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(view): only the coordinator's view shout is the person's [N26,B26]
Corey Olson141b2031be32
diff --git a/src/cli.js b/src/cli.jsindex f8c9fba3..557b0cc8 100644--- a/src/cli.js+++ b/src/cli.js@@ -2737,6 +2737,19 @@ function sayReviewOffer(ctx, found) {else ctx.io.say('no build is currently free in your lane; this review is available');}+/**+ * Whether a shout is the person's own: a relay person request, or the local view acting as the+ * coordinator (N26, B26). The view acting as a named agent, or an agent shell as the coordinator,+ * still speaks as that agent.+ *+ * @param {any} io+ * @param {{ id: string }} me+ * @returns {boolean}+ */+function personShout(io, me) {+ return io.personRequest?.phase === 'execute' || (io.personChannel === 'view' && me.id === COORDINATOR);+}+/*** `pullboard next` (N2): the whole start of an agent's loop in one command. With --wait, it keeps* looking until something is free, so an agent blocked on other work needs no polling of its own.@@ -3204,7 +3217,7 @@ function workCommands(io, args) {const hasRecipient = first && recipients.includes(first);const to = hasRecipient ? first : values.decision ? (me.id === COORDINATOR ? 'person' : COORDINATOR) : first ?? '';const text = [hasRecipient ? second : first, ...(hasRecipient ? rest : [second, ...rest])].filter(Boolean).join(' ');- const id = await ordered(ctx, board, 'shout', [{ from: (io.personChannel === 'view' || io.personRequest?.phase === 'execute') ? store.PERSON : me.id, to, text, lanes: laneNames(ctx.config), decision: Boolean(values.decision), evidence }]);+ const id = await ordered(ctx, board, 'shout', [{ from: personShout(io, me) ? store.PERSON : me.id, to, text, lanes: laneNames(ctx.config), decision: Boolean(values.decision), evidence }]);io.result?.({ id, decision: Boolean(values.decision) });const agents = store.listAgents(board);const recipient = agents.some((agent) => agent.agent_id === to) ? agentDisplayName(agents, ctx.config, to) : to;diff --git a/test/agent-session.test.js b/test/agent-session.test.jsindex 2daefd0a..1fcb47f3 100644--- a/test/agent-session.test.js+++ b/test/agent-session.test.js@@ -204,7 +204,7 @@ test('no-session shells are one session and markerless terminals retain their wrassert.deepEqual(boardSnapshot(box.boardFile), beforeSelf, 'self-addressed decision is refused without a write');});-test('a shout from the local view as the person is recorded as the person [N26,B26]', () => {+test('a shout from the local view as the person is recorded as the person [N26,B26,B3,B7]', () => {const box = project();const owner = box.run(box.repo, ['shout', 'web', 'agent owns this checkout', '--json'], { session: 'view-owner-session-273' });assert.equal(owner.status, 0, owner.stdout + owner.stderr);@@ -217,7 +217,8 @@ test('a shout from the local view as the person is recorded as the person [N26,Bconst { executeMove } = await import(${JSON.stringify(apiModule)});const { main } = await import(${JSON.stringify(cliModule)});const response = await executeMove(process.cwd(), { verb: 'shout', args: { to: 'web', text: 'actual view action' } }, main);- process.stdout.write(JSON.stringify(response));+ const asAgent = await executeMove(process.cwd(), { verb: 'shout', agent: 'web-1', args: { to: 'coordinator', text: 'view acting as web-1' } }, main);+ process.stdout.write(JSON.stringify({ ...response, asAgent }));`;const response = runFixtureChild(process.execPath, ['--input-type=module', '-e', source], {cwd: box.repo, env: { ...box.base, CODEX_THREAD_ID: 'other-process-view-session-273' }, encoding: 'utf8',@@ -227,8 +228,11 @@ test('a shout from the local view as the person is recorded as the person [N26,Bassert.equal(document.status, 200, response.stdout);assert.equal(document.body.event.event_kind, 'shout');assert.equal(document.body.event.event_by, 'person');- assert.equal(boardSnapshot(box.boardFile).shout.at(-1).shout_text, 'actual view action');- assert.equal(boardSnapshot(box.boardFile).shout.at(-1).shout_from, 'person');+ const shouts = boardSnapshot(box.boardFile).shout;+ assert.equal(shouts.at(-2).shout_text, 'actual view action');+ assert.equal(shouts.at(-2).shout_from, 'person', 'the view as the coordinator records the person');+ assert.equal(document.asAgent.status, 200, response.stdout);+ assert.equal(shouts.at(-1).shout_from, 'web-1', 'the view acting as a named agent still records that agent');assert.deepEqual(readFileSync(file), before, 'the authenticated view does not alter the local agent-session binding');});diff --git a/test/e2e-view.test.js b/test/e2e-view.test.jsindex 64515d48..8cf475ef 100644--- a/test/e2e-view.test.js+++ b/test/e2e-view.test.js@@ -261,7 +261,7 @@ test('from the view the person adds items, shouts and holds lanes, through the Cassert.equal(shouted.status, 200);assert.equal(shouted.document.event.event_kind, 'shout');assert.equal(shouted.document.event.event_by, 'person');- assert.match(box.run(box.web, 'inbox').out, /person \(unknown\) -> web: from the person/);+ assert.match(box.run(box.web, 'inbox').out, / person -> 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');