Repository navigation
Description
stale-path-verify (shipped in #1432) adjudicates a citation by matching it against the set of paths git log HEAD --no-renames --diff-filter=D --name-only reports. Four review-raised cases show that set, or the candidate extraction feeding it, is narrower than the real git states a repository can be in. Each is a silent false negative: the guard stays quiet on a citation that satisfies its own provenance contract.
They are grouped into one issue because they share a resolution gate, not because they share a mechanism.
The four
-
Deleted paths containing whitespace.
normalize_candidaterejects any token containing whitespace, so`docs/old guide.md`never reaches the provenance set. The whitespace rule exists because a code span often holds a whole command; the exact deletion-history lookup could distinguish a spaced path from a command span, but does not get the chance. -
Deleted directories.
normalize_candidateexplicitly admits a trailing-slash candidate (docs/old/), but git tracks files, so the history walk only ever containsdocs/old/a.md.DELETED["docs/old/"]can never be set, which makes the trailing-slash branch inert by construction. Either derive deleted ancestor directories from the file entries, or stop admitting the candidate shape. -
Non-ASCII paths. With git's default
core.quotePath,--name-onlyemits"docs/caf\303\251.md"rather than the literal UTF-8 name, so the associative-array key never matches a literal citation.-c core.quotePath=false, and preferably NUL-delimited output, is the machine-safe form — see https://git-scm.com/docs/git-config#Documentation/git-config.txt-corequotePath. -
Deletions introduced by merge commits.
git logdoes not emit merge-commit diffs by default, so a path deleted while resolving a merge — present in both parents, absent in the result — never enters the set.--diff-mergesis the documented option: https://git-scm.com/docs/git-log#Documentation/git-log.txt--m.
Why these are deferred rather than folded into #1432
#1432's entire justification is a measured envelope: 0.20% firing at 50% precision across the full tracked-markdown corpus, deliberately sized against the shipped sibling skill-reference-verify (0.51%/57%). All four fixes widen what the guard fires on. Landing any of them makes the number in that PR's body and in the 0.17.0 CHANGELOG entry stop describing the shipped guard.
Item 4 is the one to weigh first: --diff-merges can enlarge the deleted-path set substantially in a squash-and-merge repository, and this repository squash-merges. That is a candidate for a materially different firing rate, not a rounding change.
Acceptance
- Each item fixed or explicitly declined with a recorded reason.
- A re-measured firing rate and precision against the same full-corpus sweep, reported per item and in aggregate, compared against the 0.20%/50% baseline.
- Behavioral test cases for each admitted case, in both the fires and stays-quiet directions.
- If the aggregate lands outside the sibling guard's regime, a decision on whether the guard stays advisory-on by default.
Related
- feat(guardrails): rescope the withdrawn path guard onto a provenance gate #1432 — shipped the provenance gate; the deferral is recorded in its review threads
- guardrails: rescope asserted-path-verify — 23.7% firing rate, zero true positives on a full-corpus sweep #1314 — the rescope issue feat(guardrails): rescope the withdrawn path guard onto a provenance gate #1432 closes
- guardrails: stale-path-verify cannot see a deleted root-level path #1446 — the same shape for deleted root-level paths, filed separately because its blocker is ambiguity rather than measurement alone
Activity