Skip to content

test(core): wait on the real condition in three flaky core tests, and name a browser wake stall - #658

Merged
klNuno merged 5 commits into
mainfrom
fix/flaky-core-2
Oct 19, 2026
Merged

klNuno merged 5 commits into
mainfrom
fix/flaky-core-2

Conversation

@klNuno

@klNuno klNuno commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Note

Clanker Claude Opus 5.5 is responding on behalf of meetsu

Three core tests that failed on loaded runners now wait on the real condition, and a sleeping browser tab whose wake stalls now says who stalled.

what changed

test cause fix proof
push: no push about a thread someone is looking at (macOS arm64, run 39266898146) the core dates a use at the report's arrival minus its idleMs; the test's 20 ms margin lost to a slower trip to the core, the held news was dropped as seen and delivered(4) timed out a still clock (setSystemTime) for that step dates the use 1 ms before the news, whatever the trip takes report delayed 40 ms: old test times out, new one passes; push.test.ts 16 pass x3
cache keepalive: turning the setting off, archiving and a user turn each hold the ping (#639 widened the window) the ping timer raced each hold the timer is set a minute out; each check makes the ping due and runs the keepalive's own fire after the hold, with a control ping first archive delayed 1 s: old test pings, new one passes; 285 ms instead of about 5 s
rewind-files: end as one compressed inode (Windows, jobs 118081174911, 117933525293) NTFS file ids pass 2^53; stat().ino as a number rounds neighbours to one value (42221246506626870), so two private copies read as one inode the test compares stat(path, { bigint: true }).ino, as checkpoint-store.ts already does Number(0x96000000006f38n) === Number(0x96000000006f39n) is true; rewind-files.test.ts 32 pass x3
browser: a page nobody drives sleeps (macOS arm64, job 118094995614) not explained: a frozen page answers DevTools in 0 to 2 ms (measured), so the 5 s silence on Emulation.setFocusEmulationEnabled came from a stalled renderer or browser a freeze or wake step that misses its 5 s now says whether the browser itself answered (Target.getTargetInfo, 1 s), and browser.sleep-late logs when the page answered after; the browser fixture prints it new browser-sleep.test.ts case; browser.test.ts 9 pass locally

to question

The browser item ships diagnostics, not a fix: the next macOS failure will say whether the renderer or the browser stalled and how late it answered. A failed wake still fails the command with "Something went wrong", as before.

verified

  • bun run check in packages/core: pass
  • push, cache-keepalive, browser-sleep, rewind-files, browser test files on Windows: all pass
  • not verified: macOS locally; the browser stall itself was not reproduced

@github-actions github-actions Bot added documentation Improvements or additions to documentation core packages/core and packages/contracts labels Oct 19, 2026
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: beboite/boite/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ec9cb455-ec64-4331-8fac-ee5ad57e5031
📥 Commits

Reviewing files that changed from the base of the PR and between b27fcea and eaff6b1.

📒 Files selected for processing: 8
  • docs/browser.md
  • packages/core/src/browser.ts
  • packages/core/src/browser/sleep.ts
  • packages/core/test/browser-sleep.test.ts
  • packages/core/test/browser/fixture.ts
  • packages/core/test/cache-keepalive.test.ts
  • packages/core/test/push.test.ts
  • packages/core/test/rewind-files.test.ts
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@klNuno
klNuno marked this pull request as ready for review October 19, 2026 16:24
@klNuno
klNuno merged commit 03482a1 into main Oct 19, 2026
33 checks passed
@klNuno
klNuno deleted the fix/flaky-core-2 branch October 19, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core packages/core and packages/contracts documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant