Skip to content

[CI] test: make remote upload cases independent of clocks and initial writes - #26202

Merged
nwparker merged 1 commit into
mainfrom
nwparker/remote-upload-fixture-clock
Oct 7, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/remote-upload-fixture-clock

Conversation

@nwparker

@nwparker nwparker commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

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.

Shuffled seed Before Bun After Bun Before Node After Node
130363 408 pass,2 fail 410 pass,0 fail 408 pass,2 fail 410 pass,0 fail
104729 410 pass,0 fail 410 pass,0 fail 410 pass,0 fail 410 pass,0 fail

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.

  • Web typecheck, changed-code quality, oxfmt and whitespace checks pass.
  • Original failing reports and intermediate clock-only failure retained. A Node104729 run passed all410 cases but its sampled process guard rejected inconsistent ownership during close; that run stays rejected. A fresh epoch with sample-boundary ownership passes the same410 cases and every source/process guard; fixture bytes are identical.
  • All four source/process-guarded runtime/seed qualifications and complete original case parity.
  • Full PR CI passes on synthetic source 7c167352, combining incoming main 2dc98c93 with fixture head 8897cf6c. 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 8897cf6c and 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

  • Not applicable; no agent-skill source changed.

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

  • Focused fixture change; behavior, mechanism and choice explained.
  • N/A visual proof explained; cross-platform and remote ownership considered.
  • Self and independent source review complete.
  • Final qualifications and full PR CI pass.

@coderabbitai

coderabbitai Bot commented Oct 7, 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: df04f083-d889-4ee6-8ff9-f7eb333e1ca6
📥 Commits

Reviewing files that changed from the base of the PR and between 2dc98c9 and 8897cf6.

📒 Files selected for processing (1)
  • src/renderer/src/app-shell/remote-workspace-unplaced-upload-suppression.test.tsx

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


📝 Walkthrough

Walkthrough

The 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 8897c

No actionable merge-blocking issue is established; the test stabilization is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 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 describes the main change: making remote-upload test cases independent of clock state and initial persistence writes.
Description check ✅ Passed The description covers the required sections, explains the change and its rationale, and provides detailed testing and review results. It explains why visual proof is not applicable and identifies the…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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 7f8b4a8 into main Oct 7, 2026
30 checks passed
@nwparker nwparker changed the title test: make remote upload cases independent of clocks and initial writes [CI] test: make remote upload cases independent of clocks and initial writes Oct 9, 2026
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