Skip to content

fix(runtime-host): arm process lifecycle before readiness - #1690

Merged
Astro-Han merged 1 commit into
apache:mainfrom
M4n5ter:fix/runtime-host-process-lifecycle-readiness
Jul 31, 2026
Merged

fix(runtime-host): arm process lifecycle before readiness#1690
Astro-Han merged 1 commit into
apache:mainfrom
M4n5ter:fix/runtime-host-process-lifecycle-readiness

Conversation

@M4n5ter

Copy link
Copy Markdown
Member
English

Summary

  • install Runtime Host termination and disconnect handlers before a child process publishes readiness
  • make execution-host cleanup failures print their underlying error instead of reporting only exit code 1
  • cover the readiness ordering and listener cleanup contract with a focused regression test

Root cause

The test Host fixtures published their ready IPC message before entering the process lifecycle helper. A parent that stopped the child immediately after readiness could therefore deliver SIGTERM before the child installed its graceful-shutdown handler, producing intermittent CI failures in otherwise unrelated pull requests.

Validation

  • npm --workspace @maka/runtime-host run typecheck
  • npx biome lint on all changed files
  • full Runtime Host test suite: 416 passed, 0 failed
中文

概要

  • 在子进程发布就绪状态前安装 Runtime Host 的终止和断连处理器
  • 在 execution-host 清理失败时输出底层异常,避免只报告退出码 1
  • 使用聚焦的回归测试覆盖就绪顺序与监听器清理契约

根因

测试 Host fixture 在进入进程生命周期辅助函数之前就发布了 ready IPC 消息。父进程若在收到就绪消息后立即停止子进程,可能会在子进程安装优雅关闭处理器之前发送 SIGTERM,从而使无关 PR 的 CI 间歇失败。

验证

  • npm --workspace @maka/runtime-host run typecheck
  • 对全部改动文件运行 npx biome lint
  • 完整 Runtime Host 测试套件:416 通过,0 失败

@M4n5ter
M4n5ter marked this pull request as ready for review July 31, 2026 08:37
@Astro-Han
Astro-Han merged commit 5ae37ce into apache:mainJul 31, 2026
3 checks passed
@M4n5ter
M4n5ter deleted the fix/runtime-host-process-lifecycle-readiness branch July 31, 2026 08:57
Sign up for freeto 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.

2 participants

@M4n5ter@Astro-Han