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(land): renew during blocking gates and recheck proof [Q3,E8]
Corey Olson830cc3adc7d4
diff --git a/src/land.js b/src/land.jsindex 53c3e5bd..c0c63dff 100644--- a/src/land.js+++ b/src/land.js@@ -42,6 +42,7 @@ import {} from './gate-run-receipt.js';import { laneOf } from './lanes.js';import { takeResource } from './resources.js';+import { runLandingWorker } from './landing-worker.js';import { Refused } from './refused.js';import { landingFileTimes } from './submit-invariants.js';import {@@ -562,9 +563,8 @@ function requirePushTarget(root, branch) {`add one with git remote add ${missing} <url> and run pullboard land again, or merge each verified commit on the trunk with git merge --no-ff and record it with pullboard merged <id> <commit>`);}-/** Push the exact gated tip before recording receipts, then fast-forward only a clean unchanged main. */-async function publish(state) {- let batch = state.batch;+/** Recheck immutable publication inputs after the last awaited canonical operation. */+function publicationInputs(state, batch) {for (const entry of batch.items) {const item = store.getItem(state.board, entry.id);if (item.item_status !== 'verified' || item.item_commit !== entry.commit@@ -572,6 +572,14 @@ async function publish(state) {throw new Refused('LAND_ITEM_MOVED', `item #${entry.id} changed its checked composition; rebuild the landing before publishing`);}}+ if (batch.proof?.failures?.some(failure => !store.landingWaiverFor(state.board, failure))) throw new Refused('LAND_WAIVER', 'the landing proof has an expired or missing person waiver; ask the person for a new expiring waiver, then adopt the batch');+ if (headCommit(batch.root) !== batch.tip || !isClean(batch.root) || untracked(batch.root).length) throw new Refused('LAND_MOVED', 'the gated landing tree changed; inspect the batch and adopt it again');+ if (mainCheckout(state.root)?.commit !== batch.base) throw new Refused('LAND_TRUNK_MOVED', 'main moved during the landing; rebuild the batch from its new tip');+}++/** Push the exact gated tip before recording receipts, then fast-forward only a clean unchanged main. */+async function publish(state) {+ let batch = state.batch;const remote = requirePushTarget(state.root, batch.branch);if (batch.proof?.failures?.length && batch.state !== 'pushed') {const failures = batch.proof.failures.map((failure) => ({ ...failure, waiver: store.landingWaiverFor(state.board, failure)?.id }));@@ -579,12 +587,11 @@ async function publish(state) {batch = await save(state, { proof: { ...batch.proof, failures } });}if (batch.state !== 'pushed') {- if (headCommit(batch.root) !== batch.tip || !isClean(batch.root) || untracked(batch.root).length) throw new Refused('LAND_MOVED', 'the gated landing tree changed; inspect the batch and adopt it again');- const current = mainCheckout(state.root);- if (current?.commit !== batch.base) throw new Refused('LAND_TRUNK_MOVED', 'main moved during the landing; rebuild the batch from its new tip');+ await state.checkLease();+ publicationInputs(state, batch);const alreadyPushed = tryGit(batch.root, ['ls-remote', remote, batch.branch]).stdout.split(/\s+/u)[0] === batch.tip;if (!alreadyPushed) {- await state.checkLease();+ state.checkLeaseNow();const pushed = tryGit(batch.root, ['push', remote, `HEAD:${batch.branch}`]);if (pushed.status !== 0) throw pushRefused(pushed.stderr || pushed.stdout);}@@ -653,11 +660,13 @@ async function finishTrunk(state) {/** Build, gate, diagnose and durably land one coordinator batch; all external actions stay in its worktree. */export async function land(options) {- if (options.dryRun) return landBatch(options);+ if (options.dryRun) return runLandingBatch(options);const branch = mainCheckout(options.root)?.branch;if (!branch) throw new Refused('LAND_TRUNK', 'landing needs the coordinator’s primary branch; return its checkout to the trunk');let lastWait = '';+ const controller = new AbortController();const lease = await takeResource({ name: 'landing', scope: 'board', capacity: 1, board: options.board, write: options.write, branch,+ onLost: error => controller.abort(error),/** Report a real ordered holder, without allocating machine test capacity to this waiter. */onWait({ holders, position }) {const message = `landing waiting: ${branch} held by ${holders[0]?.label ?? 'the previous landing'}; queued at place ${position}`;@@ -675,7 +684,13 @@ export async function land(options) {? [{ ...args[0], landingFence: lease.fence }, ...args.slice(1)] : args;return options.write(operation, values);};- return await landBatch({ ...options, write, checkLease: lease.assertHeld });+ /** Relay catch-up can change proof or trunk facts while a renewal awaits its receipt. */+ const checkLease = async () => { await lease.assertHeld(); invalidateGitFacts(); };+ const batchOptions = { root: options.root, config: options.config, owner: options.owner, maximum: Number.isFinite(options.maximum) ? options.maximum : null,+ adopt: options.adopt, fence: lease.fence };+ if (batchOptions.maximum === null) delete batchOptions.maximum;+ return await runLandingWorker(batchOptions, { write, checkLease, checkLeaseNow: lease.assertCurrent,+ onWait: options.onWait, say: options.say, signal: controller.signal });} catch (error) { failed = true; throw error; }finally {try { await lease.release(); }@@ -687,7 +702,7 @@ export async function land(options) {}/** Select only after admission, retaining the existing batch, proof and adoption rules. */-async function landBatch({ root, board, config, write, say, owner, maximum = Infinity, dryRun = false, adopt = false, onWait, checkLease }) {+export async function runLandingBatch({ root, board, config, write, say, owner, maximum = Infinity, dryRun = false, adopt = false, onWait, checkLease, checkLeaseNow }) {// Quarantine is read from the accepted main policy this landing runs under, never from a branch.board.quarantineEnabled = () => config.flakes?.quarantine === true;let trunk = mainCheckout(root);@@ -746,7 +761,7 @@ async function landBatch({ root, board, config, write, say, owner, maximum = InfmkdirSync(directory, { recursive: true });git(root, ['worktree', 'add', '--detach', batch.root, batch.base]);}- const state = { root, board, config, write, say, onWait, checkLease, batch, culprits: batch.culprits ?? [], flaky: false, gates: new Map((batch.gateResults ?? []).map((result) => [result.tree, result])), diagnosed: new Map((batch.diagnostics ?? []).map((result) => [result.test, result.isGreen])) };+ const state = { root, board, config, write, say, onWait, checkLease, checkLeaseNow, batch, culprits: batch.culprits ?? [], flaky: false, gates: new Map((batch.gateResults ?? []).map((result) => [result.tree, result])), diagnosed: new Map((batch.diagnostics ?? []).map((result) => [result.test, result.isGreen])) };await save(state, { owner });await returnCulprits(state);if (state.batch.state === 'trunk') await finishTrunk(state);diff --git a/src/landing-resource.js b/src/landing-resource.jsindex fbd8ca2d..19852599 100644--- a/src/landing-resource.js+++ b/src/landing-resource.js@@ -1,7 +1,8 @@/** Wait for board admission without occupying a machine test slot [Q1,Q2,Q3]. */import { randomUUID } from 'node:crypto';import { setTimeout as pause } from 'node:timers/promises';-import { landingLeaseState } from './landing-lease.js';+import { assertLandingLease, landingLeaseState } from './landing-lease.js';+import { Refused } from './refused.js';/** A dead local owner can be released immediately on an unlinked board; never compare foreign PIDs. */function deadLocalOwner(holder) {@@ -11,19 +12,26 @@ function deadLocalOwner(holder) {}/** Return a generation-bound lease whose renewal failures prevent later landing writes. */-export async function takeLandingResource({ board, write, branch, onWait }) {+export async function takeLandingResource({ board, write, branch, onWait, onLost }) {const token = randomUUID();const parameters = { agentId: 'coordinator', token, branch, pid: process.pid };let generation = null;let timer;+ let watchdog;+ let deadline = 0;let pending = Promise.resolve();let lost = null;/** Serialize heartbeats and explicit checks, retaining a failure until the command stops. */const assertHeld = () => {const task = pending.then(async () => {if (lost) throw lost;- try { return await write('landingLeaseMove', [{ ...parameters, action: 'renew', generation }]); }- catch (error) { lost = error; throw error; }+ try {+ const result = await write('landingLeaseMove', [{ ...parameters, action: 'renew', generation }]);+ assertLandingLease(board, { token, branch, generation }); // A delayed recovered receipt is not a fresh grant.+ deadline = Date.parse(result.holder.until);+ return result;+ }+ catch (error) { lost = error; onLost?.(error); throw error; }});pending = task.catch(() => {});return task;@@ -33,21 +41,32 @@ export async function takeLandingResource({ board, write, branch, onWait }) {const holder = landingLeaseState(board).holder;if (deadLocalOwner(holder)) await write('landingLeaseMove', [{ agentId: 'coordinator', action: 'release', token: holder.token, generation: holder.generation }]);const result = await write('landingLeaseMove', [{ ...parameters, action: 'request' }]);- if (result.acquired) { generation = result.generation; break; }+ if (result.acquired) { generation = result.generation; deadline = Date.parse(result.holder.until); break; }await onWait?.({ holders: result.holder ? [result.holder] : [], position: result.position });await pause(1000);}timer = setInterval(() => { void assertHeld().catch(() => {}); }, 5000);timer.unref();+ watchdog = setInterval(() => {+ if (!lost && Date.now() >= deadline - 1000) {+ lost = new Refused('LAND_LEASE_LOST', 'the landing lease could not renew before its deadline; inspect pullboard resume after its owned worker stops');+ onLost?.(lost);+ }+ }, 100);+ watchdog.unref();return { name: 'landing', scope: 'board', fence: { token, branch, generation }, assertHeld,+ /** Check the current wall-time fence without adding an await before a physical action. */+ assertCurrent() { return assertLandingLease(board, { token, branch, generation }); },/** End renewals before releasing; a stale generation never clears its successor. */async release() {clearInterval(timer);+ clearInterval(watchdog);await pending;await write('landingLeaseMove', [{ ...parameters, action: 'release', generation }]);} };} catch (error) {clearInterval(timer);+ clearInterval(watchdog);try { await write('landingLeaseMove', [{ ...parameters, action: 'release', generation }]); }catch { /* Preserve the admission failure; the ordered lease expires without a false grant. */ }throw error;diff --git a/src/landing-worker.js b/src/landing-worker.jsnew file mode 100644index 00000000..06faff56--- /dev/null+++ b/src/landing-worker.js@@ -0,0 +1,132 @@+/** Isolate blocking Git and gates so the coordinator keeps renewing and fencing its board lease [Q1,Q3]. */+import { spawn, execFileSync } from 'node:child_process';+import { join } from 'node:path';+import { fileURLToPath } from 'node:url';+import * as store from './board.js';+import { invalidateGitFacts, repoInfo } from './git.js';+import { Refused } from './refused.js';+import { parseProcessCensus } from './process-census.js';++const FILE = fileURLToPath(import.meta.url);++/** Stop only the process group this invocation created; never signal another landing's processes. */+function stop(child) {+ if (!child.pid) return;+ // Sharded gates start their own groups; collect them while their parent ancestry is still present.+ try {+ const rows = parseProcessCensus(execFileSync('/bin/ps', ['-axo', 'pid=,ppid=,pgid=,lstart=,stat=,comm='], { encoding: 'utf8', env: { ...process.env, LC_ALL: 'C', TZ: 'UTC' } }));+ if (rows) {+ const owned = new Set([child.pid]);+ let changed;+ do {+ changed = false;+ for (const row of rows.values()) if (owned.has(row.ppid) && !owned.has(row.pid)) { owned.add(row.pid); changed = true; }+ } while (changed);+ for (const pid of [...owned].reverse()) if (pid !== child.pid) {+ try { process.kill(pid, 'SIGKILL'); } catch (error) { if (error.code !== 'ESRCH') throw error; }+ }+ }+ } catch { /* The worker's own group is still known; never broaden a failed census to the machine. */ }+ try { process.kill(-child.pid, 'SIGKILL'); }+ catch (error) { if (error.code !== 'ESRCH') throw error; }+}++/** Run blocking batch work under a live parent that owns all canonical writes and lease renewal. */+export async function runLandingWorker(options, { write, checkLease, checkLeaseNow, onWait, say, signal }) {+ const child = spawn(process.execPath, [FILE], { cwd: options.root, env: process.env, detached: true, stdio: ['ignore', 'ignore', 'pipe', 'ipc'] });+ let result;+ let failure;+ let stderr = '';+ child.stderr.setEncoding('utf8').on('data', part => { stderr = (stderr + part).slice(-65536); });+ /** A failed authority check stops the whole owned group before another command can adopt its worktree. */+ const abort = () => { failure ??= signal.reason; stop(child); };+ signal.addEventListener('abort', abort, { once: true });+ /** Reply only over this owned child's channel, preserving the original typed refusal. */+ const answer = (id, value, error) => {+ if (!child.connected) return;+ child.send({ type: 'answer', id, value, error: error ? { code: error.code ?? 'LAND_WORKER', message: error.message } : null }, () => {});+ };+ child.on('message', message => {+ if (message.type === 'say') { say(message.text); return; }+ if (message.type === 'result') { result = message.value; return; }+ if (message.type === 'failure') { failure = new Refused(message.code, message.message); return; }+ if (message.type !== 'call') return;+ /** Permit only the batch worker's narrow protocol, retaining all authority in this parent. */+ const act = async () => {+ if (message.operation === 'check') { await checkLease(); checkLeaseNow(); return null; }+ if (message.operation === 'wait') return await onWait?.(message.args[0]);+ if (!['recordLandingBatch', 'finishLandingBatch', 'recordLandingFlake', 'recordFlakeObservation', 'recordGateRun'].includes(message.operation)) {+ throw new Refused('LAND_WORKER', 'the landing worker requested an unsupported operation; stop it and inspect pullboard resume');+ }+ return await write(message.operation, message.args);+ };+ void act().then(value => answer(message.id, value), error => answer(message.id, null, error));+ });+ try {+ const terminal = new Promise((resolveClose, reject) => {+ child.once('error', reject);+ child.once('close', (code, terminatedBy) => resolveClose({ code, signal: terminatedBy }));+ });+ if (signal.aborted) abort();+ else child.send({ type: 'start', options });+ const status = await terminal;+ if (failure) throw failure;+ if (status.code !== 0 || result === undefined) throw new Refused('LAND_WORKER', `the landing worker stopped without a completed batch (${status.signal ?? status.code}); inspect pullboard resume before adopting${stderr ? `: ${stderr.trim()}` : ''}`);+ return result;+ } finally {+ signal.removeEventListener('abort', abort);+ stop(child);+ }+}++/** Make one checked request to the live parent without giving the worker independent board-write authority. */+function channel() {+ let next = 0;+ let finished = false;+ const waiting = new Map();+ process.on('message', message => {+ if (message.type !== 'answer') return;+ const pair = waiting.get(message.id);+ if (!pair) return;+ waiting.delete(message.id);+ if (message.error) pair.reject(new Refused(message.error.code, message.error.message));+ else pair.resolve(message.value);+ });+ process.once('disconnect', () => { if (!finished) { try { process.kill(-process.pid, 'SIGKILL'); } catch { process.exit(1); } } });+ const call = (operation, args = []) => new Promise((resolve, reject) => {+ const id = ++next;+ waiting.set(id, { resolve, reject });+ process.send({ type: 'call', id, operation, args });+ });+ return { call, finish(message) { finished = true; process.send(message, () => process.disconnect()); } };+}++/** Enter batch execution only through the parent's private process channel. */+async function workerMain(options) {+ const pipe = channel();+ const { call } = pipe;+ const board = store.openBoard(join(repoInfo(options.root).commonDir, 'pullboard', 'board.sqlite'));+ try {+ const { runLandingBatch } = await import('./land.js');+ /** Canonical catch-up may have moved proof or trunk while the request was in flight. */+ const checkLease = async () => { await call('check'); invalidateGitFacts(); assertWorkerFence(board, options.fence); };+ const result = await runLandingBatch({ ...options, board, write: (operation, args) => call(operation, args),+ say: text => process.send({ type: 'say', text }), onWait: state => call('wait', [state]), checkLease,+ checkLeaseNow: () => assertWorkerFence(board, options.fence) });+ pipe.finish({ type: 'result', value: result });+ } catch (error) {+ process.exitCode = 1;+ pipe.finish({ type: 'failure', code: error.code ?? 'LAND_WORKER', message: error.message });+ } finally { store.closeBoard(board); }+}++/** Check the shared native board immediately before a physical Git action, with no intervening await. */+function assertWorkerFence(board, fence) {+ // This imported live binding is used only after module initialization, keeping board cycles inert.+ return assertLandingLease(board, fence);+}+import { assertLandingLease } from './landing-lease.js';++if (process.argv[1] === FILE && process.send) process.once('message', message => {+ if (message.type === 'start') void workerMain(message.options);+});diff --git a/src/next-steps.js b/src/next-steps.jsindex 3f25d007..879b1b9b 100644--- a/src/next-steps.js+++ b/src/next-steps.js@@ -318,6 +318,12 @@ export const NEXT_STEPS = Object.freeze({BAD_CONFLICT: 'run pullboard reopen <id> --conflict <file> [--conflict <file>] from the main checkout',LANE_TAKEN: 'choose a different lane name with pullboard lane add',LAND_ADOPT: 'read pullboard resume, then run pullboard land --adopt, or pullboard land when nothing is unfinished',+ LAND_LEASE_CORRUPT: 'restore a consistent board export before running pullboard land',+ LAND_LEASE_LOST: 'stop this landing command, read pullboard resume, then adopt only after the current holder finishes',+ LAND_LEASE_REQUEST: 'start a new pullboard land command from the coordinator main checkout',+ LAND_RELAY_REQUIRED: 'restore the linked relay connection, then run pullboard land again',+ LAND_WORKER: 'read pullboard resume and the saved landing logs, stop any owned gate still running, then run pullboard land --adopt',+ RELAY_CONFIRMATION_PENDING: 'wait for the local moves to receive ordered relay receipts before running pullboard land',LAND_BATCH: 'adopt the recorded batch: pullboard land --adopt',LAND_EVIDENCE: 'preserve earlier gate and diagnostic evidence, then pullboard land --adopt',LAND_SOURCE_CHANGED: 'inspect the recorded landing logs and restore the batch source before pullboard land --adopt',diff --git a/test/landing-queue-fixture.js b/test/landing-queue-fixture.jsindex 6a6d4e22..1b5df68e 100644--- a/test/landing-queue-fixture.js+++ b/test/landing-queue-fixture.js@@ -1,6 +1,6 @@/** Public, real-Git landing contention fixture; no private drill data is used [B3,R3,Q1,Q2,E8]. */import assert from 'node:assert/strict';-import { existsSync, readFileSync, writeFileSync } from 'node:fs';+import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';import { join } from 'node:path';import * as store from '../src/board.js';@@ -19,7 +19,7 @@ function readBoard(box, action) {}/** Build two independent items and accept the higher id first through actual CLI checks. */-function acceptedPair(helpers, box) {+function acceptedPair(helpers, box, staleAfterFirst) {const entries = [1, 2].map(number => {const root = join(box.dir, `queue-build-${number}`);box.git(box.repo, 'worktree', 'add', '-q', '-b', `web/queue-${number}`, root, 'main');@@ -29,6 +29,11 @@ function acceptedPair(helpers, box) {'--criterion', `queue item ${number} works`, '--check', `grep -qx works ${file}`, '--json'));const id = added.item.item_id;run(box, root, 'claim', String(id));+ if (number === 2 && staleAfterFirst) {+ // The first-to-land item changes the lower id's checked path on an independent branch.+ mkdirSync(join(root, 'web'), { recursive: true });+ writeFileSync(join(root, 'web', 'queue-1.txt'), 'works changed\n');+ }const commit = helpers.commitFile(box, root, file, 'works\n', 'feat(web): build queue fixture [G1]');assert.equal(commit.status, 0, commit.stderr);run(box, root, 'submit', String(id));@@ -45,7 +50,7 @@ function acceptedPair(helpers, box) {}/** Prove named waiting, exclusion and verdict order with two real overlapping land commands. */-export async function landingQueueCase(t, helpers) {+export async function landingQueueCase(t, helpers, { staleAfterFirst = false } = {}) {const sandbox = helpers.sandbox();const arm = join(sandbox.dir, 'landing-armed');const entered = join(sandbox.dir, 'landing-entered');@@ -56,7 +61,7 @@ export async function landingQueueCase(t, helpers) {`const [arm,entered,release] = ${JSON.stringify([arm, entered, release])};`,"if (fs.existsSync(arm)) { fs.writeFileSync(entered, process.cwd()); const end = Date.now() + 20000; while (!fs.existsSync(release) && Date.now() < end) Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,20); assert.ok(fs.existsSync(release), 'owning test releases the gate'); }","const files = fs.existsSync('web') ? fs.readdirSync('web').filter(file => /^queue-\\d+\\.txt$/.test(file)) : [];",- "for (const file of files) assert.equal(fs.readFileSync('web/' + file,'utf8'), 'works\\n');",+ "for (const file of files) assert.match(fs.readFileSync('web/' + file,'utf8'), /^works/);","console.log('TAP version 13\\nok 1 - landed queue files keep their behavior\\n1..1\\n# tests 1\\n# pass 1\\n# fail 0');",].join('\n'));const box = helpers.project(`node ${JSON.stringify(gateFile)}`, sandbox);@@ -64,7 +69,7 @@ export async function landingQueueCase(t, helpers) {box.git(box.dir, 'init', '-q', '--bare', remote);box.git(box.repo, 'remote', 'add', 'origin', remote);box.git(box.repo, 'push', '-q', '-u', 'origin', 'main');- const entries = acceptedPair(helpers, box);+ const entries = acceptedPair(helpers, box, staleAfterFirst);const base = box.git(box.repo, 'rev-parse', 'main');const children = [];t.after(async () => {@@ -75,6 +80,7 @@ export async function landingQueueCase(t, helpers) {}});writeFileSync(arm, 'armed');+ box.env.CODEX_THREAD_ID = 'private-landing-queue-session';const first = helpers.launch(box, box.repo, process.execPath, [helpers.BIN, 'land', '--max', '1']);children.push(first);await helpers.waitFor(() => existsSync(entered) || first.exitCode !== null, 'first landing reaches its real gate');@@ -87,11 +93,25 @@ export async function landingQueueCase(t, helpers) {await helpers.waitFor(() => /landing waiting: .*held by .*; queued/u.test(second.stdoutText) || second.exitCode !== null,'second landing names its holder and queues');assert.match(second.stdoutText, /landing waiting: .*held by .*; queued/u, `${second.stdoutText}\n${second.stderrText}`);+ const holder = readBoard(box, board => store.landingLeaseState(board).holder);+ assert.equal(holder.pid, first.pid);+ assert.ok(second.stdoutText.includes(holder.label), 'the queue names the actual durable holder');assert.equal(second.exitCode, null, 'the second command stays queued instead of refusing');assert.equal(readBoard(box, board => store.landingBatches(board).length), 1, 'the waiter creates no concurrent batch');assert.equal(box.git(box.repo, 'rev-parse', 'main'), base, 'neither unfinished gate advances main');+ await helpers.waitFor(() => Date.parse(readBoard(box, board => store.landingLeaseState(board).holder?.until)) > Date.parse(holder.until),+ 'the independent parent renews while the worker is blocked inside its real synchronous gate');+ assert.equal(readBoard(box, board => store.landingBatches(board).at(-1).state), 'gating');writeFileSync(release, 'released');const results = await Promise.all(children.map(child => child.closed));+ if (staleAfterFirst) {+ assert.equal(results[0].code, 0, results[0].failure);+ assert.equal(results[1].code, 1, 'the queued command refuses the now-stale acceptance');+ assert.match(second.stderrText, /STALE_VERDICT/u);+ assert.equal(readBoard(box, board => store.landingBatches(board).length), 1, 'a stale waiter starts no batch');+ assert.equal(readBoard(box, board => store.getItem(board, entries[0].id).item_merged_commit), null);+ return;+ }for (const result of results) assert.deepEqual({ code: result.code, signal: result.signal }, { code: 0, signal: null }, result.failure ?? 'land succeeds');const batches = readBoard(box, store.landingBatches);assert.equal(batches.length, 2);diff --git a/test/team.test.js b/test/team.test.jsindex d6820a0d..fe82ab2b 100644--- a/test/team.test.js+++ b/test/team.test.js@@ -34,6 +34,9 @@ after(helpers.cleanup);test('a trunk lands one batch at a time [B3,R3,Q1,Q2,E8]', { timeout: 120_000 }, // budget: hang ceiling for real private Git, CLI checks, both gate barriers and cleanup; no speed target.async t => landingQueueCase(t, helpers));+test('a queued landing rechecks freshness after its holder moves main [E8,Q1,Q2]', { timeout: 120_000 }, // budget: real private Git/CLI and deterministic gate barrier; no speed target.+ async t => landingQueueCase(t, helpers, { staleAfterFirst: true }));+/** Open a fixture's independent board and always close it after its observation or public move. */function withBoard(root, action) {const board = store.openBoard(join(root, '.git', 'pullboard', 'board.sqlite'));