mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-21 20:30:47 +02:00
Merge codex/gstack-2 into gstack2-runtime-integration
Reconcile the four integrated v2 runtime implementations (unified execution result contract, execution profiles, capability readiness, GitHub security) with main's browser-provider hardening. Conflict resolutions: - runtimeContract() generator: keep new execution-result + doctor-capability paragraphs, adopt main's `[matching browser flags]` fallback wording; regenerate the six RUNTIME.md. - package.json: keep the strict isolated test:gstack2 runner and marked 18.0.6 security bump; adopt main's playwright-core alias. - bun.lock: regenerated via bun install. - release-hardening.test.ts: adopt main's browser-provider assertions (resolveServerLaunchTarget, --browser managed smoke loop). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,7 @@ describe("release and CI hardening", () => {
|
||||
});
|
||||
expect(pkg.files).toEqual(["bin/gstack", "runtime", "README.md", "LICENSE", "VERSION"]);
|
||||
expect(pkg.dependencies["puppeteer-core"]).toBeUndefined();
|
||||
expect(pkg.dependencies.playwright).toBe("npm:playwright-core@^1.58.2");
|
||||
});
|
||||
|
||||
test("runtime identity is aligned independently of the legacy four-slot release counter", () => {
|
||||
@@ -72,15 +73,24 @@ describe("release and CI hardening", () => {
|
||||
expect(workflow).toContain("versions/current.json");
|
||||
expect(workflow).not.toContain('active="$GSTACK_HOME/versions/2.0.0"');
|
||||
expect(workflow).toContain(".gstack-runtime-browsers");
|
||||
expect(workflow).toContain('for (const options of [{ headless: true }, { headless: true, channel: "chromium" }])');
|
||||
expect(workflow).toContain("--browser managed");
|
||||
// Exercise both the bundled browser and the explicit Chromium channel. Keep
|
||||
// this semantic: the workflow intentionally loops over launch options so a
|
||||
// harmless refactor does not invalidate release hardening.
|
||||
expect(workflow).toMatch(/for \(const options of \[\{ headless: true \}, \{ headless: true, channel: ["']chromium["'] \}\]\)/);
|
||||
expect(workflow).toContain("chromium.launch(options)");
|
||||
expect(workflow).toContain("await browser.close()");
|
||||
expect(workflow).not.toContain("--with-deps");
|
||||
expect(workflow).toContain(".gstack-runtime-tools/bun");
|
||||
expect(workflow).toContain('"$GSTACK_HOME/bin/bun" --version');
|
||||
expect(workflow).toContain("BUN-LICENSE-1.3.14.md");
|
||||
expect(workflow).toContain("command -v bun");
|
||||
expect(workflow).toContain("GSTACK_NODE=\"$node_command\"");
|
||||
expect(workflow).toContain("goto about:blank");
|
||||
expect(workflow).toContain("pathToFileURL(p).href");
|
||||
expect(workflow).toContain('path").join(process.env.GITHUB_WORKSPACE,".gstack-runtime-smoke.html")');
|
||||
expect(workflow).not.toContain("goto about:blank");
|
||||
expect(read("scripts/gstack2/runtime-install-smoke.sh"))
|
||||
.toContain('./setup --home "$HOME_DIR" --browser managed --install-now --yes --json');
|
||||
const manifest = read(".github/scripts/create-runtime-release-manifest.mjs");
|
||||
expect(manifest).toContain("bytes: stat.size");
|
||||
expect(manifest).toContain('certificateOidcIssuer: "https://token.actions.githubusercontent.com"');
|
||||
@@ -98,17 +108,17 @@ describe("release and CI hardening", () => {
|
||||
const installer = read("runtime/install.js");
|
||||
expect(installer).toContain('entry("runtime")');
|
||||
expect(installer).toContain('entry(managedBunRelativePath(), "managed-bun", true)');
|
||||
expect(installer).not.toContain('entry("node_modules/playwright-core")');
|
||||
const browser = read("browse/src/cli.ts");
|
||||
expect(browser).toContain("Every installed/compiled client must use the adjacent Node-compatible daemon");
|
||||
expect(browser).toContain("if (isCompiled)");
|
||||
expect(browser).toContain("if (!nodeServerScript)");
|
||||
expect(browser).toContain("return { isCompiled, nodeServerScript, sourceServerScript: null }");
|
||||
expect(browser).toContain("export function resolveServerLaunchTarget(");
|
||||
expect(browser).toContain("server-node.mjs not found. Rebuild the managed browser runtime");
|
||||
});
|
||||
|
||||
test("Windows setup lane installs, doctors, and uninstalls rather than only building", () => {
|
||||
const workflow = read(".github/workflows/windows-setup-e2e.yml");
|
||||
expect(workflow).toContain("--dry-run --capabilities browser");
|
||||
expect(workflow).toContain("--install-now --yes --capabilities browser");
|
||||
expect(workflow).toContain("--dry-run --capabilities browser --browser managed");
|
||||
expect(workflow).toContain("--install-now --yes --capabilities browser --browser managed");
|
||||
expect(workflow).toContain("doctor --json");
|
||||
expect(workflow).toContain("runtime/cli.js uninstall");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user