Skip to content

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.

chore(ci): a release leg whose installed editor dies keeps the editor's own logs and crash dumps

yhhdadc14e10689
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml
index 333cc8a92..11c9d8af5 100644
--- a/.github/workflows/release-desktop.yml
+++ b/.github/workflows/release-desktop.yml
@@ -630,6 +630,25 @@ jobs:
export ESTELLA_E2E_EXPORT=1
(cd desktop && node scripts/editor-mcp-editor-e2e.mjs)
+ # When the installed editor dies, the front only knows that it stopped. The editor's
+ # own record of why (main-errors.log: uncaught exceptions, renderer and GPU process
+ # losses) and its crash dumps live in its profile, which the runner throws away.
+ - name: Keep the installed editor's logs and crash dumps
+ if: failure()
+ shell: bash
+ run: |
+ case "${{ runner.os }}" in
+ Windows) profile="$APPDATA/@estella/editor" ;;
+ macOS) profile="$HOME/Library/Application Support/@estella/editor" ;;
+ *) profile="$HOME/.config/@estella/editor" ;;
+ esac
+ out="$GITHUB_WORKSPACE/out/installer-acceptance/editor-profile"
+ mkdir -p "$out"
+ for d in logs Crashpad; do
+ [ -d "$profile/$d" ] && cp -R "$profile/$d" "$out/" || echo "no $d under $profile"
+ done
+ ls -R "$out" | head -50
+
- name: Keep installed upgrade evidence
if: always()
uses: actions/upload-artifact@v7
diff --git a/tools/exercise-installed-upgrade.mjs b/tools/exercise-installed-upgrade.mjs
index 44429d28e..a3b03d528 100644
--- a/tools/exercise-installed-upgrade.mjs
+++ b/tools/exercise-installed-upgrade.mjs
@@ -93,10 +93,18 @@ try {
await writeFile(path.join(evidence, `${mode}.json`), JSON.stringify(result, null, 2));
console.log(`PASS upgrade project ${JSON.stringify(result)}`);
} finally {
+ // The front says why its editor went away on stderr, a moment before the call that
+ // finds it gone answers on stdout. Read the pipe to its end before keeping the log,
+ // or the one line that explains a failure is the line that is lost.
+ const closed = new Promise((resolve) => {
+ if (child.exitCode !== null || child.signalCode !== null) resolve();
+ else child.once('close', resolve);
+ });
if (process.platform === 'win32') {
spawnSync('taskkill.exe', ['/PID', String(child.pid), '/T', '/F'], { windowsHide: true, stdio: 'ignore' });
} else {
try { process.kill(-child.pid, 'SIGTERM'); } catch { /* already stopped */ }
}
+ await Promise.race([closed, new Promise((resolve) => setTimeout(resolve, 5000))]);
await writeFile(path.join(evidence, `${mode}-host.log`), stderr);
}