miroir/crates/miroir-proxy/src
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
..
routes P6.5: Mode C work-queued chunked jobs - complete worker processing logic 2026-05-23 07:04:53 -04:00
admin_session.rs P10.4: ADMIN_SESSION_SEAL_KEY cookie sealing with XChaCha20-Poly1305 2026-04-19 17:18:39 -04:00
auth.rs P2.7: Add test coverage for /health and /version dispatch-exempt endpoints 2026-05-22 15:26:49 -04:00
client.rs P3: Task Registry + Persistence — 14-table SQLite schema, Redis mirror, Helm validation 2026-04-24 15:50:20 -04:00
error.rs Integrate MeilisearchError into proxy (IntoResponse, auth middleware) + telemetry 2026-04-19 05:21:09 -04:00
lib.rs P10.5: scoped Meilisearch key rotation with multi-pod coordination 2026-04-20 07:33:29 -04:00
main.rs P7.1: Fix set_leader call to include scope parameter 2026-05-23 06:43:56 -04:00
middleware.rs P6.4: Mode B leader-only singleton coordinator (plan §14.5) 2026-05-23 04:26:27 -04:00
otel.rs P7.6: Implement OpenTelemetry tracing (disabled by default) 2026-04-19 10:15:39 -04:00
scoped_key_rotation.rs P3: Task Registry + Persistence — 14-table SQLite schema, Redis mirror, Helm validation 2026-04-24 15:50:20 -04:00