Repository navigation
fix(devtools): link archive tiers in fast-forward generations (#2805) - #2805
Conversation
Fast-forward generations resolved index.db inside their generation directory but omitted the sibling-tier links created by the normal generation store. Cross-tier reads therefore could not find source.db after activation, breaking Drive catch-up.\n\nCreate canonical source, user, embeddings, ops, and blob links alongside the cloned index before validation. Extend the activation fixture to prove every link resolves to the live archive tier.\n\nRef polylogue-5ucz\n\nCo-Authored-By: Claude <[email protected]>
|
Warning Review limit reached
Next review available in: 59 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 (2)
✨ 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 Reconciles the declared fast-forward plan layer onto the live-proven v32→v35 executor deployed by #2804/#2805. The deployed executor remains the only implementation of clone, activation, rollback, and recovery behavior. ## Problem PR #2788 was based before the executor landed and independently implemented the same operational surface. The merge conductor correctly held it: replacing a live-archive-proven executor would be unsafe and would create two competing recovery mechanisms. ## Solution - Keep the declarative layer in `polylogue/storage/sqlite/lifecycle.py`: versioned delta classes, clone-safe operation metadata, policy coverage, and explicit semantic-reparse routing. - Drive the deployed executor’s canonical objects, receipt delta classes, and exact stage order from the declared v32→v35 plan. Its live-proven SQL, pressure checks, reflink handling, receipts, symlink activation, rollback, and service checks are retained unchanged. - Declare v36 as `semantic-reparse`: it is a source-origin vocabulary change and is rebuild/reprocess-only, not clone SQL. - Keep ma2’s v34 `idx_web_constructs_message` as the first `index-only` plan operation and assert that the deployed executor receipt records that declaration. - Delete the branch’s competing executor/activation/rollback implementation and its conflicting executor tests; no parallel entry point remains. - Retain the schema-version policy gate and generated docs/topology projection. ## Acceptance criteria | Bead | Status | Evidence | | --- | --- | --- | | `polylogue-9rw0` | partially satisfied; replay equivalence deferred to `polylogue-p5r4` | Every current index bump is classified (v33–v35 clone-safe; v36 semantic reparse); policy rejects gaps; the deployed v32→v35 executor consumes the plan and records stages/classes; semantic deltas route away from executor SQL. Independent replay of sampled raw bytes and hash comparison remains explicitly deferred. | | `polylogue-ma2` | satisfied | v34 declares the FK-supporting index as `index-only`; the deployed executor’s v32 fixture runs the canonical index DDL and asserts `EXPLAIN QUERY PLAN` uses `idx_web_constructs_message` without a table scan. No in-place migration helper was added. | ## Verification - `POLYLOGUE_PYTEST_BASETEMP_ROOT=/realm/tmp/polylogue-pytest POLYLOGUE_PYTEST_WORKERS=0 nix develop --command devtools test tests/unit/storage/test_index_fast_forward_lifecycle.py tests/unit/devtools/test_index_fast_forward.py` → **13 passed**. - `nix develop --command devtools lab policy schema-versioning` → **Schema evolution policy intact**. - `nix develop --command devtools verify --quick` → passed; the subsequent pre-push hook reported `HEAD already verified (7527883)`. - Executor census: `rg -l "def create_and_fast_forward_generation|def fast_forward_clone" devtools polylogue tests -g '*.py'` → only `devtools/index_fast_forward.py`. Anti-vacuity: the executor integration test calls the deployed clone path and checks receipt stages/classes against the production lifecycle plan; removing that plan consumption or ma2’s operation fails it. The policy test invokes the real schema-version lab command. The pre-existing deployed executor tests still cover clone failure, activation identity proof, rollback, tamper rejection, sibling links, and restart rollback. Ref polylogue-9rw0. Ref polylogue-ma2. Ref polylogue-p5r4. --------- Co-authored-by: Codex <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
Summary
Make v35 fast-forward generations expose the same durable sibling tiers as ordinary index generations.
Problem
Live v35 activation proved that a generation containing only
index.dbbreaks cross-tier reads: SQLite reports the resolved generation directory, so Drive catch-up could not attachsource.dband failed withno such table: raw_sessions. The live generation was repaired with the canonical sibling links and Drive catch-up then completed with zero errors.Solution
source.db,user.db,embeddings.db,ops.db, andblobinto each fast-forward generation before validation.IndexGenerationStore.create.Ref polylogue-5ucz
Verification
devtools test tests/unit/devtools/test_index_fast_forward.py6 passed in 31.37sdevtools verify --quick15/15 steps passed, run20260712T231116Z-quick-1982816-95cfc11edevtools verify --quick15/15 steps passed, run20260712T231256Z-quick-1990318-c68cbdc5ok, index v35, user v6sources=1 raw=0 sessions=0 changed=0 errors=0