Skip to content

docs(#1610): split services.md into a page per plugin, redirect old anchors, terse CHANGELOG rule - #1670

Merged
scttfrdmn merged 2 commits into
mainfrom
docs/v0132-services-split
Nov 24, 2026
Merged

scttfrdmn merged 2 commits into
mainfrom
docs/v0132-services-split

Conversation

@scttfrdmn

@scttfrdmn scttfrdmn commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Fixes #1610

The operation tables stay hand-written and asserted rather than generated; the reasons are on #1610 (comment).

  • Split. docs/services.md (28.7k lines) is now the index: the generated coverage matrix, whose rows link to the pages, and a list of concept pages. There are 68 plugin pages at docs/reference/<plugin>.md, named by registry name, and 6 concept pages under docs/reference/concepts/: routing, errors, accounts, listing-order, seeds-and-replay and fault-injection. A one-off script did the split and is not committed. Every page has one # title. A single-section page's headings move up one level, so the outline shows them and their anchors keep the same text.
  • Links. 867 in-page links were rewritten: 698 stay on their page and 169 now cross pages as /reference/<page>#anchor. 55 links (27 anchors) were dead under VitePress's slugger because they were written as GitHub-style slugs (a-roles for "a role's"). They are fixed, including one whose heading had been reworded. One paragraph sat directly on a --- and rendered as an h2. It now has a blank line. Inbound links in README, index.md, testing-guide.md, getting-started.md (this also resolves the stale TODO(#178)) and fidelity.md are updated. The cfn_validate.go strict-mode message now names docs/reference/cloudformation.md; no other Go comment is touched.
  • Old URLs. docs/.vitepress/legacy-anchors.json maps each of the 908 anchors services.md served at v0.131.0 below its matrix to the page that holds the heading now. Rebased onto chore(#1611): remove the Docker executors, spawn_control and ReplayCfg.RandomSeed #1668: the three headings it replaced map to their successors (#docker-execution-runs-an-image-never-a-zip and #which-operations-drop-a-warm-container to Lambda's "Invoke answers a seed or a stub", #task-completion-records to S3's "Seeded objects"). The key set is unchanged. A <script setup> in services.md reads location.hash on mount and on hashchange, and looks it up with Object.hasOwn (so #constructor stays put). It calls history.replaceState, then router.go(withBase(target)), so Back does not bounce. Verified in headless Chrome against vitepress preview: /services#supported-operations-17 lands on /reference/eventbridge#supported-operations, scrolled, with history.length unchanged. #strict-mode-and-template-validation and the STS trust-policy anchor land the same way, and #coverage-matrix and an unknown anchor stay put.
  • Gates.
    • gen-service-reference also writes docs/.vitepress/services-sidebar.json, which config.mts imports, and -check diffs it. It holds the Services group (one entry per plugin) and the Concepts group (one per docs/reference/concepts/*.md), each labeled with the page's # title, so a renamed or added page fails the check until it is regenerated.
    • -check now refuses a change to the legacy map's key set (pinned by count and SHA-256) and any entry whose target page or anchor is gone.
    • It also refuses any link between docs pages (inline links, reference definitions and href=, fragments percent-decoded) that names a missing page or anchor. Fragments are heading ids, id= on any element and name= on <a>. The Go port of VitePress 1.6's heading ids follows markdown-it's inline parse (emphasis pairing, strikethrough, images, reference links), the attrs plugin's trailing {#id}, and the emoji plugin. It matched VitePress on all 1,013 anchors in docs/ and the 909 in the old monolith. testdata/headings.golden.json and the embedded emoji.json are written by VitePress itself (make docs-anchor-fixtures, dev-only, needs npm ci in docs/), so the expected ids are VitePress's, not a reading of it.
    • check-operation-docs reads docs/reference/*.md and drops the docSections map. It fails on a plugin with no page and on an orphan page, and gains -scaffold <plugin>.
    • check-docs-headings.sh checks one # per page, no duplicate titles, and no repeated ## within a page, and has a --self-test. Its fences, and check-operation-docs', close only on the opening character at the opening length, as CommonMark has it; the self-test passes under macOS awk and Ubuntu's mawk.
    • check-doc-counts.sh scans docs/reference/** in services-md mode, with mode self-tests.
    • The link-check replacementPatterns maps multi-segment routes to {{BASEURL}}/docs/<route>.md. I verified it locally with markdown-link-check 3.8.7, the action's version, including a negative case.
    • The Makefile help strings and the ci.yml step names are updated.
  • Changelog rule. CLAUDE.md's Changelog section now asks for one bullet per issue in about 25 words or fewer (- <Service>: <what changed> (#N).), plus ### Compatibility whenever a consumer must act. Reasoning goes in the PR or issue body.
    • Release step 4 reuses those bullets, and its footer points at the PRs and issues.
    • The PR-body convention and the error-text rule now point provenance at the PR body.
    • The Key-files row no longer calls services.md "Generated".
    • The PR template is updated.
  • golang.org/x/text moves from indirect to direct in go.mod, for the slugger's NFKD. It is the same version, and test/e2e is unchanged after a tidy.

The routed-operation catalog is unchanged at 1,128.

Links the Markdown link check may flag until merge. README links to docs/reference/ on main, and so do the /reference/... routes. The README links are relative file links, and the routes are checked as local files, so neither should fail. Any absolute github.com link to a file that only exists after merge would fail; this PR adds none.

Gates run locally: make lint test e2e, make operation-catalog-check docs-reference-check docs-headings-check operation-docs-check authz-reference-check cfn-schema-check, make wire-bookkeeping-check discarded-unmarshal-check discarded-marshal-check discarded-state-check nondeterminism-check, make docs-versions docs-counts-check, make iac-e2e (SUBSTRATE_IAC=1), the self-tests of both scripts, the VitePress build, vitepress preview with headless Chrome for the redirect, and markdown-link-check 3.8.7 offline across README and docs/.

@scttfrdmn scttfrdmn added this to the v0.132.0 milestone Nov 24, 2026
@scttfrdmn scttfrdmn added type: docs Documentation only area: docs Documentation site, README, CHANGELOG labels Nov 24, 2026
@codecov

codecov Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.93939% with 40 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/gen-service-reference/anchors.go 93.56% 24 Missing ⚠️
cmd/gen-service-reference/main.go 90.36% 8 Missing ⚠️
cmd/gen-service-reference/links.go 95.08% 6 Missing ⚠️
cmd/check-operation-docs/main.go 97.56% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

…nchors, terse CHANGELOG rule

docs/services.md becomes the index (generated matrix linking each plugin's page and
the concept pages). 68 plugin pages at docs/reference/<plugin>.md and 6 concept pages
under docs/reference/concepts/. Cross-section links rewritten to /reference/ URLs and
55 dead GitHub-style anchors fixed. A frozen legacy-anchors.json and a client-side
redirect keep old /services#<anchor> links landing.

gen-service-reference also writes the services sidebar and checks the legacy map and
every docs link's anchor; check-operation-docs reads docs/reference/*.md (no hand map,
orphan and missing pages fail, -scaffold); heading and count checks cover the pages.
…e; sidebar from page titles; review fixes

- headingText follows markdown-it's inline parse: emphasis pairing (balance_pairs),
  strikethrough, images dropped, reference links, a trailing {#id}, and the emoji
  plugin's shortcodes and shortcuts. testdata/headings.golden.json and emoji.json are
  written by VitePress itself (make docs-anchor-fixtures).
- Fragments: id= on any element, name= on <a>. Links: reference definitions, href=,
  percent-decoded fragments.
- Fences close on the opening character and length in check-docs-headings.sh and
  check-operation-docs.
- The sidebar's Services and Concepts groups are generated, labeled by page title.
- The redirect checks Object.hasOwn, so #constructor stays put.
- CHANGELOG follows the terse rule; Compatibility is a listed section in CLAUDE.md; the
  contributing checklist carries the PR template's wording.
@scttfrdmn
scttfrdmn force-pushed the docs/v0132-services-split branch from 6fe455f to c475162 Compare November 24, 2026 03:23
@scttfrdmn
scttfrdmn merged commit bcff881 into main Nov 24, 2026
20 checks passed
@scttfrdmn
scttfrdmn deleted the docs/v0132-services-split branch November 24, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Documentation site, README, CHANGELOG type: docs Documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs diet: split services.md per service with generated operation tables; terse CHANGELOG entries

1 participant