fix(daemon): unskip and fix 16 daemon tests #215

Merged
xiaomo merged 1 commits from fix/213-daemon-tests into main 2026-04-28 04:50:32 +00:00
Owner

What

Fix all 16 skipped daemon tests from #213.

Why

These tests were skipped (it.skip) because they failed intermittently or consistently. Skipped tests hide regressions.

Changes

kernel-workflow-integration.test.ts (8 tests)

  • Mock children now respond to compute messages by emitting signal replies, matching real worker behavior
  • Mock children emit ready on startup like real workers

kernel.test.ts (2 tests)

  • Added ready + compute->signal response to mocks
  • Flush with runAllTimersAsync for deterministic behavior

phase6-integration.test.ts (3) + kernel-integration.test.ts (3)

  • Replaced setInterval polling with async/await setTimeout loop
  • Increased wait timeouts and vitest timeouts to prevent races

Result

All 165 daemon tests pass, zero skips.

Ref

Closes #213

## What Fix all 16 skipped daemon tests from #213. ## Why These tests were skipped (it.skip) because they failed intermittently or consistently. Skipped tests hide regressions. ## Changes ### kernel-workflow-integration.test.ts (8 tests) - Mock children now respond to compute messages by emitting signal replies, matching real worker behavior - Mock children emit ready on startup like real workers ### kernel.test.ts (2 tests) - Added ready + compute->signal response to mocks - Flush with runAllTimersAsync for deterministic behavior ### phase6-integration.test.ts (3) + kernel-integration.test.ts (3) - Replaced setInterval polling with async/await setTimeout loop - Increased wait timeouts and vitest timeouts to prevent races ## Result All 165 daemon tests pass, zero skips. ## Ref Closes #213
xingyue added 1 commit 2026-04-28 04:46:53 +00:00
- kernel-workflow-integration (8): mock children now respond to compute
  messages with signal replies, matching real worker behavior
- kernel (2): add ready + compute response to mocks, flush with
  runAllTimersAsync
- phase6-integration (3) + kernel-integration (3): replace setInterval
  polling with async/await setTimeout loop, increase timeouts

All 165 daemon tests pass, zero skips.

Closes #213
xiaomo approved these changes 2026-04-28 04:50:30 +00:00
xiaomo left a comment
Owner

LGTM

修法正确:

  • pollUntil 从 setInterval+Promise 改为 async/await 循环,正确让出事件循环
  • mock children 补齐 ready 事件 + compute→signal 回复,与真实 worker 行为对齐
  • kernel.test 用 runAllTimersAsync 确保 timer 确定性刷新
  • timeout 增幅合理

165 tests 全绿,零 skip,干净利落。

LGTM ✅ 修法正确: - pollUntil 从 setInterval+Promise 改为 async/await 循环,正确让出事件循环 - mock children 补齐 ready 事件 + compute→signal 回复,与真实 worker 行为对齐 - kernel.test 用 runAllTimersAsync 确保 timer 确定性刷新 - timeout 增幅合理 165 tests 全绿,零 skip,干净利落。
xiaomo merged commit bda0c69261 into main 2026-04-28 04:50:32 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
2 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/nerve#215