Repository navigation
fix(storage): make below-floor durable trains applicable and probeable - #4227
Merged
Merged
Conversation
Sinity
enabled auto-merge (squash)
August 26, 2026 07:37
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 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 |
Sinity
added a commit
that referenced
this pull request
Aug 26, 2026
## Summary Round-2 corpus-fix lane (rest cluster): closes out the remaining corpus run `2b00a953` failures — lineage/MCP/storage/daemon — and repairs the MCP alias regression that #4226 introduced. ## Problem (evidence) 31 corpus failures across the rest cluster, classified per-failure: - **Real regressions**: the daemon's `/api/operation` route had no `RouteContract` entry (contract census red); MCP query alias lowering (`_mcp_aliases` mapping every declared name to its dataclass `spec_attr`) broke list pagination, provider/tag filters, cross-adapter query parity, and retrieval readiness; the startup recovery read path opened SQLite outside the controlled interruptible reader. - **Stale expectations**: lineage validation (index v73), model runtime (#4173), blob-GC v33 (schema evolution through v37 — test now pins `target_version=35`, the version its DDL snapshot proves), hook carrier identity (#4171), continuity capability catalogue (#4190), dev-loop worker count (#4222), and others per the lane report. - Additionally, #4226's `normalized = dict(params)` skipped normalization entirely, silently dropping the three genuine MCP-only alias spellings (`has_tool_use`, `has_thinking`, `has_paste_evidence`) — `SessionQuerySpec.from_params` only reads the `filter_has_*` names. Restored `normalize_query_params` with the alias map narrowed to exactly those three. ## Verification - All 40 nodeids from the corpus failure set (`/realm/tmp/work/corpus5-failed.txt`) → **40 passed** on this branch (rebased on master with #4226 + #4227 in). - `devtools test tests/unit/mcp/test_query_request_contracts.py tests/unit/test_cross_surface_agreement.py tests/unit/storage/test_retrieval_readiness_laws.py tests/integration/test_mcp.py` → 26 passed. - `devtools verify --quick` → all 15 gates ok. ## Residuals - One listed failure (`test_submit_failure_cleans_every_admitted_future_and_reservation`) was not reproducible in-lane and is unchanged; if it reappears in the corpus rerun it needs its own investigation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the corpus-red durable-migration route: archives below a tier's adoption floor could never apply the new numbered trains (user v11 from #4200, source v37 from #4185) through the production migrate-tier route.
Problem (evidence)
Two defects, both introduced with recently landed trains:
execute_durable_change_trainruns the legacy climb to the floor — mutating the live tier — then hands the same backup manifest to train backup authorization, which re-fingerprints the live tier and dies with the misleadingmigration backup receipt live tier size mismatch(corpus failuretest_backup_verify_then_migrate_tier_cli_applies_user_migration_with_receipt).promote_query/apply_query_excision, and the v37 source train declarespublish_source_generation/source_generation_census— none had a durable probe adapter, so even with a fresh backup the trains failed at the proof stage withno durable probe adapter(also red:test_continuity_migrations_have_a_deployable_cross_tier_compatibility_window[order0|order1]).A dispatched fix lane originally "fixed" this by deleting
_checkpoint_live_tierfrommigrate_archive_tierand rewriting the CLI test to assert the migration fails; that was rejected at harvest (see #4226's exclusion note).Solution
query_excision_ledgerpresent.Verification
devtools test tests/unit/cli/test_archive_maintenance_cli.py tests/unit/storage/test_query_objects.py tests/unit/storage/test_durable_migrations.py→ 197 passed.devtools test tests/unit/storage/test_durable_change_train.py tests/unit/storage/test_source_items.py→ 107 passed (both continuity-window params were red before the source probes).devtools verify --quick→ all 15 gates ok.Residuals
🤖 Generated with Claude Code
https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA