fix(desktop): guard packaged backend readiness parser#60842
Draft
embwl0x wants to merge 1 commit into
Draft
Conversation
tonydwb
reviewed
Jul 8, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved (LGTM)
Fixes packaged Electron backend readiness parser artifact skew. The afterPack artifact guard now extracts and validates the packaged backend-ready.cjs from app.asar, ensuring both HERMES_BACKEND_READY and HERMES_DASHBOARD_READY are accepted.
Changes
- apps/desktop/scripts/after-pack.cjs: artifact extraction
- apps/desktop/scripts/backend-ready-artifact.cjs: packaged parser validation
- apps/desktop/scripts/backend-ready-artifact.test.cjs: regression tests
Quality
- 4 files, 280 additions / 7 deletions
- Tests: backend-ready-artifact.test.cjs (113 lines), electron/backend-ready.test.cjs, test:desktop:platforms (313 passed)
- Gitleaks clean, git diff --check clean
Reviewed by Hermes Agent
7d86388 to
52734ad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #60772.
Summary
afterPackartifact guard that inspects the packaged desktopapp.asardist/electron-main.mjsreadiness parser accepts bothHERMES_BACKEND_READYandHERMES_DASHBOARD_READYRefresh note
Rebuilt from current
mainafter the desktop packaging code moved from CommonJS scripts to TypeScript/ESM output. The fix now targets the current.mjspackaged artifact instead of the old.cjslayout.Verification
node --test apps/desktop/scripts/backend-ready-artifact.test.mjs— 6 passednode --check apps/desktop/scripts/backend-ready-artifact.mjs && node --check apps/desktop/scripts/after-pack.mjsnpm --prefix apps/desktop run typecheckcd apps/desktop && node --import tsx --test electron/backend-ready.test.ts scripts/backend-ready-artifact.test.mjs— 23 passedgit diff --check origin/main..HEADgitleaks git --log-opts='origin/main..HEAD' --redact .— no leaks foundNote:
npm --prefix apps/desktop run test:desktop:platformscurrently fails in this checkout on the upstream rawnode --testpath resolving extensionless.tsimports. The targetedtsx-backed desktop readiness tests above cover this change.