Skip to content

Bundle reward and simulation integrity - #90

Merged
Seranged merged 2 commits into
mainfrom
codex/apex-bundle-sdk-reward-simulation
Aug 20, 2026
Merged

Seranged merged 2 commits into
mainfrom
codex/apex-bundle-sdk-reward-simulation

Conversation

@dglowinski

@dglowinski dglowinski commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • preserve named operation boundaries when Pyth, Keyring, or another plugin injects setup calls
  • keep simulation layers aligned with the user operations they represent
  • enforce a single execution chain across direct Fuul rewards and claim-all planning

Issues and fixes

  • LITE-311 / EULE2-2 — Align simulation layers with injected calls. Treating each prepended raw EVC item as an independent operation could shift positional simulation layers, causing later operations to rebuild from the wrong account snapshot. Plugin setup calls remain attached to the first named operation they prepare, so simulation and rebuild indexing share the same operation structure.
  • LITE-305 / EULE2-35 — Exclude foreign-chain rewards from claim-all. A foreign-chain Fuul row could enter a single-chain EVC batch, separating fee discovery from the chain selected for execution. Direct rows are filtered to the requested chain, reward planners carry the expected chain, and mixed-chain or mismatched calls are rejected before an EVC deployment is selected.

Changes

  • represent plugin prepends as additions to an existing named operation rather than unnamed top-level layers
  • apply the operation-boundary behavior consistently to Pyth and Keyring plugins
  • add expected-chain validation to single-reward and multi-reward planning
  • filter direct-adapter results before aggregation and cover mixed-chain claim-all inputs

Test plan

  • SDK test suite: 515 tests
  • SDK typecheck
  • SDK lint (existing unrelated warnings only)
  • git diff --check
  • inspect a plugin-prepared migration and confirm setup calls stay within the first named operation and later layers use the correct snapshots
  • provide mixed-chain Fuul rewards and confirm planning fails before execution

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@dglowinski, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 97 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository: euler-xyz/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 139c49db-64c1-4743-a1db-5a94fcc54828

📥 Commits

Reviewing files that changed from the base of the PR and between aab1ddd and fc2a4fb.

📒 Files selected for processing (8)
  • packages/euler-v2-sdk/src/plugins/pyth/pythPlugin.ts
  • packages/euler-v2-sdk/src/plugins/types.ts
  • packages/euler-v2-sdk/src/services/rewardsService/adapters/rewardsDirectAdapter/rewardsDirectAdapter.ts
  • packages/euler-v2-sdk/src/services/rewardsService/rewardsService.ts
  • packages/euler-v2-sdk/src/services/rewardsService/rewardsServiceTypes.ts
  • packages/euler-v2-sdk/test/keyringPlugin.test.ts
  • packages/euler-v2-sdk/test/pythPlugin.test.ts
  • packages/euler-v2-sdk/test/rewardsService.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@LeonardEulerXYZ LeonardEulerXYZ mentioned this pull request Aug 12, 2026
6 tasks

@LeonardEulerXYZ LeonardEulerXYZ left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head fc2a4fb319e661558fde1cb52a3a2a0e04999ab9: no blocking standalone correctness issue found.

Confirmed operation-boundary preservation for Pyth/Keyring prepends, foreign-chain Fuul filtering, mixed-chain claim rejection, chain binding for single/all claims, and Turtle proof-chain rejection. 8/8 changed files covered; 516 tests passed; type tests, release check, lint, and diff-check passed.

Landing note: this is an independent sibling of #89, not its replacement. Compose both safeguards and re-run after rebasing onto current main.

@dglowinski dglowinski changed the title [DON'T MERGE] Bundle reward and simulation integrity Bundle reward and simulation integrity Aug 13, 2026
@dglowinski
dglowinski marked this pull request as ready for review August 13, 2026 10:03
@Seranged
Seranged self-requested a review August 20, 2026 09:46
@Seranged
Seranged merged commit 8dab608 into main Aug 20, 2026
1 check 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

Development

Successfully merging this pull request may close these issues.

3 participants