Skip to content

[CI] Advance test clocks and preserve cleanup checks - #27791

Merged
nwparker merged 3 commits into
mainfrom
nwparker/ci-queued-message-clocks-and-gc-fairness-20261012
Oct 12, 2026
Merged

nwparker merged 3 commits into
mainfrom
nwparker/ci-queued-message-clocks-and-gc-fairness-20261012

Conversation

@nwparker

@nwparker nwparker commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​69 $\color{#cf222e}{\Huge{\mathbf{−}}}$​25 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​44
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1

ELI5

Queued-message windows advance without sleeps. Cleanup responsiveness stays checked; daemon provider contracts use the existing Node project.

What Changed

Advance all seven 150ms and nine 250ms queued-message windows with Vitest’s public clock; retain 34 cases, real journal writes and resume/restart checks. Dispose fixtures before restoring clocks.

GC observes real timer service at actual yields and samples the final interval before clearing its timer. Keep all 16 cases, synchronous reference, more than five serviced yields and the two-second gap bound.

Add one daemon provider-installation suite to the existing Node registry. All 11,915 discovered files remain; only this suite moves from Bun to Node. Its 14 original cases, assertions and hooks are unchanged. No diagnostic, production, dependency, worker or timeout changes ship.

Why

Public clock advancement avoids sleeps; actual yields check responsiveness without requiring slow cleanup. The daemon suite checks Node/Electron contracts, so the existing Node policy preserves assertions without extra waits. Bun failure cause stays UNKNOWN; qualification establishes compatibility, not causality or failure frequency.

Linked Issue

N/A — maintainer test maintenance.

Visual Proof

N/A — automated tests only.

Testing

Linux ARM, one original-first queue pair:

Whole 34-case command Before After
Wall seconds 8.110123 6.064720
Waited CPU seconds 6.880025 5.362714

Caches were not cleared; no full-suite, hosted or fleet forecast.

  • Combined 50 passed (40 Bun/10 Node); configured pnpm tc:node, formatting, ordinary/plugin lint and changed quality passed.
  • GC: shipping 16 passed; no-yield control failed only 0 > 5. A 2,200ms final tail fails only the corrected gap bound (2,199.231921ms); the old oracle passes all 16.
  • Provider’s unchanged 14 cases plus two runtime-boundary controls passed on physically verified Node 24.21; full discovery and four static gates passed.

AI Disclosure

Codex implementation and independent source/result review.

Review

Clock/GC gates used frozen 8b41 plus test overlays. Node qualification used tested synthetic 0b20 plus the registry overlay; covered provider/execution inputs match published 099. Other upstream context was not locally replayed. The published diff contains three tests and one registry.

Agent skill upstream boundary

  • Not applicable; no upstream skill content copied.

Notes

Recorded local wall/CPU seconds: queue+initial GC controls 17.402936/16.236907; six combined gates 38.042776/109.979683; eight final-gap commands 33.038805/84.670484; six Node qualification commands 6.445052/8.334270. Retain format stop 0.108s, formatter/AST correction 0.317s and roster-reader stop; source preparation 4.197222s/4.259037s CPU and pack export 0.935807s/1.117051s CPU are separate administration; controllers are nonadditive. Separate full-shard diagnostic passed in 341.938402s/1008.151943s CPU: nonreproduction, not cause or repair proof.

All three ordinary waves used 11,225 assigned runner-seconds across 41 physical allocations, plus 6,183 queue-seconds separately. Per-head runner-seconds/allocations/queue-seconds: 599 3,683/12/3,199; 099 3,613/14/2,900; d175 3,929/15/84. All 12 runs were attempt 1; first-wave root was automatically canceled on amendment. Second-wave provider failure remains recorded. Final head has 15 successful/17 skipped checks and no unresolved reviews. Overall 2× remains unproved.

Checklist

  • Before/after, mechanism, rationale and scope limits explained
  • Independent source/actual review; real assertions retained
  • Exact-head ordinary checks and actionable reviews complete

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 84fae7e2-d811-4b07-89b0-7a52c11ee51d

📥 Commits

Reviewing files that changed from the base of the PR and between 09972f4 and d17563c.


📒 Files selected for processing (1)
  • config/scripts/vitest-node-runtime-files.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.



📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The queued compact and stop-row tests now use fake timers for waits and restore real timers after rig disposal. The terminal-history GC occupancy test checks timer service during the GC pass and verifies that observed yields service a zero-delay timer. The Vitest Node runtime include list now contains the daemon initialization provider installation test.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to d1756

This change affects test selection, not production behavior. A provider assertion failure was reported but could not be verified in this environment, so this review establishes no actionable merge blocker; exact-path CI validation remains outstanding.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly summarizes the main changes: advancing test clocks and preserving cleanup checks.
Description check Passed The description includes all required sections, explains the changes and rationale, documents testing and scope, and records checklist completion. The linked issue is marked N/A with a maintainer just…

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b1d7e135-a957-48e6-9325-4fb378d2852c
📥 Commits

Reviewing files that changed from the base of the PR and between 4275ee3 and 59919aa.

📒 Files selected for processing (3)
  • src/main/native-chat/agent-session-wire/structured-agent-session-queued-compact.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-queued-stop-row.test.ts
  • src/main/terminal-history-gc.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Comment thread src/main/terminal-history-gc.test.ts Resolved
@nwparker nwparker changed the title [CI] Remove wall-clock waits and stabilize GC fairness check [CI] Advance test clocks and preserve cleanup checks Oct 12, 2026
@nwparker
nwparker merged commit d4d1212 into main Oct 12, 2026
32 checks passed
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.

1 participant