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.

fix(verify): keep checked reviews local on current trunk [E8,C7,V4]

Corey Olson1ed5124dff6e
diff --cc src/cli.js
index 8360299d,697cfd3e..bc4ba488
--- a/src/cli.js
+++ b/src/cli.js
@@@ -2552,25 -2533,17 +2552,26 @@@ async function verifyHere(ctx, id, { se
}
if (decision === 'ACCEPT') {
if (digest !== item.item_frozen_digest) throw new Refused('CRITERIA_CHANGED', 'the criterion changed; ask the coordinator to refreeze this item before checking it');
- const trunk = requireTrunkMerge(root, commit);
- refuseUnverifiedStack(root, board, item, commit, trunk);
+ const checkedCommit = reReview ? head : commit;
+ const checkedLabel = reReview ? 'reviewed composition' : 'submitted commit';
+ const trunk = requireTrunkMerge(root, checkedCommit);
+ if (reReview) {
+ if (!isClean(root)) throw new Refused('DIRTY', 'commit the reviewed composition before re-reviewing the stale verdict');
+ if (untracked(root).length) throw new Refused('UNTRACKED', 'commit or ignore untracked files before re-reviewing the stale verdict');
+ if (!contains(root, trunk.commit, head)) throw staleVerdictRefusal(item, stale);
+ }
+ review = captureVerdictReview(root, board, item, trunk.commit, checkedCommit);
+ refuseUnverifiedStack(root, board, item, checkedCommit, trunk);
+ const checkedItem = reReview ? { ...item, item_commit: checkedCommit } : item;
if (frozenCheck(item)) {
- const browser = !browserFreeChecksEnabled() || await checkNeedsBrowser(root, frozenCheck(item), { commit, onFallback: browserAdmissionReporter(ctx.io, ctx.io.relayJson) });
- // The private check runs here, in a private clone, under this machine's gate markers; a runner
- // lease cannot carry those markers, so the review queues for a local slot only [C7,V4].
- const shortEligible = Boolean(await explicitCheckFiles(root, frozenCheck(item), { commit }));
- check = await withGateSlot(root, (lease) => checkAtCommit(root, item, { waitMs: lease.waitMs, gateLease: lease }), { browser, remote: false, agent: me.id, item: String(id), kind: 'review', itemCheck: true, shortEligible, onWait: gateWaitReporter(ctx.io) });
+ const browser = !browserFreeChecksEnabled() || await checkNeedsBrowser(root, frozenCheck(item), { commit: checkedCommit, onFallback: browserAdmissionReporter(ctx.io, ctx.io.relayJson) });
++ // A private checked composition needs this machine's live local gate markers [C7,V4].
+ const shortEligible = Boolean(await explicitCheckFiles(root, frozenCheck(item), { commit: checkedCommit }));
- check = await withGateSlot(root, (lease) => checkAtCommit(root, checkedItem, { waitMs: lease.waitMs, gateLease: lease }), { browser, agent: me.id, item: String(id), kind: 'review', itemCheck: true, shortEligible, onWait: gateWaitReporter(ctx.io) });
++ check = await withGateSlot(root, (lease) => checkAtCommit(root, checkedItem, { waitMs: lease.waitMs, gateLease: lease }), { browser, remote: false, agent: me.id, item: String(id), kind: 'review', itemCheck: true, shortEligible, onWait: gateWaitReporter(ctx.io) });
} else {
- check = checkAtCommit(root, item);
+ check = checkAtCommit(root, checkedItem);
}
+ invalidateGitFacts(); // A private check can outlive changes in the reviewer's live checkout.
refuseSandboxBlocked(check);
verificationProfile = check.profile ?? null;
const evidence = check.checked