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(api): fixtures expect serve to refuse person moves [P6,B26]
Corey Olson5e155a1c05f0
diff --git a/docs/api.md b/docs/api.mdindex e9d5a8ba..21d17314 100644--- a/docs/api.md+++ b/docs/api.md@@ -296,4 +296,4 @@ Only the person can run `pullboard land --waive <test> --until <date> --reason "A `pullboard serve` key grants access to a board; it does not identify the person. API moves always use a non-person channel, including when the server was started in an ordinary terminal. `spec-approve`, `spec-decline`, answering or verifying with `as: person`, and any other person-only move are refused with `B26_PERSON_CHANNEL` without recording an event. Token revocation through the standalone API is refused for the same reason. Spec signing off is not an offered API move. Use the person's terminal or the actual `pullboard view` page for person actions; ordinary agent moves remain available through the API.-The view's own page retains its person channel. Residual: an agent that starts `pullboard view` itself also holds that view's link; this change does not isolate that link from the agent. Signed person moves (#408) address that separate boundary.+The view's own page retains its person channel. Residual: an agent that starts `pullboard view` itself also holds that view's link; this change does not isolate that link from the agent. Signed person moves (#408) address that separate boundary. A coordinator request (`POST /api/v1/boards/:board/requests`) is still recorded as sent by the person on either server; it approves, answers and signs nothing, and its sender attribution is a separate follow-up.diff --git a/test/api.test.js b/test/api.test.jsindex 2c854deb..cb9af3cd 100644--- a/test/api.test.js+++ b/test/api.test.js@@ -1550,7 +1550,18 @@ test('[A2,B25,B26,B27] HTTP decisions preserve routing, passing and explicit perconst personRequired = JSON.parse(box.run(box.repo, 'answer', String(passed.result.id), 'Approved', '--json').stdout).error;assert.equal(personRequired.code, 'B26_PERSON_ANSWER');assert.deepEqual(await apiError(await move('answer', { text: 'Approved' }, passed.result.id), 409), personRequired);- const answerResponse = await move('answer', { text: 'Approved', as: 'person' }, passed.result.id);+ // A serve key is not the person: an explicit person answer through the standalone API records nothing [P6].+ const eventsBefore = json(box, box.repo, 'log').events.length;+ assert.equal((await apiError(await move('answer', { text: 'Approved', as: 'person' }, passed.result.id), 409)).code, 'B26_PERSON_CHANNEL');+ assert.equal(json(box, box.repo, 'log').events.length, eventsBefore, 'a refused API person answer records no event');+ assert.ok((await (await apiFetch(api, `${path}/state`)).json()).state.decisions.some((entry) => entry.shout_id === passed.result.id),+ 'the passed decision still waits for the person');+ // The view's own adapter keeps the person channel, so the person's explicit answer still routes back to the asker.+ const view = await startLocalHandler(t, box);+ const answerResponse = await apiFetch(view, `${path}/moves`, {+ method: 'POST', headers: { 'content-type': 'application/json' },+ body: JSON.stringify({ verb: 'answer', item: passed.result.id, args: { text: 'Approved', as: 'person' }, agent: 'coordinator' }),+ });assert.equal(answerResponse.status, 200);const answered = await answerResponse.json();assert.equal(answered.version, 1);diff --git a/test/relay-agent.test.js b/test/relay-agent.test.jsindex 9ebad4e7..5fb8dedf 100644--- a/test/relay-agent.test.js+++ b/test/relay-agent.test.js@@ -305,23 +305,20 @@ test('ordered agent joins mint scoped tokens and retain authenticated native actassert.equal(box.calls.filter((call) => call.path.endsWith('/authorize')).length, firstApprovalCount + 1,'one explicit phone approval authorizes native revocation');+ // A serve key is not the person [P6,B26]: revoking the still-live second token is refused before any phone proposal.const apiApprovalCount = box.calls.filter((call) => call.path.endsWith('/authorize')).length;const apiRevokeStart = box.transit.length;- const apiRevokePending = fetchFresh(tokenUrl, {- method: 'POST', headers: apiHeaders, body: JSON.stringify({ id: firstTokenRow.id }),+ const apiRevokeResponse = await fetchFresh(tokenUrl, {+ method: 'POST', headers: apiHeaders, body: JSON.stringify({ id: secondTokenRow.id }),});- const apiProposal = await waitForPhoneProposal(box, apiRevokeStart, firstTokenRow.id);- assert.equal(box.calls.filter((call) => call.path.endsWith('/authorize')).length, apiApprovalCount,- 'local API revocation waits for a phone tap');- await approvePhoneProposal(box, chrome, apiProposal);- const apiRevokeResponse = await apiRevokePending;- assert.equal(apiRevokeResponse.status, 200, 'local API accepts the opaque id-only revocation body');- assert.equal(box.calls.filter((call) => call.path.endsWith('/authorize')).length, apiApprovalCount + 1,- 'one explicit phone approval authorizes local API revocation');+ assert.notEqual(apiRevokeResponse.status, 200, 'the standalone API cannot revoke a token');const apiRevoke = await apiRevokeResponse.json();- assert.equal(apiRevoke.id, firstTokenRow.id);- assert.equal(apiRevoke.revoked, true);- assertMetadataOnly(apiRevoke, [firstToken, secondToken, personState.token, boardKey], 'local API revocation response contains no credential');+ assert.equal(apiRevoke.error?.code, 'B26_PERSON_CHANNEL', 'a serve key carries no person authority to revoke');+ assert.equal(box.transit.slice(apiRevokeStart).some((row) => row.method === 'POST' && row.path === '/api/v1/devices/approvals'), false,+ 'a refused API revocation publishes no phone approval request');+ assert.equal(box.calls.filter((call) => call.path.endsWith('/authorize')).length, apiApprovalCount,+ 'a refused API revocation reaches no phone approval');+ assertMetadataOnly(apiRevoke, [firstToken, secondToken, personState.token, boardKey], 'local API refusal contains no credential');// Capture authenticated journal records before a person command checkpoints their prefix.const remoteState = await fetch(`${box.origin}/api/v1/boards/${personState.board}/state`, {