A Valid Lookup Can Still Be Hi... Note

A Valid Lookup Can Still Be Historically Wrong

A configuration lookup can yield valid data now but misrepresent past user experiences. This occurs when current settings are used to explain historical actions, leading to inaccurate representations. For instance, a service might generate instructions based on a destination at creation time. If that destination later changes, re-resolving it for an old instruction will succeed but point to an incorrect, never-issued destination. This subtle bug bypasses exceptions and monitoring systems.To prevent this, the system should persist the exact output provided to the user or system at the time of record creation. This stored snapshot serves as the definitive source of truth for historical reconstruction. Simply storing configuration keys is insufficient, as the values associated with those keys can change. For existing records without snapshots, null values should represent honest uncertainty, rather than implying incorrect historical data through backfilling.A safe read model explicitly handles these null snapshots, potentially withholding exact re-display for legacy rows. While snapshots duplicate data and require disciplined management, they provide self-contained historical records for users and auditors. This pattern allows support teams to avoid log searches and ensures that users see consistent information. Testing should focus on the interaction between mutable configuration and persistent history, verifying that snapshots are used and that configuration changes do not alter past records. Before implementing snapshots, consider if a person or system acted on the output, if source values can change independently, and if reproducing the old output is crucial and its inaccuracy could cause harm.