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: allow trusted pinned browser image runtimes [V3,C7]

Corey Olsonaa88bcc5d309
diff --git a/test/intake-fixture.js b/test/intake-fixture.js
index b9209562..e5a9943b 100644
--- a/test/intake-fixture.js
+++ b/test/intake-fixture.js
@@ -97,10 +97,10 @@ process.stdout.write(JSON.stringify(args.includes('--slurp')?[value]:value));\n`
}
/** Configure a Docker CLI protocol double, explicitly not a real container/runtime proof. */
-export function configureFixtureSandbox(box) {
+export function configureFixtureSandbox(box, { images = null } = {}) {
const dockerLog = join(box.dir, 'docker-calls.jsonl');
- const minimum = 'node@sha256:' + '1'.repeat(64);
- const current = 'node@sha256:' + '2'.repeat(64);
+ const minimum = images?.minimum ?? 'node@sha256:' + '1'.repeat(64);
+ const current = images?.current ?? 'node@sha256:' + '2'.repeat(64);
const docker = executable(box, 'fixture-docker', `const fs=require('node:fs'); const args=process.argv.slice(2);
fs.appendFileSync(${JSON.stringify(dockerLog)},JSON.stringify({args,secret:process.env.HOST_SECRET??null,credential:process.env.GH_TOKEN??null})+'\\n');
const image=args.find(arg=>arg.includes('@sha256:'))||''; const minimum=image===${JSON.stringify(minimum)};
diff --git a/test/intake.test.js b/test/intake.test.js
index fd74efe0..a9cf1453 100644
--- a/test/intake.test.js
+++ b/test/intake.test.js
@@ -175,3 +175,17 @@ test('renaming an existing sealing boundary cannot hide its touched old path [B2
const filed = fixtureJSON(box, box.repo, 'intake', box.pull.html_url, '--criterion', 'the fixture behavior works', '--check', 'node --test test/contribution.test.js');
assert.ok(filed.item.outside.sensitivity.some(reason => reason.path === 'src/seal.js' && reason.rule === 'declared-sensitive-path'), 'the exact old trust-boundary path remains part of the owner decision after a GitHub rename');
});
+
+
+test('trusted pinned browser images use the sandbox protocol without changing actual Node roles [V3,C7]', t => {
+ const box = intakeFixture(t);
+ const filed = fixtureJSON(box, box.repo, 'intake', box.pull.html_url, '--criterion', 'the fixture behavior works', '--check', 'node --test test/contribution.test.js');
+ const id = String(filed.item.item_id);
+ // A transport double models the custom image reference; this case is not real Chrome/container execution.
+ const images = { minimum: 'ghcr.io/fixture/node-chrome-min@sha256:' + '3'.repeat(64), current: 'ghcr.io/fixture/node-chrome-current@sha256:' + '4'.repeat(64) };
+ configureFixtureSandbox(box, { images });
+ assert.equal(fixtureJSON(box, box.web, 'verify', id, 'accept', '--sandbox', '--note', 'trusted browser image protocol').decision, 'ACCEPT');
+ const runs = fixtureJSON(box, box.repo, 'show', id).outside.sandbox.runs;
+ assert.deepEqual(runs.map(run => run.image), [images.minimum, images.current]);
+ assert.deepEqual(runs.map(run => run.environment.node), ['22.13.1', '24.21.0']);
+});