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(person): preserve unsigned guards and optional signoff [E22,B26]
Corey Olsonc3950ea4d553
diff --git a/src/commands/spec.js b/src/commands/spec.jsindex bd648e1c..efaa934e 100644--- a/src/commands/spec.js+++ b/src/commands/spec.js@@ -252,12 +252,12 @@ export async function specCommand(io, { first, second, rest, values }) {});}if (first === 'answer') {- const completed = await withBoard(ctx, async board => {+ const completed = signsPersonMoves(ctx.info.root) ? await withBoard(ctx, async board => {const row = spec.rows.find(entry => entry.id === second);if (!row) throw new Refused('NO_ROW', `${second} is not a row in ${ctx.config.spec}`);if (personSigning(board).signed) refuseNamedSigners([row], [second]);return requireSignedPerson(ctx, board, whoAmI(ctx, board), { verb: 'spec-answer', args: { row: second, answer: rest.join(' ').trim() } }, [{ id: row.id, text: row.text }]);- });+ }) : null;if (completed !== null) return completed;requirePersonChannel(io.personChannel, process.env, { command: personCommand(primaryCheckoutRoot(ctx.info) ?? ctx.info.root, ['spec', 'answer', second, rest.join(' ')]) });return withBoard(ctx, async (board) => {diff --git a/src/sentinel-command.js b/src/sentinel-command.jsindex 216094cf..b81c396c 100644--- a/src/sentinel-command.js+++ b/src/sentinel-command.js@@ -1,6 +1,9 @@/** CLI proposal and exact person decisions for board-owned watches [A6,D3]. */import { PERSON } from './board.js';-import { requireSignedPerson } from './person-signing-cli.js';+import {+ requireSignedPerson,+ signsPersonMoves,+} from './person-signing-cli.js';import { requirePersonChannel } from './person.js';import { Refused } from './refused.js';import { sentinels } from './sentinels.js';@@ -23,6 +26,7 @@ export async function sentinelCommand({ ctx, words, values, withBoard, whoAmI, oif (extra.length || !['propose', 'approve', 'decline'].includes(verb) || !name) {throw new Refused('USAGE', 'use pullboard sentinel propose <name> --check "<command>" --every 10m --owner <seat or lane>, sentinel approve <name>, sentinel decline <name> --reason "<why>", or pullboard sentinels');}+ if (verb !== 'propose' && !signsPersonMoves(ctx.info.root)) requirePersonChannel(ctx.io.personChannel);return withBoard(ctx, async board => {const me = whoAmI(ctx, board);let row;diff --git a/test/team.test.js b/test/team.test.jsindex 8b9007d4..df3d0c7d 100644--- a/test/team.test.js+++ b/test/team.test.js@@ -1175,6 +1175,20 @@ test('person-only moves are signed [E22,B26,H16]', { timeout: relayWorkBudgetMs(assert.equal(approvedRow.decisions[0].decision, 'approve');const declinedRow = await confirmTerminal(['spec', 'decline', 'G4', '--reason', 'Do not approve this row'], 'spec-decline');assert.equal(declinedRow.decisions[0].decision, 'decline');+ writeFileSync(join(box.root, 'SPEC.md'), readFileSync(join(box.root, 'SPEC.md'), 'utf8')+ + '\n- G5 [approved, must] An optional sign-off row. | gate: review\n- G6 [approved, must] A named-signature row. | gate: review | signers: [email protected]\n');+ mkdirSync(join(box.root, 'test'), { recursive: true });+ writeFileSync(join(box.root, 'test', 'signed-evidence.test.js'), '/** G5 is cited as evidence for the optional sign-off fixture. */\n');+ const sshFile = join(box.root, '.pullboard', 'signoffs.jsonl');+ const beforeSsh = existsSync(sshFile) ? readFileSync(sshFile, 'utf8') : null;+ const optionalSignoff = await confirmTerminal(['spec', 'signoff', 'G5'], 'spec-approve');+ assert.equal(optionalSignoff.count, 1);+ assert.equal(optionalSignoff.by, 'person');+ assert.equal(existsSync(sshFile) ? readFileSync(sshFile, 'utf8') : null, beforeSsh, 'passkey approval never writes an SSH signature');+ const namedSignoff = await cli(cleared, 'spec', 'signoff', 'G6');+ assert.equal(namedSignoff.document.error?.code, 'PERSON_SIGNER_REQUIRED');+ assert.match(namedSignoff.document.error.message, /G6 names its SSH signers alice@example\.com/u);+const waiver = await confirmTerminal(['land', '--waive', 'gate:lint', '--until', '2099-01-01', '--reason', 'An explicit bounded fixture exception'], 'land-waive');assert.equal(waiver.waiver.test, 'gate:lint');