Skip to content

feat(adjudicate): #779 persist verdicts and validate --confirm-count before any spend - #787

Merged
jasonssdev merged 1 commit into
mainfrom
fix/779-adjudicate-persists-verdicts
Aug 19, 2026
Merged

feat(adjudicate): #779 persist verdicts and validate --confirm-count before any spend#787
jasonssdev merged 1 commit into
mainfrom
fix/779-adjudicate-persists-verdicts

Conversation

@jasonssdev

Copy link
Copy Markdown
Owner

Summary

adjudicate re-spent one LLM call per group on every invocation 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. 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":

  • New state/adjudications.py: second tenant of .openkos/findings.db (own tables, so purge's wholesale deletion and forget'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.
  • Serve gate: latest row must match the run's effective confidential inclusion (--include-confidential OR 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.
  • Split line mirrors contradictions (N of M candidate group(s) served from persisted adjudications; K judged fresh.), --fresh mirrors contradictions --fresh. A fully-served repeat run hands the model zero groups (proven structurally by the seam stub).

(2) The --confirm-count rail 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.md updated.

Verification

  • Full suite: 5169 passed, 1 skipped. ruff, ruff format --check, mypy . clean.
  • 14 new tests (5 store, 9 CLI); 12 pre-existing tests migrated to the persistence contract.
  • Gentle AI review: lineage review-85caec9554ee6777 approved (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

…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.
@jasonssdev
jasonssdev merged commit 8ded182 into main Aug 19, 2026
6 checks passed
@jasonssdev
jasonssdev deleted the fix/779-adjudicate-persists-verdicts branch August 19, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

adjudicate: re-spends one LLM call per group on every run while contradictions persists its verdicts -- and the --confirm-count rail is validated last

1 participant