Repository navigation
Preview and atomically replace verified monthly statement sources - #317
Merged
Merged
Conversation
alexeygrigorev
force-pushed
the
fix/statement-replacement-preview
branch
from
November 4, 2026 16:36
03b842c to
0ef8ac9
Compare
alexeygrigorev
force-pushed
the
fix/statement-replacement-preview
branch
from
November 4, 2026 16:54
e72f3a6 to
e8e3bc5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.