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.

Merge commit '179ca6b177e8d85023cda567b94b7d5066bd7635' into view/luna-docs802-20261017

Corey Olson2c8818ab215d
diff --cc test/journeys.test.js
index e7c1521c,b2ecb0ab..570341b3
--- a/test/journeys.test.js
+++ b/test/journeys.test.js
@@@ -600,8 -290,7 +617,8 @@@ async function everyBoardJourney(t, slo
// A real foreground browser at the hosted relay completes the CLI's one-use device enrollment.
site = await journeyRelaySite(machineA, viewB.base);
chromeB = await openSnapshotChrome(executable, 'about:blank', profileB);
+ journeyTrace = journeyPageAnswers(chromeB, viewB.base);
- stopRoutes = await routeJourneyOrigins(chromeB, site, viewB);
+ stopRoutes = await routeJourneyOrigins(chromeB, site, viewB, slow);
const person = await machineA.phoneSession();
assert.equal((await chromeB.send('Network.setCookie', {
name: 'pb_session', value: person.token, url: JOURNEY_HOSTED, httpOnly: true, sameSite: 'Lax',
@@@ -624,56 -313,9 +641,57 @@@
assert.equal(linkedSetup.document.paired, true, 'the fixture phone completes the actual device enrollment');
await chromeB.waitFor("location.hash === '' && document.querySelector('#chain')?.textContent.includes('linked machine A board')", 45_000); // budget: bounded setup wait within this journey test’s declared outer timeout (5x relay-work budget plus 180 seconds).
await chromeB.send('Page.navigate', { url: 'about:blank' });
+ journeyTrace.begin();
+ if (slow) slow.armed = true;
await chromeB.send('Page.navigate', { url: JOURNEY_HOSTED + '/' });
- await chromeB.waitFor("[...document.querySelectorAll('#proj-list .proj.repo')].some(row => row.textContent.includes('fixture/repository')) && [...document.querySelectorAll('#proj-list .proj.repo')].some(row => row.textContent.includes('local-machine-b'))", 45_000); // budget: bounded setup wait within this journey test’s declared outer timeout (5x relay-work budget plus 180 seconds).
+ const rowPredicate = `(${journeySidebarReady.toString()})([...document.querySelectorAll('#proj-list .proj.repo .pname')].map(node => node.textContent.trim()), ${JSON.stringify(JOURNEY_BOARD_NAMES)})`;
+ const rowObservation = await observeJourneyRows(
+ () => chromeB.waitFor(rowPredicate, 45_000), // budget: bounded setup wait within this journey test’s declared outer timeout (5x relay-work budget plus 180 seconds).
+ () => boundedJourneyRead(() => chromeB.stable(`JSON.stringify({
+ rows: [...document.querySelectorAll('#proj-list .proj.repo')].map(row => ({ label: row.querySelector('.pname')?.textContent.trim() || '', text: row.textContent.trim() })),
+ unknownRowsPresent: [...document.querySelectorAll('#proj-list .proj.repo .pname')].some(node => !${JSON.stringify(JOURNEY_BOARD_NAMES)}.includes(node.textContent.trim())),
+ projects: (data?.projects || []).map(({name, source, ok, error}) => ({name, source, ok, errorPresent: Boolean(error)})),
+ unknownProjectsPresent: (data?.projects || []).some(project => !${JSON.stringify(JOURNEY_BOARD_NAMES)}.includes(project.name)),
+ localSessionPresent: Boolean(localSession), localReadPresent: Boolean(localReadBase),
+ localOriginIsFixture: localSession?.origin === ${JSON.stringify(viewB.base)},
+ transportPresent: Boolean(transport), transportLoading: Boolean(transportModule && !transport && !transportLoadError),
+ transportLoadErrorPresent: Boolean(transportLoadError), relaySessionPresent: Boolean(hosted.relaySession),
+ localNoteState: document.querySelector('#local-note')?.dataset.state || '',
+ atHostedRoot: location.origin === ${JSON.stringify(JOURNEY_HOSTED)} && location.pathname === '/',
+ pairedFragmentPresent: /(?:^|[&#])(?:device|pullboard-local|key)=/i.test(location.hash)
+ })`)),
+ () => journeyTrace.snapshot(),
+ );
+ if (!rowObservation.ready) {
+ try { t.diagnostic(JSON.stringify(rowObservation.report)); } catch { /* The original row failure remains the test result. */ }
+ throw rowObservation.error;
+ }
+ const pageAnswers = await journeyTrace.snapshot();
+ try {
+ for (const [source, boardName] of [['linked', 'fixture/repository'], ['local', 'local-machine-b']]) {
+ const sourceAnswers = pageAnswers.filter(entry => entry.source === source && entry.pathKind === '/api/v1/boards');
+ assert.ok(sourceAnswers.length > 0, `the page-used ${source} board-list answer was observed`);
+ for (const answer of sourceAnswers) {
+ assert.ok(answer.status === null || (Number.isInteger(answer.status) && answer.status >= 100 && answer.status <= 599),
+ `the page-used ${source} answer has a valid status`);
+ assert.ok(Number.isFinite(answer.requestAtMs) && answer.requestAtMs >= 0,
+ `the page-used ${source} answer has a request time`);
+ assert.ok(answer.responseAtMs === null || (Number.isFinite(answer.responseAtMs) && answer.responseAtMs >= answer.requestAtMs),
+ `the page-used ${source} answer has a valid response time`);
+ assert.ok(answer.completedAtMs === null || (Number.isFinite(answer.completedAtMs)
+ && (answer.responseAtMs === null || answer.completedAtMs >= answer.responseAtMs)),
+ `the page-used ${source} answer has a valid completion time`);
+ assert.ok(['pending', 'captured', 'unavailable', 'invalid'].includes(answer.bodyCapture),
+ `the page-used ${source} answer reports its body capture state`);
+ }
+ const answer = journeyExpectedListAnswer(sourceAnswers, source, boardName);
+ assert.ok(answer, `a completed captured page-used ${source} answer names its fixture board`);
+ assert.deepEqual(answer.boardNames, [boardName], `the page-used ${source} answer names its fixture board`);
+ }
+ } catch (error) {
+ try { t.diagnostic(JSON.stringify({ pageAnswers })); } catch { /* Keep the original assertion failure. */ }
+ throw error;
+ }
const localOrigin = await chromeB.stable('localSession?.origin || null');
assert.ok(localOrigin === viewB.base, 'B discovers its own real view without a typed key, URL, tunnel or port');
const shown = JSON.parse(await chromeB.stable(`JSON.stringify({ labels: [...document.querySelectorAll('#proj-list .proj.repo .pname')].map(node => node.textContent).sort(), secretInAddress: /key=|pullboard-local=|device=/.test(location.href), projects: data.projects.map(({id,name,source}) => ({id,name,source})) })`));