Skip to content

[CI] Improve test clocks and dependency fixtures - #27574

Merged
nwparker merged 1 commit into
mainfrom
nwparker/ci-test-clocks-and-dependency-fixtures-20261011
Oct 11, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/ci-test-clocks-and-dependency-fixtures-20261011

Conversation

@nwparker

@nwparker nwparker commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Make test fixtures faster and reliable without changing production behavior or weakening their checks.

What Changed

Advance the queued-stop test's full 2,500ms window with the existing fake-clock pattern; retain both no-resend assertions and real cleanup. Seed eight independent build fixtures from one genuine compilation, retaining actual rebuilds, failure/lock controls and portable maps.

Preserve real filesystem constants in the daemon mock while keeping its five operations mocked. In the Codex retry test, observe actual kill calls before advancing timeout timers; retain unproven→exited and exactly two SIGKILL calls.

Why

Reuse public fixture patterns to remove unnecessary waits/builds and incomplete mocks, preserving real contracts instead of shortening windows or replacing assertions.

Linked Issue

N/A — maintainer test improvement.

Visual Proof

N/A — test-only changes.

Testing

  • Linux qualification; all 137 cases retained: daemon 86, queued-stop 5, build 12, Codex 34.
  • Queued-stop/build each passed four ordered runs; eight build copies independently verified. Formatting, ordinary/plugin lint and one combined configured Node typecheck passed.
Local scope: wall / CPU Before After
Warm queued-stop 5.010s / 2.273s 2.421s / 2.198s
Build, two-run means 26.041s / 14.346s 25.089s / 13.311s

Observed reductions: queued-stop 51.68% wall/3.29% CPU; build 3.66%/7.21%, with first candidate CPU slightly worse. Ordered local comparisons do not establish hosted/fleet or overall 2× gains. Reliability results: missing-constants failure→86 passing cases; previously timed-out Codex target→whole 34 passing, without a paired performance claim.

AI Disclosure

Codex implementation and independent source/result reviews.

Review

Source, local results and restoration independently cleared; ordinary CI completed 45 checks: 24 successful and 21 legitimate skips.

Agent skill upstream boundary

  • Not applicable; no upstream skill code copied.

Notes

31 recorded qualification/setup/static commands: 183.703s wall/180.201s waited CPU, including both earlier lint failures. Separate failed exploratory full-root commands:325.699s/804.549s CPU and 225.945s/618.424s CPU; no successful full-root runtime comparison. Other administrative overhead is unmeasured. Ordinary CI, all six workflows: 5,956 assigned runner-seconds / 24 allocations, plus 93 queue-seconds; no failed, cancelled or rerun heads.

Checklist

  • Focused; self-reviewed; cross-platform/SSH contracts preserved
  • Ordinary required CI passes

@coderabbitai

coderabbitai Bot commented Oct 11, 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: 1156ce99-2694-416d-aef4-8efb18b4bc4b


📥 Commits

Reviewing files that changed from the base of the PR and between 47c9363 and 42fd0c4.



📒 Files selected for processing (4)
  • config/scripts/process-host-build-dist.test.mjs
  • src/main/codex/codex-app-server-connection.test.ts
  • src/main/daemon/daemon-init-dependency-mocks.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-claude-queued-stop.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.




📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes update test setup in four areas. Distribution tests build one shared fixture seed and reuse it across package fixtures. The Codex connection test refines its repeated-close timer sequence. The daemon filesystem mock loads constants from the actual node:fs module. The queued-stop test uses fake timers and restores real timers during teardown.



Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 42fd0

These test-only changes preserve the exercised build, process-close, filesystem-mock, and queued-stop behavior. No concrete user-facing or merge-blocking risk was identified; ordinary required CI remains the final check.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 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 and concisely describes the main changes: improving test timing and dependency fixtures.
Description check Passed The description is complete and focused. It explains the changes, rationale, testing, performance observations, AI disclosure, review status, and checklist results. The maintainer-specific Linked Issu…

  • 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.

@nwparker
nwparker merged commit d65e9be into main Oct 11, 2026
45 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