fix(desktop): guard packaged backend readiness parser - #60842
Conversation
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
|
Final duplicate audit: #61045 currently references #60772, but that PR fixes PTY wrong-session reattachment. #60772 is specifically packaged Desktop readiness-parser artifact skew; this PR validates the final |
52734ad to
c7e284a
Compare
|
Thanks for adding a packaged-artifact guard for the reported source/artifact skew. I found no blocking correctness issue.
Automated hermes-sweeper review. |
c7e284a to
1a43b03
Compare
1a43b03 to
2c83532
Compare
|
Rebased this existing PR onto current Conflict resolution retained both additions to Overlap audit: #63573 / #60763 change the Python backend to emit both readiness tokens for backward compatibility with older Desktop clients. This PR is complementary: it inspects the final packaged Current-main validation:
The repository-wide raw |
2c83532 to
355cdcd
Compare
355cdcd to
d2c9f45
Compare
|
Resolved the latest Desktop packaging conflict on current main in The platform command now preserves both current main native find-in-page coverage and the packaged readiness-artifact guard. The guard still runs first, and the real Local proof: 6 artifact tests and 1,197 Electron tests passed with 2 expected skips; all TypeScript projects passed; an actual unpacked package build and signing completed; syntax, diff/security gates, and publish gate passed. Replacement GitHub CI is fully green, and GitHub reports the PR mergeable. |
fix(desktop): guard packaged backend readiness parser A well-scoped artifact guard with real tests and a graceful fallback between the unpacked bundle and
|
Fixes #60772.
Summary
afterPackartifact guard that inspects the packaged desktopapp.asardist/electron-main.mjsreadiness parser accepts bothHERMES_BACKEND_READYandHERMES_DASHBOARD_READYRefresh note
Rebased onto current
mainafter Desktop moved its platform suite to Vitest. The standalonenode:testartifact regression now uses a non-Vitest filename and runs before the current Vitestelectronproject, preserving both test contracts.Verification
node --test apps/desktop/scripts/backend-ready-artifact.node-test.mjs- 6 passednpm --prefix apps/desktop run test:desktop:platforms- 37 files passed; 413 tests passed, 1 skipped, plus the 6 artifact testsnpm --prefix apps/desktop run typechecknode --check apps/desktop/scripts/after-pack.mjs && node --check apps/desktop/scripts/backend-ready-artifact.mjs && node --check apps/desktop/scripts/backend-ready-artifact.node-test.mjsgit diff --check origin/main...HEAD