Files
hyperframes/packages/cli/scripts/pin-chrome.ts
T
James RussoandClaude Opus 5.5 7930525024 build(chrome): pin chrome-headless-shell 158.0.8127.36 wherever the repo installs it (#8145)
The engine ceiling moves from Beta 152.0.7977.30 to stable 158.0.8127.36, with its Chrome for
Testing digests. The places that installed `@stable` or an older pin follow it: the CI test
workspace, the regression test image, the k8s and Cloud Run examples, the CLI render image
(amd64) and the Lambda build hint. The motion-blur nightly keeps its pinned-versus-stable
comparison: the pin leg now uses the workspace's pinned shell, and a stable leg fetches stable.

The chat regression golden is regenerated on 158. Chrome 157 renders it pixel-identically to
158, so the previous golden recorded Chrome 152's paint of a background-clip:text phrase whose
word spans start at opacity 0.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 07:17:16 +00:00

46 lines
1.8 KiB
TypeScript

// Prints PINNED_SHELL_DIGESTS for packages/engine/src/services/chromeHostCeiling.ts: each pinned build's headless
// shell, downloaded from Chrome for Testing with the installer the CLI uses, digested as the CLI checks it.
//
// bun run --cwd packages/cli pin:chrome 158.0.8127.36 150.0.7871.124
import { mkdtempSync, rmSync } from "node:fs";
import { tmpdir } from "node:os";
import { dirname, join } from "node:path";
import { Browser, BrowserPlatform, install } from "@puppeteer/browsers";
import { headlessShellDigest, managedChromeVersion } from "@hyperframes/engine/chrome-host-ceiling";
const PLATFORMS = [
BrowserPlatform.MAC_ARM,
BrowserPlatform.MAC,
BrowserPlatform.LINUX,
BrowserPlatform.WIN32,
BrowserPlatform.WIN64,
];
const builds = process.argv.slice(2);
if (builds.length === 0) throw new Error("Name the builds to pin.");
const digests: Record<string, string[]> = {};
for (const buildId of builds) {
digests[buildId] = [];
for (const platform of PLATFORMS) {
// Only macOS 12 is ever given a build other than the current one (managedChromeVersion).
if (buildId !== managedChromeVersion("linux") && !platform.startsWith("mac")) continue;
const cacheDir = mkdtempSync(join(tmpdir(), "hf-pin-chrome-"));
try {
const { executablePath } = await install({
browser: Browser.CHROMEHEADLESSSHELL,
buildId,
platform,
cacheDir,
});
const digest = headlessShellDigest(dirname(executablePath));
if (!digest) throw new Error(`${buildId} ${platform}: the unpacked folder holds a link`);
console.error(`${buildId} ${platform} ${digest}`);
digests[buildId].push(digest);
} finally {
rmSync(cacheDir, { recursive: true, force: true });
}
}
}
console.log(JSON.stringify(digests, null, 2));