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> |
||
|---|---|---|
| .. | ||
| miroir-core | ||
| miroir-ctl | ||
| miroir-proxy | ||