Skip to content

Commit cd8febb

Browse files
refactor(storage): remove branch-added database migration machinery
Fresh V2 stores are created at their final schema; nothing on disk predates this branch, so every migrate-old-to-new path the branch added was dead weight and the source of live failures: the unbounded observation-projection retry spin, 30s migration-txn aborts under the 150K-chunk vector rewrite, and a format-revision skew that silently disabled retention. Removed: the observation projection V1-to-V4 migration, its silent full-rebuild fallback and the worker's advance pass (creation now installs the final V4 shape and any other shape is refused typed with a fresh-start remedy); the legacy inline-vector payload migration and its rebuild receipts (stores are born row-per-vector; the liveness inventory read path survives); the legacy memory cutover drains, V1 feedback-history repair and backfill pipeline plus their scheduler drains and the memory-cutover CLI verb (the archive-merge half stays - branch retirement still preserves memory through it); session-temporal repair; the transcript-facts drain driver; Ladder B stepwise convergence. Fresh-store schema verified byte-identical to all live stores minus the empty migration ledger. memory_status loses legacy_backfill_complete, which could never complete again. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent c722c4b commit cd8febb

85 files changed

Lines changed: 312 additions & 15693 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

crates/tracedecay-dashboard-api/src/memory_api.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ async fn memory_status_payload(state: &DashboardState) -> Result<MemoryStatusPay
276276
helpful_count: as_usize(typed_status.helpful_count())?,
277277
unhelpful_count: as_usize(typed_status.unhelpful_count())?,
278278
missing_vector_count: as_usize(typed_status.missing_vector_count())?,
279-
legacy_backfill_complete: typed_status.legacy_backfill_complete(),
280279
repair: MemoryRepairStats {
281280
missing_vectors_repaired: as_usize(typed_status.repair().missing_vectors_repaired())?,
282281
banks_rebuilt: as_usize(typed_status.repair().banks_rebuilt())?,

crates/tracedecay-global-db/src/lib.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ pub mod observation;
1616
mod observation_adapter;
1717
mod observation_projection;
1818
mod registered_maintenance;
19-
mod session_temporal_repair;
2019
mod support;
2120
pub use observation_adapter::GlobalDbObservationStore;
2221
pub use observation_projection::{project_observation_with_engine, rebuild_projection_with_engine};
@@ -83,14 +82,6 @@ pub use api_types::{
8382
StoreArtifactRecord, StoreArtifactUpsert, StoreInstanceRecord, StoreInstanceUpsert,
8483
TranscriptBatch,
8584
};
86-
#[cfg(test)]
87-
use session_temporal_repair::connection_table_exists;
88-
pub use session_temporal_repair::{
89-
SessionTemporalRepairOutcome, SessionTemporalRepairStage,
90-
advance_required_session_temporal_state_repair, advance_session_temporal_store_repair,
91-
advance_session_temporal_store_repair_with_page_rows, enqueue_session_temporal_store_repair,
92-
repair_session_temporal_store, session_temporal_store_repair_status,
93-
};
9485
pub use support::{
9586
AccountingMode, env_flag, env_value_truthy, estimate_tokens, global_accounting_enabled,
9687
global_accounting_mode, global_db_path, global_db_path_is_overridden,
@@ -115,7 +106,3 @@ mod checkpoint_tests;
115106
#[cfg(any(test, feature = "test-helpers"))]
116107
#[allow(clippy::unwrap_used, clippy::expect_used)]
117108
pub mod tests;
118-
119-
#[cfg(test)]
120-
#[allow(clippy::unwrap_used, clippy::expect_used)]
121-
mod session_temporal_repair_tests;

0 commit comments

Comments
 (0)