Phase 11: Release 2 Data Migration¶
Release 2 -- Safe Rollout Phase 11 migrates existing data to work with the new reconciliation and group-based permission model.
Summary¶
This phase safely migrates existing production data to support reconciliation and group-based permissions. It auto-promotes single-annotator studies, populates reconciliation pools for multi-annotator studies, maps existing admin permissions to the new group model, and rolls out features behind feature flags.
What Happens¶
Study classification: Every existing study is classified based on its annotation history:
- Studies annotated by a single person are auto-promoted -- their answers become the gold standard with no manual intervention
- Studies annotated by two or more people enter the reconciliation pool -- ready for reconcilers to review
Permission mapping: Existing project administrator permissions are mapped to the new group-based model. The built-in Administrator group receives full permissions on all stages, preserving current access.
Feature flag rollout: Reconciliation features are enabled in a controlled order, after Release 1 features:
- Group-based permissions (first -- foundational)
- Reconciliation model (second -- auto-promotion happens in background)
- Reconciliation workflow (third -- UI becomes available to reconcilers)
Rollback capability: All changes are additive. New fields can be removed with a simple database operation ($unset) if anything goes wrong. No existing data is deleted or modified destructively.
Why This Matters¶
Migration ensures that existing projects benefit from reconciliation retroactively. Without migration, only studies annotated after the feature launches would be eligible for reconciliation -- leaving years of existing data without gold-standard records.
How It Connects¶
| Connection | Detail |
|---|---|
| Phase 8 (Project Groups) | Permission mapping creates group entries for existing administrators |
| Phase 9 (Reconciliation Model) | Auto-promotion creates ReconciliationSessionVersions for single-annotator studies |
| Phase 10 (Reconciliation Workflow) | Multi-annotator studies populate the reconciliation pool |
| Phase 7 (Release 1 Migration) | Release 2 migration runs after Release 1 migration completes |
For the platform architecture overview, see platform-architecture.md.
Phase 8 creates the permission structure. Phase 9 builds the reconciliation data model. Phase 10 delivers the reconciliation workflow. Phase 11 migrates existing data.