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
fix(core): preserve model labels across pairing and receipts [O8,O3]
Corey Olsona451411c5ea1
diff --git a/src/relay-pairing-client.js b/src/relay-pairing-client.jsindex 9caf9908..9b294f4a 100644--- a/src/relay-pairing-client.js+++ b/src/relay-pairing-client.js@@ -158,7 +158,14 @@ function requireFreshTarget(root) {const events = tables.event;const sequence = tables.sqlite_sequence;let initialDetail = false;- try { initialDetail = JSON.stringify(JSON.parse(events[0]?.event_detail)) === JSON.stringify({ lane: 'coordinator' }); }+ try {+ const detail = JSON.parse(events[0]?.event_detail);+ // Init has no declared model; engine 8 records that absence explicitly.+ if (detail.model === undefined || detail.model === 'unknown') {+ delete detail.model;+ initialDetail = JSON.stringify(detail) === JSON.stringify({ lane: 'coordinator' });+ }+ }catch { /* A non-init history cannot be safely replaced by a paired snapshot. */ }if (meta.length !== 2 || !BOARD.test(metadata.get('board_id') ?? '') ||metadata.get('event_log_version') !== String(store.EVENT_LOG_VERSION) ||diff --git a/test/api-http.test.js b/test/api-http.test.jsindex 61c35951..8feac635 100644--- a/test/api-http.test.js+++ b/test/api-http.test.js@@ -238,7 +238,7 @@ test('[A2] real HTTP state, moves and refusals use the CLI and exact committed eassert.equal(missingNote.document.error.code, 'NOTE_REQUIRED');const release = await box.call(box.path + '/moves', { verb: 'release', item: id, agent: two.agent, args: { note: 'reviewed the wrong tree' } });assert.equal(release.status, 200, JSON.stringify(release.document));- assert.deepEqual(JSON.parse(release.document.event.event_detail), { review: true, reason: 'reviewed the wrong tree' });+ assert.deepEqual(JSON.parse(release.document.event.event_detail), { review: true, reason: 'reviewed the wrong tree', model: 'Test Model' });});test('[A2,V2,H16] board-state JSON retains pending and red baselines and removes cleared observations', async (t) => {diff --git a/test/e2e-items.test.js b/test/e2e-items.test.jsindex 956b255b..5f27ff88 100644--- a/test/e2e-items.test.js+++ b/test/e2e-items.test.js@@ -41,18 +41,18 @@ test('decisions are asked, listed and answered, and evidence attached, from theassert.equal(asked.code, 0, asked.err);const id = /as #(\d+)/.exec(asked.out)?.[1];assert.ok(id, asked.out);- assert.match(box.run(box.repo, 'decisions').out, new RegExp(`#${id} {2}web-1 -> coordinator, \\d+m ago: ship today\\?`));- assert.match(box.run(box.repo, 'inbox').out, new RegExp(`web-1 -> coordinator: asks for a decision \\(#${id}; pullboard answer ${id}`));+ assert.match(box.run(box.repo, 'decisions').out, new RegExp(`#${id} {2}web-1 \\(Test Model\\) -> coordinator \\(unknown\\), \\d+m ago: ship today\\?`));+ assert.match(box.run(box.repo, 'inbox').out, new RegExp(`web-1 \\(Test Model\\) -> coordinator \\(unknown\\): asks for a decision \\(#${id}; pullboard answer ${id}`));const wrongActor = box.run(box.repo, 'answer', id, 'yes, today', '--as', 'person');assert.notEqual(wrongActor.code, 0);assert.match(wrongActor.err, /B26_PERSON_ANSWER.*person mode answers only/);- assert.match(box.run(box.repo, 'answer', id, 'yes, today').out, new RegExp(`answered #${id} to web-1 as #\\d+`));+ assert.match(box.run(box.repo, 'answer', id, 'yes, today').out, new RegExp(`answered #${id} to web-1 \\(Test Model\\) as #\\d+`));assert.match(box.run(box.repo, 'decisions').out, /no open decisions/);- assert.match(box.run(box.web, 'inbox').out, new RegExp(`coordinator -> web-1: answers #${id}: yes, today`));+ assert.match(box.run(box.web, 'inbox').out, new RegExp(`coordinator \\(unknown\\) -> web-1 \\(Test Model\\): answers #${id}: yes, today`));const head = box.git(box.web, 'rev-parse', 'HEAD');const proved = box.run(box.web, 'shout', 'coordinator', 'FINISH', 'the page', '--evidence', 'receipt', '--outcome', 'measured', '--item', '1', '--commit', 'HEAD');assert.equal(proved.code, 0, proved.err);- assert.match(box.run(box.repo, 'inbox').out, new RegExp(`web-1 -> coordinator: FINISH the page\\n {2}receipt: measured, #1 at ${head.slice(0, 12)}`));+ assert.match(box.run(box.repo, 'inbox').out, new RegExp(`web-1 \\(Test Model\\) -> coordinator \\(unknown\\): FINISH the page\\n {2}receipt: measured, #1 at ${head.slice(0, 12)}`));assert.match(box.run(box.web, 'shout', 'coordinator', 'x', '--evidence', 'receipt', '--outcome', 'measured', '--item', '1', '--commit', 'nope').err, /BAD_EVIDENCE.*"nope"/);});@@ -62,12 +62,12 @@ test('decisions default up the chain, pass to the person, and return to the origassert.equal(asked.code, 0, asked.err);const id = /as #(\d+)/.exec(asked.out)?.[1];assert.ok(id, asked.out);- assert.match(box.run(box.repo, 'decisions').out, new RegExp(`#${id} {2}web-1 -> coordinator`));+ assert.match(box.run(box.repo, 'decisions').out, new RegExp(`#${id} {2}web-1 \\(Test Model\\) -> coordinator \\(unknown\\)`));const passed = box.run(box.repo, 'pass', id, 'the checks are green');assert.equal(passed.code, 0, passed.err);const personId = /as #(\d+)/.exec(passed.out)?.[1];assert.ok(personId, passed.out);- assert.match(box.run(box.repo, 'decisions', '--as', 'person').out, new RegExp(`#${personId} {2}coordinator -> person`));+ assert.match(box.run(box.repo, 'decisions', '--as', 'person').out, new RegExp(`#${personId} {2}coordinator \\(unknown\\) -> person`));const personModeFromAgent = box.run(box.web, 'decisions', '--as', 'person');assert.notEqual(personModeFromAgent.code, 0);assert.match(personModeFromAgent.err, /B26_PERSON_ANSWER.*main checkout/);@@ -84,7 +84,7 @@ test('decisions default up the chain, pass to the person, and return to the origassert.match(answerRefusal.error.next, new RegExp(`pullboard answer ${personId} "<answer>" --as person`));assert.match(box.run(box.repo, 'answer', personId, 'Ship it.', '--as', 'person').out, new RegExp(`person answered #${personId}; notified web-1`));assert.match(box.run(box.web, 'resume').out, new RegExp(`newest from person: Person answered #${personId}: Ship it\\.`));- assert.match(box.run(box.web, 'inbox').out, new RegExp(`person -> web-1: answers #${id}: Person answered #${personId}: Ship it\\.`));+ assert.match(box.run(box.web, 'inbox').out, new RegExp(`person -> web-1 \\(Test Model\\): answers #${id}: Person answered #${personId}: Ship it\\.`));assert.match(box.run(box.repo, 'decisions').out, /no open decisions/);const refused = box.run(box.web, 'shout', 'person', 'Ship?', '--decision', '--json');assert.notEqual(refused.code, 0);@@ -107,9 +107,9 @@ test('pullboard worktree makes a joined worktree for a lane in one command [I4]'const made = box.run(box.repo, 'worktree', 'api');assert.equal(made.code, 0, made.err);const path = join(box.dir, 'repo-api-1');- assert.match(made.out, /on branch api\/1, joined as api-1 in the api lane/);+ assert.match(made.out, /on branch api\/1, joined as api-1 \(Test Model\) in the api lane/);assert.match(made.out, new RegExp(`start every command with: cd ${path} &&\n {2}cd ${path} && pullboard inbox\n {2}cd ${path} && pullboard next`));- assert.match(box.run(path, 'whoami').out, /^api-1 \(api lane\)/);+ assert.match(box.run(path, 'whoami').out, /^api-1 \(Test Model\) \(api lane\)/);assert.match(box.run(box.repo, 'worktree', 'api').out, /repo-api-2 on branch api\/2, joined as api-2/);assert.match(box.run(box.repo, 'worktree', 'nope').err, /NO_LANE/);});@@ -169,7 +169,7 @@ test("a worktree starts only from a commit that holds pullboard's files as the mconst made = box.run(repo, 'worktree', 'web');assert.equal(made.code, 0, made.err);- assert.match(made.out, /repo-web-1 on branch web\/1, joined as web-1 in the web lane/, 'the refusals made nothing and joined no one');+ assert.match(made.out, /repo-web-1 on branch web\/1, joined as web-1 \(Test Model\) in the web lane/, 'the refusals made nothing and joined no one');const web = join(box.dir, 'repo-web-1');assert.ok(readFileSync(join(web, 'SPEC.md'), 'utf8').includes('- G3 [draft'), 'it starts with the spec as committed');const foreign = commitFile(box, web, 'api/a.js', 'a', 'feat(web): page [G1]');@@ -255,7 +255,7 @@ test('verify runs at the submitted commit, against the criterion frozen at claimassert.match(box.run(box.web, 'verify', '1', 'accept').err, /SELF_VERIFY/);const unsaid = box.run(box.repo, 'verify', '1', 'accept', '--note', 'ran it');assert.match(unsaid.err, /MAIN_IS_COORDINATOR\] this is the main checkout, so this verdict would be the coordinator's/);- assert.match(unsaid.err, new RegExp(`Agent worktrees: web-1 at ${box.web}`));+ assert.match(unsaid.err, new RegExp(`Agent worktrees: web-1 \\(Test Model\\) at ${box.web}`));assert.match(box.run(box.web, 'verify', '1', 'accept', '--as', 'coordinator').err, /USAGE.*only in the main checkout/);assert.match(box.run(box.repo, 'verify', '1', 'accept', '--as', 'coordinator').err, /NOT_AT_COMMIT/);box.git(box.repo, 'merge', '-q', '--ff-only', 'web/one');@@ -274,7 +274,7 @@ test('verify runs at the submitted commit, against the criterion frozen at claimassert.match(show, /ACCEPT CRITERION_MET by coordinator/);const ledger = box.run(box.repo, 'ledger').out;assert.match(ledger, /1 verified by a second agent/);- assert.match(ledger, /\| 1 \| web \| Page \| G1 \| web-1 \| coordinator \|/);+ assert.match(ledger, /\| 1 \| web \| Page \| G1 \| web-1 \(Test Model\) \| coordinator \(unknown\) \|/);});test('unsupported spec grammar keeps claim, refreeze, submit and verify refusals typed [A5,A1,M1]', () => {diff --git a/test/e2e-view.test.js b/test/e2e-view.test.jsindex 5ea5b1aa..4f181fc7 100644--- a/test/e2e-view.test.js+++ b/test/e2e-view.test.js@@ -81,7 +81,7 @@ test('from the view the person adds items, shouts and holds lanes, through the Cconst shouted = await view.act(box.repo, { verb: 'shout', args: { to: 'web', text: 'from the person' } });assert.equal(shouted.status, 200);assert.equal(shouted.document.event.event_kind, 'shout');- assert.match(box.run(box.web, 'inbox').out, /coordinator -> web: from the person/);+ assert.match(box.run(box.web, 'inbox').out, /coordinator \(unknown\) -> web: from the person/);const held = await view.act(box.repo, { verb: 'hold', args: { lane: 'web', reason: 'G1 is changing' } });assert.equal(held.status, 200);assert.equal(held.document.event.event_kind, 'hold');diff --git a/test/review-queue-cli.test.js b/test/review-queue-cli.test.jsindex 04ec4033..221d9ad9 100644--- a/test/review-queue-cli.test.js+++ b/test/review-queue-cli.test.js@@ -159,7 +159,7 @@ test('[V1,R1] a review released without a verdict waits an hour for the same revassert.equal(releasedResult.code, 0, releasedResult.stderr);const releaseEvent = store.events(box.board, { itemId: released }).at(-1);assert.equal(releaseEvent.event_kind, 'release');- assert.deepEqual(JSON.parse(releaseEvent.event_detail), { review: true, reason: 'checked the wrong tree' });+ assert.deepEqual(JSON.parse(releaseEvent.event_detail), { review: true, reason: 'checked the wrong tree', model: 'unknown' });const secondReservation = await run(box, box.builder, ['next', '--verify', String(released), '--json']);assert.equal(secondReservation.code, 0, secondReservation.stderr);assert.equal(secondReservation.data.item.item_id, released);diff --git a/test/review-queue-replay.test.js b/test/review-queue-replay.test.jsindex 0159d4a0..1ddbb5c1 100644--- a/test/review-queue-replay.test.js+++ b/test/review-queue-replay.test.js@@ -121,7 +121,7 @@ test('v4 review releases keep their replay semantics; v5 notes add cooldowns [V1assert.equal(modernRelease.engine, ENGINE_VERSION);const modern = applyEngineMove(currentBoard, modernRelease, { sequence: 2, at: '2026-10-08T09:00:31.000Z' });assert.equal(modern.error, undefined);- assert.deepEqual(JSON.parse(modern.events[0].event_detail), { review: true, reason: 'recheck the submitted tree' });+ assert.deepEqual(JSON.parse(modern.events[0].event_detail), { review: true, reason: 'recheck the submitted tree', model: 'unknown' });assert.equal(currentBoard.executionEngineVersion, undefined);const filtered = store.reserveNextReview(currentBoard, { agentId: 'web-2', lane: 'web', leaseMs: LEASE_MS, policy: 'any' });assert.equal(filtered.item, null, 'engine 5 nextFor hides work released by this reviewer during cooldown');diff --git a/test/verdict-check.test.js b/test/verdict-check.test.jsindex 66c56b91..4f378bd7 100644--- a/test/verdict-check.test.js+++ b/test/verdict-check.test.js@@ -144,7 +144,7 @@ test('rework keeps historical rejection unknown and shows the latest accept checconst rows = succeeds(box, repo, 'ledger').split('\n').filter((line) => line.startsWith(`| ${item.id} |`));assert.equal(rows.length, 1);assert.match(rows[0], /\| unchecked \|/);- assert.doesNotMatch(rows[0], /unknown/);+ assert.equal(rows[0].split('|')[7].trim(), 'unchecked', 'the check column describes the latest accept');} finally { clean(box); }});