Skip to content

Release: develop -> main#4371

Merged
TaprootFreak merged 1 commit into
mainfrom
develop
Jul 24, 2026
Merged

Release: develop -> main#4371
TaprootFreak merged 1 commit into
mainfrom
develop

Conversation

@github-actions

Copy link
Copy Markdown

Automatic Release PR

This PR was automatically created after changes were pushed to develop.

Commits: 1 new commit(s)

Checklist

  • Review all changes
  • Verify CI passes
  • Approve and merge when ready for production

…ng residue (#4357) (#4362)

* fix(bank): resolve an internal bank account by its asset link (#4357)

A (name, currency) pair can match more than one bank row. Resolving it to the newest row alone
lets a row that is linked to no asset take over the identity of the linked account, after which
per-asset matching no longer recognises the IBAN carried by the already booked transactions of
that account. Prefer the asset-linked row and keep the newest-row rule as the fallback when no
row of that key is linked, so a stale legacy row still cannot win.

An ambiguous key (several rows with different IBANs) is now logged once when the cache is
loaded, with row ids only.

* fix(log): report pending-leg anomalies only beyond the balance tolerance (#4357)

The filtered-vs-unfiltered comparisons used exact inequality and the negative checks used a
plain sign test, so a floating-point summation residue from aggregating large pending amounts
was reported as a reconciliation anomaly on every job run. Both now report only beyond the
existing balance tolerance. Clamping to zero is unchanged for any negative value; only the
reporting is gated.

* fix(log): scale the reporting tolerance to the asset's amount type (#4357)

A cent-sized tolerance is right for a EUR/USD/CHF-denominated bank position but would be a
material amount on a high-priced asset, where it could hide a genuinely wrong balance instead of
a summation residue. The reporting threshold now follows the asset's amount type: the existing
balance tolerance for fiat-denominated positions, and the 8-decimal granularity these amounts are
logged at for everything else. Fiat-ness is read from the financial type, the same way this log
already picks the rounding for an amount.

* test(log): pin the asset-dependent reporting tolerance with a paired case (#4357)

The two separate tolerance tests could not tell the branch apart: on a fiat-denominated asset the
asset-dependent threshold and the previous flat one are the same value, so the fiat case passed
either way. One paired case now runs both assets through the same call with the same deviation, so
the only thing that differs is the amount type — and the case fails against the previous behaviour.

* refactor(bank): group bank rows with the shared helper (#4357)

The per-key grouping in the iban cache rebuilt what the shared grouping helper already does, and
that helper preserves input order within a group, so the newest-first ordering the selection relies
on is unchanged.

* test(log): make the residue cases exercise the fiat threshold they name (#4357)

The three residue cases named the fiat tolerance but their fixtures carried no financial type, so
they took the asset branch instead; with amounts far outside the band between the two thresholds
they passed either way. They now set the financial type they describe, and one of them additionally
pins the fiat threshold with a deviation inside that band.
@TaprootFreak
TaprootFreak merged commit adba139 into main Jul 24, 2026
10 checks passed
@github-actions

Copy link
Copy Markdown
Author

ℹ️ New TODOs/FIXMEs (1)

+        address: yapealEUR.bic.padEnd(11, 'XXX'),

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