Skip to content

Preview and atomically replace verified monthly statement sources - #317

Merged
alexeygrigorev merged 4 commits into
mainfrom
fix/statement-replacement-preview
Nov 4, 2026
Merged

alexeygrigorev merged 4 commits into
mainfrom
fix/statement-replacement-preview

Conversation

@alexeygrigorev

@alexeygrigorev alexeygrigorev commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Repeated Finom and Revolut statement uploads now preview counted operation, balance, coverage and issue-date differences, including identical uploads. Existing and incoming Issue date, From/To, opening and closing balances are always displayed. The selected source remains active until explicit replacement confirms the current digest. CLI and portal share the byte-parsed backend; caller-row persistence is removed.

Selections live on existing month records and change atomically with source records and verified identity/header metadata. Selected sources are strongly reloaded even when an eventually consistent history scan misses them; unavailable references return 409. Distinct actual accounts that collide with existing reconciliation operation or balance keys return an actionable structured 409 before activation, preserving existing sources and pair keys until an audited key migration. Valid disjoint coverage and unaffected currency wallets retain their source history. Unidentified email bank sources are retained for review with existing notifications rather than activated or drafted as invoices.

Package validation reads selected original PDF headers, checks Finom coverage through the actual last calendar day, and preserves explicit selection over issue date. Historical metadata and selection keys migrate together; monetary rows and reconciliation pair IDs are retained. Inactive malformed history cannot invalidate a confirmed selected source. The portal module is registered in the deployable asset manifest. Native bookkeeping transactions retain the original attempt-before-test-fallback dispatch, preserving atomic race/failure hooks.

Rebased onto the merged filename and accountant-readiness changes. The shared payment/evidence gate, explicit monthly reportPeriod, verified-unpaid/deferred dispositions, original invoice and parent-proof naming, and CLI package month guard are preserved.

Validation after this integration: targeted backend readiness/report/reconciliation tests 73 passed; CLI/portal tests 32 passed; frontend architecture plus portal tests 17 passed; existing allocation/audit atomicity regressions 4 passed; production and test TypeScript configurations passed. Three native DynamoDB Local transaction regressions are wired into the existing CI lane and intentionally not run locally. Optional artifact tests require Linux symlink support and an existing SAM build and remain CI-only. Merge still requires independent integration review and all exact-head CI checks.

@alexeygrigorev
alexeygrigorev force-pushed the fix/statement-replacement-preview branch from 03b842c to 0ef8ac9 Compare November 4, 2026 16:36
@alexeygrigorev
alexeygrigorev force-pushed the fix/statement-replacement-preview branch from e72f3a6 to e8e3bc5 Compare November 4, 2026 16:54
@alexeygrigorev
alexeygrigorev merged commit 4567f07 into main Nov 4, 2026
5 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