Repository navigation
fix(test): repair source-tier migration assertions after v9 landed - #2810
Conversation
Problem: PR #2800 (beads-ingest) added durable source-tier migration 009 (after PR #2794 claimed slot 008 for capture_mode first, requiring a merge-conductor rebase to renumber). The rebase's fix-forward edits to tests/unit/storage/test_durable_migrations.py were made to the working tree after the rebase commit but never actually committed, so PR #2800 merged without them — leaving master with 3 failing migration tests: - test_source_tier_v2_migrates_to_v3_dropping_pending_blob_refs and test_source_tier_v3_adds_publication_reservations_with_verified_backup_receipt asserted the old 8-step applied_versions tuple instead of the current 9-step chain. - test_source_tier_v7_expands_origin_checks_with_verified_backup relied on the workspace_env fixture's ArchiveStore pre-creating source.db at the CURRENT schema (already including capture_mode via CREATE TABLE IF NOT EXISTS no-op), so its stripped-down "v7" DDL was silently never applied and migration 8's ALTER TABLE ADD COLUMN capture_mode hit a real duplicate-column error under a forced PRAGMA user_version=7 stamp. What changed: updated the two applied_versions/to_version literals to include version 9, and added db_path.unlink(missing_ok=True) before the v7 test's executescript, matching the pattern _create_source_v1 already uses in the same file for the same fixture. Verification: devtools test tests/unit/storage/test_durable_migrations.py -> 33 passed. devtools verify --quick -> 15/15 checks green. Co-Authored-By: Claude <[email protected]>
|
Warning Review limit reached
Next review available in: 2 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Summary
Repairs 3 failing source-tier durable migration tests on
master, introducedby an incomplete fix-forward during merge-conductor rebase work on PR #2800.
Problem
PR #2794 (origin-interop) claimed source-tier migration slot
008forcapture_mode. PR #2800 (beads-ingest) also numbered its own migration008, requiring a rebase to renumber it to009(and preserve thecapture_modecolumn through the copy-forward rebuild it performs). Thetest-file edits accompanying that rebase were made to the working tree
after the rebase commit but never actually
git added/committed, soPR #2800 merged without them.
mastercurrently fails:test_source_tier_v2_migrates_to_v3_dropping_pending_blob_refstest_source_tier_v3_adds_publication_reservations_with_verified_backup_receipttest_source_tier_v7_expands_origin_checks_with_verified_backupSolution
applied_versions/to_versionliteral assertions toinclude migration
9(was pinned to the old 8-step chain).test_source_tier_v7_expands_origin_checks_with_verified_backuprelied onthe
workspace_envfixture'sArchiveStorepre-creatingsource.dbatthe current schema (already including
capture_mode, sinceCREATE TABLE IF NOT EXISTSsilently no-ops against it) before the test'sown stripped-down "v7" DDL ever ran. Under a forced
PRAGMA user_version=7stamp, migration 8'sALTER TABLE ADD COLUMN capture_modethen hit a real
duplicate column nameerror. Addeddb_path.unlink(missing_ok=True)before theexecutescript, matching thepattern
_create_source_v1already uses in the same file for the samefixture.
Verification
devtools test tests/unit/storage/test_durable_migrations.py— 33 passed.devtools verify --quick— 15/15 checks green.