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.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
chore(merge): carry main into #655 [B3]
Corey Olsonaf23db746f76
diff --cc src/cli.jsindex 6c96a28e,59023459..ee4a2296--- a/src/cli.js+++ b/src/cli.js@@@ -2133,10 -2134,8 +2134,10 @@@ async function submitHere(ctx, id)withBoard(ctx, (board) => refuseUnverifiedStack(root, board, held, commit, trunk));// Every submit proves its frozen check and reachable tests anew on this exact commit (V4,V16).// A full-gate stamp never substitutes for either proof; only an actual full fallback may stamp.- const gate = await runSubmitGate(root, ctx.config, { base: claimHead, trunk: acceptedMain.commit, check: frozenCheck(held), agent: me.id, item: String(id), onWait: gateWaitReporter(ctx.io) });+ const gate = await runSubmitGate(root, ctx.config, { base: claimHead, trunk: acceptedMain.commit, check: frozenCheck(held), agent: me.id, item: String(id), onWait: gateWaitReporter(ctx.io), onBrowserFallback: browserAdmissionReporter(ctx.io, ctx.io.relayJson) });- if (!gate.isGreen) {+ // Only the person's live waivers can pass a red proof, failure by failure; the item's own check is never waived [B3].+ const waived = !gate.isGreen && gate.check?.green ? withBoard(ctx, (board) => waivedFailures(board, accountedFailures(gate, root))) : null;+ if (!gate.isGreen && !waived) {const message = `the submission proof is red at ${commit.slice(0, 12)}; fix it, commit, submit again. ${submitGateReport(gate)}`;// No submission can follow this verdict. Read-only main comparisons must not retain the seat's write lease.CHECKOUT_LEASES.get(ctx.io)?.release();diff --cc src/gate.jsindex 1a679873,54c70c30..6c58c693--- a/src/gate.js+++ b/src/gate.js@@@ -247,17 -162,20 +248,20 @@@ function safeLog(output)/** Run the unchanged caller command and profile only timings already present in its output.* @param {string} root* @param {string} command- * @param {{ waitMs?: number, artifactDirectory?: string, artifactPrefix?: string, persistLog?: boolean, profileFile?: string, pipefail?: boolean, gateSlotHeld?: boolean, gateLease?: object }} [options]- * @param {{ waitMs?: number, artifactDirectory?: string, artifactPrefix?: string, persistLog?: boolean, profileFile?: string, pipefail?: boolean, gateSlotHeld?: boolean, gateLease?: object, landing?: boolean }} [options]++ * @param {{ waitMs?: number, artifactDirectory?: string, artifactPrefix?: string, persistLog?: boolean, profileFile?: string, pipefail?: boolean, gateSlotHeld?: boolean, gateLease?: object, landing?: boolean, stages?: boolean }} [options]*/- export function runProfiledShell(root, command, { waitMs = 0, artifactDirectory, artifactPrefix = 'pullboard-gate', persistLog = false, profileFile, pipefail = false, gateSlotHeld = false, gateLease, stages = false } = {}) {-export function runProfiledShell(root, command, { waitMs = 0, artifactDirectory, artifactPrefix = 'pullboard-gate', persistLog = false, profileFile, pipefail = false, gateSlotHeld = false, gateLease, landing = false } = {}) {++export function runProfiledShell(root, command, { waitMs = 0, artifactDirectory, artifactPrefix = 'pullboard-gate', persistLog = false, profileFile, pipefail = false, gateSlotHeld = false, gateLease, landing = false, stages = false } = {}) {const directory = artifactDirectory ?? dirname(gitPath(root, LOG));mkdirSync(directory, { recursive: true, mode: 0o700 });const id = randomUUID();const profilePath = profileFile ?? join(directory, `${artifactPrefix}-${id}.profile.json`);const logPath = persistLog ? join(directory, `${artifactPrefix}-${id}.log`) : null;const started = Date.now();- const inherited = gateLease ? gateSlotEnvironment(gateLease) : gateSlotHeld ? { [GATE_SLOT_HELD_ENV]: '1' } : {};+ const inherited = {+ ...(gateLease ? gateSlotEnvironment(gateLease) : gateSlotHeld ? { [GATE_SLOT_HELD_ENV]: '1' } : {}),+ [LANDING_RUN_ENV]: landing ? '1' : '0',+ };- const run = runShell(root, command, { pipefail, env: inherited });+ const run = runShell(root, command, { pipefail, env: inherited, stages });const profile = writeTimingProfile(profilePath, {...timingFromOutput(run.output, timingRunner(command)),waitMs: Math.max(0, Math.round(waitMs)), wallMs: Math.max(0, Date.now() - started),@@@ -403,20 -324,19 +410,20 @@@ export async function runGate(root, conthrow new Refused('NO_GATE', 'no gate configured; set "gate" in pullboard.json, e.g. "npm test"');}if (trustStamp && isStampedGreen(root)) return { isGreen: true, isCached: true, output: '', seconds: 0, log: '' };- return await withGateSlot(root, (lease) => fullGateRun(root, config, trustStamp, { waitMs: lease.waitMs, gateLease: lease, stages }), {- return await withGateSlot(root, (lease) => fullGateRun(root, config, trustStamp, { waitMs: lease.waitMs, gateLease: lease, landing }), {++ return await withGateSlot(root, (lease) => fullGateRun(root, config, trustStamp, { waitMs: lease.waitMs, gateLease: lease, landing, stages }), {landing, browser: true, agent, item, kind: landing ? 'landing' : 'gate', onWait,});}/** Run a full gate while its caller owns the queue lease; only a full run may stamp its tree. */- function fullGateRun(root, config, trustStamp = false, { waitMs = 0, log = gitPath(root, LOG), gateLease, stages = false } = {}) {-function fullGateRun(root, config, trustStamp = false, { waitMs = 0, log = gitPath(root, LOG), gateLease, landing = false } = {}) {++function fullGateRun(root, config, trustStamp = false, { waitMs = 0, log = gitPath(root, LOG), gateLease, landing = false, stages = false } = {}) {if (trustStamp && isStampedGreen(root)) return { isGreen: true, isCached: true, output: '', seconds: 0, log: '' };const before = committedTree(root);- const run = runProfiledShell(root, config.gate, { waitMs, pipefail: true, profileFile: `${log}.profile.json`, gateLease, stages });- const { isGreen, output, seconds, profile, profilePath } = runProfiledShell(root, config.gate, { waitMs, pipefail: true, profileFile: `${log}.profile.json`, gateLease, landing });++ const run = runProfiledShell(root, config.gate, { waitMs, pipefail: true, profileFile: `${log}.profile.json`, gateLease, landing, stages });+ const { isGreen, output, seconds, profile, profilePath } = run;writeFileSync(log, output);if (isGreen && before !== null && committedTree(root) === before) writeFileSync(gitPath(root, STAMP), `${before}\n`);- return { isGreen, isCached: false, output, seconds, log, profile, profilePath };+ return { isGreen, isCached: false, output, seconds, log, profile, profilePath, ...(stages ? { stages: run.stages } : {}) };}/** Quote a fixed executable or selected path without permitting shell expansion. */