Repository navigation
test: pin the .cspell.yml word and ignorePaths contract - #1012
Merged
Merged
Conversation
cspell matches words case-insensitively unless caseSensitive is set, and .cspell.yml does not set it. Fifteen entries differed from another entry only by case and could never be the entry that allowed a word. Remove them and add tests/cspell-config.test.mjs so the allowlist cannot drift back into misrepresenting what it permits. npm run check:spelling still reports 43 files checked, 0 issues found. Signed-off-by: quality <quality@hive.kubestellar.io>
Contributor
Author
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will automatically remove the |
This was referenced Oct 3, 2026
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.
Test Improvement
Adds
tests/cspell-config.test.mjs, the first test that reads inside.cspell.yml, and removes the fifteenwords:entries it proves areunreachable.
tests/workflow-scripts.test.mjs:201already checks thatcheck:spellingpoints at a path that exists. Nothing checked what that path contains, so the
allowlist governing
npm run check:spellinghad no contract.The defect this removes
cspell matches
wordscase-insensitively unlesscaseSensitive: trueis set,and
.cspell.ymldoes not set it. These fifteen entries differ from anotherentry only by case, so none of them can ever be the entry that allows a word:
Case-insensitivity was verified against this repo's own cspell rather than
taken from the docs, in both directions:
What the test pins
versionis the string'0.2'andlanguageisen. The YAML quoting iswhat stops 0.2 parsing as a number, which cspell rejects.
wordsentry collides with an earlier one undertoLowerCase(). The sametest asserts
caseSensitiveis still unset, so opting into case sensitivitylater fails this test and forces the guard to be reconsidered rather than
silently inverted.
dictionariesincludesen_US. Without it, ordinary English has to be listedby hand and
words:stops being project vocabulary.ignorePathsstill coversnode_modules/**,build/**,package-lock.json,**/*.svgand**/*.json— machine-written files whose failures nocontributor can act on except by growing
words:.and stays silent on a genuinely distinct pair, so a green run is the config
answering rather than the helper matching nothing.
Verification
npm run check:spelling—Files checked: 43, Issues found: 0 in 0 files,unchanged from
main6ccdaac with all fifteen entries removed.TZ=UTC node --test tests/cspell-config.test.mjs— 6 pass, 0 fail.- Kyvernomakes the guard fail, naming both sides of thecollision.
npm run test:unit:coverage:check— exit 0; the new file reports100.00% lines / 100.00% regions.
npx prettier --check— clean on both changed files.Scope
No production code and no workflow files. Disjoint from every open hold-gated
PR: #1004 (
tests/ignore-file-contract.test.mjs), #1007(
.markdown-link-check.json), #1010 (tests/markdownlint-config.test.mjs),#998, #1000, #1002, #996, #989 and #991 touch no overlapping path, and none of
them reads
.cspell.yml.Related Issue
Closes #1011 — merging this leaves nothing for the issue to track: both
deliverables (the removals and the guard) land here.
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88