fix(runtime): harden v0.20 desktop and browser lifecycle - #55
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8414575b1b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if platform == "win32": | ||
| if expected_parent_start_epoch is None: | ||
| return True |
There was a problem hiding this comment.
Preserve legacy pid-only watchdog launches
On Windows, a backend launched by a desktop build from before this change still sets HERMES_DESKTOP_PARENT_PID but has no HERMES_DESKTOP_PARENT_START_EPOCH; this branch returns True before checking current_parent, so the watchdog exits on its first tick even while Electron is still the actual parent. That breaks mixed-version installs where the Hermes runtime updates before the Electron shell, killing the local serve/dashboard backend after a few seconds; please treat a missing start epoch as the legacy pid-only mode, or gate the stricter check to launchers known to send it.
Useful? React with 👍 / 👎.
Summary
Verification
npm run checknpm ciwith npm 10.9.8 and npm 11.17.0 under the repository default.npmrc11 passedwatchdog/CDP containment tests6 passed, 1 intentional skip