This repository was archived by the owner on Sep 30, 2026. It is now read-only.
Repository navigation
Document that AxeCuprite::Results takes ownership of (deep-freezes) the passed hash - #36
Merged
Merged
Conversation
…he passed hash Results (and the nested Violation/Node/ContrastData wrappers) deep-freeze the hash they are given in place. That is safe for the internal CDP-boundary flow, but Results is public API, so a caller building Results.new(hash) could be surprised by a FrozenError on a hash they reuse afterward. Make the ownership transfer explicit in the Results doc comment and the README runner section, and note it in the changelog. Documentation only; no behavior change. Closes #33
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Documentation-only change for #33. No behavior change.
Results.new(and the nestedViolation/Node/ContrastDatawrappers) callDeepFreeze.callon the hash they're given, freezing it in place. That's safe for the internal flow (payload comes fresh off the CDP boundary), butResultsis public API —Runner#runreturns one, and a caller can buildResults.new(some_hash)themselves — so a reused hash can surface a surprisingFrozenError. This makes the ownership transfer explicit.Changes
lib/axe/cuprite/results.rb— added an ownership note to theResultsclass doc comment.README.md— mirrored the note in the runner section.CHANGELOG.md— entry under[Unreleased] → Changed.Closes #33