Repository navigation
[CI] test(persistence): reuse first constructors in six more suites - #26250
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (6)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughSix test files now use shared persistence test state and reset retirement-collision cache state before each test. Their store helpers create a fresh or canonical store on the first call and retain the existing SQLite-store path for later calls. The host-retarget tests add cases for orphan target preservation and explicit project changes. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The changes are confined to persistence tests, with targeted runs and typechecking reported as passing. Full CI is pending; no specific merge-blocking issue is evident. 🚥 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
Six persistence test files repeatedly reload the persistence code before opening their first database. Reuse the existing test constructor for that first opening so the same checks spend less time importing code.
What Changed
Only the first Store in each case uses the existing SQLite test harness and canonical constructor. Each case still has its own temporary directory, real database and persisted state. Later disk reloads keep their existing module reset/import path. Reset the existing retirement collision cache before each case.
The two removal suites use their existing explicit data-file setup rather than installing a new application environment. Automation suites retain their existing per-case environment, cipher registration, owner fencing, cleanup and subsequent reloads.
Why
Reduce repeated imports without caching databases or removing persistence checks. Reuse established fixtures rather than adding a second persistence implementation. All six suites remain actual-Node runtime contracts even when Bun coordinates tests.
Linked Issue
Internal maintainer test-performance work; no pre-existing issue. The repository template asks maintainers to avoid opening needless issues.
Visual Proof
N/A — test fixtures only; no application appearance or interaction changes.
Testing
MacOS qualification: all 178 original cases across 12 related files passed in eight accepted before/after runs: Bun and actual Node coordinators, shuffle seeds 104729 and 130363. Exact named-case identities/statuses, routes, resolved settings, source hashes, normal process close and recorded coordinator census matched. The six timed files contain 43 original cases, all on actual Node.
pnpm tc:node, changed-code quality, format checks and diff checks passed.Before/after measurements
Whole
pnpm testcommand through normal close, macOS, four workers and filesystem module cache disabled in both arms. First runs counted; alternating schedule before0, after0, after1, before1, before2, after2.11.8546% less elapsed time / 1.1345× for these 43 cases. All three pairs improved. All six timed attempts qualified; zero timing/preflight rejections, retries or discarded qualified samples.
One earlier correctness run (before/Node/seed130363) passed all 178 tests but was disqualified for unrelated external Vitest coordinators. Its raw reports and process proof are retained. A separately named quiet recheck passed every qualification guard; no test failure was retried or ignored.
Frozen source
76d1b7bf29932f6e1edfb6b0b34d65c5c88e5f55. Local raw evidence:notes/bun-migration/performance/persistence-six-firstctor-76d1-*andpersistence-first-construction-six-families-76d1-*. All 48 earlier source guards and six candidate file bodies match the prior source-only proposal; a fresh epoch records the current source rather than relabeling old results. The consumed benchmark plan has a copied prose label saying five files; its authoritative file arrays, recorded routes and case map contain six files / 43 cases. That wording is retained as an artifact finding; no consumed plan was edited. This focused result does not establish whole-suite acceleration or the historical two-times goal.Full CI run 37644725348 passed on exact head
7c4b7032af8a948dd751a89571b7153f8d3ae61a, synthetic sourcec09d6c2e1bf5e82c40b5ac3e5e372c1b33cd486bwith parents76d1b7bf+7c4b7032. All 11,678 files ran exactly once across five passing shards: 11,538 passed, 140 existing skips; 112,609 passed cases, one expected failure and 1,052 existing skips. Zero failures, unhandled errors, omitted failures or added/missing files. All 43 changed cases completed under actualnode-runtime; all 18 stock source/configuration/registry/setup guards match incoming main. Stock artifacts prove enrollment/raw counts/runtime markers; the local eight-report qualification separately proves exact selected case maps. No deadline, assertion, skip, route or shutdown guard is weakened.CodeRabbit review covers exact
7c4b7032: zero actionable findings and zero unresolved threads. Its generic 0% docstring-coverage warning for six existing fixture functions is advisory, not a repository requirement; adding boilerplate to meet its 80% threshold conflicts with the repository’s concise-comment rule. Constructor ownership, later cold reloads and cleanup are explained above. Other advisory description/issue checks passed.Review
Independent source review checks the first-construction gate, fresh database ownership, collision-cache reset and retained later reloads. Independent fresh evidence review passed: all eight 178-case qualification maps match and all six timed runs retain the same 43 actual-Node cases, resolved settings and source fingerprints, with normal close and zero noise/errors. Full CI and exact-head automated review completed; no actionable findings remain.
Agent skill upstream boundary
Notes
No production behavior, host/SSH execution, folder-workspace handling, native runtime or wire changes.
Checklist