Skip to content

Surface Compound decimals-guard failure via errored flag (#36) - #38

Merged
szhygulin merged 1 commit into
mainfrom
fix/compound-decimals-guard-errored
Apr 15, 2026
Merged

Surface Compound decimals-guard failure via errored flag (#36)#38
szhygulin merged 1 commit into
mainfrom
fix/compound-decimals-guard-errored

Conversation

@szhygulin

Copy link
Copy Markdown
Collaborator

Summary

  • Closes get_compound_positions returns empty for wallet with 184k cUSDCv3 on ethereum (no errored flag) #36. PR Add verifiable transaction preview (swiss-knife + payload-hash proof) #35 tightened three of the four position-critical multicalls in Compound V3, but left the base-token decimals() guard at return null. A transient failure on that read (with a nonzero base balance) silently dropped the market while coverage.compound.errored stayed false — the aggregator reported clean coverage with a curated-registry market silently missing.
  • Throw instead so the Promise.allSettled wrapper in getCompoundPositions classifies the market as errored and surfaces it via erroredMarkets.
  • Regression test in test/session-regression.test.ts now asserts result.errored === true and that erroredMarkets names the failing market, rather than just checking the old silent-skip behavior.

Test plan

  • npx tsc --noEmit
  • npx vitest run — 395/395 pass
  • Updated regression test exercises the decimals-read-fails-with-nonzero-base-balance path and asserts the new errored surface.

🤖 Generated with Claude Code

PR #35 tightened three of the four position-critical multicalls but left
the base-token decimals guard at `return null` — the aggregator then
reported clean coverage with a curated-registry market silently missing.
Throw instead so Promise.allSettled classifies it as errored.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@szhygulin
szhygulin merged commit b47fa1c into main Apr 15, 2026
3 checks passed
@szhygulin
szhygulin deleted the fix/compound-decimals-guard-errored branch April 25, 2026 02:15
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.

get_compound_positions returns empty for wallet with 184k cUSDCv3 on ethereum (no errored flag)

1 participant