Skip to content

Fix CI regressions from GHSA-8qw7-6phv-7q6p remediation - #2691

Merged
joelhawksley merged 2 commits into
mainfrom
fix-reused-instance-ci
Aug 24, 2026
Merged

joelhawksley merged 2 commits into
mainfrom
fix-reused-instance-ci

Conversation

@joelhawksley

Copy link
Copy Markdown
Member

The GHSA-8qw7-6phv-7q6p fix (81f501d) landed on main and broke CI in two ways:

  1. test (Rails 7.1/7.2) — RenderingTest#test_renders_component_with_asset_url renders the same AssetComponent instance up to four times. Under the new single-use invariant, the second render raises ViewComponent::ReusedInstanceError. Updated the test to build a fresh AssetComponent.new per render.

  2. audition — ReusedInstanceError::MESSAGE was missing .freeze, tripping the Ractor-readiness mutable-constants check. Added .freeze to match the surrounding error constants.

Full local suite: 546 runs, 0 failures. audition --static-only reports no new errors.

joelhawksley and others added 2 commits August 24, 2026 11:26
- 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
@joelhawksley
joelhawksley merged commit da90f4d into main Aug 24, 2026
22 of 23 checks passed
@joelhawksley
joelhawksley deleted the fix-reused-instance-ci branch August 24, 2026 17:36
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.

1 participant