miroir/crates
jedarden 605be4cb07 P3.1 TaskStore trait + SQLite backend (tables 1-7) - Implementation complete
Implemented the TaskStore trait and SQLite backend for the first 7 tables:

1. tasks - Miroir task registry with JSON node_tasks field
2. node_settings_version - per-(index, node) settings freshness tracking
3. aliases - single and multi-target alias support with history
4. sessions - read-your-writes session pins
5. idempotency_cache - BLOB body_sha256 field for request deduplication
6. jobs - background job queue with claim expiration
7. leader_lease - advisory lock for leader election

Key implementation details:
- Idempotent migrations using CREATE TABLE IF NOT EXISTS
- Schema version tracking with single SELECT check
- WAL mode enabled for concurrent write support
- PRAGMA busy_timeout=5000 to prevent deadlocks
- JSON columns properly serialized/deserialized
- BLOB fields for binary data (SHA256 hashes)

All acceptance criteria met:
- cargo test -p miroir-core task_store::sqlite - all CRUD round-trips pass
- Opening existing DB skips migrations via schema version check
- Concurrent writes work without deadlock (WAL + busy_timeout)
- Table sizes fit within 100 MB task registry cache budget

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 18:15:39 -04:00
..
miroir-core P3.1 TaskStore trait + SQLite backend (tables 1-7) - Implementation complete 2026-05-13 18:15:39 -04:00
miroir-ctl Phase 0 (miroir-qon): Add serial_test annotation to fix test race condition 2026-05-09 02:19:32 -04:00
miroir-proxy Fix typo in primary key header name (X-Meiroil → X-Miroir) 2026-05-09 15:36:41 -04:00