Stop populating the write-only namespace description in desc#2787
Open
ericproulx wants to merge 1 commit into
Open
Stop populating the write-only namespace description in desc#2787ericproulx wants to merge 1 commit into
ericproulx wants to merge 1 commit into
Conversation
22c44e2 to
3532917
Compare
Danger ReportNo issues found. |
`desc` stored its settings under both the route scope (`route_setting(:description)`) and the namespace scope (`namespace_setting(:description)`). The namespace copy was never read: `route` consumes only `route[:description]`, the namespace scope is not wired for inheritance (`InheritableSetting#inherit_from` skips `@namespace`), and grape-swagger reads neither. `desc` now writes only the route scope. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3532917 to
9b6eeae
Compare
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.
descwrote its settings into two places — the route scope (route_setting(:description)) and the namespace scope (namespace_setting(:description)) — but the namespace copy was pure dead state:route[:description](inroute(), and only for the:paramskey).InheritableSetting#inherit_fromsetsinherited_valuesfornamespace_inheritable/namespace_stackable/namespace_reverse_stackableand mergesroute, but never touches@namespace. So namespace-scope values are only cloned bypoint_in_time_copyand never consulted.Confirmed by experiment: dropping the write breaks only the
desc_spec.rbassertions that checked the write itself — the rest of the suite is unaffected.Change
descnow writes only the route scope.namespace_setting(:description)returnsnil; a route's description remains available viaroute_setting(:description)and theroute.descriptionreader. UPGRADING note added.Full suite green (2351 examples, 0 failures); RuboCop clean.
🤖 Generated with Claude Code