Skip to content

BUG: Accept equivalent occurred-at precision in reservation events #264

Closed

Description

@ramioooz

Problem

Transaction Service sends valid account reservation events to the DLQ when the Kafka occurred-at header and JSON occurredAt represent the same instant with different fractional-second precision.

Scope

  • Compare occurred-at and occurredAt as parsed Instant values.
  • Preserve strict equality for the other contract headers.
  • Add focused regression coverage for equivalent timestamp precision.
  • Validate the fix through the parented Sprint 3 transfer acceptance fixture.

Parent

Acceptance

  • A reservation event with equivalent header and payload instants is processed.
  • A genuinely different instant is rejected.
  • The event no longer reaches the reservation DLQ due only to precision formatting.

Activity

  1. self-assigned this
    on Sep 9, 2026
  2. ramioooz commented on Sep 9, 2026

    @ramioooz
    MemberAuthor

    Confirmed root cause from the SIT DLQ: occurred-at header used microsecond precision while JSON occurredAt used nanosecond precision for the same instant. Transaction Service rejected the event as a raw-string mismatch.

    Fix PR: digital-bank-java/transaction-service#29
    Verification: Transaction Service ./mvnw --batch-mode --no-transfer-progress verify passed with 101 unit tests and 16 integration tests.

  3. ramioooz commented on Sep 9, 2026

    @ramioooz
    MemberAuthor

    Controlled SIT evidence update (2026-09-09):

    • Ledger Service accepted and persisted the posting after PR ledger-service#25 compatibility change.
    • Account Service timestamp compatibility is implemented in account-service#44; full Maven verification passed (57 unit, 27 integration).
    • The final run still produced a Transaction Service reservation DLQ record for the observed rounded-header/nanosecond-payload timestamp, even though the final Transaction image contains the bounded-tolerance bytecode and its full verification passed.
    • SIT was restored automatically to the original images and all four workloads are healthy.

    Keep this bug and parent task #261 open until the deployed Transaction image behavior is reconciled and the complete acceptance runner passes.

  4. ramioooz commented on Sep 9, 2026

    @ramioooz
    MemberAuthor

    Acceptance update (2026-09-09):\n\n- The controlled fixture ran with the exact compatibility images for Transaction, Account, Ledger, and API Gateway.\n- The Transaction pod image ID matched the local verified image: .\n- The running checksum matched the local build artifact exactly: .\n- The packaged live bytecode contains the intended timestamp comparison.\n- Despite that, the positive transfer remained ; the accepted reservation event was sent to with header and payload (281ns difference), reporting .\n- All SIT workloads were restored to their known baseline images and are healthy.\n- Acceptance remains open. No PR was merged and no task was closed.

  5. ramioooz commented on Sep 9, 2026

    @ramioooz
    MemberAuthor

    Acceptance update (2026-09-09):

    • The controlled fixture ran with the exact compatibility images for Transaction, Account, Ledger, and API Gateway.
    • The Transaction pod image ID matched the local verified image: sha256:d21f20c8cfe1c25bef93b4a813a8ab1fbbc0b6da69bdd4f856109137fd6777e1.
    • The running /app/app.jar checksum matched the local build artifact exactly: 01686d836abcfab6067ee584dcb9749aeb163e31f005cf1d44d01b8298072d30.
    • The packaged live bytecode contains the intended Duration.between(...).abs().compareTo(1 microsecond) timestamp comparison.
    • Despite that, the positive transfer remained PENDING; the accepted reservation event was sent to account.reservation.accepted.v1.dlq with header 2026-09-09T06:15:40.295646Z and payload 2026-09-09T06:15:40.295645719Z (281ns difference), reporting Kafka header does not match payload: occurred-at.
    • All SIT workloads were restored to their known baseline images and are healthy.
    • Acceptance remains open. No PR was merged and no task was closed.
  6. ramioooz commented on Sep 9, 2026

    @ramioooz
    MemberAuthor

    Validation follow-up (2026-09-10): the bounded occurred-at tolerance was exercised in the controlled SIT transfer acceptance. The completed transfer crossed Account reservation acceptance, Ledger completion, and Transaction terminal completion; duplicate completion replay remained idempotent with one terminal outbox row. Transaction correction is implemented in transaction-service PR #30, which remains reviewable and CI-green.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions