Internalize the route scope behind InheritableSetting accessors#2811
Open
ericproulx wants to merge 1 commit into
Open
Internalize the route scope behind InheritableSetting accessors#2811ericproulx wants to merge 1 commit into
ericproulx wants to merge 1 commit into
Conversation
Every raw `route[...]` poke from outside InheritableSetting is replaced by a semantic accessor, so nothing external touches the `@route` hash anymore (the `route` reader is now reachable only from specs and can go internal later): * `route_validations` / `route_declared_params` (+ writers) — the flat per-route param snapshots seeded per endpoint and topped up on mount. * `route_renamed_params` / `add_route_renamed_param` — the `as:` rename map, an accumulator replacing the read-modify-write in ParamsScope. * `route_description` (+ writer) — the `desc` block's settings. * `route_settings` — the settings handed to each Route (everything but the internal snapshots), replacing the `route.except(...)` in Endpoint. * `route_setting` — the open store behind the `route_setting` DSL, which now delegates here instead of reaching into the raw hash. * `inherit_route_params` — folds a mounting parent's namespace snapshots into the route buffers, replacing the merge that lived in `Endpoint#inherit_settings`. Bumps Metrics/ClassLength to 370; the class is a settings registry and will shrink again once its stores are extracted. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ericproulx
force-pushed
the
route-scope-accessors
branch
from
July 23, 2026 02:32
b9aa661 to
44dcf28
Compare
Danger ReportNo issues found. |
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.
Follow-up to #2810, stacked on
inheritable-setting-finale(will retarget tomasteronce #2810 merges).Continues the
InheritableSettingencapsulation by sealing off the per-route settings store: every rawroute[...]access from outsideInheritableSettingis replaced by a semantic accessor, so nothing external touches the@routehash anymore. Theroutereader is now reached only from specs, so it can be made internal once the stores are extracted (planned follow-up).Accessors added on
InheritableSettingroute_validations/route_declared_params(+ writers) — the flat per-route param snapshots, seeded per endpoint and topped up on mount.route_renamed_params/add_route_renamed_param— theas:rename map; theadd_accumulator replaces the read-modify-write inParamsScope#push_renamed_param.route_description(+ writer) — thedescblock's settings.route_settings— the settings handed to eachRouter::Route(everything but the internal snapshots), replacingroute.except(...)inEndpoint#to_routes.route_setting— the open store behind theroute_settingDSL, which now delegates here instead of poking the raw hash.inherit_route_params— folds a mounting parent's namespace snapshots into the route buffers, replacing the merge that lived inEndpoint#inherit_settings.Call sites migrated
Endpoint,DSL::Declared,DSL::Desc,DSL::Routing,DSL::Settings,Validations::ParamsScope.Bumps
Metrics/ClassLengthto 370;InheritableSettingis a settings registry and will shrink again once its stores are extracted.🤖 Generated with Claude Code