Repository navigation
fix: filter runs by non-existent distribution_date/stellar_transaction_hash, so every period reconciles to zero payouts - #1307
Conversation
|
@innocentharuna Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
911cc4b to
3472fe1
Compare
|
Security check: this PR contains PolinRider malware and cannot be merged as is. Our automated scan flagged these files on your branch:
This branch adds obfuscated code after a long run of whitespace in the ESLint config, and changes the To get this merged: remove these files and changes from your branch (update from the latest Thanks! |
Summary
Reconciliation now selects distribution runs by
run_at(inclusive of both period bounds) in bothreconcileandquickBalanceCheck. Before, it filtered ondistribution_date, which doesn't exist, so every period summed to zero payouts.validateChainEventConsistencynow reads the chain reference fromrun.tx_batch_idinstead of the non-existentstellar_transaction_hash. Runs with atx_batch_idare verified, and runs without one are still flaggedSTELLAR_TX_NOT_FOUND. I did not addlistByOfferingAndRunAtRangeto the repository; the filter stays in the service, which keeps the change small and the existing mocks working. I couldn't runtscor the tests here. I updated the existing test fixtures to userun_atandtx_batch_id.Changed files
src/services/revenueReconciliationService.test.tssrc/services/revenueReconciliationService.tsTest plan
Run
npx jest src/services/revenueReconciliationService.test.ts, thennpx tsc --noEmitand the full CI suite. I added arun_at period filteringblock torevenueReconciliationService.test.ts. It covers: a run inside the period (a balanced-report regression that fails on master), runs exactly on both boundaries, runs outside the period, the same filter inquickBalanceCheck, a run withtx_batch_id(not flagged, verifier called with it), and a run with a nulltx_batch_id(still flaggedSTELLAR_TX_NOT_FOUND).This PR was created as a draft by the issue solver bot. It will remain a
draft until repository CI passes.
Closes #1256