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.

chore(merge): integrate accepted check failure details [V19]

Corey Olson44682f58ee5c
diff --cc src/cli.js
index 7c7ecc87,71560c17..246a4411
--- a/src/cli.js
+++ b/src/cli.js
@@@ -1555,12 -1559,10 +1559,12 @@@ 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');
requireTrunkMerge(root, commit);
- check = checkAtCommit(root, item);
+ check = await withGateSlot(root, () => checkAtCommit(root, item), { itemCheck: true, onWait: gateWaitReporter(ctx.io) });
- if (check.state === 'unverified') throw new Refused('CHECK_UNVERIFIED', `the frozen ${check.stage} could not be verified at the submitted commit; restore the install or check environment, then retry verification; output digest:\n${check.report.replace(/^/gm, ' ')}`);
- if (check.state === 'red') throw new Refused('CHECK_RED', `the frozen item check is red at the submitted commit; check.install may be needed for dependencies; reject with the failing behavior or ask the builder to fix and resubmit; output digest:\n${check.report.replace(/^/gm, ' ')}`);
-
+ const evidence = check.checked
+ ? `\nlast output lines (up to 40):\n${(check.outputTail ?? '(no output)').split('\n').map((line) => ` ${line}`).join('\n')}\nfull output file: ${check.outputPath ?? `(unavailable${check.outputError ? `: ${check.outputError}` : ''})`}`
+ : '';
+ if (check.state === 'unverified') throw new Refused('CHECK_UNVERIFIED', `the frozen ${check.stage} could not be verified at the submitted commit; restore the install or check environment, then retry verification; output digest:\n${check.report.replace(/^/gm, ' ')}${evidence}`);
+ if (check.state === 'red') throw new Refused('CHECK_RED', `the frozen item check is red at the submitted commit (${check.stage}); check.install may be needed for dependencies; reject with the failing behavior or ask the builder to fix and resubmit; output digest:\n${check.report.replace(/^/gm, ' ')}${evidence}`);
const receipt = store.events(board, { itemId: id }).filter(event => event.event_kind === 'submit').map(event => JSON.parse(event.event_detail)).find(event => event.commit === commit);
submissionPaths(root, item, commit, { mainCommit: receipt?.policyCommit, dependencies: dependencySnapshots(board.db, item) });
requireTrunkMerge(root, commit); // Re-read after the frozen check, before accepting.
diff --cc src/trusted-policy.js
index 5a8ca04a,841038e4..cfa862a6
--- a/src/trusted-policy.js
+++ b/src/trusted-policy.js
@@@ -1,15 -1,12 +1,15 @@@
/** Coordinator policy and immutable submission checks cannot come from a builder's candidate [V4,V16,L3,M3]. */
+import { randomUUID } from 'node:crypto';
import { spawnSync } from 'node:child_process';
import { digestOf } from './gate.js';
-import { existsSync, mkdtempSync, mkdirSync, readFileSync, rmSync } from 'node:fs';
+import { closeSync, existsSync, mkdtempSync, mkdirSync, openSync, readFileSync, readSync, rmSync, writeSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
+import { StringDecoder } from 'node:string_decoder';
import { fileURLToPath } from 'node:url';
import { configFromSource } from './config.js';
- import { cleanGitEnvironment, mainCheckout } from './git.js';
+ import { cleanGitEnvironment, mainCheckout, refuseGrafts } from './git.js';
+import { secretsIn } from './hooks.js';
import { outOfLane } from './lanes.js';
import { Refused } from './refused.js';