Skip to content

docs: wire check:examples into CI, derive the status badge, consolidate the IA - #26

Merged
Sean-Koval merged 3 commits into
mainfrom
docs/ia-and-badge
Aug 31, 2026
Merged

docs: wire check:examples into CI, derive the status badge, consolidate the IA#26
Sean-Koval merged 3 commits into
mainfrom
docs/ia-and-badge

Conversation

@Sean-Koval

Copy link
Copy Markdown
Contributor

Three cleanups that were blocked until the docs stack merged. Grouped because all three touch
docs-site/astro.config.mjs.

1 — check:examples runs in CI (756ef30)

The gate that compiles every documented Rust example existed but nothing ran it. Added to the
docs-checks job, with a Rust toolchain step since it invokes cargo.

This matters: that gate already caught a real regression on main (the get_parkinson_vol rename
left the docs referencing a dead symbol). Until now it only caught it because someone ran it by hand.

2 — The status badge is derived, not duplicated (47e1035)

The badge was injected through each page's frontmatter banner.content, because the branch that
introduced it could not touch astro.config.mjs. So the badge sat beside the status field
rather than being derived from it, and check-content-schema.mjs carried an extra rule to fail
when the two disagreed.

Now a Starlight Banner component override reads status from frontmatter directly. The badge
markup is gone from all 57 pages, removed from the generator, and the consistency rule is retired —
the two can no longer drift because there is only one source.

3 — Information architecture (5b2a746)

The same 39 modules were indexed four times under three contradicting taxonomies, with a
20-group sidebar, five groups holding a single page.

  • Sidebar collapsed 20 → 7 top-level groups: Getting Started, Setup, Workflows, Modules,
    Reference, Governance, Coverage — with AFML chapters nested inside Modules rather than at top level
  • modules/index.md is now the single canonical module index
  • module-reference/api-surfaces.md merged into it as By language surface, then deleted
  • module-reference/indexing-and-discovery.md — prose describing the sidebar — deleted, its
    discovery paths folded into the reading path
  • by-afml-chapter.md kept; the audit judged it the best page on the site

Both deleted pages were redirect targets, which is precisely the bug class that broke this site
before. Repointed: /api-reference/openquant/modules/, /search/openquant/. Verified both
resolve to files that exist.

Verification

astro build 0 (97 pages) · check-links 0 (109 files, redirects included) ·
check-content-schema 0 (57 docs: 40 generated, 6 draft, 11 reviewed) · check:examples 0
(39 examples) · check:api-drift 0 · generator idempotent.

Badge renders on 57 of 57 doc pages. check-links passing after the deletions is the
load-bearing check — it is what proves no dangling link or redirect was left behind.

Sean-Koval and others added 3 commits August 30, 2026 20:23
docs-site/package.json has shipped a check:examples gate -- it cargo-checks
every documented Rust example against the real crate -- but nothing ran it,
so a documented example could stop compiling without CI noticing.

The gate invokes cargo, so docs-checks now installs a Rust toolchain
alongside bun and carries the same CARGO_TERM_COLOR /
PYO3_USE_ABI3_FORWARD_COMPATIBILITY env that lint-test does.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VcwF3j7E2HxMc3Fnq4fmu7
The status pill was injected through each page's `banner.content`, because
the branch that added it could not touch astro.config.mjs. That put the
badge BESIDE the `status` field instead of deriving it FROM it, and needed
a rule in check-content-schema.mjs to stop the two disagreeing.

Now a Starlight `Banner` override (src/components/DocStatusBanner.astro,
registered under `components:`) reads `status` off the page and renders the
pill itself. The badge markup is gone from all 59 pages and from the
generator; the badge-consistency rule is retired -- there is nothing left to
drift. A page may still set `banner.content` of its own (index.md keeps its
Quickstart CTA); it then replaces the default sentence beside the pill.

The markup is the same `.sl-banner` element Starlight emits, so the existing
`doc-status--generated|draft|reviewed` palette in starlight.css applies
unchanged in light and dark.

Two fixes the change forced out of the freshness gate, which is what makes
the stamps mean anything:

- It treated any file change as a content change, so removing a banner line
  from frontmatter marked ten human-reviewed pages stale -- offering a
  choice between a false re-review and a status downgrade. It now falls back
  to the last commit whose *body* differs, ignoring frontmatter-only edits;
  an uncommitted body edit or unreadable history still fails strictly.
- mtimes were read in UTC while commit dates were read as local civil days,
  so every stamp made after 17:00 Pacific looked like it predated its own
  page. mtimes are now local days too.

check:examples 0 · astro build 0 (59 pages carry a pill) · check-links 0 ·
check-content-schema 0 (59 files: 40 generated, 8 draft, 11 reviewed) ·
api-drift 0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VcwF3j7E2HxMc3Fnq4fmu7
The same 39 modules were indexed four times under three taxonomies that
disagreed with each other, and the sidebar had 20 top-level groups, five of
them holding a single page.

Sidebar: 20 top-level groups -> 7 (Getting Started, Setup, Workflows,
Modules, Reference, Governance, Coverage). The 13 AFML chapter groups are
nested one level inside Modules and start collapsed, so a one-page chapter
costs a line instead of a heading; the four single-page chapter groups are
paired into 'Ch 5-7: Features & Validation' and 'Ch 8-9: Importance &
Tuning'. No module page left the sidebar.

modules/index.md is now the single canonical index, and says so. It grew a
'By language surface' section generated from moduleDocs.ts.

Deleted, with where each page went:
- module-reference/api-surfaces.md — a hand-maintained fourth index of the
  same modules. Its Rust list and Python namespace lists are now generated
  into modules/index.md from `apiSurface` and `pythonApis`, so they cannot
  drift again; the generated version is also fuller than the page was (31
  namespaces against 12). Three links in the two workflow pages and the
  '/api-reference' redirect now point at /modules/.
- module-reference/indexing-and-discovery.md — prose describing the sidebar,
  sitting in the sidebar. Its three discovery paths and its search advice
  fold into the home page's Recommended Reading Path. The '/search' redirect
  now points at the home page.

by-afml-chapter.md stays: it is the one taxonomy with editorial value.

The generator now refuses two python modules claiming one namespace, since
the index can only link a namespace to one page.

astro build 0 (97 pages) · check-links 0 (109 files, redirects included) ·
check-content-schema 0 (57 files) · check:examples 0 · api-drift 0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VcwF3j7E2HxMc3Fnq4fmu7
@Sean-Koval
Sean-Koval merged commit f375ad2 into main Aug 31, 2026
2 of 4 checks passed
@Sean-Koval
Sean-Koval deleted the docs/ia-and-badge branch August 31, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant