miroir/crates/miroir-ctl
jedarden 020c77efdb feat(reshard): implement full six-phase orchestrator with admin API integration
Implements P5.1 online resharding via shadow index (plan §13.1):

1. Admin API background orchestrator:
   - POST /_miroir/indexes/{uid}/reshard now spawns background task
   - Background task runs full execute_reshard orchestrator (phases 2-6)
   - Registry updates track phase transitions
   - Returns operation ID for status monitoring

2. CLI admin API integration:
   - miroir-ctl reshard --start now calls POST /_miroir/indexes/{uid}/reshard
   - miroir-ctl reshard --status calls GET /_miroir/indexes/{uid}/reshard/status
   - Proper error handling and progress reporting
   - Passes admin_key and api_url through to sub-functions

3. Six-phase flow (all phases already implemented):
   - Phase 1: Shadow create (shadow_create_phase)
   - Phase 2: Dual-hash dual-write (prepare_dual_write_documents)
   - Phase 3: Backfill (backfill_phase) with throttling
   - Phase 4: Verify cross-index PK sets (verify_phase)
   - Phase 5: Alias swap (alias_swap_phase)
   - Phase 6: Cleanup (cleanup_phase) after retention

Acceptance criteria addressed:
- Full orchestrator runs in background after shadow creation
- CLI connects to admin API (no longer dry-run only)
- Metrics callback placeholder added for phase transitions
- All 76 resharding tests pass

Closes: miroir-uhj.1
2026-05-24 18:59:36 -04:00
..
src feat(reshard): implement full six-phase orchestrator with admin API integration 2026-05-24 18:59:36 -04:00
tests P12.OP3: Validate 2× transient load caveat and add CLI schedule window guard 2026-04-18 22:00:57 -04:00
Cargo.toml Merge remote-tracking branch 'origin/master' 2026-05-24 05:21:32 -04:00