Skip to content

[CI] Remove copied probes and advance queued-card test waits - #27447

Merged
nwparker merged 1 commit into
mainfrom
nwparker/ci-remove-copied-probes-and-queued-card-waits-20261011
Oct 11, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/ci-remove-copied-probes-and-queued-card-waits-20261011

Conversation

@nwparker

@nwparker nwparker commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Remove two tests that bypass Orca behavior, and stop spending real time on queued-card test delays. Keep the actual behavior checks and their full timing windows.

What Changed

  • Remove a copied spawn probe and one POSIX statusline source-string case. Keep all 17 statusline survivors and the real search/classifier coverage.
  • Use Vitest's public fake timers for eleven complete 250ms queued-card windows. Keep all 17 case bodies and assertions, real SQLite operations, and restore real timers after cleanup.

Why

Copied logic and literal source strings cannot verify the real caller. Advancing the test clock exercises the same delayed callbacks without waiting on the wall clock.

Linked Issue

N/A — maintainer CI-health task.

Visual Proof

N/A — tests only; no product UI change.

Testing

CodeRabbit noted that malformed current-clock values lack behavior tests. The removed source-grep case never executed that behavior; the real saved-stamp 008 control remains. Add current-duration/date behavior controls in the next meaningful testing batch; this pre-existing coverage gap does not change this PR’s implementation.

  • Relevant local tests and scoped format/lint/type-aware checks passed on macOS.
  • Two ineffective tests removed; retained coverage described above.

Queued-card full-entrypoint ABBA, wall / waited-child CPU seconds:

Arm Wall CPU
A1 original 6.808 4.173
B1 fake clock 3.782 3.880
B2 fake clock 3.704 3.776
A2 original 6.722 4.384

Means: 6.765→3.743s wall (−44.67%), 4.278→3.828s CPU (−10.53%). All four runs passed the same 17 identities, using Bun 1.4.2/Vitest 5/Node 24.21, one isolated worker and all six setup files. This local ordered pair of pairs retains host/cache variation; no hosted or fleet 2× gain is proved.

Cleanup passed 19→17 cases, removing exactly two approved identities; 39 real boundary cases also passed. Cleanup wall 3.941→3.982s and CPU 3.211→3.333s show no speed gain. Two-file format, lint and type-aware checks passed. All recorded project commands cost 32.784s wall / 35.630s waited-child CPU; metadata and controllers are separate. Completed ordinary CI used 3,910 assigned runner-seconds across 14 allocations, plus 57 queue-seconds separately: five units used 3,189 runner-seconds (2,996 Test-step seconds; 193 setup/lifecycle seconds). All 14 allocated jobs succeeded; 17 jobs were skipped. The tested merge-ref 296382dfa9c3f2fd7bce2672ff3aec6ddf67e28c reported all 11,900 unit modules, including 139 skipped modules, with no failures. This single post-change wave does not establish causal hosted savings or a fleet 2× gain.

AI Disclosure

Review

Independent source and saved-result reviews passed. Publication uses the exact three qualified test paths on named main 57452c; the primary checkout and its unrelated work remain untouched.

Agent skill upstream boundary

  • Not applicable; no upstream skill material copied.

Notes

Two inherited SQLite diagnostic records remain. The first queued-card controller closeout was overwritten accidentally; original bytes and its total overhead are unavailable. Raw four-arm results and final source/process restoration remain verified; no missing cost is treated as zero. The removed OS probe and textual ordering alarm are intentionally lost. No production, dependency, native or library-patch changes; no diagnostic CI run.

Checklist

  • Focused test scope; before/after, mechanism and rationale explained
  • Visual N/A; self-reviewed; cross-platform and SSH considered
  • Relevant local checks passed; ordinary PR checks cover the remaining platforms

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough
📝 Walkthrough

Walkthrough

The queued-card test now uses fake timers for its no-send check and restores real timers after rig disposal. The POSIX statusline throttle test and the non-Windows ripgrep descriptor-exhaustion test were removed.



Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to 3f953

The statusline guard still handles malformed clocks, but its regression coverage was removed. A future input-validation regression could interrupt statusline updates; adding focused tests is a small, non-blocking follow-up.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 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 identifies both primary changes: removing copied probes and replacing queued-card wait delays.
Description check Passed The description is complete and focused. It covers the change, rationale, testing, retained and removed coverage, platform considerations, and checklist items. The missing issue link is explicitly jus…

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

🧹 Nitpick comments (1)
src/main/claude/statusline-script.test.ts (1)

278-303: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add behavior tests for malformed current timestamps.

The current script rejects malformed current values before throttle arithmetic. The retained tests do not exercise that guard. Add cases for a malformed total_duration_ms and malformed date output.

Suggested fix
+  it('fails open on a malformed total_duration_ms value', async () => {
+    const { scriptPath, dir, curlLog } = makeHarness()
+    const payload =
+      '{"cost":{"total_duration_ms":008},"rate_limits":{"five_hour":{"used_percentage":12}}}'
+    await runScript(scriptPath, dir, payload)
+    expect(lineCount(curlLog)).toBe(1)
+    expect(readFileSync(stampPathFor(dir), 'utf8')).toBe('2000000000')
+  })
+
+  it('fails open on malformed date output', async () => {
+    const { scriptPath, dir, curlLog } = makeHarness()
+    writeFileSync(stampPathFor(dir), '1')
+    writeFileSync(join(dir, 'stub-bin', 'date'), '#!/bin/sh\nprintf \'008\\n\'\n', {
+      mode: 0o755
+    })
+    await runScript(scriptPath, dir, '{"rate_limits":{"five_hour":{"used_percentage":12}}}')
+    expect(lineCount(curlLog)).toBe(1)
+    expect(readFileSync(stampPathFor(dir), 'utf8')).toBe('1')
+  })

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 83093510-475c-4353-8c80-ae5021eca5d1
📥 Commits

Reviewing files that changed from the base of the PR and between c2624ab and 3f953eb.

📒 Files selected for processing (3)
  • src/main/claude/statusline-script.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-queued-card-holds.test.ts
  • src/main/ripgrep/fd-exhausted-spawn.test.ts
💤 Files with no reviewable changes (2)
  • src/main/ripgrep/fd-exhausted-spawn.test.ts
  • src/main/claude/statusline-script.test.ts

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

@nwparker
nwparker merged commit 6d51651 into main Oct 11, 2026
31 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