feat(import): support Wise balance statements (#1368)

* feat(import): support Wise balance statements

* fix(import): fail closed on ambiguous Wise rows

* fix(import): guard Wise statement netted-fee assumption with running-balance continuity check

Swedish accounting review asked whether balance-statement Total fees is
netted into Amount. It is: Running Balance moves by exactly the signed
Amount per row, so a separate fee row would double-count the cost. Codify
the assumption with a pairwise continuity warning (order-agnostic, chain
resets across skipped rows) and document the decision.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(api): cap bank-import validation payload and harden issue assertion

CodeRabbit review: bound the VALIDATION_ERROR issues array to 20 entries
with issue_count carrying the full total, so a large malformed file cannot
balloon the response or log sink. Gate stays format-agnostic on purpose:
error severity means do-not-ingest for every parser, and no non-Wise parser
emits per-row errors alongside parsed transactions today.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Mattsson
2026-08-03 17:55:09 +02:00
committed by GitHub
co-authored by Claude Fable 5
parent 0510d4c13f
commit 24911abde0
12 changed files with 741 additions and 23 deletions
+2 -1
View File
@@ -6128,7 +6128,8 @@
"cloud_row_title": "Cloud sync",
"cloud_row_description": "Continuous backup of the archive to Google Drive",
"help_text": "Every way in and out lives here: bank connections, file imports and migrations from other systems, plus SIE export and backups. Every import is reviewed before anything is booked.",
"pgnote": "Every import goes through the same steps: upload, map columns, review, result. Nothing is booked without you seeing it first."
"pgnote": "Every import goes through the same steps: upload, map columns, review, result. Nothing is booked without you seeing it first.",
"bank_format_wise_statement": "Wise balance statement"
},
"annualReportStudio": {
"choose": "Välj",
+2 -1
View File
@@ -6128,7 +6128,8 @@
"cloud_row_title": "Molnsynkronisering",
"cloud_row_description": "Löpande säkerhetskopia av arkivet till Google Drive",
"help_text": "Här samlas alla vägar in och ut: bankkoppling, filimporter och flytt från andra system, samt export av SIE och säkerhetskopior. Varje import granskas innan något bokförs.",
"pgnote": "Varje import går genom samma steg: ladda upp, mappa kolumner, granska, resultat. Inget bokförs utan att du ser det först."
"pgnote": "Varje import går genom samma steg: ladda upp, mappa kolumner, granska, resultat. Inget bokförs utan att du ser det först.",
"bank_format_wise_statement": "Wise kontoutdrag"
},
"annualReportStudio": {
"choose": "Välj",