Skip to content

fix(update): avoid blocking install during self-update#1521

Merged
EKKOLearnAI merged 1 commit into
EKKOLearnAI:mainfrom
qdivan:fix/update-install-async
Jun 13, 2026
Merged

fix(update): avoid blocking install during self-update#1521
EKKOLearnAI merged 1 commit into
EKKOLearnAI:mainfrom
qdivan:fix/update-install-async

Conversation

@qdivan

@qdivan qdivan commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #1505.

The self-update endpoint no longer runs the global npm install -g hermes-web-ui@latest through execFileSync. The update install and follow-up npm root -g lookup now use the existing async execFile wrapper, so the Node event loop can continue serving requests while npm is pending. The in-process update lock is also released through a finally path when installation fails, while successful installs keep the lock until restart handling begins.

Validation

  • Failing-before-fix regression recorded: npm exec vitest -- run tests/server/update-controller.test.ts failed because the pending async install callback was absent and the controller still used execFileSync.
  • PATH=/Users/shangyifan/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH npm exec vitest -- run tests/server/update-controller.test.ts
  • git diff --check
  • PATH=/Users/shangyifan/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH npm run harness:check
  • PATH=/Users/shangyifan/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH npm run test:coverage
  • PATH=/Users/shangyifan/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH npm run build

Build completed with the existing Vite large chunk warning only.

Duplicate Check

Browser / Playwright

Not run locally. This is server-controller behavior for /api/hermes/update; no visible UI, browser routing, or interaction changed.

@qdivan qdivan marked this pull request as ready for review June 12, 2026 12:40
@EKKOLearnAI EKKOLearnAI merged commit 395582f into EKKOLearnAI:main Jun 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 升级按钮调用 execFileSync 阻塞事件循环 + Ia 互斥锁缺 finally,易导致 8648 端口假死/锁死

2 participants