Skip to content

fix: Add Stellar transaction tests, reconciliation test, and webhook retry job - #550

Merged
DeFiVC merged 2 commits into
ChainLearnOfficial:mainfrom
PrimeFactor-Dev:fix/test-bugs-and-webhook-improvements
Oct 2, 2026
Merged

DeFiVC merged 2 commits into
ChainLearnOfficial:mainfrom
PrimeFactor-Dev:fix/test-bugs-and-webhook-improvements

Conversation

@PrimeFactor-Dev

Copy link
Copy Markdown
Contributor

Closes #517, Closes #518, Closes #519, Closes #520

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)

Summary

This PR addresses4 issues in the chainlearn-api repository:

  1. Issue Fix lock TTL mismatch between test and implementation #517 (Lock TTL mismatch): Verified that the implementation and test already use consistent 30000ms TTL. No changes needed.

  2. Issue Fix Stellar transaction tests with invalid public key mock #518 (Stellar transaction tests): Created tests/unit/stellar/transactions.test.ts with proper Stellar SDK mocks using valid public key format and vi.hoisted() pattern.

  3. Issue Fix Vitest mock hoisting error in reconciliation test #519 (Vitest mock hoisting): Created tests/unit/services/reconcile-pending-rewards.test.ts with proper vi.hoisted() pattern to avoid mock hoisting errors.

  4. Issue Improve webhook retry logic with proper failure categorization #520 (Webhook retry logic): Created src/jobs/process-webhook-retries.ts with:

    • Failure categorization (transient vs permanent)
    • Exponential backoff with jitter
    • Configurable max retry attempts
    • Comprehensive logging

Motivation / Context

PrimeFactor-Dev and others added 2 commits October 2, 2026 10:44
…retry job

- Add Stellar transaction tests with valid public key mocks (ChainLearnOfficial#518)
- Add reconciliation test with proper vi.hoisted() pattern (ChainLearnOfficial#519)
- Add webhook retry job with failure categorization (ChainLearnOfficial#520)

Issue ChainLearnOfficial#517 was already resolved (lock TTL test passes).
@DeFiVC
DeFiVC merged commit ce29ec0 into ChainLearnOfficial:main Oct 2, 2026
3 of 5 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

2 participants