Repository navigation
Fix CI regressions from GHSA-8qw7-6phv-7q6p remediation - #2691
Merged
Merged
Conversation
- Freeze ReusedInstanceError::MESSAGE to satisfy the audition Ractor-readiness check (mutable-constants). - Update test_renders_component_with_asset_url to build a fresh AssetComponent per render, matching the new single-use invariant enforced by __vc_check_reused_instance!. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cda2ec69-023a-4c78-857e-8ebb046b3c48
The previous approach called component.config.asset_host= on a fresh component instance, which delegates through helpers and raises HelpersCalledBeforeRenderError since helpers are not populated until render_in has run. Mutate ActionController::Base.asset_host instead, which is what the Rails 7.x branch of the test is actually verifying, and restore the original value in an ensure block. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cda2ec69-023a-4c78-857e-8ebb046b3c48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The GHSA-8qw7-6phv-7q6p fix (81f501d) landed on
mainand broke CI in two ways:test (Rails 7.1/7.2)—RenderingTest#test_renders_component_with_asset_urlrenders the sameAssetComponentinstance up to four times. Under the new single-use invariant, the second render raisesViewComponent::ReusedInstanceError. Updated the test to build a freshAssetComponent.newper render.audition—ReusedInstanceError::MESSAGEwas missing.freeze, tripping the Ractor-readinessmutable-constantscheck. Added.freezeto match the surrounding error constants.Full local suite: 546 runs, 0 failures.
audition --static-onlyreports no new errors.