Skip to content

Roll back button registrations when an outer render fails - #51

Merged
josbeir merged 1 commit into
fix/reject-overlapping-button-namesfrom
fix/rollback-button-registrations
Nov 20, 2026
Merged

josbeir merged 1 commit into
fix/reject-overlapping-button-namesfrom
fix/rollback-button-registrations

Conversation

@josbeir

@josbeir josbeir commented Nov 19, 2026

Copy link
Copy Markdown
Owner

When a custom renderer successfully rendered a named button and then failed, catching the exception and closing the same form could still accept that discarded button's name. Stage button registrations alongside pending inputs and restore them on render failure. Only the outermost successful render commits them to form protection.

This PR builds on #50's separate tracking of automatic button unlocks. Merge #50 first, then retarget this PR to main if GitHub does not do so automatically.

Regression tests exercise a real custom renderer that renders a button before throwing, retrying the same field, preserved existing and successful buttons, rejected discarded-name injections, hidden-value tampering, and a caught nested failure that retains the outer pending button.

Validation: composer validate --strict, formatting, composer check (834 tests, 3,342 assertions, analysis, lint, Rector, format check), and Xdebug Clover coverage: 100% (2,539/2,539 lines); greater-than-90% gate passed.

All four review fixes were also merged in a temporary integration checkout without conflicts: the complete checks passed with 844 tests, 3,377 assertions, and 100% line coverage (2,549/2,549 lines).

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d80953f) to head (5a9d1b4).

Additional details and impacted files
@@                           Coverage Diff                           @@
##             fix/reject-overlapping-button-names       #51   +/-   ##
=======================================================================
  Coverage                                 100.00%   100.00%           
- Complexity                                  1094      1097    +3     
=======================================================================
  Files                                        120       120           
  Lines                                       2958      2967    +9     
=======================================================================
+ Hits                                        2958      2967    +9     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@josbeir

josbeir commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T07:37:22.272438Z 5a9d1b4 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 5a9d1b4e61

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@josbeir
josbeir merged commit 7109cba into fix/reject-overlapping-button-names Nov 20, 2026
4 checks passed
@josbeir
josbeir deleted the fix/rollback-button-registrations branch November 20, 2026 07:38
josbeir added a commit that referenced this pull request Nov 20, 2026
* Reject submit names that unlock protected form fields

* Roll back button registrations with failed outer renders (#51)

* Cover inert buttons that share protected field names
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.

2 participants