feat(engine): fixture-path dead links are SKIP, not WARN
A file living under test/, tests/, fixtures/, or a *golden* path is presumed to break its own links on purpose. nav-golden-escape/bundle/ index.md's deliberate `../../../../etc/passwd` escape pops the whole base path instead of resolving to null, so it read as a genuine WARN against three repos in the org — the check was at fault, not them. The finding still fires, as LINK-INTERNAL-FIXTURE at SKIP with file and line, so it is never silently dropped. Measured before shipping: 16 LINK-INTERNAL-* findings before, 16 after, across all 20 local clones — every one converted 1:1, none disappeared. 135 tests (was 129).
This commit is contained in:
parent
43a8d28f00
commit
9eb210bb01
4 changed files with 105 additions and 8 deletions
12
CLAUDE.md
12
CLAUDE.md
|
|
@ -80,6 +80,16 @@ would recreate, in data, exactly the drift this plugin exists to remove.
|
|||
root it is a `WARN`: that is where session plans, agent working files and
|
||||
path-traversal fixtures with deliberately invalid targets live. Measured, 30
|
||||
of 43 findings were down there and all were `ERROR`s.
|
||||
- **A fixture-path dead link is `SKIP`, not `WARN` — and never silently
|
||||
dropped.** `test/`, `tests/`, `fixtures/` (exact segment) and `*golden*`
|
||||
(substring) mark a path as presumed intentional; the finding still fires as
|
||||
`LINK-INTERNAL-FIXTURE` with its file and line, it just isn't judged.
|
||||
Grounded in `nav-golden-escape/bundle/index.md`'s deliberate
|
||||
`../../../../etc/passwd` escape: the deep `..` pops the whole base path
|
||||
rather than resolving to `null`, so it read as a genuine `WARN` — third tool
|
||||
in the org to hit this exact pattern, which is the signal the check was at
|
||||
fault. Measured before shipping: 16 findings before, 16 after, across all 20
|
||||
local clones — every one converted 1:1, none disappeared.
|
||||
- **A repo's name is its remote, not its directory.** `catalog/` holds
|
||||
`ktg-plugin-marketplace`. The basename left it unregistered with zero checks
|
||||
run, against the one repo every catalog rule depends on.
|
||||
|
|
@ -89,7 +99,7 @@ would recreate, in data, exactly the drift this plugin exists to remove.
|
|||
## Commands
|
||||
|
||||
```bash
|
||||
npm test # 129 tests
|
||||
npm test # 135 tests
|
||||
node scripts/repo-standard-check.mjs --dir "$PWD" # gate one repo
|
||||
node scripts/repo-standard-check.mjs --offline # no network call
|
||||
node scripts/repo-standard-check.mjs --json # machine output
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue