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 background view [H5,N26]

Corey Olsonc53861c79bd0
diff --cc docs/api.md
index d0ef87f2,b29dccb6..24aff076
--- a/docs/api.md
+++ b/docs/api.md
@@@ -16,13 -18,13 +18,15 @@@ The machine gate pool admits landings f
Release priority is separately opt-in with `"gate": { "queue": { "currentReleaseFirst": true } }`. Before queueing, a gate run captures its board identity and its item's roadmap rank. The first unfinished milestone is current, counting only this board's own items as verified out of total; `repo#id` references are left out and never opened. Later milestones follow in roadmap order, then already completed earlier milestones, then unplanned work. Within otherwise-tied positions belonging to one board, current-release work goes first: `A-later, B, A-current` becomes `A-current, B, A-later`. Different boards retain their opportunity positions. Global admission classes and landings retain their existing precedence, and a waiter older than `agingMinutes` keeps its position against release reordering. Queued ranks do not change if the roadmap changes. With the setting off, no board is read for release priority. Unknown board identities keep their positions; while any older client is waiting, all clients fall back together to landings then arrival. `pullboard settings` prints `gate.queue.currentReleaseFirst`, default `false`.
+`pullboard init` and `pullboard resume` keep `pullboard view` running in the background, so pullboard.dev finds this computer's boards with no command. When no view answers on the view port (4890, or `PULLBOARD_VIEW_PORT`), they start one detached, writing its output to a private `view-<port>.log` beside the view's session record in `~/.pullboard`; a view already running is left alone, and a busy port is one line that fails neither command. init prints one line naming where the view runs, its log and the `kill <pid>` that stops it; resume prints that line only when it starts the view or cannot. Both JSON results carry `view` with `state` (`started`, `running`, `busy`, `off` or `failed`), `port` and, for a view, `pid`. It is on unless the machine sets `"view": { "background": false }` in `~/.pullboard/settings.json`; `PULLBOARD_VIEW_BACKGROUND=0` turns it off for one process tree, and the test runner sets it so tests leave no view behind.
+
The memory hold is opt-in per machine with `"gate": { "memoryFloorMB": <n> }` in `~/.pullboard/settings.json`; absent, it is off and the pool admits by slots alone, as before. When set, before admitting a run the machine gate pool reads the machine's memory: on macOS the kernel's memory pressure level and free percentage, on Linux `MemAvailable` and the pressure stall averages in `/proc/pressure/memory`. The whole queue, landings included, waits in place while pressure is critical or free memory is under that many megabytes (`0` leaves only the pressure check). A held run prints one line naming why and the three biggest processes by memory, with pid, size and working directory, and starts once memory recovers. While the floor is set, `pullboard resources` prints the same line and returns it as `memory` in JSON; with no floor it reads no memory and `memory` is `null`. Where memory cannot be read, the pool admits by slots alone and prints one warning that memory is not checked there.
+ Short gate slots are opt-in per machine with `pullboard settings gate.shortSlots <n>`, stored as `"gate": { "shortSlots": n }`; the default `0` keeps them off and the pool behaves as before. With `n` above `0`, up to `n` runs that name their test files (a `pullboard check` or a review whose check is a literal `node bin/run-tests.js` call over test files, or a direct `node bin/run-tests.js <files>`) are admitted on short slots while every gate slot is held. Whole suites, directories, landings, diagnostics and anything the parser cannot read never use them, and a child that does not name its files cannot reuse a short lease (`SHORT_SLOT_FULL_SUITE`). Short slots do not add to `gateSlots`, and browser runs still count against `browserSlots`. `pullboard settings` prints `gate.shortSlots`; `pullboard resources --json` reports `shortSlots`, each gate holder's `slot` (`gate` or `short`), and `requestedSlot: "short-eligible"` on a waiting run that may take one.
+
When `add` or `edit` supplies a new nonempty check, it records the item before measuring that check in a background temporary checkout of the captured `main` commit. Use `--wait` to wait for the measurement before returning, or `args.wait: true` for an HTTP add/edit move. The item returned by `add`, `edit`, `show`, and `next --verify` may include `item_check_baseline`: `{command, main, result, request?, seconds?, reason?, warning?}`. `main` is the commit id or `null`, and `result` is `pending`, `green`, `red`, or `unavailable`. A background request carries an opaque `request` identity; an older completion cannot overwrite a newly edited or cleared check.
- An item's HTTP detail, and each item in the full board state, include `check` and, when recorded, `checkBaseline` with the same observation fields. A green result carries `warning: "CRITERION_PROVES_NOTHING"`; text output names that warning when showing or reserving the item for review, and when filing it with `--wait`. An exact match with the project gate configured at that main commit records green with `reason: "repo gate"` without running it again. A missing main records unavailable with `reason: "no main"` and still files the item. Changing the check replaces this observation; clearing it removes the observation. Captured observations and completions travel through ordered board moves, so replicas store results without executing commands. A completed result awaiting relay delivery stays on the measuring device and is retried by the next normal CLI command.
+ An item's HTTP detail, and each item in the full board state, include `check` and, when recorded, `checkBaseline` with the same observation fields. A green result carries `warning: "CRITERION_PROVES_NOTHING"`. When accepted main's `pullboard.json` sets `checks.provesNothing` to `"hold"` (`pullboard init` writes it for new boards), claim and submit refuse that item with `CRITERION_PROVES_NOTHING` until the check changes to one whose baseline is not green, or the person accepts the check as it reads with `pullboard check accept <id>`, or the local view sends `check-accept` with the item. The acceptance carries the check's SHA-256 digest, so a changed check needs a new one; it refuses agent shells, remote shells, agent worktrees, the API channel and MCP. With no setting it stays a warning: text output names it when showing or reserving the item for review, and when filing it with `--wait`. An exact match with the project gate configured at that main commit records green with `reason: "repo gate"` without running it again. A missing main records unavailable with `reason: "no main"` and still files the item. Changing the check replaces this observation; clearing it removes the observation. Captured observations and completions travel through ordered board moves, so replicas store results without executing commands. A completed result awaiting relay delivery stays on the measuring device and is retried by the next normal CLI command.
`pullboard stats [--since <date>] --json` returns `{version: 1, stats: {...}}` from the append-only event log. `submissions` and `rejections` count moves, including repeated attempts; `rejectionShare` is rejections divided by submissions (zero when the window has no submissions). `merged` counts distinct items with a merge move; `mergedWithoutAccept` counts those whose merge lacks an earlier acceptance of the latest submitted commit. That audit uses earlier history even when the acceptance falls before the selected window. Current item and verdict rows do not replace event evidence.
diff --cc src/cli.js
index f63861c4,e207be1f..d7620c82
--- a/src/cli.js
+++ b/src/cli.js
@@@ -3263,11 -3341,20 +3299,21 @@@ function settingsCommand(io, { first, s
io.say(`gate.queue.currentReleaseFirst: ${queue.currentReleaseFirst}${queue.currentReleaseFirst ? '' : ' (release priority is off)'}`);
io.say(`gate.queue.agingMinutes: ${queue.agingMinutes}${queue.reviewsFirst || queue.currentReleaseFirst ? '' : ' (used only while reviewsFirst or currentReleaseFirst is true)'}`);
io.say(`gate.memoryFloorMB: ${memoryFloorMB() ?? 'off (the gate queue does not wait for memory)'}`);
+ io.say(`view.background: ${settings.view?.background !== false}${settings.view?.background === false ? ' (init and resume leave the view to you)' : ' (init and resume keep pullboard view running for pullboard.dev)'}`);
+ io.say(`gate.shortSlots: ${shortSlots}${shortSlots ? '' : ' (off; runs that name their test files wait for a gate slot)'}`);
return 0;
}
- if (!['gateSlots', 'browserSlots'].includes(first) || !second || rest.length) {
- throw new Refused('USAGE', 'pullboard settings gateSlots <n> | browserSlots <n>');
+ if (!['gateSlots', 'browserSlots', 'gate.shortSlots'].includes(first) || !second || rest.length) {
+ throw new Refused('USAGE', 'pullboard settings gateSlots <n> | browserSlots <n> | gate.shortSlots <n>');
+ }
+ if (first === 'gate.shortSlots') {
+ if (!/^(?:0|[1-9]\d*)$/u.test(second) || !Number.isSafeInteger(Number(second))) {
+ throw new Refused('BAD_SHORT_SLOTS', 'gate.shortSlots must be a whole number, 0 or more; run pullboard settings gate.shortSlots <n>');
+ }
+ const settings = setGateShortSlots(Number(second));
+ io.result?.({ settings });
+ io.say(`gate.shortSlots set to ${settings.gate.shortSlots}`);
+ return 0;
}
if (!/^[1-9]\d*$/u.test(second) || !Number.isSafeInteger(Number(second))) {
if (first === 'gateSlots') throw new Refused('USAGE', 'pullboard settings gateSlots <positive integer>');
diff --cc src/settings.js
index 90c0704e,af49470b..fb115f66
--- a/src/settings.js
+++ b/src/settings.js
@@@ -21,11 -22,10 +22,14 @@@ export function loadMachineSettings()
if (value.gate?.browserFreeChecks !== undefined && typeof value.gate.browserFreeChecks !== 'boolean') {
throw new Refused('BAD_MACHINE_SETTINGS', `gate.browserFreeChecks in ${file} must be true or false`);
}
+ if (value.gate?.browserByLaunch !== undefined && typeof value.gate.browserByLaunch !== 'boolean') {
+ throw new Refused('BAD_MACHINE_SETTINGS', `gate.browserByLaunch in ${file} must be true or false`);
+ }
validateGateQueue(value, file);
+ if (value.view !== undefined && (!value.view || typeof value.view !== 'object' || Array.isArray(value.view)
+ || (value.view.background !== undefined && typeof value.view.background !== 'boolean'))) {
+ throw new Refused('BAD_MACHINE_SETTINGS', `view in ${file} must be an object whose background is true or false; fix it before running Pullboard`);
+ }
if (value.gate?.memoryFloorMB !== undefined && (!Number.isSafeInteger(value.gate.memoryFloorMB) || value.gate.memoryFloorMB < 0)) {
throw new Refused('BAD_MACHINE_SETTINGS', `gate.memoryFloorMB in ${file} must be a whole number of megabytes, 0 or more; fix it before running Pullboard`);
}
@@@ -53,16 -57,14 +61,24 @@@ export function browserFreeChecksEnable
return loadMachineSettings().gate?.browserFreeChecks === true;
}
+ /**
+ * Classifying a test file as browser-bound only when it reaches a real Chrome launch is opt-in per
+ * machine; off, any path to the Chrome fixture or an unfollowed process starter takes a browser slot.
+ */
+ export function browserByLaunchEnabled() {
+ return loadMachineSettings().gate?.browserByLaunch === true;
+ }
+
+/**
+ * Whether init and resume keep a view running in the background [H5,N26]. Unlike the gate's
+ * settings this is on by default: pullboard.dev can only open a computer's boards while its view
+ * runs, and a newcomer should never need a command for that. Only `"view": { "background": false }`
+ * turns it off.
+ */
+export function viewBackgroundEnabled() {
+ return loadMachineSettings().view?.background !== false;
+}
+
/**
* The free-memory floor, in megabytes, below which the machine gate pool holds its queue, or null
* when the hold is off. Gate and queue behavior is off by default, the person's rule, so an absent