Skip to content

feat(events): add Ledger v3 broker schemas - #2004

Open
flemzord wants to merge 1 commit into
mainfrom
feat/ledger-v3-events
Open

feat(events): add Ledger v3 broker schemas#2004
flemzord wants to merge 1 commit into
mainfrom
feat/ledger-v3-events

Conversation

@flemzord

Copy link
Copy Markdown
Member

Summary

  • add schemas for every Ledger v3 event currently emitted by the event sink to NATS and Kafka
  • model the Ledger v3 envelope as type, ledger, date, logSequence, and the complete log
  • support version-specific event envelopes while preserving the historical Stack payload envelope
  • keep legacy Ledger event lookup working for event types that only exist in v1/v2
  • regenerate both canonical and legacy event catalogues

Ledger v3 events

  • COMMITTED_TRANSACTION
  • REVERTED_TRANSACTION
  • SAVED_METADATA
  • DELETED_METADATA
  • CREATED_LEDGER
  • DELETED_LEDGER
  • SKIPPED_ORDER

Validation

  • cd events && go test ./...
  • cd events && go vet ./...
  • nix develop -c just generate-events
  • Ledger release/v3.0 targeted event conversion and JSON serialization tests
  • exact comparison between the Ledger EventType enum and the generated v3 catalogue
  • generated catalogue reproducibility and canonical/legacy checksum equality
  • git diff --check

Notes

The schemas are based on the current formancehq/ledger release/v3.0 sink serialization. NATS and Kafka share the same serialized event envelope; only transport routing differs.

@flemzord
flemzord marked this pull request as ready for review August 28, 2026 23:01
@NumaryBot

Copy link
Copy Markdown

✅ Approve — automated review

No actionable correctness issues were identified in the current diff.

No findings.

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.

2 participants