Repository navigation
Conversation
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: 🔵 Low · up to 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 |
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/claude/statusline-script.test.ts (1)
278-303: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd 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_msand malformeddateoutput.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
📒 Files selected for processing (3)
src/main/claude/statusline-script.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-queued-card-holds.test.tssrc/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.
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
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
008control 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.Queued-card full-entrypoint ABBA, wall / waited-child CPU seconds:
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
296382dfa9c3f2fd7bce2672ff3aec6ddf67e28creported 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
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