Commit graph

9 commits

Author SHA1 Message Date
jedarden
e0d6735ec0 Phase 0 (miroir-qon): Foundation — verification complete
Phase 0 (Foundation) was already established in the repository. All required
components are in place:
- Cargo workspace with three crates (miroir-core, miroir-proxy, miroir-ctl)
- rust-toolchain.toml pinning Rust 1.87
- All key dependencies wired (axum, tokio, reqwest, serde, config, clap, uuid)
- Config struct with full YAML schema from plan §4
- Style configuration (rustfmt.toml, clippy.toml, .editorconfig)
- Project files (CHANGELOG.md, LICENSE, .gitignore)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 19:20:18 -04:00
jedarden
ffc0ae3beb P12.OP2: Finalize Raft research — correct openraft version, update benchmarks, suppress warnings
Correct openraft version from 0.9.22 to 0.9.20 (latest stable per GitHub releases).
Update benchmark measurements from fresh re-run (50K ops). Suppress dead_code warnings
in benchmark module (functions only called from #[test]).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 22:37:20 -04:00
jedarden
7a6dea77cf P12.OP2: Re-verify Raft state machine benchmark with fresh run
Benchmark numbers stable: state machine apply ~1.0x direct HashMap
overhead, both sub-microsecond. Confirms prior measurements.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 22:25:34 -04:00
jedarden
2c628a6f87 P12.OP2: Re-run Raft state machine benchmark, update measured values
Fresh benchmark confirms state machine apply adds ~1.0-1.1x overhead
vs direct HashMap — both sub-microsecond. Real Raft cost remains
network + fsync (2-5ms vs Redis 0.3-0.8ms). Decision unchanged:
revisit before v2.0, do not ship in v0.x or v1.0.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 22:14:11 -04:00
jedarden
111a128278 P12.OP2: Update Raft vs Redis research with web survey findings
Add rrqlite/openraft+SQLite reference project, correct raft-rs status
to maintenance mode, note openraft 0.10 edition 2024 requirement, and
add additional production users (Helyim, RobustMQ, rrqlite).

Decision unchanged: do not ship Raft in v0.x or v1.0, revisit before v2.0.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 22:03:29 -04:00
jedarden
81155beb0d P12.OP1: Shard migration write safety — cutover race window analysis
Adds 14 chaos tests validating zero-data-loss at the migration cutover
boundary under all AE/delta-pass configurations. Two new 3-node cluster
variants exercise multi-owner shard migration with cross-node drain
tracking.

Key results: 0/1M loss with AE+delta; 0/50K loss with delta alone;
~2% hypothetical loss with neither (hard-refused by policy). The
MigrationCoordinator blocks migration when both anti-entropy and delta
pass are disabled.

Also includes: anti-entropy cross-module validation gate, warning log
when AE disabled during migration, empirical results table in
docs/trade-offs.md, and plan §15 OP#1 status update to verified.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 21:52:34 -04:00
jedarden
232092ffbb P0.5: Implement Config struct mirroring plan §4/§13 YAML schema
Full serde-derived struct tree covering every block in plan §4 (MiroirConfig,
NodeConfig, TaskStoreConfig, AdminConfig, HealthConfig, ScatterConfig,
RebalancerConfig, ServerConfig, ConnectionPoolConfig, TaskRegistryConfig) and
all 21 §13 advanced-capability sub-structs (ReshardingConfig through
SearchUiConfig with nested auth/rate-limit/CSP/analytics structs), plus §14
horizontal-scaling structs (PeerDiscoveryConfig, LeaderElectionConfig, HpaConfig).

Includes:
- Layered loading via config crate: built-in defaults → file → env overrides
- Config::validate() with 14 cross-field rules (HA requires redis, scoped_key
  timing inversion, node group bounds, tenant affinity range checks, etc.)
- 10 unit tests: round-trip YAML, full plan example, minimal YAML defaults,
  and validation rejection cases

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 21:46:12 -04:00
jedarden
fe274a5c0e P12.OP2: Add Raft vs Redis task store HA research doc
Survey openraft, raft-rs, and async-raft crates. Design a Raft-backed
TaskStore prototype using openraft with SQLite state machine. Analytical
benchmark against Redis across latency, throughput, memory, and ops
complexity. Decision: revisit before v2.0, do not ship in v0.x/v1.0 —
Raft fails the decision gate (worse on write latency and correctness
maturity despite removing the Redis dependency).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 21:00:53 -04:00
jedarden
409f952f59 Add repo hygiene: LICENSE, CHANGELOG, .gitignore
- LICENSE: MIT (per plan §12)
- CHANGELOG.md: Keep a Changelog 1.1.0 skeleton with [Unreleased]
  and [0.1.0] sections matching the awk extractor from plan §7
- .gitignore: Rust target/, editor junk; Cargo.lock kept in VCS

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 20:47:36 -04:00