Development record
guard check's also-matched line assumes Matches[0] is the winner, so a synthetic block over registry warns silently drops the matched warn entry and echoes the winner twice
issueresolvedminoriss-346
guard check's also-matched line assumes Matches[0] is the winner, so a synthetic block over registry warns silently drops the matched warn entry and echoes the winner twice
Evidence
internal/surface/cli/guard.go:335rendersdec.Matches[1:]as "also matched", butMatchesis ordered blockers, warns, synthetics (internal/core/guard/guard.go:441, contract documented at:155-158) — winner-first holds except when a synthetic block wins over registry warns.- Reproduced:
guard check --command 'git clean -fd && env -S "a$b"'blocks onexecute-string-uninspectable, prints "also matched: execute-string-uninspectable" (the winner, twice) and omitsgit-clean; the JSON plane showsmatches: ["git-clean","execute-string-uninspectable"]. - Refuter verdict: CONFIRMED substantive (low end — report integrity in a safety tool; exit code and JSON unaffected). Fix is display-only: filter by
id != dec.EntryID; do not reorder coreMatches(the corpus warn-rate gate reads it).
Frontmatter
| id | iss-346 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-346-guard-check-s-also-matched-line-assumes.md
open on GitHub ↗ · commit history ↗
mentions1
- dcn-26082000000000022026-08-20 — bughunt round 2 (branch bughunt-b/round-2): captured the round-2 records (iss-346..iss-357, with the two colliding ids re-minted as iss-358/iss-359), fixed