Skip to content

TASK: Consume governed ledger events in Account Service #171

Closed

Description

@ramioooz

Type: Task
Parent: #102
Epic: Ledger and Financial Posting
Slice: Slice 5 - Internal Transfer
Service: account-service
Priority: P0

Objective

Add the Account Service Kafka inbound adapter that consumes the governed LedgerPostingCompleted.v1 and LedgerPostingFailed.v1 events and delegates to the existing transport-neutral account outcome boundary.

Scope

  • Consume only the governed versioned ledger event contract.
  • Validate required event headers, schema version, producer, timestamp, posting identity, and payload fields.
  • Map COMPLETED, FAILED, and REVERSED outcomes to the existing account application boundary.
  • Preserve durable inbox deduplication and conflicting event detection already implemented by the account application layer.
  • Configure SIT Kafka bootstrap, topic, consumer group, retry, and dead-letter behavior through Helm values and environment variables.
  • Keep direct public balance mutation prohibited.
  • Add unit, adapter, and PostgreSQL integration coverage.
  • Document the adapter boundary, partition key, replay behavior, and recovery procedure.

Acceptance Criteria

  • A valid governed LedgerPostingCompleted.v1 event commits the matching reservation exactly once.
  • A valid governed LedgerPostingFailed.v1 event releases the matching reservation exactly once.
  • Replays are safe and conflicting event reuse is rejected without a second balance transition.
  • Invalid headers, unsupported versions, untrusted producers, malformed timestamps, and invalid payloads are handled without corrupting account state.
  • Retryable delivery failures use bounded retries and a visible dead-letter/quarantine outcome.
  • ./mvnw verify, Helm validation, and container smoke verification pass.

Dependencies

This task must remain under parent story #102 and must be implemented through a non-draft PR. Do not merge directly to main.

Activity

  1. self-assigned this
    on Aug 31, 2026
  2. added theissue type on Aug 31, 2026
  3. ramioooz commented on Sep 1, 2026

    @ramioooz
    MemberAuthor

    Completed by merged Account Service PR #35. The PR records Maven verify, Helm validation, unit coverage, and PostgreSQL/Testcontainers coverage for governed ledger-event validation, inbox replay/conflict handling, and commit/release behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions