Skip to content

Milestone/m2 ledger persistence - #3

Merged
saifcores merged 3 commits into
mainfrom
milestone/m2-ledger-persistence
Nov 4, 2026
Merged

saifcores merged 3 commits into
mainfrom
milestone/m2-ledger-persistence

Conversation

@saifcores

Copy link
Copy Markdown
Owner

No description provided.

- LedgerTransaction carries ledger, description, metadata, reversesId and
  archivedAt; restore() and reversal(); new Ledger aggregate
- repository ports reshaped for the posting algorithm (insertIfAbsent,
  lockForUpdateSorted, insertEntries with account versions)
- ledger-application: post, transition, reverse, create ledger, open account,
  balance and lookup queries; SHA-256 request hash for idempotency
- unit tests on the in-memory fixtures
- Flyway V1 schema: ledgers, accounts, balances, transactions, monthly
  partitioned entries; deferred balance triggers, append-only entries,
  pending -> posted|archived guard, CHECK >= 0 (ADR-18, ADR-19)
- ledger_owner runs Flyway, ledger_app gets only the grants it needs
  (ADR-20); init script shared by Compose and Testcontainers
- JdbcClient repositories with sorted FOR UPDATE locks, idempotent insert
  on (ledger_id, external_id) + request hash, as_of balances, recompute
  query, partition maintenance at startup and daily
- REST API in snake_case with integer amounts and RFC 9457 problem
  details; OpenAPI contract in contracts/openapi/ledger.yaml
- integrationTest suite (senwallet.integration-test, platform/test-support):
  exercises 3, 4 and 5, crossed transfers, database guardrails, API and
  contract tests; new ArchUnit layer rules
- Compose ledger service with health check; CI runs integration tests
  and a Compose health smoke test
- Updated .gitignore to include versioned build outputs and refine Gradle wrapper exclusions.
- Configured build directory for included builds to prevent cache conflicts between IDE and CLI.
- Added gradle.properties to optimize Kotlin compiler execution strategy.
- Introduced gradlew and gradlew.bat scripts for easier Gradle execution on different platforms.
- Added gradle-wrapper.jar and gradle-wrapper.properties for consistent Gradle version management.
- Refactored integration test suite configuration to utilize the new TestingExtension API.
- Adjusted dependency declarations in Java and Spring service Gradle scripts for improved clarity.
- Enhanced integration tests with better formatting and documentation for clarity.
@saifcores saifcores self-assigned this Nov 4, 2026
@saifcores
saifcores merged commit 693acad into main Nov 4, 2026
4 checks passed
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.

1 participant