Skip to content

fix: provide the fee vault in foreign settlement tests - #337

Open
snawaz wants to merge 1 commit into
mainfrom
fix/foreign-settlement-fee-vault
Open

snawaz wants to merge 1 commit into
mainfrom
fix/foreign-settlement-fee-vault

Conversation

@snawaz

@snawaz snawaz commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What changed

The foreign-account settlement test omitted the fee vault. With validator #1920, fee accounts are checked earlier, so the test fails with MissingAccount before reaching the ownership checks.

Supply the current validator’s fee vault in both commit and undelegation cases. The existing ownership errors and unchanged-account assertions still verify that foreign accounts cannot be settled.

Integration

Validator #1920 now pins CI to this fix (1488223). Its CI run passed with the updated fixture.

The foreign-ownership scenario delegates its payer to the current validator
but builds settlement requests without that validator's fee vault. After
validator PR #1920 validates fee accounts before preparing the intent, these
requests fail with MissingAccount before reaching the ownership checks.

Build the existing commit and undelegation requests with an IntentBundle
that includes the current validator's fee vault. Keep the foreign cell,
expected IllegalOwner/ReadonlyDataModified errors, and unchanged-account
assertions so the scenario isolates foreign delegation rather than relying
on validation order.

Context: magicblock-labs/magicblock-validator#1920
@snawaz snawaz added the bug Something isn't working label Nov 10, 2026 — with ChatGPT Codex Connector
@snawaz snawaz self-assigned this Nov 10, 2026
snawaz added a commit to magicblock-labs/magicblock-validator that referenced this pull request Nov 10, 2026
Pin RedSuite to 1488223536910cbddbb8550aa644ce196c709574 so CI
exercises the foreign-account settlement fixture fix from PR #337.
The fixture now supplies the validator fee vault and reaches the intended
ownership checks after scheduling-fee validation moved earlier.

The shared RedSuite action uses this revision for correctness and security
checks, as well as release benchmarks. Its source-SHA cache keys ensure
that the previous runner and fixture artifacts are not reused.

RedSuite PR: magicblock-labs/redsuite#337

Validation: action YAML parsing and git diff --check passed. The pinned
RedSuite commit's settlement_lifecycle scenario passed locally against
this validator branch before this configuration-only change.
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

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

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The foreign-ownership test now creates an intent bundle with the outsider as payer, the ER identity as validator, and a commit for the foreign cell and outsider. This replaces direct construction of a settlement instruction.

Changes: Foreign-ownership test

Layer / File(s) Summary
Build the settlement intent bundle
redshift/src/scenarios/committor/settlement_lifecycle.rs
The test imports Commit and IntentBundle. It creates an intent bundle with the outsider as payer, the ER identity as validator, and a commit for the foreign cell and outsider.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

Suggested labels: rust

Suggested reviewers: bmuddha

Merge Risk: Minimal · up to 14882

No actionable merge-blocking risk was identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly describes the change: providing the fee vault in foreign settlement tests.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description explains that the test now supplies the fee vault in commit and undelegation cases to reach the ownership checks.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

CI annotation context is incomplete: annotation collection unavailable or limited

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 677b55d and 1488223.

Files selected for processing: 1

  • redshift/src/scenarios/committor/settlement_lifecycle.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant