Skip to content

chore: share the glossary term rule between docs-impact and glossary coverage - #1211

Merged
mforce merged 1 commit into
mainfrom
chore/1204-share-term-rule
Oct 11, 2026
Merged

mforce merged 1 commit into
mainfrom
chore/1204-share-term-rule

Conversation

@mforce

@mforce mforce commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

docs-impact.mjs had its own copy of the glossary term rule from glossaryCoverage.ts. Now only one copy remains:

  • glossaryCoverage.ts owns termSections (term → section text). glossaryTerms returns its keys.
  • docs-impact.mjs imports normalise and termSections from the checkout's glossaryCoverage.ts. In CI, the checkout is the merge commit GitHub creates for the PR. The base revision is still loaded only for its SPEC_ONLY rows, so an older base without the export never matters.
  • glossaryCoverage.ts still has no imports, so Node can still load it from any revision.

Closes #1204

Docs-impact: none — CI script refactor, no user-facing strings.

Verification

All checks ran locally at 8ca0685e:

  • node --test .github/scripts/docs-impact.test.mjs: 14/14 pass.
  • npx vitest run src/routes/helpGlossary.test.ts --maxWorkers=2: 11/11 pass.
  • npm run lint and npm run typecheck in web/: clean.
  • node .github/scripts/docs-impact.mjs --base origin/main: nothing to flag.
  • Parity: glossaryTerms and termSections produce byte-identical output on the current GLOSSARY.md before and after the change (116 terms, none duplicated, so returning the Map's keys changes nothing).
  • Mutation: normalise was changed to stop dropping parentheticals. Both checks went red. docs-impact failed 3 of 14: section split, feat(web): prefill the farm code from ?farm= and remember it (#535) #588 drift and wrapped-issue-number. helpGlossary.test.ts failed 3 of 11: every spec term covered, SPEC_ONLY limited to current terms, and every entry names a spec term. With the change restored, both are green.

…coverage

docs-impact.mjs kept its own copy of the term rule. glossaryCoverage.ts now
owns termSections, glossaryTerms derives from it, and docs-impact imports it
from the checkout, so the two checks cannot read GLOSSARY.md differently.
@mforce mforce added this to the Platform hardening milestone Oct 11, 2026
@mforce

mforce commented Oct 11, 2026

Copy link
Copy Markdown
Owner Author

Review round 1 (Codex, read-only) at 8ca0685e: no findings.

  • Import works on CI. glossaryCoverage.ts uses only erasable type syntax, Node 26 runs it with no loader, and older bases only need SPEC_ONLY/NOT_YET.
  • No new trust given to the PR. The script already imported head en.ts, helpGlossary.ts and glossaryCoverage.ts. The job has only contents: read, with persist-credentials: false.
  • Duplicates. glossaryTerms now returns each name once. Its one caller checks membership and a >100 floor, so nothing relied on duplicates.
  • --head. The checker and its rule come from the running checkout, as before, and the comment says so. No guard needed.

Wording nit for the body: CI checks out GitHub's PR merge commit, not the raw head. It still works because the script and the rule come from the same checkout.

VERDICT: 0 product defects, 0 test/doc-only findings.

@mforce
mforce merged commit c9bdfaf into main Oct 11, 2026
22 of 23 checks passed
@mforce
mforce deleted the chore/1204-share-term-rule branch October 11, 2026 03:20
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.

chore: share the glossary-term rule between docs-impact and glossary coverage

1 participant