Remove alternate hosts from tooling probes

Keep the probe suite on the Material composition so browser fixtures and capture drivers no longer render or select Cupertino hosts. Record the final residual legacy arguments and implementation checks for the delivery gate.
This commit is contained in:
2026-11-11 21:38:30 +00:00
parent 7cb95471cb
commit b60ad6d98f
68 changed files with 405 additions and 747 deletions
+31 -39
View File
@@ -7,7 +7,7 @@
// The fixture serves the actual RunDetailView over a fake gateway, then drives
// headless Chrome over loopback: the native Changes button, the recorded file,
// its diff, Close diff, Back, the failed-run evidence without a run-wide
// summary, the absent action while executing, and the Cupertino raw/dark
// summary, the absent action while executing, and the Material raw/dark
// surfaces. No server or operator run is touched.
import { createServer } from 'node:http';
import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
@@ -322,57 +322,57 @@ try {
evidence.checks.push({ check: 'an executing run offers no snapshot Changes page', value: true });
await capture('d1-wire-material-running');
await navigate(`${origin}/?platform=cupertino&theme=light`);
await navigate(`${origin}/?theme=light`);
if (!(await hasLabel('Changes'))) {
throw new Error(`Cupertino run detail has no Changes action: ${JSON.stringify(await labels())}`);
throw new Error(`Material run detail has no Changes action: ${JSON.stringify(await labels())}`);
}
await capture('d1-wire-cupertino-detail');
await capture('d1-wire-material-detail');
await clickExact('Changes');
const cupertinoChanges = await bodyText();
if (!cupertinoChanges.includes(file)) {
throw new Error(`Cupertino Changes did not open the recorded file: ${JSON.stringify(cupertinoChanges)}`);
const materialChanges = await bodyText();
if (!materialChanges.includes(file)) {
throw new Error(`Material Changes did not open the recorded file: ${JSON.stringify(materialChanges)}`);
}
evidence.checks.push({ check: 'Cupertino Changes opened the recorded file', value: true });
await capture('d1-wire-cupertino-changes');
evidence.checks.push({ check: 'Material Changes opened the recorded file', value: true });
await capture('d1-wire-material-changes');
await clickPrefix(rowPrefix);
if (!(await bodyText()).includes('const recorded = true;')) {
throw new Error('Cupertino recorded diff missing');
throw new Error('Material recorded diff missing');
}
await capture('d1-wire-cupertino-diff');
await capture('d1-wire-material-diff');
await clickExact('Raw patch');
const rawLabels = await labels();
const rawBody = await bodyText();
if (!rawLabels.some((label) => label.includes('Raw patch for'))
&& !rawBody.includes('const recorded = true;')) {
throw new Error(`Cupertino raw patch did not render: ${JSON.stringify(rawLabels)}`);
throw new Error(`Material raw patch did not render: ${JSON.stringify(rawLabels)}`);
}
if (!(await hasLabel('Copy patch'))) {
throw new Error(`Cupertino raw view lost its actions: ${JSON.stringify(await labels())}`);
throw new Error(`Material raw view lost its actions: ${JSON.stringify(await labels())}`);
}
evidence.checks.push({ check: 'Cupertino Raw patch uses a native selectable body', value: true });
await capture('d1-wire-cupertino-raw');
evidence.checks.push({ check: 'Material Raw patch uses a native selectable body', value: true });
await capture('d1-wire-material-raw');
await clickExact('Close diff');
await delay(600);
await clickExact('Back');
await delay(800);
if (!(await bodyText()).includes('Changes wiring probe')) {
throw new Error('Cupertino Back did not return to the run detail');
throw new Error('Material Back did not return to the run detail');
}
evidence.checks.push({ check: 'Cupertino diff and Back returned', value: true });
await capture('d1-wire-cupertino-back');
evidence.checks.push({ check: 'Material diff and Back returned', value: true });
await capture('d1-wire-material-back');
await navigate(`${origin}/?platform=cupertino&theme=dark`);
await navigate(`${origin}/?theme=dark`);
await clickExact('Changes');
const darkText = [await bodyText(), ...(await labels())].join('\n');
if (!darkText.includes(file) || !darkText.includes('file changed')) {
throw new Error(`Cupertino dark Changes did not render: ${JSON.stringify(darkText)}`);
throw new Error(`Material dark Changes did not render: ${JSON.stringify(darkText)}`);
}
evidence.checks.push({ check: 'Cupertino dark Changes renders the recorded summary', value: true });
await capture('d1-wire-cupertino-dark-changes');
evidence.checks.push({ check: 'Material dark Changes renders the recorded summary', value: true });
await capture('d1-wire-material-dark-changes');
await clickPrefix(rowPrefix);
if (!(await bodyText()).includes('const recorded = true;')) {
throw new Error('Cupertino dark recorded diff missing');
throw new Error('Material dark recorded diff missing');
}
// The header is a merged semantics label, so anchor the pixel crop on the
// controls below it: the form control and the title share the 16 px inset,
@@ -389,15 +389,15 @@ try {
height: 22,
});
if (titleLuminance.max < 0.5) {
throw new Error(`Dark Cupertino diff header is not light: ${JSON.stringify(titleLuminance)}`);
throw new Error(`Dark Material diff header is not light: ${JSON.stringify(titleLuminance)}`);
}
evidence.checks.push({
check: 'Cupertino dark diff header text is light on the popup surface',
check: 'Material dark diff header text is light on the popup surface',
value: true,
luminance: titleLuminance.max,
});
evidence.checks.push({ check: 'Cupertino dark diff renders its recorded lines', value: true });
await capture('d1-wire-cupertino-dark-diff');
evidence.checks.push({ check: 'Material dark diff renders its recorded lines', value: true });
await capture('d1-wire-material-dark-diff');
// A 320-px host at 2x text is the narrowest documented state. The native
// controls must keep the whole browser words; the strip scrolls and reveals
@@ -408,14 +408,11 @@ try {
}, session);
await delay(400);
};
const openScaledDiff = async ({ platform, prefix }) => {
const openScaledDiff = async ({ prefix }) => {
await send('Emulation.setDeviceMetricsOverride', {
width: 320, height: 720, deviceScaleFactor: 1, mobile: true,
}, session);
const query = platform === 'cupertino'
? '?platform=cupertino&theme=light&scale=2'
: '?theme=light&scale=2';
await navigate(`${origin}/${query}`);
await navigate(`${origin}/?theme=light&scale=2`);
await clickExact('Changes');
// The 2x summary pushes the recorded file below the fold: scroll the
// Changes list until its row is built and offered.
@@ -440,7 +437,7 @@ try {
// The native menu carries both fixed words on a host too narrow for the
// segmented control; the sheet/list must show each of them whole. A real
// pointer tap is used because the Cupertino label sits on a semantic
// pointer tap is used because the Material label sits on a semantic
// wrapper above the actual button.
const menuRect = await rectOfLabel('Diff form');
if (!menuRect) {
@@ -477,16 +474,11 @@ try {
await delay(600);
};
await openScaledDiff({ platform: 'material', prefix: 'd1-wire-material-2x-320' });
await openScaledDiff({ prefix: 'd1-wire-material-2x-320' });
evidence.checks.push({
check: 'Material 2x/320 diff keeps its controls and opens Raw patch',
value: true,
});
await openScaledDiff({ platform: 'cupertino', prefix: 'd1-wire-cupertino-2x-320' });
evidence.checks.push({
check: 'Cupertino 2x/320 diff keeps its controls and opens Raw patch',
value: true,
});
console.log(JSON.stringify(evidence, null, 2));
} finally {