Repository navigation
test: pin the .vscode/settings.json exclude contract - #1016
Merged
Merged
Conversation
.vscode/settings.json was the last developer-environment entry point with nothing reading it, and it had drifted in both directions: it excluded .docker/, vendor, /resources and /themes/docsy -- the layout of the Hugo site that preceded this one, none of which exist in the checkout -- while every directory this repo generates (build/, .docusaurus, coverage, test-results, playwright-report) was searched and watched. It also hid **/.vscode from the explorer, so the stale file was invisible to the contributors it misconfigured. Rewrite the file to exclude what the repo actually produces, and extend tests/dev-environment.test.mjs -- which already owns Justfile and devcontainer.json for the same reason -- with three guards: no excluded path may be absent from the checkout and ungitignored, every generated directory must be excluded from search and the watcher, and files.exclude may not hide .vscode. All three fail against the previous file. The first guard also caught .DS_Store being watcher-excluded but never gitignored, so add it to .gitignore. 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 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
.vscode/settings.jsonwas the last developer-environment entry point with notest reading it, and it had drifted in both directions at once.
What it excluded, none of which exists here.
.docker/,vendor,/resourcesand/themes/docsyare the layout of the Hugo + Docsy site thatpreceded this one. All four are absent from the checkout, so VS Code silently
discarded every one of them. The fifth,
"**/.vscode": trueinfiles.exclude,hid the settings file from the explorer — which is how it stayed wrong.
What it did not exclude. Every directory the repo writes and
.gitignoreignores —
build/,.docusaurus,coverage,test-results,playwright-report— appeared in none of the three maps. After the build ande2e commands
CONTRIBUTINGtells a contributor to run, VS Code search returnedhits out of the generated bundle and the Playwright report, and the watcher
walked both trees.
Changes
.vscode/settings.json— rewritten to exclude what this repo actuallyproduces.
tests/dev-environment.test.mjs— extended rather than duplicated: this filealready owns
Justfileand.devcontainer/devcontainer.jsonfor exactly thisreason, and already has the
stripJsonComments()andgit check-ignoremachinery the new assertions need. Four tests:
must exist in the checkout or be gitignored;
search.excludeandfiles.watcherExclude;can never demand that tracked files be hidden;
files.excludedoes not hide.vscode.Tests 1, 2 and 4 each fail against the previous file and pass against the new
one; verified by stashing the config change and re-running:
.gitignore— one line. Test 1 caught**/.DS_Storebeing watcher-excludedbut never gitignored, which is a real gap for anyone on macOS. Adding it is
what makes the invariant hold without carving an exception into the test.
Note on the
git check-ignoreprobe.gitignore:10is/build/. A directory-only rule does not match the barepathname
build, and a file rule such as.DS_Storedoes not match.DS_Store/—check-ignorematches rules against the pathname's shape, notagainst the filesystem. The helper therefore probes both forms.
Verification
TZ=UTC node --test tests/dev-environment.test.mjs— 16/16 passTZ=UTC node --test— 1786 tests, 0 failnpm run test:unit:coverage:check— exit 0 (--check 99 --check-source 100 --check-regions 94 --check-source-regions 99)npx prettier --checkon every changed file — cleanScope / overlap
Touches
.vscode/settings.json,tests/dev-environment.test.mjsand.gitignore. Disjoint from every open hold-gated PR: #1004 reads.prettierignore/.markdownlintignorein a newtests/ignore-file-contract.test.mjsand asserts nothing about.gitignoreor.vscode; #1007, #1010, #1012, #1014, #996, #989, #991, #998, #1000 and #1002touch none of these three files. Branch cut from
origin/mainat 6ccdaac.Related Issue
Closes #1015
Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88