feat(adjudicate): #779 persist verdicts and validate --confirm-count before any spend - #787
Merged
Merged
Conversation
…before any spend adjudicate re-spent one model call per group on every run while contradictions served persisted verdicts -- three full passes in one E2E session for the same 8 stable verdicts, one of them existing only to test the --confirm-count rail. Verdicts now persist to .openkos/findings.db (own tables beside the contradiction findings, so purge and forget's privacy sweep cover them with no new surface), keyed on each member's content hash and the run's EFFECTIVE confidential inclusion (flag OR verified local exemption). A repeat run on an unchanged bundle hands the model zero groups and reports the same served/fresh split line contradictions prints; --fresh re-judges; the store replaces superseded rows so it stays bounded by the live group set. A --confirm-count that cannot possibly match any count (empty or non-numeric) is refused before candidate discovery -- the cheapest check is no longer the most expensive step in the workflow.
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
adjudicatere-spent one LLM call per group on every invocation whilecontradictionsserved persisted verdicts — three full passes in one E2E session for the same 8 stable verdicts, one of them existing only to test the--confirm-countrail. Both halves of the issue land:(1) Persisted verdicts, served before re-judging — the option the issue calls "the one that makes the curation loop usable":
state/adjudications.py: second tenant of.openkos/findings.db(own tables, sopurge's wholesale deletion andforget's privacy sweep — extended here with the same checked-checkpoint erasure — cover it with no new privacy surface), replace semantics per group so the store stays bounded by the live group set.--include-confidentialOR the verified local-backend exemption, resolved before partitioning), carry a digest for every current member and no others, with every digest equal to the member's current content hash, and a vocabulary verdict. Anything else re-judges, conservatively; corrupt store / persist failure degrade to one advisory each.contradictions(N of M candidate group(s) served from persisted adjudications; K judged fresh.),--freshmirrorscontradictions --fresh. A fully-served repeat run hands the model zero groups (proven structurally by the seam stub).(2) The
--confirm-countrail is validated first: an empty or non-numeric value is refused (exit 2) before candidate discovery and before any model call. A numeric mismatch still aborts at the gate — and with (1), the retry it forces costs zero.Specs (entity-resolution-adjudication, forget-command) and
docs/cli.mdupdated.Verification
ruff,ruff format --check,mypy .clean.review-85caec9554ee6777approved (4R; one repair round fixed both round-1 CRITICALs — effective-inclusion serve keying and a docs table split — plus the corroborated ref-set, unbounded-growth, and unicode-digit findings).Closes #779
🤖 Generated with Claude Code
https://claude.ai/code/session_011rKLjyxsEZJtZWDCeozZhs