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(cli): preserve full reads without loading policy execution [C7]

Corey Olson60bd8763b407
diff --git a/test/cli-startup-budget-fixture.js b/test/cli-startup-budget-fixture.js
index a822c2cb..93ffbf17 100644
--- a/test/cli-startup-budget-fixture.js
+++ b/test/cli-startup-budget-fixture.js
@@ -72,6 +72,9 @@ export async function assertStartupBudgets(t) {
const code=resolve(import.meta.dirname,'../bin/pullboard.js');
const initial=boardDigest(db);
const expectedItems=JSON.parse(JSON.stringify(store.listItems({db,clock:store.systemClock})));
+ const board={db,clock:store.systemClock};
+ const expectedShow=JSON.parse(JSON.stringify({version:1,...store.getItem(board,4),verdicts:store.verdictsFor(board,4),
+ thread:store.itemThread(board,4),agentApproved:[],approvalQualification:''}));
const samples={version:[],show:[],status:[],list:[]};
const childEnvironment={...process.env,PULLBOARD_HOME:join(root,'private-home'),PULLBOARD_MACHINE_HOME:join(root,'private-machine'),GIT_CONFIG_GLOBAL:'/dev/null',GIT_CONFIG_NOSYSTEM:'1'};
for(const name of ['PULLBOARD_RELAY_TOKEN','PULLBOARD_RELAY_KEY']) delete childEnvironment[name];
@@ -83,7 +86,7 @@ export async function assertStartupBudgets(t) {
assert.equal(result.status,0,`${name} round ${round}: ${result.error?.message ?? result.stderr ?? result.stdout}`);
const data=JSON.parse(result.stdout);
assert.equal(data.version,1);
- if(name==='show') assert.equal(data.item_id,4);
+ if(name==='show') assert.deepEqual(data,expectedShow,'the complete item, verdicts and thread survive the startup optimization');
if(name==='status') assert.equal(data.stats.items.submitted,10);
if(name==='list') {
assert.equal(data.items.length,1000);
diff --git a/test/cli-startup.test.js b/test/cli-startup.test.js
index c706257c..ed7c3efe 100644
--- a/test/cli-startup.test.js
+++ b/test/cli-startup.test.js
@@ -15,7 +15,8 @@ import { assertStartupBudgets } from './cli-startup-budget-fixture.js';
const REPO = resolve(import.meta.dirname, '..');
const BIN = join(REPO, 'bin', 'pullboard.js');
/** Modules a read must never load: the gate runner, the relay client and the landing machinery. */
-const HEAVY = ['src/gate.js', 'src/relay.js', 'src/land.js', 'src/commands/gate.js', 'src/commands/relay.js', 'src/commands/land.js'];
+const HEAVY = ['src/gate.js', 'src/relay.js', 'src/land.js', 'src/commands/gate.js', 'src/commands/relay.js', 'src/commands/land.js',
+ 'src/trusted-policy.js', 'src/check-baseline.js', 'src/shell-run.js', 'src/hooks.js', 'src/resources.js'];
/** Find the real Git executable before the fixture puts its counting shim first on PATH. */
function realGitPath() {