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.

test: reuse the owned async fixture runner [N26,H5]

Corey Olson8d8466b8b334
diff --git a/test/cockpit/relay.test.js b/test/cockpit/relay.test.js
index 1da988aa..85fa2308 100644
--- a/test/cockpit/relay.test.js
+++ b/test/cockpit/relay.test.js
@@ -10,6 +10,7 @@ import { press, stableChrome } from './stable.js';
import { cockpitPage } from '../../src/cockpit.js';
import { createRelayBrowserHandler } from '../../relay/browser-page.js';
import { relayClientFixture } from '../relay-client-fixture.js';
+import { runFixtureChildAsync } from '../fixture-child.js';
import { findChromeExecutable, relayWorkBudgetMs, startChrome } from '../relay-browser-fixture.js';
import { BIN, scratch, SPEC, machine, project, fetchLive, startView, target, chromeExecutable, browserPause, openSnapshotChrome, stopOwnedChrome, closeSnapshotChrome, pickProject } from './fixture.js';
@@ -1036,9 +1037,10 @@ test('the hosted page lists linked and local boards together [N26,H5]', {
PULLBOARD_MACHINE_HOME: local.env.PULLBOARD_MACHINE_HOME,
PATH: local.env.PATH,
};
- const localRelayResult = await linked.cliAtWithEnv(duplicateProject.repo, localRelayEnv,
- 'relay', 'on', '--url', linked.origin);
- assert.equal(localRelayResult.code, 0,
+ const localRelayResult = await runFixtureChildAsync(process.execPath,
+ [BIN, 'relay', 'on', '--url', linked.origin, '--json'],
+ { cwd: duplicateProject.repo, env: localRelayEnv, timeout: relayWorkBudgetMs() });
+ assert.equal(localRelayResult.status, 0,
'C links its actual local board to the relay as a second source for the same board identity');
const localRelay = JSON.parse(readFileSync(join(duplicateProject.repo, '.git', 'pullboard', 'relay.json'), 'utf8'));
const localRelayKey = readFileSync(join(local.env.PULLBOARD_HOME, 'relay-keys', localRelay.board + '.key'), 'utf8').trim();
diff --git a/test/relay-client-fixture.js b/test/relay-client-fixture.js
index 06918cbd..24480e6b 100644
--- a/test/relay-client-fixture.js
+++ b/test/relay-client-fixture.js
@@ -479,10 +479,6 @@ globalThis.fetch = function tracedFetch(input, init) {
async function cliAt(cwd, ...args) {
return childResult(cwd, env, [CLI, ...args, '--json']);
}
- /** Invoke the production CLI at another repository with an explicit private fixture environment. */
- async function cliAtWithEnv(cwd, commandEnv, ...args) {
- return childResult(cwd, commandEnv, [CLI, ...args, '--json']);
- }
/** Bound a CLI child using the exact snapshot count asserted by its fixture flow. */
async function cliWithSnapshotUploads(snapshotUploads, ...args) {
cliChildDeadlineMs(snapshotUploads);
@@ -591,7 +587,7 @@ globalThis.fetch = function tracedFetch(input, init) {
}
return {
transit, providerState: provider.state, providerCalls: provider.calls, relayDirectory: join(scratch, 'relay'), authDatabase, auth, otherDeviceJoin,
- root, env, origin, lane, before, linkFile, keyFile, calls, moveAcks, cli, cliAt, cliAtWithEnv, cliWithSnapshotUploads, cliWithSnapshotTrace, link, phoneSession, requireEngineThree, otherDeviceOff, additionalBoard, script, stopRelay, restartRelay,
+ root, env, origin, lane, before, linkFile, keyFile, calls, moveAcks, cli, cliAt, cliWithSnapshotUploads, cliWithSnapshotTrace, link, phoneSession, 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');