Skip to content

Fix Morpho vault migration review preparation - #856

Merged
Seranged merged 1 commit into
developmentfrom
fix/morpho-migration-review-snapshot
Sep 10, 2026
Merged

Seranged merged 1 commit into
developmentfrom
fix/morpho-migration-review-snapshot

Conversation

@dglowinski

Copy link
Copy Markdown
Contributor

Summary

Fix Morpho Vaults → Euler review preparation failing with Vault snapshot is unavailable when a MetaMorpho source is treated as an Euler vault.

Changes

  • Treat positionRef, including externalTarget.positionRef, as an external protocol reference during vault requirement collection. Preserve asset dependencies, Euler source/destination vaults, swap verification vaults, and explicit vault constraints.
  • Cover MetaMorpho v1/v2 direct and batch preparation through the application snapshot loader, missing Euler destination snapshots, external asset requirements, and independent Euler requirements in mixed batches.

Test plan

  • Reproduce the original snapshot error in all four v1/v2 direct/batch preparation cases before applying the fix.
  • npm run lint — 0 errors, 6 existing warnings.
  • npm run typecheck.
  • npm run build, then npm run test:run — 218 files, 2,084 tests passed.
  • Browser smoke on the local production build with live Ethereum data: v1 and v2 both reach direct Transaction review and Review batch. The reviews show the Morpho permit and migration, and execution stays disabled in spy mode. No signatures or transactions submitted.

To repeat the browser checks, replace http://localhost:3000 with the deployment hostname and select K3 Capital Prime Market · USDC (0x797DD80692c3b2dAdabCe8e30C07fDE5307D48a9). Click Review Migration, close the review, then use Add to batch → Review batch.

Connected-wallet production review remains unverified.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

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

Review profile: CHILL

Plan: Advanced

Run ID: 5875f615-5ce9-419e-9494-158c58c8acbd


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

@railway-app
railway-app Bot temporarily deployed to euler-lite(dev,PR previews) / euler-lite-pr-856 September 9, 2026 09:34 Destroyed
@railway-app

railway-app Bot commented Sep 9, 2026

Copy link
Copy Markdown

🚅 Deployed to the euler-lite-pr-856 environment in euler-lite(dev,PR previews)

Service Status Web Updated
dev-build ✅ Success (View Logs) Web Sep 9, 2026 at 9:36 am UTC

@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.

Review: approved

Reviewed all three changed files at 7284560 against development 45af546. No blocking findings.

The recursive exclusion is scoped to external positionRef subtrees, including externalTarget.positionRef. Euler source/destination vaults, quote verification vaults, explicit vault constraints, assets and accounts continue through their existing collection paths. Independent Euler requirements cannot be erased by encountering the same address in an external reference. Checked the strict migration schemas and inbound/outbound intent producers for consistency. No dependency, API, signing or dispatch changes are introduced.

Validation on the exact head with a fresh npm ci install:

  • npx vitest run tests/reviewed-execution: 19 files, 176 tests passed.
  • npm run test:run: 218 files, 2,084 tests passed.
  • npm run typecheck: passed.
  • npm run build: passed.
  • ESLint over all three changed files: passed.
  • git diff --check: passed; tracked worktree clean.

The new tests exercise the application snapshot loader for MetaMorpho v1/v2 in direct and batch presentation modes, missing Euler destination snapshots, mixed requirement ordering, and Aave/Morpho asset retention. They retain mocked registry/compiler/simulation dependencies: this is preparation-layer regression evidence, not proof of live migration execution. Browser smoke in the PR description is author-provided evidence and was not independently repeated; no signatures or transactions submitted by this review. Connected-wallet production execution remains unverified.

Cross-repo boundary: the existing SDK-facing reference shapes are preserved; no producer release or consumer dependency update is required by this diff.

@Seranged
Seranged self-requested a review September 10, 2026 08:07
@Seranged
Seranged merged commit e441cf0 into development Sep 10, 2026
6 checks passed
@Seranged
Seranged deleted the fix/morpho-migration-review-snapshot branch September 10, 2026 08:21
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