Repository navigation
test(responses): make the periodic spill sweep resume case deterministic - #6848
Conversation
The window case assumed three 25ms liveness ticks could finish a real directory. On a slow runner the deadline stopped each tick early, so the assertion saw 3 removals instead of every orphan. Drive order through the existing readdir seam, hold the clock still, and assert the first tick stops at the scan window while the next tick removes only the orphans. Reset the process-global sweep cursor around each case. Co-authored-by: JUN <jun@lidgeai.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe test suite resets the process-global periodic sweep cursor before and after each test. The full-window test uses deterministic enumeration to verify scan-limit handling, orphan removal, and retention of owned files. ChangesSpill orphan sweep tests
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Merge Risk: ⚪ Minimal · up to This change only makes a flaky test deterministic and does not alter production behavior. It carries no merge-blocking risk. Pre-merge checks |
|
|
✅ Deterministic PR hygiene checks passed. |
Summary
tests/responses/responses-spill-orphan-sweep.test.tssaw 3 removals instead of every orphan (shard 4/4 on feat(gui): add a Context accounting control to the Claude Code page #6782).readdirEntryseam and holdsDate.nowstill. The first tick must stop atscanMaxwith nothing removed; the next tick removes only the orphans and leaves the referenced spills. The process-global sweep cursor is reset around each case.Verification
bun test ./tests/responses/responses-spill-orphan-sweep.test.ts— 6 pass, 0 fail, 24 expects.python3busy-loops saturated the CPUs: 20 pass, 0 fail.devis onlytests/responses/responses-spill-orphan-sweep.test.ts(46 insertions, 15 deletions).scripts/test-layout/layout.jsonis unchanged.Checklist
Summary by CodeRabbit