Repository navigation
feat: verified findings backend (S1) - #162
Merged
Merged
Conversation
Add a machine-checked verification state to findings, separate from the human disposition (status). A finding is verified only when a proof or verification traffic body is bound, the agent declares POE L3 or higher, and every evidence quote appears verbatim, after whitespace normalization, in one of those response bodies. - schema: poe_level, verification_status, verification_note on findings (idempotent ADD COLUMN IF NOT EXISTS, no CHECK, no backfill). - db: SetFindingVerification validates status and POE 0-4; the three fields are scanned with the finding rows and exposed in the DTO. - update_finding_report: optional poe_level and evidence_quotes. The report is always saved; verification only decides the status. Read failures give not_assessed, never unverified. - report agent guidance: declare POE and exact quotes from the bound body. Not in this change: UI badges and filters, the blocked and false_positive transitions, and the stored default report prompt for existing databases (the guidance is appended at run time).
A two-character quote such as "x7" can exist in any body and proves nothing. Normalized quotes under 8 runes are now ignored; if none remain the finding is unverified with the note "evidence quote too short". Check order is unchanged: binding, POE, quote presence, then body.
The quote x7 is now rejected as too short before the store is read, so the test never reached the not_assessed path. Use a quote long enough to pass the minimum; the store removal is unchanged.
This was referenced Nov 9, 2026
Merged
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
Backend for machine-checked finding verification (spec S1). A finding is
verifiedonly when:prooforverificationtraffic body is bound,poe_level>= 3,evidence_quotesentry of at least 8 runes (after whitespace normalization) appears verbatim in one of those response bodies.Shorter quotes are ignored; if none remain the finding is
unverifiedwith the noteevidence quote too short. Everything else isunverified(with a note), ornot_assessedwhen a read fails. The report is always saved; a downgrade is reported in the tool result.Changes
poe_level,verification_status,verification_noteonfindings(idempotent, no CHECK, no backfill: existing rows stayunverified).SetFindingVerification(validates status and POE 0-4); fields scanned with finding rows and exposed in the DTO.update_finding_report: optionalpoe_levelandevidence_quotes; one-time schema upgrade for existing databases.Status values
verified,unverified,not_assessedare produced by this PR.blockedis accepted by the validator but no path produces it yet; reserved for S1b (external control prevented exploitation).false_positiveis accepted but no path produces it, and it duplicates the human dispositionfindings.status = false_positive. The human disposition stays instatus; this column is the machine proof state only.Known limit
readBoundResponsereads every proof/verification body, up to 4 MiB each. A finding with many large bindings does more I/O than necessary; bounded by the cap, not by the number of bindings.Not in this PR
unverifieduntil S1b.Verification
go build ./...,go vet: pass locally. Non-Postgres tests: pass locally.TestVerification*server tests need Postgres: they run in CI only.Do not merge before
go,shellandwebare green on the exact head SHA.