Repository navigation
[CI] test: reduce session imports and mocked recovery waits - #26567
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (49)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughOne recovery test disables the recovery-resolution delay during session restoration and restores the original resolver afterward. Across renderer, component, and end-to-end tests, imports move from the aggregate web-session-tabs-sync module to dedicated synchronization modules. The import changes do not alter test behavior. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The changes are limited to test imports and recovery-test timing, with no merge-blocking behavior change established. Normal CI validation remains outstanding. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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
Tests spend less time loading web-session code and waiting for a mocked process to stop. The application and all existing test checks stay unchanged.
What Changed
Use the same operations from their existing modules in 47 tests and their harness. Preserve the harness’s browser registration, shared state, public API coverage, callbacks, mocks, hooks and deadlines.
One recovery test supplies an async no-op to the existing resolver’s delay dependency. Its owner probe is mocked and clock fixed; all probe iterations, stop signals and real store/journal transitions remain. Restore the spy before the original assertions and session attach.
Why
Direct imports avoid loading unused operations while reusing actual owners. The existing delay dependency removes mocked pacing waits while preserving migration checks and real process deadlines.
Linked Issue
N/A — internal CI capacity work.
Visual Proof
N/A — test imports and one mocked test dependency only; no UI or application behavior changes.
Testing
Web-session imports: correctness run 37729112594 passed eight original/candidate commands across Bun and Node with two seeds: exact maps for 513 passed cases in 62 files. Timing run 37731201208 retained all six full commands on one Linux ARM4 runner:
Means: 35.022554 → 29.792018 seconds (14.935% less cohort time). The much larger first-pair improvement is confounded by shared warming; the later two averaged 3.636% less time. Process snapshots run every five seconds while each command is active; their observer overhead is included, with no added five-second wait or tail. Qualification occupied 597 runner-seconds across four hosts plus the collector; the timing host occupied 249 seconds and queued 5 seconds.
Mocked recovery: run 37749440808 passed eight original/candidate commands with exact 19-case maps across both parent runtimes and seeds. The fixture retained its protected Node route. Its six following full commands were:
Means: 10.525460 → 3.823861 seconds (63.670% less fixture-command time). This one host occupied 186 seconds: 76.082 seconds of qualification commands and 43.048 seconds of timing commands, plus setup/collection/upload; it queued 914 seconds. Queue time is separate from occupied runner cost.
Both trials retained all first commands in before/after, after/before, before/after order, with four workers, isolation, six setups and the shipping filesystem cache. Recovery qualification preceded timing on the same host. Shared OS/Bun/cache warming limits interpretation; these are scoped observations, not a whole-CI 2× or fleet capacity claim.
Measured sources were
8b20d211(imports) and3b24c0d4(recovery). The 28 later type-import syntax cleanups were source-checked, not separately timed. On named main7c50009c, all 49 originals match the source proposal and committed headf956a01creproduces the candidate bytes from6fad8c40. All 116 guarded owners/configuration paths still match the proposal’se0a98a4fsource; the recently merged test cleanup is retained. Against branch basea2114892, 115/116 source guards match; only an unrelated SQLite registry addition differs and remains preserved. Current-source full CI now passes; official results are below. Node proof covers the launcher receipt/source chain and route, not a sampled worker binary.Current PR Checks, Mobile, Node-server detector and LoC all pass. Static analysis/typecheck, all ten unit shards, relay, wire compatibility, Linux and Windows packaging, the selected two-app Electron check and final verification pass. Headless-server platform builds correctly skip because their inputs are unchanged; skipped optional checks are not claimed as executed.
Current full validation completed successfully across all four attached workflows. It occupied 4,916 runner-seconds in 24 allocated jobs (46 declared): 4,570 for PR Checks, 24 for the Node-server detector, 310 for Mobile and 12 for LoC. Pool totals were 3,981 ARM, 583 ubuntu-latest, 291 Windows and 61 ubuntu-slim runner-seconds.
The ten unit jobs occupied 3,290 seconds: 2,934 in Test shard steps, 321 before them and 35 afterward. The longest test step took 315 seconds; the largest unit creation-to-start delay was 699 seconds, counted separately from occupied time. The previous PR26546 validation used 3,244 unit runner-seconds; this run used 46 more (1.42%) on different source, hosts and allocations. This unpaired observation establishes neither a fleet saving nor a causal regression. The earlier correctness/timing diagnostics occupied 597 + 249 + 186 = 1,032 seconds and remain separate from normal-PR accounting.
All 11,833 modules appear exactly once across the ten shard reports: 113,859 passed, three expected failures and 1,069 skips, with zero unhandled errors. Actual reported routes match the full source plan: 10,682 Bun, 1,150 Node-runtime and one measurement module. All 62 original web-session cohort modules passed with 513 cases, and recovery passed all 19 cases on Node. Current logs provide module counts and status, while historical exact title-map qualifications and scoped timings retain their original source scope.
The historical diagnostics and this full validation together used 5,948 occupied seconds; no new diagnostic was launched for this integration. This validation still selects packaging/Electron work when the shared unit harness changes, due to existing filename routing. That cost is included above. A separate exact-harness routing proposal is held for direct-import protection and runtime qualification; it is not part of this patch.
The actual tested merge
e02a8136has the exact shipping-head tree, with parent7c50009c. All 49 edited targets match the reviewed candidate, and the 67 other guarded owners/configuration paths remain exact. A fresh main check still finds7c50009c; no rebase or untested source substitution occurred.Review
Archived source, raw-map and measurement reviews passed. Current-source static formatter, lint and normal commit hooks pass; independent source and official-report review verifies unchanged callbacks, local import bindings, browser registration and complete enrollment. CodeRabbit reviewed the exact
f956a01chead and generated no actionable comments; the final saved review snapshot has zero inline threads. No additional benchmark or shared-cache warmer job is introduced.Agent skill upstream boundary
Notes
Production and SSH/folder-workspace, wire, native-runtime, security and platform contracts remain unchanged. The separate prose/count-test cleanup is outside this change.
Checklist