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
test(person): pin valid SSH history for apply control [E22,H16]
Corey Olson7de516a1980b
diff --git a/src/row-decisions.js b/src/row-decisions.jsindex 22d82729..f1b57e93 100644--- a/src/row-decisions.js+++ b/src/row-decisions.js@@ -178,13 +178,11 @@ export function handAnsweredQuestions(before, after, readDecisions) {function decisionReceipt({ event, at, applied, appliedAt, ...record }) { return record; }/** Preflight every file and signature before an apply writes even its first byte. */-export function planRowApply(root, config, records, { passkeyDecision = () => false } = {}) {+export function planRowApply(root, config, records) {const pending = records.filter((record) => !record.applied);const files = new Map();for (const record of pending) {- const verifiedPasskey = passkeyDecision(record);- if (verifiedPasskey) verifySignedRecords(root, readRawRecords(root));- else verifyRowDecision(root, record);+ verifyRowDecision(root, record);const file = record.kind === 'spec' ? config.spec : loadDoctrine(root, config).name;const aliases = new Set(['DOCTRINE.md', 'PRACTICE.md']);if (file !== record.file && !(record.kind === 'doctrine' && aliases.has(file) && aliases.has(record.file))) throw new Refused('STALE_ROW_DECISION', `${record.id}'s file changed; ask the person to approve its current row again`);@@ -193,7 +191,6 @@ export function planRowApply(root, config, records, { passkeyDecision = () => faconst lines = (change.after ?? change.before).split('\n');const parsed = loadSpec(root, { ...config, spec: file });const matches = parsed.rows.filter((row) => row.id === record.id);- if (verifiedPasskey && matches[0]?.signers?.length) throw new Refused('PERSON_SIGNER_REQUIRED', `${record.id} names its SSH signers ${matches[0].signers.join(', ')}`, 'a passkey does not claim any named SSH identity');const index = matches.length === 1 ? matches[0].line - 1 : -1;const source = index < 0 ? '' : lines[index].replace(/\r$/u, '');if (source !== record.source && source !== record.replacement) throw new Refused('STALE_ROW_DECISION', `${record.id}'s exact row changed after the person's decision; ask the person to approve its current text again`);diff --git a/test/person-optional-apply-fixture.js b/test/person-optional-apply-fixture.jsindex 1db7cf5f..aa1913d3 100644--- a/test/person-optional-apply-fixture.js+++ b/test/person-optional-apply-fixture.js@@ -52,7 +52,7 @@ export async function optionalPasskeyApply(t) {const allowed = sshPublicLine(publicPair.publicKey);mkdirSync(join(box.root, '.pullboard'), { recursive: true });writeFileSync(join(box.root, '.pullboard', 'signers'), allowed);- writeFileSync(join(box.root, '.pullboard', 'signers.initial'), allowed);+ writeFileSync(join(box.root, '.pullboard', 'signers.initial'), createHash('sha256').update(allowed).digest('hex') + '\n');writeFileSync(join(box.root, '.pullboard', 'first-commit'), runFixtureGit(['rev-list', '--max-parents=0', 'HEAD'], { cwd: box.root, env: box.env }) + '\n');const board = store.openBoard(join(box.root, '.git', 'pullboard', 'board.sqlite'));t.after(() => store.closeBoard(board));