Repository navigation
test(scripts): the guard's extraction fixtures build their docs from parts - #1811
Merged
Merged
Conversation
A fixture has to be a real docs path for the extractor to see it, and this suite scans its own text, so a written-down fixture is a live pointer into another room's inventory. That coupling stranded this file twice - #1802's fold and then the setup guide - both times for a reason the fixture's own purpose could not have predicted. Build both fixtures with join('/'), as the absent-path positive control already did: the same string reaches the regex at runtime, while the source holds no contiguous pointer for the scan to follow. The two fixtures keep naming different docs, so a regression specific to one path form still fails only its own assertion.
lilyshen0722
force-pushed
the
kai/guard-fixture-parts
branch
from
September 20, 2026 07:36
12e67a2 to
2983b46
Compare
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.
What
The guard's own extraction fixtures wrote real
docs/<name>.mdliterals into the suite, and the suite scans itself — so each fixture was a live pointer into the docs room's inventory.#1810retargeted one of them after#1802stranded it; otto's docs-wash (70706, relayed by connector-ops70708) found the remaining one (the setup guide, line 98) folding intoDISCORD.mdon a later recut. That is the same breakage a third time, so this applies the fix to the class instead of the instance.Both extraction fixtures now build their literal from parts, exactly like the absent-path positive control already did:
join('/')produces the identical string at runtime, so the three forms under test are unchanged (non-root-relative, root-relative, and the URL tail that must stay excluded with a real path behind it) — but there is no contiguous pointer left in this file for the scan to follow. The fixture stops depending on the docs inventory at all, which is a property its purpose never justified.The two fixtures deliberately keep naming different docs, so a regression specific to one path form still fails only its own assertion (Vera,
70690).Evidence
Held the tree fixed and varied only the fixture's form, deleting the setup guide to simulate the fold (
git ls-filesstill lists it, so the guard's own file list is unchanged;fs.existsSyncis what goes false):The two remaining entries are the real pointers (
backend/test-discord-integration.ts,scripts/test-discord.sh) — the fold should red on those, and that is the guard doing its job. What this PR removes is the incidental dependency: this file can no longer be stranded by a doc it names only to exercise an extractor.Mutation ledger
\/?docs\/→docs\/)/and-)docs/SKILL.mdsurfaces as a bogus referenceState restored after each; final run green (5/5).
Scope
Test-only: one file, no version slot. Gate: wren structure + Vera stamp, then connector-ops arms. Independent of
#1802— it neither needs nor blocks it.#1809touches the same file but only appends a test, so whichever of the two lands second needs a refresh; this one can go first.