Repository navigation
[CI] Import Activity functions directly in eight test suites - #26237
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (8)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughActivity tests now import helpers, components, and a hook from dedicated modules instead of importing them from Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The reviewed changes move test imports to dedicated modules, with no concrete behavior or production risk identified. The change appears mergeable subject to normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings
🛠️ Fix failing CI checks 💡
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 |
60a8061 to
3ff830d
Compare
ELI5
Eight Activity tests can load their existing functions without loading the entire Activity page. The measured subset takes 44.24% less time with the same 57 cases.
What Changed
Replace named page imports with imports from the existing function owners: event/thread builders, grouping/presentation, the filter-focus shortcut, and terminal portal status. Combine the existing presentation import with the moved binding. Every other statement, original case, callback, assertion, clock, mock, and cleanup remains byte-identical. The actual default-page rendering tests still load the page; production exports remain unchanged.
Why
The public page loads unrelated React, Store and presentation modules before tests exercise small functions. Reuse the exact existing function objects and state owners through direct imports instead of duplicating implementations or weakening isolation.
Before/after measurements
Whole
pnpm testcommand on macOS at committed sourceb00556676fa387a09cbbb92e47107b8c3fd7537e, four workers, filesystem transform caching disabled in both arms. This baseline already includes PR #26229; its fixture change stays fixed in both arms. Three alternating pairs, including first runs:44.2434% less time / 1.7935× for these eight files and 57 cases. All three pairs improved; all six reported samples qualified; no qualified sample was discarded. One additional before2 attempt took 18.001536s with external test coordinators overlapping it: every source/configuration/case gate passed, only the predeclared process-noise gate failed. That raw rejected attempt and its coordinator ledger are retained; it is excluded from the quiet comparison. Four external-coordinator preflight rejections launched no test child. No hidden warmup or source/settings retry was used.
This is an incremental subset result, not a full-suite two-times claim. The earlier four-suite fixture percentage cannot be added to or multiplied by this eight-suite result.
Linked Issue
Maintainer exception from
.github/pull_request_template.md: internal contributor performance work, no pre-existing issue; avoid opening a needless issue.Visual Proof
N/A — test imports only; no application layout or interaction changes.
Testing
ORCA_BACKGROUND_LAUNCH=1.An earlier source draft passed correctness but failed the duplicate-import lint rule before any timing. Its original plans, all eight reports and failure record remain preserved. A fresh source epoch combined the same presentation bindings, passed independent import/owner review, and repeated all eight qualifications before these timings.
Review
Independent source checks verified every non-import byte, complete module/name/local-alias/type import inventory, every original callback, all 14 owners, and exact removal of the appended audit. Canonical i18n/Intl can initialize earlier after the page import is removed; broad qualification includes actual page rendering, portals, HMR, menus/ref interactions, lifetime and cache behavior. Universal evaluation-order identity is not claimed.
Agent skill upstream boundary
Notes
Measurements used named source
b0055667. Rebase onto76d1b7bf29932f6e1edfb6b0b34d65c5c88e5f55preserves all eight shipping target hashes. One of 59 named guards differs: the lifetime test's import-only change from separately reviewed/merged PR #26217; its case bodies and actual Node route remain. The other 58 guards match; final full CI must cover the new integration. Timings were not repeated after rebase and are not represented as measurements of the latest main.No execution-host, SSH, mobile, wire, platform, deadline, assertion, or isolation changes. Raw qualification/performance evidence and all rejected attempts are retained under ignored
notes/bun-migration/performance/activity-public-test-leaves-b005-import-fixed-*andactivity-public-test-existing-leaves-b005566-import-epoch-*.Checklist
Preserved earlier full-CI failure
Run 37639529667 on synthetic merge
98945fd8f44a6d83baba213225e221a2c42adf0denrolled all 11,678 files exactly once, with zero omissions or additions. Four shards passed; shard 1 completed with a failure: 11537 passed files, 140 skipped, one failed; 112608 passed cases, one expected failure, 1052 skipped, one failed case, plus one unhandled EEXIST error. This is a failed full-CI result, not qualification.The failures are the remote/new-turn cancellation HTTP test in
server-claude-task-wakeup-lifecycle.test.tsand a late archive abort error attributed toskill-bundle-creation.test.ts. Both tests and their production sources are byte-identical to incoming main. The archive error has a deterministic real-gzip regression under both Node and Bun. The correction in #26246 is now merged after a passing 11,678-file full CI run. The HTTP transport/fake-clock diagnosis remains under investigation. The original failed run remains retained. All before/after performance evidence above remains unchanged and incremental.Current source after the archive correction — full CI passed
Head
3ff830da8740799d17ae84de587578a5a7a0a384is rebased onto archive-fix merge7d6d7ca6f841acf686a8dd07c1dbcc7cf40073fa, which also includes the six-fixture merge #26250. All eight Activity shipping files remain byte-identical to the prior head. The fresh full PR CI result below validates this integration; the measured source and every before/after sample above remain unchanged.An isolated HTTP compatibility trial passed the unchanged 51 cases before and after the proposed header, under both runtimes and two seeds. It did not reproduce the earlier failure and therefore does not justify shipping that header as a fix. HTTP diagnosis remains open. The archive correction is included in the current source; its fresh full CI passes both the archive regression and the unchanged HTTP suite. This passing integration does not establish the cause of the earlier HTTP failure or a header fix.
Current full CI and independent source proof
Run 37651561672, attempt 1, tests synthetic merge
4e2f4903645953b69fe665c4ef88a7e04657433awith parents7d6d7ca6f841acf686a8dd07c1dbcc7cf40073faand exact PR head3ff830da8740799d17ae84de587578a5a7a0a384. All five unit shards pass; all 30 indexed check contexts are terminal success or stock skip.Downloaded assignments from every shard match fresh canonical discovery and the source's LPT map, report exactly their own shard, and cover the same 11,678-file physical inventory. Eighteen stock runtime/configuration/source guards and the two landed archive production/test guards match incoming main. All eight shipping file hashes match both the tested PR head and the original shipping head
60a80615. Actual completion markers show all 57 stock-registered cases in those eight files passing under Bun; protected runtime routes remain unchanged. The archive regression passes all 15 cases and the unchanged HTTP wakeup suite passes all 51. Stock CI artifacts provide module states/counts and runtime markers, not complete individual case identities; local qualification above supplies the named-case parity evidence.CodeRabbit's review has zero actionable comments and zero unresolved threads, but its embedded coverage names the earlier
60a80615head, not the rebased3ff830dahead. Exact new-head bot coverage is therefore not claimed. Independent checks establish unchanged shipping bytes, the incoming source guards, all original local qualification boundaries and this fresh full CI outcome. The review gap and earlier failed integration remain explicit; no failures or performance samples have been removed.Raw assignment/log evidence and the independent source/count proofs are retained under ignored
notes/bun-migration/performance/pr26237-rebased-*. The separate ordinary five/ten-shard canary pair is now bound to identical pinned-base source and actual full five/ten enrollment. Its cost/performance outcomes remain pending and do not change the measurements or coverage in this PR.