You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hydration crash fixture intentionally leaves its top-level hydrate() await pending after writing a partial ownership binding. Once the event loop became empty, Node could detect that unsettled top-level await and exit with code 13 before the parent test delivered SIGKILL.
Keep a referenced timer alive around the hydration call and clear it if the call ever settles normally. The fixture now stays alive until the parent kills it, so the existing signal and staging-state assertions remain strict instead of accepting Node's early exit.
CI note: the #2537 crash test passed in the affected job, and the Storage workspace completed successfully. The aggregate workspace failure is in the new QuickJS code-mode concurrency tests; current main is failing the same lane (run 31299049684). The Storybook and Desktop E2E failures also match current main's #2574 run (31299103563). Locally, Storage is 770 passed / 14 platform skips and the target test is 50/50. I don't see a #2537-specific follow-up patch here.
The reason will be displayed to describe this comment to others. Learn more.
Verified against the Node 24 unsettled top-level-await behavior: the fixture now stays alive until the parent captures the partial state and sends SIGKILL, while resolve/reject paths still clear the keepalive in finally. No findings.
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
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.
Summary
The hydration crash fixture intentionally leaves its top-level
hydrate()await pending after writing a partial ownership binding. Once the event loop became empty, Node could detect that unsettled top-level await and exit with code 13 before the parent test delivered SIGKILL.Keep a referenced timer alive around the hydration call and clear it if the call ever settles normally. The fixture now stays alive until the parent kills it, so the existing signal and staging-state assertions remain strict instead of accepting Node's early exit.
Fixes#2537
中文对照
hydration crash fixture 会在写入部分 ownership binding 后,故意让顶层
hydrate()await 永久挂起。当事件循环变空时,Node 可能把它识别为未完成的 top-level await,并在父测试发送 SIGKILL 前以退出码 13 主动结束。本 PR 在 hydration 调用期间保留一个 ref'ed timer,并在调用正常结束时清理。这样 fixture 会一直存活到父测试主动终止,原有的 signal 与 staging 状态断言仍保持严格,不会把 Node 的提前退出当作可接受结果。
Verification
npm --workspace @maka/storage run test:dist— 770 passed, 14 platform skipsnpx biome check packages/storage/src/__tests__/fixtures/session-bundle-hydration-binding-crash.tsChecklist
SIGKILL