Skip to content

fix: check post-finalize actions on what they modified - #54

Merged
bmuddha merged 1 commit into
programsfrom
dode/post-finalize-after-actions
Aug 11, 2026
Merged

fix: check post-finalize actions on what they modified#54
bmuddha merged 1 commit into
programsfrom
dode/post-finalize-after-actions

Conversation

@Dodecahedr0x

@Dodecahedr0x Dodecahedr0x commented Aug 11, 2026

Copy link
Copy Markdown

What changed

Closes #42

Executes actions first, then run the post finalize check

@Dodecahedr0x
Dodecahedr0x force-pushed the dode/post-finalize-after-actions branch from b5cf868 to c89c45c Compare August 11, 2026 12:42
@Dodecahedr0x Dodecahedr0x self-assigned this Aug 11, 2026
@Dodecahedr0x
Dodecahedr0x requested a review from bmuddha August 11, 2026 12:42
@bmuddha bmuddha added the coderabbit Trigger coderabbit review label Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Post-finalize actions now execute before account mutation validation. Dirty accounts are rejected only when they are not writable under AccountMode and DirtyMarkers, while transient and closed lifecycle transitions remain permitted.

Changes

Post-finalize validation

Layer / File(s) Summary
Action ordering and mode-aware writability
programs/magic-root-program/src/post_finalize.rs
Post-finalize actions execute before account validation. Dirty accounts are rejected when they are not writable. The private writable predicate permits mutable accounts and marked transient or closed accounts.

Estimated code review effort: 3 (Moderate) | ~15 minutes

Suggested reviewers: bmuddha

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The change addresses action ordering and immutable-account validation, but the provided summary does not confirm public-key diagnostics or creation validation preservation. Verify that rejection diagnostics include the affected account public key and that creation still requires a system-owned, empty target account.
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The described changes remain within the linked issue scope and target post-finalize action validation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly states that post-finalize actions are checked against the changes they make.
Description check ✅ Passed The description directly explains that actions execute before the post-finalize check and references the related issue.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dode/post-finalize-after-actions

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.

@bmuddha bmuddha linked an issue Aug 11, 2026 that may be closed by this pull request
@Dodecahedr0x
Dodecahedr0x changed the base branch from replicator to programs August 11, 2026 13:40

@bmuddha bmuddha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@Dodecahedr0x
Dodecahedr0x force-pushed the dode/post-finalize-after-actions branch from c89c45c to e9d8240 Compare August 11, 2026 13:43
@bmuddha
bmuddha merged commit 859bb43 into programs Aug 11, 2026
1 check passed
@bmuddha
bmuddha deleted the dode/post-finalize-after-actions branch August 11, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coderabbit Trigger coderabbit review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Post-finalize guard prevents post-delegation account creation

2 participants