Lock @r-plan/ev-engine API as shipped in Wave 3 Pass A. Pass B integra…
Decision
Lock @r-plan/ev-engine API as shipped in Wave 3 Pass A. Pass B integrates DB → engine via apps/web/src/lib/ev-recompute.ts; engine remains pure-TS, no mutations. costWeight wiring deferred to v2 (qty-weighted v1).
Rationale
Premortem (session 2dab0888) surfaced 6 failure modes — all addressable in the Pass B persistence layer without engine changes. Scalar contract (plannedCost/actualCost as single number, physicalPercent as 0..1) is correct boundary; pushes period aggregation + descendant flattening into integration layer where DB shape lives. 37 tests pass on engine; PMI semantics conformant. costWeight column missing from schema is gracefully handled by qty-fallback in rollupPhysicalPercent — no migration needed for v1.
Alternatives Rejected
Outcome
Pending
Related
- r-plan-layer-2-architecture-locked-final-record-with-correct
- r-plan-wave-0-shipped-adr-0003-authz-scope-captured-repo-liv
- v191-gap-closure-pass-complete-commit-0af70cf-three-new-docu
- referral-credit-note-scs-module-is-go-for-production-within
- snowflake
- wave-4-pass-4a-architecture-canonical-re-record-serwistnext
- adr-0006-cloudflare-r2-for-r-plan-v1-photo-storage-aws-sdk-v