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
fix(flakes): integrate CI imports with command modules [H16]
Corey Olsondfc4ba1031e2
diff --cc docs/formats.mdindex 8358f3a8,aefacdd1..e2a0e2c3--- a/docs/formats.md+++ b/docs/formats.md@@@ -178,8 -178,8 +178,10 @@@ Engine 62 (`HEALTH_CAP_ENGINE`; engineEngine 63 (`RECURRING_JOB_ENGINE`) records recurring jobs. `declareJob` is the coordinator's or the person's: it stores a job's name, its cadence (`10m`, `2h`, `1d`, `hourly` or `daily`) and its owner, and a later declaration replaces the cadence and owner but keeps the run history. `recordJobRun` is any joined seat's and stores the job's name. Both events carry `engine: 63`. `pullboard health` reports a job with no run within one and a half cadences as `JOB_MISSED`, once per episode. An older engine refuses both moves with `ENGINE_VERSION`, and a replay at an older engine ignores their events.+ Engine 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.+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/ci-flake-engine.jsindex 00000000,00000000..2a1dde3anew file mode 100644--- /dev/null+++ b/src/ci-flake-engine.js@@@ -1,0 -1,0 +1,2 @@@++/** CI flake observations retain the job, runner, Node version and red/rerun attempts with unknown host load (#918). */++export const CI_FLAKE_ENGINE = 65;diff --cc src/commands/flakes.jsindex 00000000,2c85b7c2..0a991383mode 000000,100644..100644--- a/src/commands/flakes.js+++ b/src/commands/flakes.js@@@ -1,0 -1,11 +1,13 @@@+ /** The pullboard flakes command, in its own module so an item adding another command never edits these lines. */+ import * as nativeFlakes from '../native-flake-cli.js';+ import {+ context,++ ordered,++ resourceAgent,+ withBoard,+ } from '../cli.js';++ /** Run `pullboard flakes` and return its exit code. */+ export function run(io, { first, second, rest }) {- return nativeFlakes.command(context(io), { first, second, rest }, withBoard);++ return nativeFlakes.command(context(io), { first, second, rest }, withBoard, { ordered, resourceAgent });+ }diff --cc src/engine.jsindex e7e39810,cf13518b..00ebb41a--- a/src/engine.js+++ b/src/engine.js@@@ -75,7 -75,10 +76,10 @@@ const OPERATION_ENGINE = Object.freeze(/** Dependency edits, causes, sealed reviews, submission proofs, trunk conflicts, health observations and milestone targets retain distinct recorded engine meanings. */function minimumOperationEngine(operation, args, board) {+ // A batch landed on the local trunk before it is published (#801).+ if (operation === 'recordLandingBatch' && args[0]?.batch?.state === 'trunk'+ || operation === 'finishLandingBatch' && board && store.landingBatches(board).find(batch => batch.id === args[0]?.id)?.state === 'trunk') return LOCAL_LANDING_ENGINE;- if (operation === 'recordFlakeObservation') return NATIVE_FLAKE_ENGINE;+ if (operation === 'recordFlakeObservation') return args[0]?.observation?.kind === 'ci' ? CI_FLAKE_ENGINE : NATIVE_FLAKE_ENGINE;if (operation === 'recordLandingBatch' && carriesFlakeDiagnostics(args[0]?.batch)) return NATIVE_FLAKE_ENGINE;if (['proposeSentinel', 'decideSentinel', 'beginSentinelRun', 'finishSentinelRun'].includes(operation) || typeof args[1]?.cause === 'string' && args[1].cause.startsWith('sentinel:')) return BOARD_SENTINEL_ENGINE;if (['declareJob', 'recordJobRun'].includes(operation)) return RECURRING_JOB_ENGINE;diff --cc src/flake-engine.jsindex 4f162b96,40497f64..036b3740--- a/src/flake-engine.js+++ b/src/flake-engine.js@@@ -1,3 -1,3 +1,6 @@@++/** Preserve the original CI engine export for callers after its declaration moved to its own leaf (#918). */++export { CI_FLAKE_ENGINE } from './ci-flake-engine.js';++/** Coordinator allocation17419: typed Native flake observations start here [H16]. */export const NATIVE_FLAKE_ENGINE = 61;