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.

fix(relay): await acknowledged presentation checkpoints [H5,H15,H16]

Corey Olson321be6b3e03d
diff --git a/relay/browser-client.js b/relay/browser-client.js
index 419f5db8..6ab53d13 100644
--- a/relay/browser-client.js
+++ b/relay/browser-client.js
@@ -1,6 +1,7 @@
/** Device-only relay transport: cookie authorization, local keys and authenticated ciphertext [H5,H15]. */
import { decodeBoardKey, unseal } from './seal.js';
import { snapshotState, presentationState } from './model.js';
+import { ENGINE_VERSION } from './engine.js';
import { Refused } from './refused.js';
const KEYS = 'pullboard.relay.keys.v1';
@@ -124,6 +125,17 @@ export async function createTransport({ onUpdate = () => {} } = {}) {
}
}
+ /** Wait for an acknowledged device snapshot instead of consuming an event with no projection. */
+ async function waitForSnapshot(entry, sequence) {
+ const deadline = Date.now() + 15000;
+ while (Date.now() < deadline) {
+ await snapshot(entry);
+ if (entry.state && entry.cursor >= sequence) return;
+ await new Promise(resolveSnapshot => setTimeout(resolveSnapshot, 100));
+ }
+ throw new Error('The relay snapshot has not caught up to this move. Retry this board.');
+ }
+
/** Apply a sealed presentation in strict sequence; newer executable formats are never guessed. */
async function receive(entry, row, history = false) {
if (!row || !Number.isSafeInteger(row.event_id) || !['move', 'request'].includes(row.kind)) throw new Error('The relay event is invalid. Refresh this board.');
@@ -138,15 +150,14 @@ export async function createTransport({ onUpdate = () => {} } = {}) {
const move = JSON.parse(new TextDecoder().decode(plain));
if (accessLost) throw new Error('Sign in again to read this board.');
if (move.version !== 1 || !Number.isSafeInteger(move.engine) || move.engine < 1) throw new Error('This sealed move has an unsupported format. Refresh it from a linked machine.');
- if (move.engine !== 1) throw new Refused('RELAY_ENGINE_VERSION', 'This board needs engine ' + move.engine + '; this browser reads engine 1. Upgrade the browser client.');
+ if (move.engine !== ENGINE_VERSION) throw new Refused('RELAY_ENGINE_VERSION', 'This board needs engine ' + move.engine + '; this browser reads engine ' + ENGINE_VERSION + '. Upgrade the browser client.');
if (move.presentation) {
entry.state = presentationState(move.presentation, entry.id);
entry.cursor = row.event_id;
} else {
- await snapshot(entry);
- // Earlier records in a legacy batch have no complete projection. Consume their position
- // without exposing later local moves; its final record/checkpoint supplies the presentation.
- if (entry.cursor < row.event_id) entry.cursor = row.event_id;
+ // A snapshot may be uploaded just after this ACK and compact the event immediately. Keep
+ // the cursor where it is until a valid snapshot actually covers this row.
+ await waitForSnapshot(entry, row.event_id);
}
}
diff --git a/relay/browser-page.js b/relay/browser-page.js
index 17d0966c..67755c93 100644
--- a/relay/browser-page.js
+++ b/relay/browser-page.js
@@ -2,6 +2,7 @@
import { createHash } from 'node:crypto';
import { readFileSync } from 'node:fs';
import { cockpitPage } from '../src/cockpit.js';
+import { ENGINE_VERSION } from '../src/machine.js';
import { Refused } from '../src/refused.js';
const STYLES = readFileSync(new URL('../src/view.css', import.meta.url), 'utf8');
@@ -24,6 +25,7 @@ export function createRelayBrowserHandler({ authenticate }) {
['/view.css', ['text/css', STYLES]],
['/relay/client.js', ['text/javascript', readFileSync(new URL('./browser-client.js', import.meta.url), 'utf8')]],
['/relay/model.js', ['text/javascript', readFileSync(new URL('./browser-model.js', import.meta.url), 'utf8').replace("'../src/refused.js'", "'./refused.js'")]],
+ ['/relay/engine.js', ['text/javascript', 'export const ENGINE_VERSION = ' + ENGINE_VERSION + ';\n']],
['/relay/seal.js', ['text/javascript', readFileSync(new URL('../src/seal.js', import.meta.url), 'utf8')]],
['/relay/refused.js', ['text/javascript', readFileSync(new URL('../src/refused.js', import.meta.url), 'utf8')]],
]);
diff --git a/src/machine.js b/src/machine.js
index be07b290..33859268 100644
--- a/src/machine.js
+++ b/src/machine.js
@@ -9,6 +9,9 @@
* broken copy, and checks the declaration against the refusals board.js and cli.js raise today.
*/
+/** Executable move semantics; bump whenever a move's meaning changes [H16]. */
+export const ENGINE_VERSION = 1;
+
/** @typedef {'agent' | 'coordinator' | 'clock'} Role */
/**
diff --git a/src/relay.js b/src/relay.js
index b5871489..cd4ef3f6 100644
--- a/src/relay.js
+++ b/src/relay.js
@@ -8,6 +8,7 @@ import { repoInfo, tryGit } from './git.js';
import { forgetBoardKey, readBoardKey, storeBoardKey } from './relay-key.js';
import { encodeBoardKey, generateBoardKey, seal } from './seal.js';
import { terminalQr } from './qr.js';
+import { ENGINE_VERSION } from './machine.js';
import { Refused } from './refused.js';
export const DEFAULT_RELAY = 'https://app.pullboard.dev';
@@ -165,8 +166,12 @@ async function flush(root, file, state, io) {
saveLink(file, state);
}
if (state.snapshot) {
- const uploaded = await request(state, path + '/state', { method: 'PUT', body: state.snapshot }, io);
- if (uploaded.state?.sequence !== state.snapshot.sequence || uploaded.state.sealed !== state.snapshot.sealed) throw new Refused('RELAY_RESPONSE', 'the relay did not acknowledge the queued snapshot; retry the configured relay');
+ const pendingSnapshot = state.snapshot;
+ const uploaded = await request(state, path + '/state', { method: 'PUT', body: pendingSnapshot }, io);
+ if (uploaded.state?.sequence !== pendingSnapshot.sequence || uploaded.state.sealed !== pendingSnapshot.sealed) throw new Refused('RELAY_RESPONSE', 'the relay did not acknowledge the queued snapshot; retry the configured relay');
+ if (state.snapshotPresentationDigest) state.presentationDigest = state.snapshotPresentationDigest;
+ delete state.snapshotPresentationDigest;
+ state.needsPresentation = false;
delete state.snapshot;
saveLink(file, state);
}
@@ -184,7 +189,12 @@ async function flush(root, file, state, io) {
}
if (state.pending) {
const accepted = received.find((event) => event.event_id === state.pending.sequence && event.sealed === state.pending.sealed && event.kind === 'move');
- if (accepted) { state.cursor = state.pending.localEvent; if (state.pending.presentationDigest) state.presentationDigest = state.pending.presentationDigest; delete state.pending; }
+ if (accepted) {
+ state.cursor = state.pending.localEvent;
+ state.needsPresentation = Boolean(state.needsPresentation || state.pending.needsPresentation || !state.pending.presentationDigest);
+ if (state.pending.presentationDigest) state.presentationDigest = state.pending.presentationDigest;
+ delete state.pending;
+ }
}
if (received.length) state.sequence = Math.max(state.sequence, ...received.map((event) => event.event_id));
if (state.pending && state.pending.sequence <= state.sequence) delete state.pending;
@@ -196,8 +206,8 @@ async function flush(root, file, state, io) {
const current = relayPresentation(root);
// Only a projection ending at this local record belongs to its relay position.
const presentation = current.state.events[0]?.event_id === event.event_id ? current : undefined;
- state.pending = { localEvent: event.event_id, sequence, ...(presentation ? { presentationDigest: presentationDigest(presentation) } : {}),
- sealed: await sealedRecord(key, { version: 1, engine: 1, event, presentation }, state, 'move', sequence) };
+ state.pending = { localEvent: event.event_id, sequence, needsPresentation: Boolean(state.needsPresentation || !presentation), ...(presentation ? { presentationDigest: presentationDigest(presentation) } : {}),
+ sealed: await sealedRecord(key, { version: 1, engine: ENGINE_VERSION, event, presentation }, state, 'move', sequence) };
saveLink(file, state);
}
const { sequence, sealed } = state.pending;
@@ -205,20 +215,25 @@ async function flush(root, file, state, io) {
if (reply.event?.event_id !== sequence || reply.event.sealed !== sealed) throw new Refused('RELAY_RESPONSE', 'the relay acknowledgement does not match the queued record; retry after checking the relay');
state.sequence = sequence;
state.cursor = event.event_id;
+ state.needsPresentation = Boolean(state.needsPresentation || state.pending.needsPresentation);
if (state.pending.presentationDigest) state.presentationDigest = state.pending.presentationDigest;
delete state.pending;
saveLink(file, state);
}
const presentation = relayPresentation(root);
const digest = presentationDigest(presentation);
- if (state.presentationDigest !== digest) {
+ if (state.needsPresentation || state.presentationDigest !== digest) {
const document = relaySnapshot(root);
if ((document.tables.event.at(-1)?.event_id ?? 0) !== state.cursor) throw new Refused('RELAY_PRESENTATION_PENDING', 'new local moves arrived while syncing; run pullboard status again before publishing their presentation');
state.snapshot = { sequence: state.sequence, sealed: await sealedRecord(key, document, state, 'snapshot', state.sequence) };
- state.presentationDigest = presentationDigest(document.presentation);
+ state.snapshotPresentationDigest = presentationDigest(document.presentation);
saveLink(file, state);
- const uploaded = await request(state, path + '/state', { method: 'PUT', body: state.snapshot }, io);
- if (uploaded.state?.sequence !== state.snapshot.sequence || uploaded.state.sealed !== state.snapshot.sealed) throw new Refused('RELAY_RESPONSE', 'the relay did not acknowledge the refreshed presentation; retry the configured relay');
+ const pendingSnapshot = state.snapshot;
+ const uploaded = await request(state, path + '/state', { method: 'PUT', body: pendingSnapshot }, io);
+ if (uploaded.state?.sequence !== pendingSnapshot.sequence || uploaded.state.sealed !== pendingSnapshot.sealed) throw new Refused('RELAY_RESPONSE', 'the relay did not acknowledge the refreshed presentation; retry the configured relay');
+ state.presentationDigest = state.snapshotPresentationDigest;
+ delete state.snapshotPresentationDigest;
+ state.needsPresentation = false;
delete state.snapshot;
saveLink(file, state);
}
diff --git a/test/relay-browser.test.js b/test/relay-browser.test.js
index fddbe114..d4f53807 100644
--- a/test/relay-browser.test.js
+++ b/test/relay-browser.test.js
@@ -4,7 +4,8 @@ import { readFileSync, writeFileSync } from 'node:fs';
import { join } from 'node:path';
import { test } from 'node:test';
import { snapshotState, presentationState } from '../relay/browser-model.js';
-import { decodeBoardKey, unseal } from '../src/seal.js';
+import { decodeBoardKey, seal, unseal } from '../src/seal.js';
+import { relaySnapshot } from '../src/relay-presentation.js';
import { relayClientFixture } from './relay-client-fixture.js';
import { findChromeExecutable, startChrome } from './relay-browser-fixture.js';
@@ -121,6 +122,105 @@ test('real Chrome pairs, retains its device key, follows SSE without polling and
await chrome.waitFor("document.body.textContent.includes('Sign in with GitHub') && !document.body.textContent.includes(" + JSON.stringify(liveTitle) + ')');
});
+/** Append an authenticated synthetic sealed move without writing it to the private local board. */
+async function appendEngineMove(box, link, key, sequence, engine, presentation) {
+ const event = { event_id: sequence, event_kind: 'add', event_by: 'fixture', event_at: new Date().toISOString(), event_detail: '{}' };
+ const sealed = Buffer.from(await seal(key, new TextEncoder().encode(JSON.stringify({ version: 1, engine, event, ...(presentation ? { presentation } : {}) })), {
+ boardId: link.board, kind: 'move', sequence,
+ })).toString('base64url');
+ const response = await fetch(box.origin + '/api/v1/boards/' + link.board + '/moves', {
+ method: 'POST', headers: { authorization: 'Bearer ' + link.token, 'content-type': 'application/json' },
+ body: JSON.stringify({ sequence, sealed }),
+ });
+ assert.equal(response.status, 200, 'the private stand-in accepts the synthetic sealed sequence');
+ return response.json();
+}
+
+test('real Chrome refuses a newer engine in the initial replay without exposing board contents [H5,H15]', {
+ skip: !findChromeExecutable() && 'Chrome is not installed',
+}, async t => {
+ const box = await relayClientFixture(t);
+ const privateTitle = 'ENGINE_TWO_PRIVATE_108';
+ assert.equal((await box.cli('add', box.lane, privateTitle)).code, 0);
+ await box.link();
+ const link = JSON.parse(readFileSync(box.linkFile, 'utf8'));
+ const key = decodeBoardKey(readFileSync(box.keyFile, 'utf8').trim());
+ const presentation = relaySnapshot(box.root).presentation;
+ presentation.state.items[0].title = privateTitle;
+ await appendEngineMove(box, link, key, 1, 2, presentation);
+
+ const chrome = await startChrome();
+ t.after(() => chrome.close());
+ await signIn(chrome, box);
+ await chrome.navigate(box.origin + '/#board=' + link.board + '&key=' + readFileSync(box.keyFile, 'utf8').trim());
+ await chrome.waitFor("document.querySelector('#relay-notice')?.textContent.includes('This board needs engine 2')");
+ assert.equal(await chrome.evaluate('document.body.textContent.includes(' + JSON.stringify(privateTitle) + ')'), false,
+ 'an unsupported initial event cannot install its attached presentation');
+});
+
+test('real Chrome refuses a newer engine delivered over the live stream [H5,H15]', {
+ skip: !findChromeExecutable() && 'Chrome is not installed',
+}, async t => {
+ const box = await relayClientFixture(t);
+ const initialTitle = 'ENGINE_ONE_INITIAL_108';
+ const privateTitle = 'ENGINE_TWO_LIVE_PRIVATE_108';
+ assert.equal((await box.cli('add', box.lane, initialTitle)).code, 0);
+ await box.link();
+ const link = JSON.parse(readFileSync(box.linkFile, 'utf8'));
+ const key = decodeBoardKey(readFileSync(box.keyFile, 'utf8').trim());
+ const chrome = await startChrome();
+ t.after(() => chrome.close());
+ await chrome.send('Page.addScriptToEvaluateOnNewDocument', { source: 'window.setInterval = () => 0;' });
+ await signIn(chrome, box);
+ await chrome.navigate(box.origin + '/#board=' + link.board + '&key=' + readFileSync(box.keyFile, 'utf8').trim());
+ await chrome.waitFor("document.querySelector('#chain')?.textContent.includes(" + JSON.stringify(initialTitle) + ')');
+ const presentation = relaySnapshot(box.root).presentation;
+ presentation.state.items[0].title = privateTitle;
+ await appendEngineMove(box, link, key, 1, 2, presentation);
+ await chrome.waitFor("document.querySelector('#relay-notice')?.textContent.includes('This board needs engine 2')");
+ assert.equal(await chrome.evaluate('document.body.textContent.includes(' + JSON.stringify(privateTitle) + ')'), false,
+ 'a newer live engine is refused before its presentation changes the page');
+});
+
+test('real Chrome waits for and installs the late snapshot that compacts a legacy move [H5,H15]', {
+ skip: !findChromeExecutable() && 'Chrome is not installed',
+}, async t => {
+ const box = await relayClientFixture(t);
+ const initialTitle = 'LATE_SNAPSHOT_INITIAL_108';
+ const finalTitle = 'LATE_SNAPSHOT_REPAIRED_108';
+ assert.equal((await box.cli('add', box.lane, initialTitle)).code, 0);
+ await box.link();
+ const link = JSON.parse(readFileSync(box.linkFile, 'utf8'));
+ const key = decodeBoardKey(readFileSync(box.keyFile, 'utf8').trim());
+ const chrome = await startChrome();
+ t.after(() => chrome.close());
+ await chrome.send('Page.addScriptToEvaluateOnNewDocument', { source: 'window.setInterval = () => 0;' });
+ await signIn(chrome, box);
+ await chrome.navigate(box.origin + '/#board=' + link.board + '&key=' + readFileSync(box.keyFile, 'utf8').trim());
+ await chrome.waitFor("document.querySelector('#chain')?.textContent.includes(" + JSON.stringify(initialTitle) + ')');
+
+ await appendEngineMove(box, link, key, 1, 1);
+ await new Promise(resolveLate => setTimeout(resolveLate, 350));
+ assert.equal(await chrome.evaluate('document.body.textContent.includes(' + JSON.stringify(finalTitle) + ')'), false,
+ 'the event position is not consumed while the current snapshot is behind it');
+
+ const checkpoint = relaySnapshot(box.root);
+ checkpoint.tables.item[0].item_title = finalTitle;
+ checkpoint.presentation.state.items[0].title = finalTitle;
+ const bytes = Buffer.from(await seal(key, new TextEncoder().encode(JSON.stringify(checkpoint)), {
+ boardId: link.board, kind: 'snapshot', sequence: 1,
+ })).toString('base64url');
+ const uploaded = await fetch(box.origin + '/api/v1/boards/' + link.board + '/state', {
+ method: 'PUT', headers: { authorization: 'Bearer ' + link.token, 'content-type': 'application/json' },
+ body: JSON.stringify({ sequence: 1, sealed: bytes }),
+ });
+ assert.equal(uploaded.status, 200, 'the stand-in acknowledges a snapshot covering the move');
+ await chrome.waitFor("document.querySelector('#chain')?.textContent.includes(" + JSON.stringify(finalTitle) + ')');
+ const replay = await fetch(box.origin + '/api/v1/boards/' + link.board + '/events?after=0', { headers: { authorization: 'Bearer ' + link.token } });
+ assert.equal(replay.status, 409, 'the relay compacted the covered event and requires the new snapshot cursor');
+ assert.equal(box.keyInRequest(), false, 'the key remains absent from browser requests');
+});
+
test('an unauthenticated pairing link stays device-only through sign-in and a wrong key shows no contents [H5,H15]', {
skip: !findChromeExecutable() && 'Chrome is not installed',
}, async t => {
@@ -156,14 +256,39 @@ test('legacy queued presentations never disclose later unacknowledged moves [H5,
assert.equal((await box.cli('add', box.lane, 'FIRST_QUEUED_108')).code, 0);
assert.equal((await box.cli('add', box.lane, 'SECOND_QUEUED_108')).code, 0);
box.refuseReads(false);
- assert.equal((await box.cli('status')).code, 0);
- const response = await fetch(box.origin + '/api/v1/boards/' + link.board + '/events?after=0', { headers: { authorization: 'Bearer ' + link.token } });
- assert.equal(response.status, 200);
- const rows = (await response.json()).events;
- assert.equal(rows.length, 2);
+ box.refuseSnapshotWrites(true);
+ const status = await box.cli('status');
+ assert.equal(status.code, 0);
+ assert.equal((status.document.diagnostics ?? []).some(line => line.includes('[RELAY_UNAVAILABLE]')), true,
+ 'a refused snapshot keeps the final projection pending for retry');
+ assert.equal(box.calls.filter(call => call.method === 'POST' && /\/moves$/.test(call.path)).length, 2, 'both queued moves reached the real stand-in route');
+ assert.equal(box.moveAcks.length, 2, 'both encrypted move acknowledgements were captured before snapshot compaction');
+ const pendingLink = JSON.parse(readFileSync(box.linkFile, 'utf8'));
+ assert.equal(pendingLink.needsPresentation, true);
+ assert.equal(Boolean(pendingLink.snapshot), true);
+ const oldState = await fetch(box.origin + '/api/v1/boards/' + link.board + '/state', { headers: { authorization: 'Bearer ' + link.token } });
+ assert.equal((await oldState.json()).state.sequence, 0, 'the relay did not acknowledge the refused checkpoint');
+
+ box.refuseSnapshotWrites(false);
+ const retried = await box.cli('status');
+ assert.equal(retried.code, 0);
+ assert.equal(retried.document.diagnostics?.length ?? 0, 0, 'the saved checkpoint retries without re-sending acknowledged moves');
+ assert.equal(box.moveAcks.length, 2);
+ const completedLink = JSON.parse(readFileSync(box.linkFile, 'utf8'));
+ assert.equal(completedLink.needsPresentation, false, 'only a matching snapshot acknowledgement clears the pending presentation');
+ assert.equal(Boolean(completedLink.snapshot), false);
const key = decodeBoardKey(readFileSync(box.keyFile, 'utf8').trim());
- const moves = await Promise.all(rows.map(async row => JSON.parse(new TextDecoder().decode(await unseal(key, Buffer.from(row.sealed, 'base64url'), { boardId: link.board, kind: row.kind, sequence: row.event_id })))));
+ const moves = await Promise.all(box.moveAcks.map(async row => JSON.parse(new TextDecoder().decode(await unseal(key, Buffer.from(row.sealed, 'base64url'), { boardId: link.board, kind: row.kind, sequence: row.event_id })))));
assert.equal(moves[0].presentation, undefined, 'the earlier record cannot attest the already-advanced whole board');
assert.equal(moves[1].presentation.state.events[0].event_id, moves[1].event.event_id);
assert.equal(moves[1].presentation.state.items.some(item => item.title === 'SECOND_QUEUED_108'), true);
+ const response = await fetch(box.origin + '/api/v1/boards/' + link.board + '/state', { headers: { authorization: 'Bearer ' + link.token } });
+ assert.equal(response.status, 200);
+ const checkpoint = (await response.json()).state;
+ assert.equal(checkpoint.sequence, box.moveAcks[1].event_id, 'the acknowledged final checkpoint covers the omitted presentation');
+ const document = JSON.parse(new TextDecoder().decode(await unseal(key, Buffer.from(checkpoint.sealed, 'base64url'), { boardId: link.board, kind: 'snapshot', sequence: checkpoint.sequence })));
+ assert.equal(document.presentation.state.items.some(item => item.title === 'FIRST_QUEUED_108'), true);
+ assert.equal(document.presentation.state.items.some(item => item.title === 'SECOND_QUEUED_108'), true);
+ const compacted = await fetch(box.origin + '/api/v1/boards/' + link.board + '/events?after=0', { headers: { authorization: 'Bearer ' + link.token } });
+ assert.equal(compacted.status, 409, 'the relay compacted the moves only after acknowledging their final checkpoint');
});
diff --git a/test/relay-client-fixture.js b/test/relay-client-fixture.js
index 4f2db1f6..6fdb9ef9 100644
--- a/test/relay-client-fixture.js
+++ b/test/relay-client-fixture.js
@@ -61,12 +61,24 @@ export async function relayClientFixture(t) {
let time = Date.now();
let override = null;
let refuseEventReads = false;
+ let refuseSnapshotWrites = false;
let signIn;
let api;
const calls = [];
+ const moveAcks = [];
const privateKeys = new Set();
let keyLeaked = false;
const server = createServer(async (req, res) => {
+ const end = res.end.bind(res);
+ res.end = (chunk, ...args) => {
+ if (req.method === 'POST' && /\/api\/v1\/boards\/[0-9a-f]{32}\/moves$/.test(req.url ?? '') && (typeof chunk === 'string' || Buffer.isBuffer(chunk))) {
+ try {
+ const response = JSON.parse(Buffer.isBuffer(chunk) ? chunk.toString('utf8') : chunk);
+ if (typeof response.event?.sealed === 'string') moveAcks.push(response.event);
+ } catch { /* Capture only valid move acknowledgements; the production response remains unchanged. */ }
+ }
+ return end(chunk, ...args);
+ };
calls.push({ method: req.method, path: req.url, accept: req.headers.accept ?? '' });
if ([...privateKeys].some(key => JSON.stringify({ url: req.url, headers: req.headers }).includes(key))) keyLeaked = true;
if (refuseEventReads && req.method === 'GET' && /\/events(?:\?|$)/.test(req.url)) {
@@ -79,6 +91,11 @@ export async function relayClientFixture(t) {
res.end(JSON.stringify({ version: override.version ?? 1, error: { code: override.code, message: 'fixture refusal' } }));
return;
}
+ if (refuseSnapshotWrites && req.method === 'PUT' && /\/api\/v1\/boards\/[0-9a-f]{32}\/state$/.test(req.url ?? '')) {
+ res.writeHead(503, { 'content-type': 'application/json' });
+ res.end(JSON.stringify({ version: 1, error: { code: 'RELAY_UNAVAILABLE', message: 'fixture snapshot outage' } }));
+ return;
+ }
if (await signIn(req, res)) return;
await api(req, res);
});
@@ -155,9 +172,10 @@ export async function relayClientFixture(t) {
return childResult(root, env, ['--input-type=module', '-e', source]);
}
return {
- root, env, origin, lane, before, linkFile, keyFile, calls, cli, link, otherDeviceOff, additionalBoard, script,
+ root, env, origin, lane, before, linkFile, keyFile, calls, moveAcks, cli, link, otherDeviceOff, additionalBoard, script,
advance(days) { time = Date.now() + days * 86400000; },
overrideDelete(value) { override = value; },
+ refuseSnapshotWrites(value) { refuseSnapshotWrites = value; },
mainURL: new URL('../src/cli.js', import.meta.url).href,
keyInRequest() { return keyLeaked; },
/** Revoke the actual synthetic person session, including its current live streams. */