Repository navigation
chore: share the glossary term rule between docs-impact and glossary coverage - #1211
Merged
Merged
Conversation
…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.
Owner
Author
|
Review round 1 (Codex, read-only) at
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs-impact.mjshad its own copy of the glossary term rule fromglossaryCoverage.ts. Now only one copy remains:glossaryCoverage.tsownstermSections(term → section text).glossaryTermsreturns its keys.docs-impact.mjsimportsnormaliseandtermSectionsfrom the checkout'sglossaryCoverage.ts. In CI, the checkout is the merge commit GitHub creates for the PR. The base revision is still loaded only for itsSPEC_ONLYrows, so an older base without the export never matters.glossaryCoverage.tsstill 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 lintandnpm run typecheckinweb/: clean.node .github/scripts/docs-impact.mjs --base origin/main:nothing to flag.glossaryTermsandtermSectionsproduce byte-identical output on the currentGLOSSARY.mdbefore and after the change (116 terms, none duplicated, so returning the Map's keys changes nothing).normalisewas 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.tsfailed 3 of 11: every spec term covered,SPEC_ONLYlimited to current terms, and every entry names a spec term. With the change restored, both are green.