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(merge): relay person tests hold under load [H16,C7]
Corey Olson21e352f833e7
diff --cc test/relay-client-fixture.jsindex 28847ac2,cb74cd74..b2365f25--- a/test/relay-client-fixture.js+++ b/test/relay-client-fixture.js@@@ -86,14 -182,14 +182,17 @@@ globalThis.fetch = function tracedFetchassert.ok(Number.isSafeInteger(injectedSnapshotWriteDelayMs) && injectedSnapshotWriteDelayMs >= 0 && injectedSnapshotWriteDelayMs <= 15000,'injected snapshot delay is within the product wait bound');let snapshotWriteDelayMs = 0;+ let oneSnapshotDelay = null;let snapshotWriteCount = 0;const snapshotWriteDelays = [];+ const snapshotWriteRecords = [];let stateReadDelayMs = 0;+ let stateReadHold = null;let stateReadStarted = 0;let refuseSnapshotWrites = false;+ let rejectSnapshotWrites = null;+ let rejectedStateReads = null;+ let beforeSnapshotWrite = null;let refuseRequestWrites = false;let signIn;let api;@@@ -179,20 -289,9 +298,20 @@@res.end(JSON.stringify({ version: 1, error: { code: 'RELAY_UNAVAILABLE', message: 'fixture snapshot outage' } }));return;}+ if (rejectSnapshotWrites && req.method === 'PUT' && /\/api\/v1\/boards\/[0-9a-f]{32}\/state$/.test(req.url ?? '')) {+ req.resume();+ res.writeHead(rejectSnapshotWrites.status, { 'content-type': 'application/json' });+ res.end(JSON.stringify({ version: 1, error: { code: rejectSnapshotWrites.code, message: rejectSnapshotWrites.message } }));+ return;+ }+ if (beforeSnapshotWrite && req.method === 'PUT' && /\/api\/v1\/boards\/[0-9a-f]{32}\/state$/.test(req.url ?? '')) {+ const before = beforeSnapshotWrite;+ beforeSnapshotWrite = null;+ await before(req.headers);+ }const stateSnapshotDelayMs = Math.max(snapshotWriteDelayMs, injectedSnapshotWriteDelayMs);- if (stateSnapshotDelayMs && req.method === 'PUT' && /\/api\/v1\/boards\/[0-9a-f]{32}\/state$/.test(req.url ?? '')) {- const delay = stateSnapshotDelayMs;+ if ((stateSnapshotDelayMs || oneSnapshotDelay?.count === snapshotWriteCount) && req.method === 'PUT' && /\/api\/v1\/boards\/[0-9a-f]{32}\/state$/.test(req.url ?? '')) {+ const delay = oneSnapshotDelay?.count === snapshotWriteCount ? oneSnapshotDelay.ms : stateSnapshotDelayMs;const delayedAt = Date.now();await new Promise(resolveDelay => setTimeout(resolveDelay, delay));snapshotWriteDelays.push(Date.now() - delayedAt);@@@ -262,12 -393,8 +413,12 @@@}/** Invoke the production CLI in this private repository under its planned budget, when present. */async function cli(...args) {- return runCliChild(args);+ return runCliChild(args, undefined, args[0] === 'status');}+ /** Invoke the production CLI from another worktree sharing this fixture's repository and home. */+ async function cliAt(cwd, ...args) {+ return childResult(cwd, env, [CLI, ...args, '--json']);+ }/** Bound a CLI child using the exact snapshot count asserted by its fixture flow. */async function cliWithSnapshotUploads(snapshotUploads, ...args) {cliChildDeadlineMs(snapshotUploads);@@@ -369,7 -501,7 +525,7 @@@}return {transit, relayDirectory: join(scratch, 'relay'), authDatabase, otherDeviceJoin,- root, env, origin, lane, before, linkFile, keyFile, calls, moveAcks, cli, cliAt, cliWithSnapshotUploads, link, requireEngineThree, otherDeviceOff, additionalBoard, script, stopRelay, restartRelay,- root, env, origin, lane, before, linkFile, keyFile, calls, moveAcks, cli, cliWithSnapshotUploads, cliWithSnapshotTrace, link, requireEngineThree, otherDeviceOff, additionalBoard, script, stopRelay, restartRelay,++ root, env, origin, lane, before, linkFile, keyFile, calls, moveAcks, cli, cliAt, cliWithSnapshotUploads, cliWithSnapshotTrace, link, requireEngineThree, otherDeviceOff, additionalBoard, script, stopRelay, restartRelay,/** Assert the test consumed every declared child budget, with no hidden CLI calls. */assertCliChildrenComplete() {if (cliChildren) assert.equal(cliChildIndex, cliChildren.length, 'every planned private CLI child ran exactly once');