feat: pluggable triage Verifier seam (false-positive reduction, engine / Plan A)#7
Merged
Merged
Conversation
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.
Summary
Adds a pluggable
Verifierseam to the detection engine so findings can be triaged — confidently-benign findings (e.g. acurl | bashinside a fenced doc example) are demoted out of axis grading to cut false positives — without breaking the deterministic engine. Engine-only (Plan A); the LLM-backed verifier, verdict cache, tier gating, UI, and SP-7 benchmark live inskilltrust(Plan B).pkg/triage:Verifierinterface,Verdict/VerdictKey, inertNoopVerifier(default),ScriptedVerifiertest double.model.Findinggains optionalTriage *TriageVerdict(+IsSuppressed(),TriageDemoteThreshold = 0.85); nil-pointeromitempty⇒ un-triaged scans marshal byte-identically.grade.Gradeexcludes suppressed findings from the worst-severity pool; notes(N suppressed by triage)when a pool empties. Caps table /CanonicalMetadata()untouched — registry checksum unchanged (f1dcffd63faabeb3on both branches).scanner.OptionsgainsVerifier+TriageTimeout;applyTriageruns after the deterministic sort and before grading. Demote-only + fail-safe: on verifier error / deadline / ctx-cancel / unmatched verdict, findings are stampedunavailableand never suppressed (grade stays ≥ deterministic floor). Deterministic file iteration (sorted paths).SchemaVersionbumped1.2→1.3.Design:
docs/specs/2026-05-29-llm-triage-verifier-design.md· Plan:docs/plans/2026-05-29-llm-triage-verifier-engine.mdInvariants (verified in final review)
model→triageimport cycle. 6. Seam sufficient for the Plan-B LLM verifier with no engine change. 7. Schema 1.3 consistent.Test Plan
go test ./... -p 1— 660 passed, 12 packagesgo vet ./...clean;gofmtcleanDefaultRegistry().Checksum())expectedChecksumldflag at next release (schema/checksum unchanged here, but confirm at tag)