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(relay): retain each board checkpoint timeout independently [H5,H16]
Corey Olson180299c07be0
diff --git a/relay/browser-client.js b/relay/browser-client.jsindex e8f77af9..acb1cf74 100644--- a/relay/browser-client.js+++ b/relay/browser-client.js@@ -15,7 +15,6 @@ import { phoneSnapshotPages } from './browser-pages.js';import { createPhoneHistory } from './browser-history.js';const CHECKPOINT_WAIT_MS = 15_000;-const CHECKPOINT_TIMEOUT = 'The relay snapshot has not caught up to this move. Retry this board.';const KEYS = 'pullboard.relay.keys.v1';const PENDING = 'pullboard.relay.pair.v1';const OUTBOX = 'pullboard.relay.requests.v1.';@@ -165,7 +164,6 @@ export async function createTransport({ onUpdate = () => {}, onOpenBoard = () =>for (const pending of entry.pendingSince?.keys() ?? []) if (pending <= sequence) entry.pendingSince.delete(pending);if (entry.checkpointTimedOut && !pendingCheckpointTimeout(entry)) {entry.checkpointTimedOut = false;- if (failureBoard === entry.id && failure === CHECKPOINT_TIMEOUT) { failure = ''; failureBoard = null; }// Reconnect at the authenticated prefix after a timed-out checkpoint, without reloading the page.if (entry.stream) subscribe(entry);}@@ -176,8 +174,6 @@ export async function createTransport({ onUpdate = () => {}, onOpenBoard = () =>for (const since of entry.pendingSince?.values() ?? []) {if (Date.now() - since < CHECKPOINT_WAIT_MS) continue;entry.checkpointTimedOut = true;- failure = CHECKPOINT_TIMEOUT;- failureBoard = entry.id;return true;}return false;@@ -499,7 +495,8 @@ export async function createTransport({ onUpdate = () => {}, onOpenBoard = () =>}if (document.version !== 1) throw new Error('Upgrade this browser client to read the relay API.');await receive(entry, document.event);- if (!entry.checkpointTimedOut) { failure = ''; failureBoard = null; }+ failure = '';+ failureBoard = null;notice();onUpdate();}@@ -832,7 +829,7 @@ export async function createTransport({ onUpdate = () => {}, onOpenBoard = () =>await snapshot(entry);await catchUp(entry);// A read has authenticated the checkpoint and complete prefix before clearing its failure.- if (failureBoard === entry.id && !entry.checkpointTimedOut) { failure = ''; failureBoard = null; }+ if (failureBoard === entry.id) { failure = ''; failureBoard = null; }if (entry.stream?.closed) subscribe(entry);notice();if (match[2] === 'state') return { version: 1, state: entry.state };diff --git a/relay/browser-notice.js b/relay/browser-notice.jsindex 87b5dd5b..4db4b773 100644--- a/relay/browser-notice.js+++ b/relay/browser-notice.js@@ -40,6 +40,10 @@ export function noticeLines({ available, paired, ownedRequestIds = new Map(), wa}, 0);if (waiting) lines.push(`${waiting} request${waiting === 1 ? '' : 's'} from this device ${waiting === 1 ? 'is' : 'are'} waiting for a linked machine to run Pullboard.`);for (const link of pendingLinks) if (typeof link?.name === 'string') lines.push(`${link.name}: waiting for approval on your phone.`);+ // One board's successful event or checkpoint cannot clear another board's recorded lag.+ for (const [id, entry] of paired) if (entry.checkpointTimedOut) {+ lines.push((entry.repository ?? id) + ': The relay snapshot has not caught up to this move. Retry this board.');+ }const pairedRepositories = new Set(available.filter(board => paired.has(board.id)).map(board => board.repository));for (const board of available.filter(value => !paired.has(value.id))) {// This phone just approved the link: its key is on the way, so asking to pair would be wrong.