Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
docs: bind withdrawn verdict format to its acceptance [V2,H3]
Corey Olson3c67e830ee30
diff --git a/docs/formats.md b/docs/formats.mdindex 5d3d4970..11b02906 100644--- a/docs/formats.md+++ b/docs/formats.md@@ -425,7 +425,7 @@ The `event` table is a SQLite schema object governed by `SCHEMA_VERSION`; its ap| `reserve` | reviewer | `until` || `accept` | reviewer | `reason`, `commit`, engine-20 `implies`, engine-33 `review`, engine-68 `note` || `reject` | reviewer | `reason`, `commit`, engine-20 `implies`, engine-33 `review` |-| `reopen` | coordinator | `commit`, `note`, `judgment`, engine-10 `supersedes`, `landingFailure`, engine-30 `cause`, engine-52 `conflict` |+| `reopen` | coordinator, or reviewer | `commit`, `note`, `judgment`, engine-10 `supersedes`, `landingFailure`, engine-30 `cause`, engine-52 `conflict`, `withdrawnVerdict` || `merged` | coordinator | `commit` || `landing_batch` | coordinator | `batch` || `landing-review-moved` | coordinator | `code`, `batch`, `verdict`, `checked`, `landed` |@@ -464,6 +464,8 @@ A CLI `accept` event includes `check: "none"` when no frozen item check ran or `An engine-10 `reopen` of a verified item adds `supersedes` with the earlier accept event id and `landingFailure` with `{batch, tests: [{file, name}], mergeCommit}`. For a recorded red batch, `batch` is its id and the tests and merge commit come from that batch. For a hand-run landing, `batch` is `null`; the coordinator's note supplies a test path and name plus merge commit, which are recorded without checking that commit against the repository. The accept event and verdict row remain append-only, and merged items cannot be reopened. Engine-8 and engine-9 `reopen` events keep their original `{commit, note, judgment}` detail and submitted-only behavior.+A `reopen` with `withdrawVerdict: true` records `withdrawnVerdict: {verdictId, acceptEventId}` for the exact current acceptance withdrawn by its accepting reviewer or the coordinator, and `supersedes` names that same accept event. The original verdict row and accept event remain immutable; history derives their withdrawn state from this binding, without rewriting earlier records or reviving an older acceptance. A later fresh acceptance can become current. This flag requires the verdict-withdraw feature engine; ordinary reopen records and older recorded moves keep their original meaning.+Item facts use the existing append-only `event` table and event-log version 1. A `fact` event's actor and timestamp stamp its author and time; its detail carries a stable string `id`, typed `kind`, exact `text`, optional `ref` binding or `null`, and superseded fact id or `null`. Allowed kinds are `capture`, `measurement`, `note`, `diff`, `decision`, `rejection`, `supersession` and `root-cause`. Judgement kinds and any correction using `supersedes` require the item's live holder or the coordinator. A correction must refer to a fact on the same item; it adds a new event and preserves every earlier fact.A binding is `{path, start, end, commit}`: a relative repository path, a positive ascending inclusive line range and a full 40-character hexadecimal commit id. It identifies code without storing source or requiring Git on a replica. Fact ids are generated UUIDs locally. A sealed `appendFact` operation uses its executable move id as its fact id, so replicas keep corrections bound to the same fact even when local event sequence ids differ. Native export/import retains these event rows without a separate fact table or schema upgrade.diff --git a/docs/formats.test.js b/docs/formats.test.jsindex 26b17b85..be4232ff 100644--- a/docs/formats.test.js+++ b/docs/formats.test.js@@ -391,6 +391,23 @@ function recordEventContract() {verify(board, conflicting, { agentId: reviewer, decision: 'ACCEPT', reason: ACCEPT_REASON, note: 'checked the conflicting example', head: conflictingCommit, digest: 'conflicting', policy: 'agents' });reopen(board, conflicting, { agentId: coordinator, conflict: { files: ['docs/formats.md'], trunk: '2'.repeat(40) } });+ const withdrawnAcceptance = addItem(board, { by: coordinator, lane: 'docs', title: 'Withdrawn acceptance example' });+ claim(board, withdrawnAcceptance, { agentId: returnedBuilder, lane: 'docs', leaseMs: 60_000, freeze: freeze('withdrawn-acceptance') });+ const withdrawnCommit = '3'.repeat(40);+ submitFixture(board, withdrawnAcceptance, { agentId: returnedBuilder, commit: withdrawnCommit, tree: 'e'.repeat(40) });+ verify(board, withdrawnAcceptance, { agentId: reviewer, decision: 'ACCEPT', reason: ACCEPT_REASON,+ note: 'checked the withdrawal format example', head: withdrawnCommit, digest: 'withdrawn-acceptance', policy: 'agents' });+ const originalVerdict = board.db.prepare('SELECT * FROM verdict WHERE item_id = ?').get(withdrawnAcceptance);+ const originalAccept = events(board).findLast(row => row.item_id === withdrawnAcceptance && row.event_kind === 'accept');+ reopen(board, withdrawnAcceptance, { agentId: reviewer, withdrawVerdict: true, note: 'correct the accepted interpretation' });+ const withdrawalDetail = JSON.parse(events(board).findLast(row => row.item_id === withdrawnAcceptance && row.event_kind === 'reopen').event_detail);+ assert.deepEqual(withdrawalDetail.withdrawnVerdict, { verdictId: originalVerdict.verdict_id, acceptEventId: originalAccept.event_id });+ assert.equal(withdrawalDetail.supersedes, originalAccept.event_id);+ assert.deepEqual(board.db.prepare('SELECT * FROM verdict WHERE item_id = ?').get(withdrawnAcceptance), originalVerdict,+ 'the format binding leaves the accepted verdict immutable');+ assert.deepEqual(events(board).find(row => row.event_id === originalAccept.event_id), originalAccept,+ 'the format binding leaves the original accept event immutable');+const withdrawn = addItem(board, { by: coordinator, lane: 'docs', title: 'Withdrawn example' });withdraw(board, withdrawn, { agentId: coordinator, reason: 'duplicate fixture' });holdLane(board, 'view', { agentId: coordinator, reason: 'fixture hold' });