ADR-001: Manual FIFO Erosion Strategy
Status
Accepted
Context
In a Rolling Budget system, it is crucial to avoid "double counting" when a proposed budget line (placeholder) is replaced by a real, approved contract. The system uses a FIFO (First In, First Out) logic to reduce placeholders.
Decision
We decided to implement FIFO Erosion as a manual trigger (Button on the Contract record) rather than a fully automatic background operation.
Rationale
- Control: Budget managers need to choose when the erosion applies, especially if multiple placeholders exist for the same bucket.
- Auditability: Each erosion event is logged via the
erosion_appliedflag, preventing accidental double-deduction. - Stability: Automatic erosion on every edit could trigger complex recalculation loops in Zoho Creator, potentially hitting execution limits or causing data race conditions.
- Clarity: The manual step forces the user to acknowledge that a placeholder is being consumed, maintaining awareness of the budget remaining.
Consequences
- Budget managers must remember to click the button for newly approved contracts.
- The
total_contracts_valuemetric might temporarily be inflated until the erosion button is clicked. docs/ui_ux.mdmust clearly document this requirement.