Skip to content

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.

test(person): compose boundary, versions and cap with main [C7,E22]

Corey Olson8f0ca8c4e2fe
diff --git a/test/boundary.test.js b/test/boundary.test.js
index 2e7010ab..85169166 100644
--- a/test/boundary.test.js
+++ b/test/boundary.test.js
@@ -39,6 +39,8 @@ test('the core names no model, engine or vendor; secret patterns may name the ke
test('only explicit relay commands open outbound connections; the view and API stay on loopback [P5, H15, H17, N26, A2]', () => {
const allowed = (file, line) => file === 'src/relay.js' ||
(file === 'src/relay-pairing-client.js' && line.trim() === 'response = await fetch(new URL(path, url), {') ||
+ // A board that signs person moves reads its linked relay's person authority, the relay link it already holds (#408).
+ (file === 'src/person-signing-cli.js' && line.trim() === "const response = await fetch(new URL(AUTHORITY_PATH, origin), { redirect: 'error', signal: AbortSignal.timeout(timeoutMs) });") ||
(['src/serve.js', 'src/api.js'].includes(file) && line.trim() === "import { createServer } from 'node:http';") ||
(file === 'src/local-fetch.js' && line.trim() === "import { request as httpRequest } from 'node:http';") ||
(file === 'src/serve.js' && line.trim() === "const reply = await fetch(address.origin + path, { headers: { 'x-pullboard-key': address.searchParams.get('k') } });") ||
diff --git a/test/machine.test.js b/test/machine.test.js
index 2ea6ae51..01fc683f 100644
--- a/test/machine.test.js
+++ b/test/machine.test.js
@@ -129,8 +129,7 @@ const NON_MOVE_ENTRY_POINTS = [
'cli.js#refuseRemoteCoordinatorModel',
// Child-process commands may be serialized into scripts, so audit this exported setup guard directly.
'resources.js#gateSlotEnvironment',
- // Before a person command, the relay's authority is read and compared with the board's stored key (#408).
- 'person-signing-cli.js#pinRelayAuthority',
+ 'person-signing-cli.js#pinRelayAuthority', // Reads the relay's authority before a person command (#408).
];
/** Board functions handed a function to call, and the one the CLI and the runner hand them. */
@@ -172,8 +171,7 @@ const CAUGHT = {
// Only an unsupported historical grammar is ignored; new caller refusals remain audited below.
'rigor-auto-source.js#automaticDecisionSource': ['spec.js#parseSpec'],
'rigor-auto-source.js#rigorDecisionKey': ['spec.js#parseSpec'],
- // A passkey row proof is a non-throwing boundary: an answer it cannot rebuild makes the proof false (#408).
- 'person-row-proof.js#signedRowDecisionsMatch': ['blueprints.js#answerQuestion'],
+ 'person-row-proof.js#signedRowDecisionsMatch': ['blueprints.js#answerQuestion'], // A non-throwing proof: an unbuildable answer reads false (#408).
};
/**
diff --git a/test/shared-version.test.js b/test/shared-version.test.js
index b77efca9..62e0c103 100644
--- a/test/shared-version.test.js
+++ b/test/shared-version.test.js
@@ -41,7 +41,7 @@ function fixture(t) {
/** Read persistent formats without invoking a writable opener. */
const versions = () => { const db = new DatabaseSync(file, { readOnly: true }); try { return { schema: db.prepare('PRAGMA user_version').get().user_version, log: db.prepare("SELECT meta_value FROM board_meta WHERE meta_key='event_log_version'").get().meta_value }; } finally { db.close(); } };
/** Change only one version constant in the uncommitted linked source. */
- const bump = (name, from, to) => { const path = join(lane, 'src/board.js'); const text = readFileSync(path, 'utf8'); const updated = text.replace(`export const ${name} = ${from};`, `export const ${name} = ${to};`); assert.notEqual(updated, text); writeFileSync(path, updated); };
+ const bump = (name, from, to) => { const path = join(lane, 'src/board-schema-source.js'); const text = readFileSync(path, 'utf8'); const updated = text.replace(`export const ${name} = ${from};`, `export const ${name} = ${to};`); assert.notEqual(updated, text); writeFileSync(path, updated); return 'src/board-schema-source.js'; };
return { dir, root, lane, env, file, run, cli, git, probe, versions, bump };
}
@@ -71,9 +71,9 @@ test('a broken Git link cannot impersonate an installed release and upgrade a bo
});
test('a newer lane can make a real checked commit and doctor gives a working main-checkout step [A5,A6]', t => {
- const box = fixture(t); const before = box.versions(); box.bump('SCHEMA_VERSION', 3, 4);
+ const box = fixture(t); const before = box.versions(); const versionSource = box.bump('SCHEMA_VERSION', 3, 4);
writeFileSync(join(box.lane, '.githooks/pre-commit'), `#!/bin/sh\nexec "${process.execPath}" "$(git rev-parse --show-toplevel)/bin/pullboard.js" hook pre-commit\n`);
- box.git(box.lane, 'add', 'src/board.js'); box.git(box.lane, 'commit', '-q', '-m', 'feat: propose a future schema [G1]');
+ box.git(box.lane, 'add', versionSource); box.git(box.lane, 'commit', '-q', '-m', 'feat: propose a future schema [G1]');
assert.deepEqual(box.versions(), before, 'the actual checkout hook must not migrate the shared board');
const r = box.cli(box.lane, box.lane, 'doctor', '--json'); assert.equal(r.status, 1, r.stderr + r.stdout);
const finding = JSON.parse(r.stdout).problems.find(p => p.code === 'SCHEMA_VERSION');