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(core): init imported replicas without a model [O8,O3]
Corey Olson3473c7aada28
diff --git a/test/exchange.test.js b/test/exchange.test.jsindex 0fe7d0af..fb73dc2d 100644--- a/test/exchange.test.js+++ b/test/exchange.test.js@@ -229,7 +229,10 @@ test('export and import CLI commands exchange a versioned document between real};const cli = (cwd, ...args) => runFixtureChild(process.execPath, [BIN, ...args], { cwd, env, encoding: 'utf8' });try {- const initialized = cli(targetRoot, 'init');+ // An import recipient starts without its own declared coordinator metadata.+ const initEnv = { ...env };+ delete initEnv.PULLBOARD_MODEL;+ const initialized = runFixtureChild(process.execPath, [BIN, 'init'], { cwd: targetRoot, env: initEnv, encoding: 'utf8' });assert.equal(initialized.status, 0, initialized.stderr || initialized.stdout);assert.match(initialized.stdout, /coordinator/i);diff --git a/test/relay-client-fixture.js b/test/relay-client-fixture.jsindex cc0d8041..6448b355 100644--- a/test/relay-client-fixture.js+++ b/test/relay-client-fixture.js@@ -517,7 +517,9 @@ globalThis.fetch = function tracedFetch(input, init) {assert.equal(runFixtureChild('git', ['clone', bare, otherRoot], { cwd: scratch, env: otherEnv, encoding: 'utf8' }).status, 0, 'second device is a real clone');assert.equal(runFixtureChild('git', ['remote', 'set-url', 'origin', '[email protected]:fixture/repository.git'], { cwd: otherRoot, env: otherEnv, encoding: 'utf8' }).status, 0, 'clone names the same authorized repository');const run = (...args) => childResult(otherRoot, otherEnv, [CLI, ...args, '--json']);- assert.equal((await run('init')).code, 0, 'the cloned project initializes its private local board');+ const initEnv = { ...otherEnv };+ delete initEnv.PULLBOARD_MODEL; // Pairing imports the source coordinator's declaration.+ assert.equal((await childResult(otherRoot, initEnv, [CLI, 'init', '--json'])).code, 0, 'the cloned project initializes its private local board');const joined = await run('relay', 'join', code, '--url', origin);const document = joined.document;if (joined.code !== 0) throw new Error('real clone did not join the one-use pairing code');diff --git a/test/relay-person-recovery.test.js b/test/relay-person-recovery.test.jsindex b60a8260..ddb3cdad 100644--- a/test/relay-person-recovery.test.js+++ b/test/relay-person-recovery.test.js@@ -112,7 +112,10 @@ test('[H12,H16] an expired native executor lease transfers once and the old deviPULLBOARD_MACHINE_HOME: join(secondHome, 'machine'),};runFixtureGit(['init', '-q', '-b', 'main'], { cwd: secondRoot, env: secondEnv });- const initialized = await cli(secondRoot, secondEnv, 'init');+ // Preserve the source coordinator declaration when importing into this fresh replica.+ const initEnv = { ...secondEnv };+ delete initEnv.PULLBOARD_MODEL;+ const initialized = await cli(secondRoot, initEnv, 'init');assert.equal(initialized.code, 0, initialized.failure ?? initialized.stderr);const snapshot = join(secondRoot, 'native-board.json');writeFileSync(snapshot, JSON.stringify(await privateExport(box.root, box.env)), { mode: 0o600 });diff --git a/test/relay-sealed.test.js b/test/relay-sealed.test.jsindex 099ebf67..0d2ca0b7 100644--- a/test/relay-sealed.test.js+++ b/test/relay-sealed.test.js@@ -126,6 +126,13 @@ function replayClient(root, env, ...args) {});}+/** Initialize an import recipient without declaring a second coordinator; later commands retain their model. */+function initializeReplica(root, env) {+ const initEnv = { ...env };+ delete initEnv.PULLBOARD_MODEL;+ return replayClient(root, initEnv, 'init');+}+/** Replay through the native CLI while acknowledging but suppressing checkpoint writes to the fixture relay. */function replayClientWithoutCheckpoint(root, env) {const cliURL = pathToFileURL(resolve(import.meta.dirname, '../src/cli.js')).href;@@ -220,7 +227,7 @@ test('sealed agent shout cannot answer a person decision on either independent cconst envs = homes.map(home => ({ ...box.env, HOME: home, PULLBOARD_HOME: home }));mkdirSync(roots[1]); mkdirSync(homes[1], { mode: 0o700 });assert.equal(spawnSync('git', ['init', '-q', '-b', 'main'], { cwd: roots[1], env: envs[1] }).status, 0);- await replayClient(roots[1], envs[1], 'init');+ await initializeReplica(roots[1], envs[1]);const native = join(box.directory, 'native.json');writeFileSync(native, JSON.stringify(document), { mode: 0o600 });await replayClient(roots[1], envs[1], 'import', native);@@ -318,7 +325,7 @@ test('two real clients stop before sender checks for newer operations and actorconst envs = homes.map(home => ({ ...box.env, HOME: home, PULLBOARD_HOME: home }));mkdirSync(roots[1]); mkdirSync(homes[1], { mode: 0o700 });assert.equal(spawnSync('git', ['init', '-q', '-b', 'main'], { cwd: roots[1], env: envs[1] }).status, 0);- await replayClient(roots[1], envs[1], 'init');+ await initializeReplica(roots[1], envs[1]);const native = join(box.directory, 'native.json');writeFileSync(native, JSON.stringify(document), { mode: 0o600 });await replayClient(roots[1], envs[1], 'import', native);@@ -422,7 +429,7 @@ test('two real clients refuse forged relay actors and person-only requests whileconst envs = homes.map(home => ({ ...box.env, HOME: home, PULLBOARD_HOME: home }));mkdirSync(roots[1]); mkdirSync(homes[1], { mode: 0o700 });assert.equal(spawnSync('git', ['init', '-q', '-b', 'main'], { cwd: roots[1], env: envs[1] }).status, 0);- await replayClient(roots[1], envs[1], 'init');+ await initializeReplica(roots[1], envs[1]);const snapshotFile = join(box.directory, 'native.json');writeFileSync(snapshotFile, JSON.stringify(document), { mode: 0o600 });await replayClient(roots[1], envs[1], 'import', snapshotFile);@@ -569,7 +576,7 @@ test('two real clients enforce the verify policy captured in the item freeze [H1const envs = homes.map(home => ({ ...box.env, HOME: home, PULLBOARD_HOME: home }));mkdirSync(roots[1]); mkdirSync(homes[1], { mode: 0o700 });assert.equal(spawnSync('git', ['init', '-q', '-b', 'main'], { cwd: roots[1], env: envs[1] }).status, 0);- await replayClient(roots[1], envs[1], 'init');+ await initializeReplica(roots[1], envs[1]);const snapshotFile = join(box.directory, 'policy-snapshot.json');writeFileSync(snapshotFile, JSON.stringify(document), { mode: 0o600 });await replayClient(roots[1], envs[1], 'import', snapshotFile);@@ -659,7 +666,7 @@ test('person recovery explicitly skips one future-engine blocker and publishes aconst secondHome = join(box.directory, 'recovery-replica-home');mkdirSync(secondRoot); mkdirSync(secondHome, { mode: 0o700 });assert.equal(spawnSync('git', ['init', '-q', '-b', 'main'], { cwd: secondRoot, env: box.env }).status, 0);- await replayClient(secondRoot, { ...box.env, HOME: secondHome, PULLBOARD_HOME: secondHome }, 'init');+ await initializeReplica(secondRoot, { ...box.env, HOME: secondHome, PULLBOARD_HOME: secondHome });const initialFile = join(box.directory, 'recovery-initial.json');writeFileSync(initialFile, JSON.stringify(box.document), { mode: 0o600 });await replayClient(secondRoot, { ...box.env, HOME: secondHome, PULLBOARD_HOME: secondHome }, 'import', initialFile);@@ -917,7 +924,7 @@ test('two future-engine blockers recover one durable position at a time on two rfinally { store.closeBoard(source); }mkdirSync(roots[1]); mkdirSync(homes[1], { mode: 0o700 });assert.equal(spawnSync('git', ['init', '-q', '-b', 'main'], { cwd: roots[1], env: envs[1] }).status, 0);- await replayClient(roots[1], envs[1], 'init');+ await initializeReplica(roots[1], envs[1]);const initial = join(box.directory, 'two-blockers-native.json');writeFileSync(initial, JSON.stringify(document), { mode: 0o600 });await replayClient(roots[1], envs[1], 'import', initial);@@ -975,7 +982,7 @@ test('recovery collision status preserves the retry while the winner catches anmkdirSync(secondHome, { mode: 0o700 });const secondEnv = { ...box.env, HOME: secondHome, PULLBOARD_HOME: secondHome };assert.equal(spawnSync('git', ['init', '-q', '-b', 'main'], { cwd: secondRoot, env: secondEnv }).status, 0);- await replayClient(secondRoot, secondEnv, 'init');+ await initializeReplica(secondRoot, secondEnv);const snapshotFile = join(box.directory, 'collision-initial.json');writeFileSync(snapshotFile, JSON.stringify(box.document), { mode: 0o600 });await replayClient(secondRoot, secondEnv, 'import', snapshotFile);