Plan replay engine. See docs/03-plan-replay-design.md.
Public surface:
- [
replay::replay] — the deterministic entry point. - Types in [
types] —PlanInput,PlanResult, etc. - [
error::PlanError] — every error this crate can return.
Hard invariants enforced by tests/replay.rs and tests/bootstrap.rs:
- Determinism: same
(historical_rows, proposed_config, seed)→ bit-identical JSON output. - Bootstrap CI coverage: synthetic universes with known truth land inside the 95% CI ~95% of the time.
- Conservative cost math: missing pricing → request counted as unchanged (never fabricate savings).