Skip to content

Fix: Santander liquidity must refresh after Sheet updates and exclude unfunded envelopes - #917

Merged
mamg97 merged 2 commits into
mainfrom
fix/finance-allocation-freshness-20261031
Oct 31, 2026
Merged

mamg97 merged 2 commits into
mainfrom
fix/finance-allocation-freshness-20261031

Conversation

@mamg97

@mamg97 mamg97 commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Root causes

  • The private SPA only checked frontend release changes on focus; an already-open page could retain old finance snapshots and show a grey unallocated balance after canonical Sheets had been reconciled.
  • The finance Worker treated unfunded / budget_funding_gap rows as funded reservations, causing an accounting over-allocation.
  • A missing ReservasCuenta optional read could be mistaken for zero active reservations and mislabel cash as undetailed.

Fix

  • Refresh only the finance scope when a private tab becomes visible/focused after a 60-second cooldown (no polling, no persistence).
  • Filter genuinely unfunded / executed holds from liquidity allocations; retain the uncovered amount in budget reporting, not in the bank balance.
  • Fail closed when the private allocation range lacks required source headers.
  • Add synthetic unit tests for these behaviors. No private finance values in Git.

Validation

  • Synthetic in-memory checks passed prior to commit; CI and private deployment remain to be verified.

Caveat

  • Open production tabs need the new frontend version and authentication to receive fresh data; do not claim the UI is corrected until verified on the private app.

@mamg97
mamg97 merged commit 255c9e3 into main Oct 31, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant