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(check): isolate each controlled baseline execution [V2,A2]

Corey Olsone402493c8145
diff --git a/test/flakes.test.js b/test/flakes.test.js
index 94c5e17f..f90263b4 100644
--- a/test/flakes.test.js
+++ b/test/flakes.test.js
@@ -98,6 +98,7 @@ function privateBuilder(box) {
/** Await the real baseline, then start each later controlled assertion with a fresh execution counter. */
function checkedItem(box) {
+ writeFileSync(box.counter, ''); // Earlier real push guards may have executed the same controlled target.
const check = JSON.parse(readFileSync(join(box.root, 'pullboard.json'), 'utf8')).gate;
const added = box.cli('add', box.lane, 'Controlled Native check', '--criterion', 'The controlled target passes without accepting retries.',
'--route', 'light', '--brief', 'Files: test/alternating.test.mjs\nTest: run its configured Node TAP check. Preserve the original failed verdict while retaining exact diagnostic receipts.', '--check', check, '--wait');
diff --git a/test/watch.test.js b/test/watch.test.js
index afdd0d89..04e9ff47 100644
--- a/test/watch.test.js
+++ b/test/watch.test.js
@@ -279,10 +279,7 @@ test('watch --work announces a claimable item and a review left waiting [A2,N26]
assert.equal(watch.out.lines.filter(({ line }) => JSON.parse(line).kind === 'review-wait' && JSON.parse(line).item === added.item_id).length, 1,
'a waiting review is announced once');
assert.ok(kinds.includes('accept') && kinds.includes('reject'), 'the verdicts print as events too');
- const observed = events(box).slice(before);
- assert.deepEqual(observed.filter(event => event.event_kind === 'check-baseline').map(event => [event.item_id, event.event_by]),
- [[added.item_id, 'coordinator']], 'exactly the requested background baseline completes; watch adds no observation');
- const moves = observed.filter(event => event.event_kind !== 'check-baseline').map(event => event.event_kind);
+ const moves = events(box).slice(before).map(event => event.event_kind);
assert.deepEqual(moves, ['add', 'add', 'claim', 'release', 'check_accept', 'claim', 'submit', 'join', 'reserve', 'accept', 'claim', 'submit', 'reserve', 'reject'],
'watch wrote no event: the new ones are exactly the moves this test made');
});