Repository navigation
[CI] Reuse first SQLite fixture construction in five persistence suites - #26231
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughFive persistence tests now use shared harness state and create a fresh store on the first store request in each test case. Each test resets its per-case store flag and retirement-collision cache. Later store requests retain their existing module-reset and SQLite setup or reload paths. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to This PR changes persistence-test setup without changing production behavior; each case retains its own store and input. No actionable merge risk is evident; routine CI and bot review checks remain. 🚥 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
Five persistence test files repeatedly rebuild the persistence module graph before opening their first database. Reuse the existing test constructor for that first opening so the same checks spend less time loading code.
What Changed
The first Store in each case uses the existing SQLite test harness. Every case still has its own temporary directory, persisted input, real SQLite database, authority, and Store. Later disk reloads still reset and reload modules exactly as before. The existing retirement collision cache is cleared before each case.
Why
Avoid repeating imports rather than caching databases or removing reload checks. Existing tests still cover retirement namespaces, host-scoped repository IDs, pinned automation ownership, workspace repinning, and SSH re-adoption. Their runtime contracts remain on actual Node even when Bun coordinates the test command.
Linked Issue
Maintainer exception from
.github/pull_request_template.md: this is internal contributor test-performance work, with no pre-existing issue. The template asks maintainers to avoid opening needless issues.Visual Proof
N/A — test fixtures only; no application appearance or interaction changes.
Testing
macOS qualification: 209 original cases across 12 related files passed in all eight before/after runs: Bun and Node coordinators, shuffle seeds 104729 and 130363. Exact case identities and statuses, routes, resolved settings, source hashes, normal process close, and recorded coordinator census passed validation. The timed subset is the original 59 cases in these five actual-Node files. Typecheck, changed-code quality, and formatting passed.
Before/after measurements
Whole
pnpm testcommand, macOS, four workers and transform cache disabled in both arms. First measured runs counted; schedule: before0, after0, after1, before1, before2, after2.22.9263% less elapsed time / 1.2975× for these 59 cases, all three pairs improved. All six timings qualified; zero timed attempts rejected or qualified samples discarded. 1 external-coordinator preflight rejection launched no test child. One earlier paperwork preflight also launched no child: a copied unused historical collector retained its parent hash. The old failed record is retained; a fresh template corrected only that digest and artifact label, then the unchanged eight-report validator requalified the same eight reports. No measured sample, source change, settings, or case map was replaced.
Source:
40d35fb7bfcee9b33ff8027bc4a9a44ee1a48f6d; frozen qualification/performance evidence is retained locally undernotes/bun-migration/performance/persistence-five-firstctor-40d35-paperwork-fixed-*. This subset gain is not a whole-suite two-times result.Full CI and review
Full CI run 37635653020 passed on exact head
61a8b98506bdf0b0bbe69b763f7b2816bdfb001e, tested synthetic source226eb1aba4ad72cbd02fdcabf167cde006596e7cwith parents40d35fb7+61a8b985. All 11,678 physical files ran exactly once across five passing shards: 11,538 passed files, 140 existing skipped files; 112,609 passed cases, one expected failure, 1,052 existing skips. No unhandled errors, omitted failures, or added/missing files. All 59 changed cases completed under the actualnode-runtimeproject (34 retirement, 9 SSH re-adoption, 8 pinned fence, 5 host-scope, 3 repinning). Routes: 10,551 Bun, 1,126 actual-Node runtime, one Node measurement; all 18 stock launcher/configuration/registry/setup guards match incoming main. Stock artifacts prove full enrollment/raw totals; the separate local eight-report qualification proves the selected named-case maps.CodeRabbit review explicitly covers exact head
61a8b985: zero actionable findings and no review comments/open threads. Two advisory warnings assessed before merge: the description now states the template's maintainer issue exception and completed CI; its 33.33% documentation-coverage threshold is not a repository requirement. These existing fixture functions keep their assertions and reload tails; adding boilerplate docstrings solely to reach 80% would conflict with concise comments. The constructor boundary and cleanup rationale are explained above.Review
Existing canonical constructor and cleanup are reused; no production code, deadlines, test cases, skip conditions, or runtime routing changed. Separate source review checked the first-construction gate, fresh database authority, cache reset, and retained later reload boundaries.
Agent skill upstream boundary
Notes
No changes to Windows, Linux, SSH execution, folder workspace behavior, or wire compatibility. A subset speedup will not be presented as the full-suite two-times goal.
Checklist