Skip to content

Conversation

@rekmarks
Copy link
Member

@rekmarks rekmarks commented Jan 15, 2026

Summary

Fixes the intermittent failures in the "should trigger GC syscalls through bringOutYourDead" test by adding proper synchronization.

Changes

  • Added await waitUntilQuiescent() after queueMessage to ensure all async syscall side-effects complete before checking reference counts

Root Cause

The test was flaking due to a race condition where reference count updates from resolvePromises syscalls were still pending in microtasks when the test immediately checked them after await kernel.queueMessage() returned.

Verification

  • Ran the test 10 times with --repeat 10 - all iterations passed
  • Change is consistent with other synchronization patterns in the test file (lines 91, 104, 129)

🤖 Generated with Claude Code


Note

Synchronizes the GC test to eliminate a race when asserting reference counts.

  • In garbage-collection.test.ts, add await waitUntilQuiescent() immediately after kernel.queueMessage('createObject', ...) in the "should trigger GC syscalls through bringOutYourDead" test
  • Ensures async syscall side-effects settle before reading kernelStore refcounts, reducing test flakiness

Written by Cursor Bugbot for commit 0216c9f. This will update automatically on new commits. Configure here.

The "should trigger GC syscalls through bringOutYourDead" test was flaking
due to a race condition where reference count updates from resolvePromises
syscalls were still pending in microtasks when the test checked them.

Adding await waitUntilQuiescent() after queueMessage ensures all async
operations complete before checking ref counts. This is consistent with
other synchronization patterns in the test file (lines 91, 104, 129).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@rekmarks rekmarks requested a review from a team as a code owner January 15, 2026 22:13
@rekmarks rekmarks added this pull request to the merge queue Jan 15, 2026
Merged via the queue into main with commit a0a2494 Jan 15, 2026
28 checks passed
@rekmarks rekmarks deleted the rekm/retry-gc branch January 15, 2026 23:22
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.

3 participants