-
Notifications
You must be signed in to change notification settings - Fork 85
refactor: improve transaction processing flow with observability, structured logging, and test coverage #2042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
103 commits
Select commit
Hold shift + click to select a range
2593d1e
refactor: rename HTTP handler files from dashes to snake_case :hammer:
ClaraTersi d5376f4
refactor: move CreateTransactionJSON to transaction.go :hammer:
ClaraTersi 4a5eca8
refactor: move transaction input types from postgres adapter to pkg/t…
ClaraTersi 40c6dd2
docs: regenerate swagger specs after input type relocation :books:
ClaraTersi fc27e26
fix: use value types for required Send fields in transaction inputs :…
ClaraTersi 2502e86
refactor: move transaction status derivation to Transaction.InitialSt…
ClaraTersi 7ed0544
refactor: move CreateTransactionAnnotation to transaction.go :hammer:
ClaraTersi 73bd1ba
refactor: move CreateTransactionInflow to transaction.go :hammer:
ClaraTersi 56ea5d3
refactor: move CreateTransactionOutflow to transaction.go :hammer:
ClaraTersi f2588d1
refactor: move CreateTransactionDSL to transaction.go, delete empty f…
ClaraTersi b1b694c
refactor: remove dead CreateTransaction use case and tests :hammer:
ClaraTersi e860b58
refactor: rename transaction_creation_helpers to transaction_create :…
ClaraTersi 6ca8c4a
refactor: move GetTransaction to transaction.go :hammer:
ClaraTersi 1ebf2ba
refactor: rename transactionScope to transactionPathParams :hammer:
ClaraTersi 1bf0b42
refactor: rename scope to params for path parameters :hammer:
ClaraTersi de0c25c
refactor: inline generateTransactionID with structured logging :hammer:
ClaraTersi 89a2a3c
fix: rename duplicate span to handler.create_transaction.orchestrate …
ClaraTersi 7b8db0d
refactor: move checkTransactionDate to transaction_helper.go :hammer:
ClaraTersi e13eebb
fix: remove double-logged error in checkTransactionDate caller :bug:
ClaraTersi 36554f0
fix: use constant.EntityTransaction and structured log for value vali…
ClaraTersi 65d34b9
refactor: move ApplyDefaultBalanceKeys to transaction_helper.go as fr…
ClaraTersi 5453eb6
refactor: move handleAccountFields to transaction_helper.go :hammer:
ClaraTersi 7a1671c
refactor: split handleAccountFields into concatAccountAliases and spl…
ClaraTersi 433e3c9
fix: stop mutating input slice in concat/splitAccountAliases :bug:
ClaraTersi 00a1ef8
refactor: move alias helpers to pkg/transaction with idempotent Mutat…
ClaraTersi 0838b35
fix: copy Amount value before taking pointer to avoid aliasing into t…
ClaraTersi 21a3619
fix: ensure correct transaction status handling by using a shallow co…
ClaraTersi 6625ec0
fix: remove debug log lines and unused tenantID fetch from CreateWrit…
ClaraTersi a203f2d
refactor: rename parserDSL parameter to transactionInput in CreateWri…
ClaraTersi d9e046d
perf: pre-allocate strings.Builder capacity in all Redis key function…
ClaraTersi 608b329
refactor: move unexported helpers below exported interface in consume…
ClaraTersi 2286211
refactor: remove mock-interaction unit tests from Redis repository an…
ClaraTersi 03b7237
refactor: move checkTransactionDate to pkg/transaction/validations.go…
ClaraTersi bc3be77
refactor: move idempotency deserialization into CreateOrCheckIdempote…
ClaraTersi 0dc8678
fix: replace fmt.Sprintf with structured log field in ValidateSendSou…
ClaraTersi a11f3a0
refactor: error handling in balance validation tests and improve erro…
ClaraTersi f2ac774
fix: return error from GetParsedLedgerSettings instead of silently fa…
ClaraTersi d0ea6bb
refactor: rename MergeSettingsWithDefaults to FillDefaultSettings and…
ClaraTersi 2bd5e09
fix: return typed LedgerSettings struct from GET/PATCH settings handl…
ClaraTersi 3ca44c2
fix: remove unnecessary ParseLedgerSettings call used only for debug …
ClaraTersi 5ebc998
refactor: simplify propagateRouteValidation by deriving isPending fro…
ClaraTersi 1a05044
refactor: move PropagateRouteValidation from handler to pkg/transacti…
ClaraTersi ff4d07e
refactor: move StatusToAction from handler to pkg/transaction :hammer:
ClaraTersi 25f96c1
refactor: split createTransaction into createTransaction and createRe…
ClaraTersi fb6af1c
refactor: transaction backup cache handling by removing redundant sen…
ClaraTersi 3d7fab4
fix: structured logging in error path :bug:
ClaraTersi 0a34fe7
refactor: split GetBalances into pure read (GetBalances) and mutation…
ClaraTersi c3f3e6b
fix: accept pending transactions when destination route has commit bu…
ClaraTersi 6cbc5cd
chore: update Go toolchain to 1.26.2 and upgrade dependencies :wrench:
ClaraTersi 870434f
fix: add Host header to TestMidazErrorMapper requests for Go 1.26.2 c…
ClaraTersi e845b48
fix: resolve lint errors (dogsled, unused) and add nolint directives …
ClaraTersi 2df2f95
fix: skip destination route count validation and account rules for ho…
ClaraTersi fbbace3
refactor: rename remainingAliases to uncachedAliases for clarity :ham…
ClaraTersi 046ee4e
refactor: improve getBalancesFromCache with pre-alloc, observability …
ClaraTersi 9626a1a
perf: move empty input check before getDB in ListByAliasesWithKeys :r…
ClaraTersi 03db4d4
refactor: use structured logging in ListByAliasesWithKeys getDB error…
ClaraTersi 702b278
refactor: fix alias#key parsing, dedup error and use structured loggi…
ClaraTersi 79184c0
fix: end query span explicitly on both success and error paths :bug:
ClaraTersi d62a845
refactor: convert balance Create to Squirrel with RETURNING and retur…
ClaraTersi a1cf298
fix: skip direction validation for cancel reversal operations on sour…
ClaraTersi 23899de
refactor: use structured logging in ListByAliasesWithKeys rows iterat…
ClaraTersi 99cf957
refactor: move buildBalanceOperations to transaction handler helper :…
ClaraTersi 7ee0646
fix: read LOG_LEVEL from env instead of hardcoded info in main.go :bug:
ClaraTersi 6c7ad99
refactor: update buildBalanceOperations to accept context for improve…
ClaraTersi 9815180
refactor: break ValidateAccountingRules into focused methods, validat…
ClaraTersi 8b4d662
fix: use ledger settings validateAccountType flag instead of env var …
ClaraTersi d491259
refactor: enhance ValidateAccountingRules documentation and improve e…
ClaraTersi 5930a79
docs: fix stale godoc referencing removed validateAccountType gate :b…
ClaraTersi e1b8bfe
refactor: introduce input struct for improved readability and maintai…
ClaraTersi 6764ebc
refactor: add OTel attributes and structured logging to ProcessBalanc…
ClaraTersi 3bc3b01
refactor: extract logger/tracer from context in ProcessBalanceAtomicO…
ClaraTersi 993dbda
refactor: document Lua ARGV mapping and error string matching in Proc…
ClaraTersi 43382af
refactor: remove always-enabled balanceSyncScheduleFlag from Lua scri…
ClaraTersi 2d6882c
refactor: replace double marshal/unmarshal with json.RawMessage in ba…
ClaraTersi 135963a
refactor: ensure balance cloning in atomic operations to prevent data…
ClaraTersi 87b4e29
refactor: replace all fmt.Sprintf logs with structured fields in Redi…
ClaraTersi 1fe6386
fix: address code review findings across transaction flow (lock leak,…
ClaraTersi ef09ca3
docs: expand AccountingEntry description with conditional credit/debi…
ClaraTersi 1b4913d
refactor: rename pkg/transaction to pkg/mtransaction and fix swagger …
ClaraTersi d914c46
docs: fix AccountingEntry description to match validator (destination…
ClaraTersi 009e800
refactor: replace remaining fmt.Sprintf logs with structured fields i…
ClaraTersi 7433eea
fix: use defer for child spans and preserve parent context in balance…
ClaraTersi 5aa9aab
fix: classify DB error as infrastructure error in GetBalances span :bug:
ClaraTersi 3195bc9
style: fix import ordering in mtransaction/input.go :gem:
ClaraTersi 306d3df
docs: add format:uuid tag to FromTo.RouteID and Transaction.RouteID :…
ClaraTersi ff06343
docs: remove incorrect swagger:type object from Metadata fields and c…
ClaraTersi 2e52778
docs: hide internal Amount fields from swagger with swaggerignore :bo…
ClaraTersi a5fc060
fix: fail-fast on idempotency hash serialization failure instead of u…
ClaraTersi d20aa17
fix: clean up Redis backup queue entry on GetBalances failure :bug:
ClaraTersi 6cda1d3
fix: downgrade accounting rule validation log from Error to Warn :bug:
ClaraTersi 8481060
fix: preserve original WriteTransaction error for telemetry, return s…
ClaraTersi f0921df
style: fix import ordering in transaction_helper.go :gem:
ClaraTersi aa24b96
fix: add missing deleteLockOnError on BuildOperations failure path in…
ClaraTersi 8f95914
style: fix import ordering in validate_accounting_routes.go :gem:
ClaraTersi 3a2f002
style: fix import ordering in input_test.go :gem:
ClaraTersi b407300
fix: check GOPATH/bin for dev tools and warn when not in PATH :bug:
ClaraTersi cb59079
docs: promote sensitive data logging rule above log level table :books:
ClaraTersi 90fb9c4
fix: remove swagger type directives from field comments to prevent le…
ClaraTersi 6e6772e
fix: align ProcessBalanceOperations log level with span classificatio…
ClaraTersi 0537179
style: fix import ordering in transaction.go :gem:
ClaraTersi b55a081
docs: correct MutateConcatAliases/MutateSplitAliases godoc to reflect…
ClaraTersi cda9dd4
fix: always release idempotency key on SendTransactionToRedisQueue fa…
ClaraTersi 69856d9
docs: explain why idempotency key and backup queue are preserved afte…
ClaraTersi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.