fix: startup migration syncs stale CRDT stages from pipeline_items DB
510 stories had stale 1_backlog stages in the CRDT because they were imported during the filesystem→CRDT migration and then moved forward via filesystem-only moves that never wrote CRDT ops. This made done stories appear as ghost entries in the backlog. On startup, reads the authoritative stage from pipeline_items and corrects any CRDT entries that disagree. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -337,6 +337,12 @@ async fn main() -> Result<(), std::io::Error> {
|
||||
}
|
||||
}
|
||||
|
||||
// One-time fix: sync CRDT stages from pipeline_items DB for stories
|
||||
// that were migrated with stale backlog stages.
|
||||
if let Some(ref db_path) = pipeline_db_path {
|
||||
db::sync_crdt_stages_from_db(db_path).await;
|
||||
}
|
||||
|
||||
// (CRDT state layer is initialised above alongside the legacy pipeline.db.)
|
||||
|
||||
// Start the CRDT sync rendezvous client if configured in project.toml.
|
||||
|
||||
Reference in New Issue
Block a user