Skip to content

ADR-004: Quote Versioning Implementation

Status: Proposed
Date: 2026-01-24

Context

Every published quote must be immutable. Changes must result in a new version for audit transparency.

Decision

Branch-and-Snapshot Versioning.

Rationale

  • Immutability: Once status = 'PUBLISHED', the row is read-only.
  • Snapshotting: All dependent rates (Steel Rate, MHR) are physically copied into the quote record at time of publish.
  • Monotonicity: Versions use simple integers (1, 2, 3) + a human label (e.g., "Post-Trial Run").

Consequences

  • Positive: Bulletproof audit trail; "Forensic Replay" becomes possible.
  • Negative: Minor database bloat from duplicated rate data; acceptable trade-off for data integrity.