Skip to main content

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

  1. Control: Budget managers need to choose when the erosion applies, especially if multiple placeholders exist for the same bucket.
  2. Auditability: Each erosion event is logged via the erosion_applied flag, preventing accidental double-deduction.
  3. Stability: Automatic erosion on every edit could trigger complex recalculation loops in Zoho Creator, potentially hitting execution limits or causing data race conditions.
  4. 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_value metric might temporarily be inflated until the erosion button is clicked.
  • docs/ui_ux.md must clearly document this requirement.