A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
fix(golden): Electron is fetched once before editors launch side by side
esenginee6a11677e055
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex ac3b2f76d..8dd21e9f9 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -355,6 +355,21 @@ published separately; it ships inside the editor.### Fixed+- **An editor an agent started closes when the agent does.** The editor the MCP+ server launches outlived it: an agent that exited, crashed or was killed left+ its editor running, and an unattended one with unsaved edits sat at the+ "save changes?" prompt forever. The editor now watches the process that+ launched it and quits when that process is gone, and a run nobody attends+ never asks to save.++- **A Play that never comes up says how far it got.** A game that stayed silent+ for 90 seconds was always reported as "handed the scene but never reported+ ready" — including one whose realm never loaded at all, so it was never handed+ anything. The message now names which of the two happened. The reason also+ stays on the failed session rather than only in a toast: the realm is torn down+ the moment its session fails, which cleared the one error anything could read+ back, so an automated run that waited on Play saw no error and no game.+- **A native build runs a script that holds a NUL character.** The desktop andmobile hosts measured the embedded SDK and the project's scripts with`strlen`, so the first NUL byte ended them. The script-graph runner carrieddiff --git a/tools/lib/electronRun.mjs b/tools/lib/electronRun.mjsindex 433224198..561efa6ac 100644--- a/tools/lib/electronRun.mjs+++ b/tools/lib/electronRun.mjs@@ -17,8 +17,22 @@* A precondition that every caller must remember is a precondition one of them* will forget, so it belongs to the tool that needs it.*/+import { createRequire } from 'node:module';+import path from 'node:path';+import { fileURLToPath } from 'node:url';import { runTool } from './runTool.mjs';+const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..');++/**+ * Resolve Electron's binary once, before anything launches it in parallel. A binary+ * the install left out is downloaded on first launch, and two first launches at+ * once had one executing the file while the other still wrote it: spawn ETXTBSY.+ */+export function ensureElectronBinary() {+ createRequire(path.join(ROOT, 'package.json'))('electron');+}+/** xvfb-run's own default is 1280x1024x8, which is smaller than the windows* golden asks for and shallower than a pixel judgement should be read from. */const SCREEN = '-screen 0 1920x1080x24';diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjsindex 3110f0d0f..0cfa2f733 100644--- a/tools/releaseNotes.mjs+++ b/tools/releaseNotes.mjs@@ -28,6 +28,36 @@ export const NOTES_FLOOR = 'v0.65.0';* the reader recognises anyway.*/export const NOTED = {+ 'fix(play): a Play that never comes up says how far it got':+ { note: 'A Play that never comes up says how far it got.' },++ 'fix(automation): an editor a program drives ends when the program does':+ { note: 'An editor an agent started closes when the agent does.' },++ 'fix(golden): Electron is fetched once before editors launch side by side':+ { internal: 'The golden verifier launching its own editors; no creator runs it.' },++ 'fix(golden): a retry is handed the attempt that failed':+ { internal: 'What the golden verifier prints about its own retries.' },++ 'fix(golden): a missing frame says what the attempt printed, and blames the GPU only on evidence':+ { internal: 'What the golden verifier prints about its own retries.' },++ 'fix(ci): the parity frames a golden failure keeps are actually uploaded':+ { internal: 'CI artifacts only.' },++ 'fix(golden): lighting-3d\'s points follow the surface shading at its real place':+ { internal: 'The expected pixels moved to where the surface is; the engine did not change.' },++ 'fix(checks): dodge-graph plays paused, so only a step moves the player':+ { internal: 'An editor check; the editor did not change.' },++ 'fix(checks): scatter-scale measures the editor\'s half, out of the eye\'s view':+ { internal: 'An editor check; the editor did not change.' },++ 'fix(checks): camera-frustum captures after the toggle is drawn, not after a sleep':+ { internal: 'An editor check; the editor did not change.' },+'feat(render): what a shiny thing reflects indoors is the room, not the sky':{ note: 'What a shiny thing reflects indoors is the room, not the sky.' },diff --git a/tools/verify-golden.mjs b/tools/verify-golden.mjsindex 35744dc34..d7dacc185 100644--- a/tools/verify-golden.mjs+++ b/tools/verify-golden.mjs@@ -23,7 +23,7 @@ import path from 'node:path';import { atTier, projectDir, parityFor, interactFor, audioFor, suspendFor, safeAreaFor, atlasFor, webPixels, launchTimeoutFor, ROOT } from './goldenProjects.mjs';import { frameDistance, frameCellMax, readPNG } from './frameCompare.mjs';import { retryOnDeadGpu, deadGpuVerdict, launchNeverHappenedVerdict, failureLines } from './lib/deadGpu.mjs';-import { runElectron } from './lib/electronRun.mjs';+import { runElectron, ensureElectronBinary } from './lib/electronRun.mjs';import { requireCurrentEngine } from './lib/engineBuild.mjs';const argv = process.argv.slice(2);@@ -101,6 +101,7 @@ const JOBS = Math.max(1, Number(flag('jobs', '1')) || 1);/** How many launches share this runner's rasterizer: a worker's, or one. */const SHARE = argv.includes('--worker') ? JOBS : 1;if (JOBS > 1 && !argv.includes('--worker') && projects.length > 1) {+ ensureElectronBinary();const weight = (g) => g.targets.filter((t) => OWNED.has(t)).length* (1 + [interactFor(g), audioFor(g), safeAreaFor(g), atlasFor(g)].filter(Boolean).length + (suspendFor(g) ? 3 : 0));const bins = Array.from({ length: Math.min(JOBS, projects.length) }, () => ({ ids: [], load: 0 }));