You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TASK: Apply ledger completion to destination account projection #231
Sprint: Sprint 3 - Internal Transfers and Event Consistency
Objective
When Account Service consumes a valid LedgerPostingCompleted.v1 event, apply the balanced credit line to the destination account in the same database transaction as the reserved source debit and reservation transition.
Scope
Preserve the existing reservation account validation and commit or reversal behavior.
Validate that the completed posting has exactly one matching destination credit line for the transfer.
Update source and destination account projections atomically and idempotently through the existing inbox.
Keep direct public balance mutation endpoints prohibited.
Preserve failed-posting release behavior.
Acceptance Criteria
A successful internal transfer debits the reserved source projection and credits the destination projection exactly once.
A reversal restores the source and removes the destination credit exactly once.
Missing, duplicate, ambiguous, or currency-inconsistent destination lines are rejected without a partial balance update.
Duplicate delivery and concurrent delivery remain safe through the existing inbox and database transaction.
Maven verify and Helm validation pass without redundant endpoint-test expansion.
This closes a production-critical projection gap in the existing Sprint 3 ledger-driven transfer flow. AWS and UAT deployment remain out of scope.
Governed transfer completions now validate the persisted destination debit/credit line and atomically update source and destination projections.
Duplicate delivery remains an inbox replay and cannot credit the destination twice.
Destination identity is persisted in account_inbox_events by Flyway V6 for replay conflict detection.
Account Service documentation now describes the transfer projection behavior.
Verification passed: ./mvnw -q spotless:check, focused unit tests, and full ./mvnw -q verify with Docker/Testcontainers. The PR is open for review and must be merged before this task can close.
Activity
ramioooz commentedon Sep 5, 2026
Implemented in account-service#39.
account_inbox_eventsby Flyway V6 for replay conflict detection.Verification passed:
./mvnw -q spotless:check, focused unit tests, and full./mvnw -q verifywith Docker/Testcontainers. The PR is open for review and must be merged before this task can close.