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: capture fixture output before matching proofs [C7]

Corey Olson58e97c71e7dd
diff --git a/test/doctrine-name.test.js b/test/doctrine-name.test.js
index 41665bf4..37d12d65 100644
--- a/test/doctrine-name.test.js
+++ b/test/doctrine-name.test.js
@@ -404,7 +404,7 @@ test('[D4,A5] verify in a detached checkout reads the trunk baseline for a doctr
lanes: { web: { owns: ['web/'], specs: [] } }, shared: [] }, null, 2) + '\n');
box.git(source, 'add', '-A');
box.git(source, 'commit', '-q', '-m', 'chore: initialize doctrine verification fixture');
- const check = `${shellWord(process.execPath)} ${shellWord(BIN)} spec check | grep -E 'DOCTRINE[.]md: .*0 errors'`;
+ const check = `out=$(${shellWord(process.execPath)} ${shellWord(BIN)} spec check 2>&1) && printf '%s\\n' "$out" | grep -Eq 'DOCTRINE[.]md: .*0 errors'`;
const added = box.run(source, 'add', 'web', 'Doctrine review fixture', '--criterion', 'The frozen doctrine check passes in the verifier clone.', '--check', check, '--json');
assert.equal(added.status, 0, `${added.stdout}${added.stderr}`);
const id = JSON.parse(added.stdout).item.item_id;
diff --git a/test/gate.test.js b/test/gate.test.js
index 9afb4053..124aaf85 100644
--- a/test/gate.test.js
+++ b/test/gate.test.js
@@ -559,8 +559,14 @@ test('output after the match', async () => {
});
`);
const runner = resolve(import.meta.dirname, '../bin/run-tests.js');
- const named = `${shellWord(process.execPath)} ${shellWord(runner)} ${shellWord(fixture)} 2>&1 | grep -Eq '^ok [0-9]+ - passing named item check'`;
- for (const command of [named, 'yes | grep -q y', 'sh -c "exit 7" | tail -1']) {
+ const named = `${shellWord(process.execPath)} ${shellWord(runner)} ${shellWord(fixture)} 2>&1`;
+ const captured = (probe, assertion = `printf '%s\\n' "$out"`) => `out=$(${probe}) && ${assertion}`;
+ const commands = [
+ captured(named, `printf '%s\\n' "$out" | grep -Eq '^ok [0-9]+ - passing named item check'`),
+ captured('yes | grep -q y'),
+ captured('sh -c "exit 7" | tail -1'),
+ ];
+ for (const command of commands) {
const item = repoWithGate('true', command);
const baseline = JSON.parse(item.run('show', '1', '--json').stdout).item_check_baseline;
assert.equal(baseline.result, 'green', 'background baselines preserve last-stage semantics');