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
Merge branch 'main' into core/opus-next
Corey Olsonb1e39e9a4324
diff --cc docs/formats.mdindex b27f636c,e2a0e2c3..0816296c--- a/docs/formats.md+++ b/docs/formats.md@@@ -180,8 -180,8 +180,10 @@@ Engine 63 (`RECURRING_JOB_ENGINE`) recoEngine 64 (`LOCAL_LANDING_ENGINE`) lets a landing batch reach the state `trunk`: merged onto the local trunk after its quick guards (the static checks and submit invariants), with each item's merged receipt recorded before anything is pushed. Only a board whose `pullboard.json` sets `landing: { "publish": "separate" }` lands this way; `pullboard publish` then runs the whole suite on the exact trunk head and pushes only a green head. A batch recorded at an older engine still needs `pushed` before its receipts.+ Engine 65 (`CI_FLAKE_ENGINE`) records flake observations imported from CI with `pullboard flakes import <folder>`. Such an observation has kind `ci`, a `ci` record (provider, run id, the failed attempt and its rerun attempt, job, runner and Node version) and a `load` of null, because a hosted runner reports no host load. A failed attempt whose rerun at the same commit passes the test is a flake; one whose TAP names no test by file stays unclassified. Observations of the other kinds replay as at engine 61.++Engine 67 (`GATE_RUN_ENGINE`) records gate runs and the flake quarantine they prove. The gate writes a receipt for each real run of the accepted gate command on a clean, committed tree, under the common git directory at `pullboard/gate-receipts/<id>.json`: its id, kind (`gate`, `submit` or `land`), tree, head, accepted main, the command's SHA-256, its result, the committed file and name of each test that failed, the host load and the time. The writer is private to the gate and takes the result from the process it just ran; a run of any other command, or one whose checkout was dirty or moved, leaves no receipt. `recordGateRun` carries that receipt, and both a direct call and a sealed move are refused (`GATE_RUN_UNBOUND`) unless the store beside the board holds the same receipt byte for byte, so a run made up by hand is never recorded. A replayed move is applied as its origin checked it. When the coordinator's runs have found one tree both red and green for the same test, the board files one ordinary repair item for that test, with the runs as evidence, and records a `test-quarantine` event; a seat's own runs are recorded but prove nothing. Quarantine itself is the coordinator's `flakes.quarantine` setting in pullboard.json, read from accepted main and off by default: with it off, runs and the repair item are still recorded, but nothing stops blocking a landing. With it on, a quarantined test still runs and reports, but a landing treats it as covered, like a waiver naming that file and test, as long as every run that proved it is a receipt on the landing machine and its repair item is not verified or withdrawn; it then blocks again, and only a newer red-and-green proof files a new item. A different red in the same run is never covered. An older engine refuses the move with `ENGINE_VERSION`.+The CLI declares its engine in every relay request's `X-Pullboard-Engine` header.A linked board requires at least engine 48 after issuing any agent token or machine credential, includingrevoked or expired ones; before engine 48 these minimums were 3 and 6. The minimum survives reopening the auth database;diff --cc src/flake-command.jsindex 8bc8e923,8aac403a..716d87b7--- a/src/flake-command.js+++ b/src/flake-command.js@@@ -4,25 -4,49 +4,51 @@@ importwriteFileSync,} from 'node:fs';import { join } from 'node:path';+ import { ciObservations } from './ci-flakes.js';import { CONFIG_FILE } from './config.js';+ import { COORDINATOR } from './config.js';+ import { laneOf } from './lanes.js';import { flakeLedger } from './flakes.js';+import { flakeQuarantines } from './quarantine.js';import { Refused } from './refused.js';+ /**+ * Import CI results into the ledger (#918): each observation is an ordinary ordered board move, filed in the lane+ * that owns its test, and the original red always stays red.+ */+ async function importCi(ctx, folder, withBoard, { ordered, resourceAgent }) {+ const observations = ciObservations(ctx.info.root, folder);+ const agentId = resourceAgent(ctx);+ const lanes = Object.keys(ctx.config.lanes ?? {});+ const recorded = [];+ for (const observation of observations) {+ const owner = observation.file ? laneOf(ctx.config, observation.file) : COORDINATOR;+ const lane = owner === COORDINATOR ? lanes[0] : owner;+ const result = await withBoard(ctx, board => ordered(ctx, board, 'recordFlakeObservation', [{ agentId, observation, lane }]));+ recorded.push({ id: observation.id, classification: observation.classification, file: observation.file, name: observation.name,+ run: observation.ci.run, job: observation.ci.job, duplicate: Boolean(result?.duplicate), item: result?.item ?? null });+ ctx.io.say(`${observation.classification}: ${observation.file ?? '(unnamed CI failure)'}${observation.name ? ' :: ' + observation.name : ''}; run ${observation.ci.run} attempts ${observation.ci.attempt}→${observation.ci.rerunAttempt}; ${observation.ci.job}${result?.duplicate ? ' (already recorded)' : ''}`);+ }+ if (!observations.length) ctx.io.say('no failed CI attempt with a rerun at the same commit; nothing to record');+ ctx.io.result?.({ imported: recorded });+ return 0;+ }+/** List actual flake sightings separately from unknown failures and candidate regressions. */- export function flakesCommand(ctx, { first, second, rest }, withBoard) {+ export function flakesCommand(ctx, { first, second, rest }, withBoard, services = {}) {+ if (first === 'import' && second && !rest.length) return importCi(ctx, second, withBoard, services);- if (first === 'rerun' && ['on', 'off'].includes(second) && !rest.length) {+ if (['rerun', 'quarantine'].includes(first) && ['on', 'off'].includes(second) && !rest.length) {if (!ctx.info.isMain) throw new Refused('NOT_MAIN', 'only the coordinator sets this board’s diagnostic policy; ask it to run pullboard flakes rerun on or off');const file = join(ctx.info.root, CONFIG_FILE);const config = JSON.parse(readFileSync(file, 'utf8'));- config.flakes = { rerun: second === 'on' };+ config.flakes = { ...(config.flakes ?? {}), [first]: second === 'on' };writeFileSync(file, JSON.stringify(config, null, 2) + '\n');ctx.io.result?.({ flakes: config.flakes, file: CONFIG_FILE });- ctx.io.say(`paired flake diagnostics ${second}; commit ${CONFIG_FILE} to apply this board policy. The original red remains red.`);+ ctx.io.say(first === 'rerun' ? `paired flake diagnostics ${second}; commit ${CONFIG_FILE} to apply this board policy. The original red remains red.`+ : `flake quarantine ${second}; commit ${CONFIG_FILE} to apply this board policy. Runs and repair items are recorded either way; only quarantine stops a proven flake from blocking a landing.`);return 0;}- if (first || second || rest.length) throw new Refused('USAGE', 'pullboard flakes lists observations; pullboard flakes rerun|quarantine on|off sets the coordinator’s opt-in policy');- if (first || second || rest.length) throw new Refused('USAGE', 'pullboard flakes lists observations; pullboard flakes rerun on|off sets the coordinator’s opt-in policy; pullboard flakes import <folder> records downloaded CI results');++ if (first || second || rest.length) throw new Refused('USAGE', 'pullboard flakes lists observations; pullboard flakes rerun|quarantine on|off sets the coordinator’s opt-in policy; pullboard flakes import <folder> records downloaded CI results');return withBoard(ctx, board => {const rows = flakeLedger(board);const flakes = rows.filter(row => row.count > 0);diff --cc src/next-steps.jsindex 31f631cd,84bb7874..76126274--- a/src/next-steps.js+++ b/src/next-steps.js@@@ -132,10 -132,9 +132,12 @@@ export const NEXT_STEPS = Object.freezeBAD_SENDER: 'use the authenticated board credential belonging to the acting person, machine or agent, then retry',BAD_SEQUENCE: 'refresh the relay head and retry the saved operation at its declared coverage sequence; keep the durable pending record',FLAKE_EVIDENCE: 'retain the original gate log, timing profile and pinned source; ask the coordinator to repair the failure-evidence recorder before recording again',+ GATE_RUN_EVIDENCE: 'run the gate again from a clean, committed checkout so the run can name its tree, its failing test ids and the host load',+ GATE_RUN_UNBOUND: 'run the gate on this machine; it stores its own receipt and records its runs itself, and a run written by hand never counts',+ GATE_RUN_CHANGED: 'keep the original gate run unchanged; record a new run with a new id instead of replacing historical evidence',FLAKE_OBSERVATION_CHANGED: 'keep the original observation unchanged; record a new gate failure with a new observation identity instead of replacing historical evidence',+ CI_RESULT: 'save each CI attempt as a ci-result.json manifest beside its TAP file (provider, run, attempt, job, runner, node, commit, root, conclusion, at, tap), then run pullboard flakes import <folder> again',+ CI_COMMIT_UNKNOWN: 'fetch the CI commit into this checkout with git fetch origin <commit>, then run pullboard flakes import <folder> again',HEALTH_FINDINGS: 'run pullboard health to read the current findings, then run pullboard resume to capture a fresh observation',HEALTH_SCAN_STALE: 'run pullboard resume again to scan the current board before posting sentinel notices',A5_GRAMMAR_VERSION: 'upgrade Pullboard: npm install -g pullboard@latest',