miroir/crates
jedarden 63a9207051 P3: Complete Phase 3 Task Registry + Persistence
Implements the 14-table task-store schema from plan §4 with both SQLite
and Redis backends, enabling pod restart resilience and multi-replica HA.

## Changes

- SqliteTaskStore: Full TaskStore trait implementation for all 14 tables
  - Tables 1-7: tasks, node_settings_version, aliases, sessions,
    idempotency_cache, jobs, leader_lease
  - Tables 8-14: canaries, canary_runs, cdc_cursors, tenant_map,
    rollover_policies, search_ui_config, admin_sessions
  - WAL mode + busy_timeout for concurrent access
  - Idempotent migrations with schema version tracking

- RedisTaskStore: Complete TaskStore trait implementation
  - Mirrors SQLite keyspace with hash + _index pattern for O(1) lookups
  - Uses SET NX/EX for leader leases, ZADD for canary runs
  - Pub/Sub for instant admin session revocation
  - Rate limiting helpers (search_ui, admin_login with backoff)
  - CDC overflow buffer with byte tracking

- Schema migrations: 3-migration system (001_initial, 002_feature_tables,
  003_task_registry_fields)

- Tests:
  - SQLite: 36 tests including property tests (proptest)
  - Redis: 20+ integration tests using testcontainers
  - Restart resilience: tasks survive DB close/reopen cycles

- Helm validation: values.schema.json enforces replicas > 1 requires
  taskStore.backend: redis

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-02 17:27:48 -04:00
..
miroir-core P3: Complete Phase 3 Task Registry + Persistence 2026-05-02 17:27:48 -04:00
miroir-ctl P3: Phase 3 Task Registry + Persistence — COMPLETE 2026-05-02 16:50:42 -04:00
miroir-proxy P4: Complete Phase 4 Topology Operations integration 2026-05-02 16:50:42 -04:00