Skip to content

fix: filter runs by non-existent distribution_date/stellar_transaction_hash, so every period reconciles to zero payouts - #1307

Open
innocentharuna wants to merge 1 commit into
RevoraOrg:masterfrom
innocentharuna:solver/issue-1256-68-a0
Open

innocentharuna wants to merge 1 commit into
RevoraOrg:masterfrom
innocentharuna:solver/issue-1256-68-a0

Conversation

@innocentharuna

Copy link
Copy Markdown

Summary

Reconciliation now selects distribution runs by run_at (inclusive of both period bounds) in both reconcile and quickBalanceCheck. Before, it filtered on distribution_date, which doesn't exist, so every period summed to zero payouts. validateChainEventConsistency now reads the chain reference from run.tx_batch_id instead of the non-existent stellar_transaction_hash. Runs with a tx_batch_id are verified, and runs without one are still flagged STELLAR_TX_NOT_FOUND. I did not add listByOfferingAndRunAtRange to the repository; the filter stays in the service, which keeps the change small and the existing mocks working. I couldn't run tsc or the tests here. I updated the existing test fixtures to use run_at and tx_batch_id.

Changed files

  • src/services/revenueReconciliationService.test.ts
  • src/services/revenueReconciliationService.ts

Test plan

Run npx jest src/services/revenueReconciliationService.test.ts, then npx tsc --noEmit and the full CI suite. I added a run_at period filtering block to revenueReconciliationService.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 in quickBalanceCheck, a run with tx_batch_id (not flagged, verifier called with it), and a run with a null tx_batch_id (still flagged STELLAR_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

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@innocentharuna
innocentharuna marked this pull request as ready for review October 19, 2026 08:32
@innocentharuna
innocentharuna force-pushed the solver/issue-1256-68-a0 branch from 911cc4b to 3472fe1 Compare October 21, 2026 11:49
@thlpkee20-wq

Copy link
Copy Markdown
Contributor

Security check: this PR contains PolinRider malware and cannot be merged as is.

Our automated scan flagged these files on your branch:

  • eslint.config.js
  • package.json

This branch adds obfuscated code after a long run of whitespace in the ESLint config, and changes the package.json dev/start scripts to run node api.js first. That is the PolinRider payload, and it would run on every developer's machine that starts the app. A change like this usually means the machine it was pushed from is infected and is injecting it automatically. Before you push again, please check your machine, rotate your GitHub/npm tokens and SSH keys from a clean device, and review the public PolinRider guidance.

To get this merged: remove these files and changes from your branch (update from the latest main, which is clean), and make sure the diff contains only your intended changes. Please don't open the repo in an editor with automatic tasks enabled while doing this, and use a terminal or a plain-text editor instead. Push the cleaned branch and we'll re-scan and review it.

Thanks!

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.

fix(reconciliation): filter runs by non-existent distribution_date/stellar_transaction_hash, so every period reconciles to zero payouts

3 participants