miroir/crates/miroir-proxy
jedarden 8b1cf42863 P6.5: Mode C work-queued chunked jobs - complete worker processing logic
Implements plan §14.5 Mode C work-queued chunked jobs for large
background operations (dump import, reshard backfill).

## Changes

### Core Implementation
- mode_c_coordinator.rs: Job coordination with claim/reclaim/heartbeat
- mode_c_worker/mod.rs: Worker loop for processing jobs
- mode_c_worker/acceptance_tests.rs: Full acceptance test suite
- reshard_chunking.rs: Shard-id range chunking for reshard backfill

### Database
- migrations/005_jobs_chunking.sql: Add chunking fields (parent_job_id,
  chunk_index, total_chunks, created_at) with indexes

### Integration
- admin_endpoints.rs: Add ModeCWorker to AppState
- task_store: Updated to support chunking fields
- All test fixtures updated with new NewJob fields

## Acceptance Tests Pass
- 1 GB dump splits into 4× 256 MiB chunks; 3 pods claim in parallel
- Claim expires in 30s; another pod resumes at last_cursor
- HPA queue depth metric drives scaling (queue_depth > 10)
- Two concurrent dumps interleave without starvation
- Reshard backfill splits by shard-id range

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 07:04:53 -04:00
..
src P6.5: Mode C work-queued chunked jobs - complete worker processing logic 2026-05-23 07:04:53 -04:00
static Phase 5: Add Advanced Capabilities verification and UI static assets 2026-05-03 19:01:22 -04:00
tests P7.1: Core metrics families acceptance tests 2026-05-23 02:29:28 -04:00
Cargo.toml P5.7 §13.7: Complete atomic index alias implementation 2026-05-23 02:12:50 -04:00