Repository navigation
[CI] Keep native watcher contracts in Node and reset runtime test caches - #26315
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe Node runtime test include list now includes Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to This change adjusts test routing and cache cleanup; the inspected configuration supports the intended Node execution, and no concrete regression is established. No code-review blocker remains. 🚥 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
Full test runs exposed two runtime-contract problems: shuffled tests could inherit a repository-key cache from an earlier case, and a real native filesystem-watcher test ran under Bun rather than the app's Node runtime. This fixes those boundaries while retaining every test and assertion.
What Changed
Three added lines in two existing files:
_resetCanonicalRepoKeyCacheForTestsseam with its other mocks. Existing cleanup hooks and within-case production cache reuse remain intact.@parcel/watchercontract. Its event assertions, eight-second delivery deadline, 300ms absence check, newline-path cases and native cleanup stay unchanged. Pure watcher-policy tests stay in the ordinary project.Why
The fixture's mock reset and cache reset need the same lifetime. Reusing the existing reset seam fixes the cold-probe assumption directly. The native watcher belongs in the app's actual runtime, consistent with the agreed native-contract policy. Disabling the production cache, weakening assertions, changing real deadlines or retrying failures would conceal the evidence.
Testing
Repository-cache correctness before and after, across the complete 22-file/1,669-case cohort:
a576c0bc, seed 104729a576c0bc, seed 13036330bc964e, seed 10472930bc964e, seed 130363The original failed run and corrected qualification are both first attempts. Original case identities match exactly: in each old failing control, only “OrcaRuntimeService routes local WSL project worktree drift probes through runtime git options” changes failed→passed. All other statuses match; the precise stock skip is “lists drive roots for a server-root browse.” The cohort includes one separate public-binding check. Four additional optimizer-enabled arms pass the same cohort; those qualify a separate experiment and provide no speedup claim for this fix.
Native-watcher observations are preserved separately:
bcce34b6b4fef30146cef5b47b23aThe unchanged watcher missed a source path within its existing deadline in the failed run. The passing observations prevent claiming a categorical Bun defect, and these limited observations do not establish a reliability improvement. This is a runtime-contract correction; it makes no speedup claim.
All original cohort identities, statuses, stock isolation, six setups, four workers, source fingerprints and natural-close/process guards are verified independently. Cache-reset compatibility uses fsModuleCache=false; full CI retains stock caching. Native contracts run only in isolated Linux ARM CI with
ORCA_BACKGROUND_LAUNCH=1. Formatting, Node typecheck, changed-code quality and normal commit hooks pass. Combined normal shipping commit71fa4b2116319b1ae4c8f8be274b9bebad2cfcb7, rebased onto the merged ten-shard rollout00984ccb, changes only the two target files. The 196 upstream paths added or changed since the original base remain intact, including the newer SQLite contract registry. Formatting, Node typecheck and changed-code quality passed again after rebasing. The complete ten-shard PR suite passed; earlier focused measurements keep their original source labels. Each target byte matches its separately qualified normal donor commit (f5a3abc8registry,30bc964efixture). Full PR CI and current-head review are recorded below.Complete integration: run 37680622381, tested merge
5b47b23a93de5400fd2f405a20f1f64bd5b426df, parents00984ccband shipping head71fa4b21. All ten shards, selection evidence and final verification pass; all 35 current-head contexts are terminal, with no failures. Package jobs were skipped for this two-file change and are not claimed as package validation.Actual uploaded assignments, fresh canonical discovery and raw module completion records agree: 11,715 physical files exactly once, 11,575 passed files and 140 stock skipped files; 112,984 passed cases, three expected failures and 1,052 stock skips, with zero failed cases, unhandled errors or omitted failures. Every physical file from the immediately preceding qualified
c0256db7integration remains enrolled, with identical aggregate case counts. Actual runtime markers show 10,581 ordinary Bun files, 1,133 Node runtime files and one Node measurement file. The real watcher runs innode-runtimeand passes in 377ms. The lifecycle.spec.tsfile is imported fixture support rather than a separately discovered test; its exact shipping bytes and all runtime suites are preserved. Stock CI artifacts provide module-level counts and runtime markers, not a complete named-case map, so full-suite case identity parity is not inferred from totals.The exact tested merge preserves incoming main except the two intended files, and both match their shipping bytes. Of the 55 existing stored source guards, only the intended Node runtime registry differs from the preceding qualified integration; all other guarded paths retain identical bytes.
Linked Issue
N/A — maintainer follow-up to measured full-suite and shuffle failures.
Visual Proof
N/A — test fixture cleanup and runtime routing only; no application UI change.
Review
Independent source and actual cache-reset raw-report reviews are clear. All four native qualifications retain identical 36-case identity/status maps. Actual completion records keep the watcher in
node-runtime/node-runtimefor both Bun seeds andnode/forksfor both Node seeds; pure policy and sequencing counterexamples stay ordinary. Independent raw source/config/process gates and a separate root raw-map check pass. Combined integration passes. CodeRabbit's review covers exact head71fa4b21, reports no actionable comments, and has no review threads. Its generic documentation advisory for the existingresetRuntimeTestMocksfunction is acknowledged: the function name and reset calls state its scope clearly, so no redundant docstring is added.Agent skill upstream boundary
Notes
Production native, WSL and SSH repository-cache ownership and folder-workspace behavior are unchanged. Native watcher routing applies on macOS, Linux and Windows and retains the existing Windows filename guard. New runtime observations are from Linux ARM CI; no macOS or Windows app testing is claimed.
Checklist