Skip to content

[CI] test: load Activity fixture builders without importing the page - #26229

Merged
nwparker merged 1 commit into
mainfrom
nwparker/activity-fixture-leaf-builders
Oct 7, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/activity-fixture-leaf-builders

Conversation

@nwparker

@nwparker nwparker commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Activity tests can build their sample data without loading the entire Activity page first. Four measured suites took 57.03% less time with the same 19 tests.

What Changed

One test fixture imports buildActivityEvents and buildAgentPaneThreads from their existing owner modules instead of the page that reexports them. Factory bodies, public exports, production code and assertions stay unchanged.

Why

The page brings unrelated React, Store and presentation modules into pure builder tests. Importing the existing builders directly avoids that work while preserving the same function objects and cache owners.

Measured on macOS at source 0d8289997296413ed1629f7256885c27c277b436, with four workers, filesystem module caching disabled and the complete test command timed through exit:

Matched pair Before After
1 5.073 s 2.429 s
2 6.536 s 2.255 s
3 4.852 s 2.389 s
Mean 5.487 s 2.358 s

All six samples qualified, including the first runs; none were rejected or discarded. Every pair improved. The result is 57.03% less time (2.327× faster) for these four suites, not a full-suite speed claim.

Linked Issue

Maintainer-requested test performance work; no existing issue.

Visual Proof

N/A — only test fixture imports change.

Testing

  • Automated tests run locally on macOS with ORCA_BACKGROUND_LAUNCH=1.
  • All 30 qualification suites passed under the Bun coordinator and stock Node, with both shuffle seeds: 219 original tests versus 220 with the separate binding audit. Removing that one audit case preserves every original case name, status, runtime route and resolved configuration.
  • The audit checks that both public page exports are the same function objects as the direct imports. It is removed from shipping and timing.
  • The lifetime contract keeps running in actual Node under Bun; the remaining 29 suites run in Bun. The four timed suites keep their original routes.
  • Web typecheck, changed-code quality and formatting pass.
  • Final full CI passed on the rebased head; full five-shard enrollment verified.

AI Disclosure

Review

Independent source review checked unchanged factory statements, public binding identity, mock boundaries, runtime routing and audit removal.

Agent skill upstream boundary

  • Not applicable; no upstream skill source is copied or translated.

Notes

The existing i18n and Intl initializers can run earlier after removing the page import. Qualification includes the real page, portal, HMR, cache and status tests; this does not claim universal initialization-order identity. No execution-host, SSH, mobile, security or wire behavior changes.

Checklist

  • This PR is small and focused.
  • The before/after behavior, mechanism and choice of approach are explained.
  • Visual proof is N/A with a reason.
  • Self-reviewed for correctness, security and performance.
  • Cross-platform and remote impact considered.
  • Relevant local tests, typecheck, quality and formatting pass; full CI passed before merge.

Measurements used frozen 0d828999; after rebasing onto 40d35fb7, the shipping fixture is byte-identical. The only guarded dependency change adds an unrelated SSH command file to the Node registry; all 30 selected Activity routes remain unchanged. Incoming clock tests are outside this cohort. Final full CI qualifies the new main integration; timings were not repeated after rebase.

Final full CI: run 37632605254, synthetic source 65d14982c9e77d2a8d9d1eb803c4d9d0ae72578f with parents 40d35fb7 + exact head b0055667. All 11,678 physical files ran exactly once across five passing shards: 11,538 passed files and 140 existing skipped files; 112,609 passed cases, one expected failure and 1,052 existing skips. No unhandled errors, omitted failures, added or missing files. Source-configured routes are 10,551 Bun files, 1,126 actual-Node runtime files, and one Node measurement file; all 18 launcher/configuration/registry/setup guards match incoming main. These stock artifacts prove enrollment and raw totals, not complete named-case parity; the separate local qualification supplies the exact selected case maps.

CodeRabbit review explicitly covers exact head b0055667: zero actionable findings, no open review threads and all five advisory checks passed. Existing builder/public binding identity, earlier initialization caveat and removed audit were independently reviewed.

@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: 0e7d0b0b-657a-45e9-8355-f097a324f952
📥 Commits

Reviewing files that changed from the base of the PR and between 40d35fb and b005566.

📒 Files selected for processing (1)
  • src/renderer/src/components/activity/ActivityPrototypePage-test-fixtures.ts

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


📝 Walkthrough

Walkthrough

The activity test fixture module now imports buildActivityEvents and buildAgentPaneThreads from their dedicated builder modules instead of importing both from ActivityPrototypePage.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to b0055

This change only redirects test-fixture imports to the same builders without changing production behavior; no actionable merge risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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 and concisely describes the main change: loading Activity fixture builders directly without importing the Activity page.
Description check ✅ Passed The description follows the required template and explains the change, rationale, testing, visual-proof exception, scope, compatibility considerations, and checklist status. The missing issue link is …
✨ Finishing Touches
📝 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 4a0418d into main Oct 7, 2026
30 checks passed
@nwparker nwparker changed the title test: load Activity fixture builders without importing the page [CI] test: load Activity fixture builders without importing the page 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