Repository navigation
Description
Metadata
Parent: #1807
Related cleanup umbrella: #2177
Related assertion substrate: #1883
Related archive-debt cockpit: #2179
Status: implementation PR in flight.
Purpose
Add an explicit promotion workflow for candidate assertions.
Polylogue assertions now cover marks, annotations, corrections, suppressions, decisions, caveats, blockers, lessons, handoffs, run state, prompt evals, and transform candidates. Candidate assertions can be stored and queried, but they need a first-class workflow for reviewing a candidate claim, accepting it into active assertion state, rejecting it with a durable reason, deferring it, or superseding it with an operator-authored replacement.
The authority model is intentionally small:
candidate assertion -> explicit judgment assertion -> active / rejected / deferred / superseded lifecycle
Confidence is not authority. A model- or transform-produced candidate must not silently become durable active truth without an explicit judgment path.
Current code reality
The relevant live substrate is:
polylogue/storage/sqlite/archive_tiers/user_write.pyowns assertion writes, lifecycle defaults, transform-candidate writes, and candidate listing/judgment helpers.polylogue/surfaces/payloads.pyowns shared assertion and archive-debt payloads.polylogue/api/archive.pyis the Python facade surface.polylogue/cli/commands/user_state.pyowns the current user-tier operational surface underpolylogue ops state.polylogue/operations/archive_debt.pyowns the unified operator debt projection from feat(ops): expose unified archive debt views across import, index, embedding, and transforms #2179.docs/search.mdowns assertion query and lifecycle docs.
Assertions already support status=active,candidate, kind=transform_candidate, private/no-inject defaults, and terminal unit queries such as:
polylogue assertions where 'status:candidate AND target:session:codex-session:abc123' --format jsonThe missing workflow is:
list candidates needing judgment
accept candidate -> active assertion with candidate/evidence provenance
reject candidate -> rejected candidate + judgment reason
supersede candidate -> active replacement assertion with supersedes lineage
defer candidate -> keep candidate pending but record explicit judgment
show candidates as actionable archive debt rows
Chosen surface
Do not create a new root command and do not revive a separate memory/KV/user-state system. The workflow belongs under the existing ops-state surface:
polylogue ops state candidates list --target-ref session:... --format json
polylogue ops state candidates accept assertion:candidate-id --reason TEXT --format json
polylogue ops state candidates reject assertion:candidate-id --reason TEXT --format json
polylogue ops state candidates defer assertion:candidate-id --reason TEXT --format json
polylogue ops state candidates supersede assertion:candidate-id --kind summary --body TEXT --format jsonMachine surface:
await archive.list_assertion_candidates(target_ref=..., limit=...)
await archive.judge_assertion_candidate(
"assertion:candidate-id",
decision="accept" | "reject" | "defer" | "supersede",
reason="...",
)Archive-debt surface:
polylogue ops debt list --kind assertion-candidate --only-actionable --format jsonCandidate rows in archive debt should be kind=assertion-candidate, stage=candidate-judgment, owner=user, and action back to polylogue ops state candidates list --format json.
Storage and payload design
Use assertions as the storage substrate. Prefer judgment rows over a new table unless source inspection proves assertion rows cannot represent the lifecycle cleanly.
Concrete storage expectations:
- A judgment is an assertion row with kind
judgment, targetassertion:<candidate-id>, private visibility, andcontext_policy.inject=false. acceptandsupersedecreate an active assertion whose evidence refs include the original candidate assertion ref.- Active promoted assertions use
supersedes=("assertion:<candidate-id>",)so readers can traverse lineage. rejectanddeferpreserve the judgment reason and never erase the original candidate evidence.- Candidates stay private/no-inject unless a later surface explicitly opts into candidate context.
Payload expectations:
AssertionJudgmentPayload:
assertion_id: str
candidate_ref: str
decision: Literal["accept", "reject", "defer", "supersede"]
reason: str | None
actor_ref: str
resulting_assertion_ref: str | None
value: object | None
created_at_ms: int
AssertionJudgmentResultPayload:
candidate: AssertionClaimPayload
judgment: AssertionJudgmentPayload
resulting_assertion: AssertionClaimPayload | NoneAcceptance criteria
- Candidate assertions can be listed with evidence, lifecycle, target, and context-policy fields.
- A candidate can be accepted into an active assertion without losing original candidate/evidence provenance.
- A candidate can be rejected with a reason and later read as rejected when non-active statuses are requested.
- A candidate can be superseded by a replacement assertion, with candidate -> active assertion lineage represented by refs.
- CLI and Python API expose list and judgment workflows.
- Candidate rows appear in the feat(ops): expose unified archive debt views across import, index, embedding, and transforms #2179 archive-debt cockpit as actionable debt.
- Context compiler/read surfaces continue to default candidate/no-inject behavior unless promotion policy changes it explicitly.
- Docs explain candidate, judgment, active, rejected, deferred, and superseded lifecycle semantics.
Required tests
Keep tests behavioral; do not add absence/rename memorial tests.
Storage:
tests/unit/storage/test_archive_tiers_assertions.py::test_candidate_assertion_acceptance_creates_active_assertion_with_lineagetests/unit/storage/test_archive_tiers_assertions.py::test_candidate_assertion_rejection_preserves_reason_and_filteringtests/unit/storage/test_archive_tiers_assertions.py::test_candidate_assertion_supersede_records_replacement_and_lineage
API:
tests/unit/api/test_facade_contracts.py::test_facade_judges_candidate_assertion_in_user_tiertests/unit/api/test_facade_contracts.py::test_no_undiscovered_async_methods
CLI:
tests/unit/cli/test_assertion_candidates.pyfor JSON list and judgment smoke.
Archive debt:
tests/unit/operations/test_archive_debt.py::test_archive_debt_reports_candidate_assertions_as_actionable
Generated surfaces:
devtools render all --checkdevtools verify --quick
Non-goals
- Do not build a full project-management approval system.
- Do not add a new root command.
- Do not auto-promote candidates based on confidence alone.
- Do not block or reopen Unify user overlays as evidence-linked assertions #1883 unless source inspection proves assertion storage itself is incomplete.
- Do not create a parallel memory, KV, or user-state truth system.
Forensic audit reinforcement
The 2026-06-19 static audit treats #1883 as closeable for the assertion substrate after lifecycle/defaults/terminal-row work. This issue owns the remaining product workflow: candidate promotion through explicit judgment.
This workflow should also help retire older user-state overlay semantics cleanly. Candidate claims, marks, corrections, caveats, lessons, and decisions should converge on assertion lifecycle plus explicit operator judgment rather than reviving a separate memory/KV/user-state system.
Activity
feat(assertions): add candidate judgment workflow (#2182) (#2204)
fix(assertions): finish candidate judgment catalogs (#2182) (#2205)
Sinity commentedon Jun 21, 2026
Closure-integrity note from the current issue audit: the implementation surface appears to be
polylogue mark candidates ..., not the olderpolylogue ops state candidates ...path described in this issue body.I am not reopening this issue on that basis because the behavior exists under the better current owner. But future readers should treat the
ops state candidatesexamples in the body as superseded by:The durable cleanup owner is reopened #1883: assertion-backed public vocabulary still needs to be synchronized around candidate judgment, blackboard/note naming, and the remaining
user-stateadapter names.feat(insights): emit pathology findings as candidate assertions (#2383)…