Skip to content

Freeze ViewComponent::VERSION::STRING (audition round 2)#2672

Merged
joelhawksley merged 1 commit into
mainfrom
audition-round-2
Jul 24, 2026
Merged

Freeze ViewComponent::VERSION::STRING (audition round 2)#2672
joelhawksley merged 1 commit into
mainfrom
audition-round-2

Conversation

@joelhawksley

Copy link
Copy Markdown
Member

Follow-up to the audition CI integration.

Fixes one non-controversial, low-hanging finding from the audition baseline:

  • ViewComponent::VERSION::STRING is built with [...].compact.join("."). Because frozen_string_literal only freezes string literals (not the result of #join), the constant held a mutable, non-Ractor-shareable String. Freezing it makes the version constant immutable and shareable.
  • Regenerated .audition-baseline.json (201 → 200 findings); the runtime-unshareable-constant entry for version.rb is removed.

Left for later (not low-hanging / would change behavior or public API): the class variables and class_attribute/mattr_accessor state, class-level ivars, define_method blocks, and the $PROGRAM_NAME script-run line.

audition round 2: freeze the computed version string so the constant is
immutable and Ractor-shareable (frozen_string_literal doesn't cover the
result of #join). Removes the corresponding runtime-unshareable-constant
entry from the audition baseline.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves Ractor readiness by making the ViewComponent::VERSION::STRING constant immutable (and therefore shareable) and updates the audition baseline to reflect the resolved finding.

Changes:

  • Freeze ViewComponent::VERSION::STRING so it is no longer a mutable, runtime-built String.
  • Document the change in the changelog under the main section.
  • Regenerate .audition-baseline.json to remove the resolved runtime-unshareable-constant entry for version.rb.
Show a summary per file
File Description
lib/view_component/version.rb Freezes the computed version string constant to ensure immutability and Ractor shareability.
docs/CHANGELOG.md Adds a changelog entry describing the version string freeze.
.audition-baseline.json Updates the baseline by removing the resolved finding for lib/view_component/version.rb.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Low

@joelhawksley
joelhawksley merged commit e68585c into main Jul 24, 2026
30 of 32 checks passed
@joelhawksley
joelhawksley deleted the audition-round-2 branch July 24, 2026 19:29
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