Repository navigation
[CI] test: make remote upload cases independent of clocks and initial writes - #26202
Conversation
|
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; 5 remain after this review. 📝 WalkthroughWalkthroughThe test harness now waits for the initial debounced session write and verifies that it does not cause a remote upload. Upload-race and transient-upload-failure tests use this settled persistence setup. Fake-timer teardown advances past the suppression interval and checks that no Direct SSH apply remains in progress. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue is established; the test stabilization is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
ELI5
The remote-upload tests now start each case with fresh Store state and a clock that keeps moving forward. The two tests of later edits wait for the initial persistence write before installing the responses they intend to measure.
What Changed
Reset the existing Store from its canonical initial state before the same remote fixture overrides. Carry virtual time across cases; after unmount, advance the existing 1,500ms virtual suppression window, check that the real apply gate has closed, and restore timers in finally.
For the two edit tests, observe the real host-persistence call without changing its result and await its returned completion promise for every local/host write. Only then authorize the remote target and install the measured write gates and responses. All six original titles, upload-authority assertions, edit markers, and 300/1,500/12,000ms windows remain unchanged.
Why
The production apply deadline survives between cases, while resetting fake time can move the next case behind it. Mounting the persistence hook also starts an initial write; it could consume a response intended for a later edit. Existing Store initialization and the real writer's completion promise make both fixture boundaries explicit while keeping the real authorization path exercised.
Linked Issue
Maintainer test-performance and reliability work; no new issue.
Visual Proof
N/A — test fixture only; no application UI or behavior change.
Testing
Before/after correctness measurements on macOS arm64, Bun1.4.2 and stock Node24.20.0, Vitest5.0.3, four workers, filesystem module cache disabled. Each report covers the same 410 original cases in 48 physical renderer suites. Source before:
b8c967196bdbcc0b5c93ba586b744ecd7c964349.Both failures at seed130363 were in this six-case upload module. Its original assertions remain; the full cohort has no added, removed or skipped cases. Complete original case identities and all other statuses, configuration, routes, source guards and sampled-coordinator guards match; zero unhandled errors. These are reliability measurements, with no speed claim.
7c167352, combining incoming main2dc98c93with fixture head8897cf6c. All 11,678 physical files run exactly once: 11,538 passing modules and 140 existing skips; 112,609 passing cases, one expected failure, and 1,052 existing skips. Zero unhandled errors, missing files, duplicates or omitted failures. The changed six-case module passes under actual Bun. All 19 runtime/configuration/setup/lock guards match incoming main; the only source difference is this fixture. Normal commit hooks pass; committed fixture bytes equal the focused qualification snapshots.Review
Independent source review confirms the pass-through observer returns the same production result, awaits its actual completion promise, restores the spy in finally, and installs measured authorization/responses afterward. Store functions and real remote ownership checks remain. All 30 head checks are green and the head is mergeable. CodeRabbit review explicitly covers
8897cf6cand reports no actionable or merge-blocking comments. No unresolved review threads remain. Its non-blocking docstring-coverage advisory was considered: this repository calls for brief comments on non-obvious behavior, and the fixture already names its setup boundaries and explains the shared clock deadline. Extra documentation was declined to keep those test helpers concise; all required checks pass.Agent skill upstream boundary
Notes
Production, remote protocol, runtime routing and native process contracts are unchanged. The fixture exercises the real SSH authorization path and retains its incomplete-projection protection, retry authority and revision assertions.
Checklist