rails-ai-context 5.34.0 → 5.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/CLAUDE.md +3 -0
- data/CONTEXT.md +13 -1
- data/docs/COMPATIBILITY.md +3 -0
- data/docs/TOOLS.md +1 -1
- data/docs/adr/0006-strong-params-resolve-as-ruby-runs.md +10 -0
- data/lib/rails_ai_context/version.rb +1 -1
- data/server.json +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b06974567f2b7098d9bdd1eccb11438d8327271fe07efeb986a2ca8004c0eede
|
|
4
|
+
data.tar.gz: 8ad3f24358bbc9e83c73baa1fbd99c5ae5ed0113aa7d5b9cc4f8f69088281236
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 06f3deab68deafc795d5574fb3acbfcf9a2f4a2f568036aef7b12089ff8cff5249b15139eceff6a843d89e5d1e7840c84ea3ad3c37cab8be92e5b79f1b1300ba
|
|
7
|
+
data.tar.gz: 6a3fcbbf27a9aad384875a84d6a863f54d5643858db4ffa6a36be7b9e58b2a05ccdab080af4219318a46da5ba5f89b3aacde36afaa55b4650e9820016d2b259f
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [5.34.1] - 2026-10-12
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **The repository tracks `CLAUDE.md`.** It points at `AGENTS.md`, and the
|
|
13
|
+
gem ships it beside the `AGENTS.md` and `CONTEXT.md` it already shipped.
|
|
14
|
+
The code is v5.34.0's.
|
|
15
|
+
- **The glossary defines strong params and notable gems.** `CONTEXT.md` says
|
|
16
|
+
what makes a method strong params and which gems count as notable, and
|
|
17
|
+
ADR-0006 records why a strong params call is read as the method Ruby
|
|
18
|
+
would run.
|
|
19
|
+
|
|
8
20
|
## [5.34.0] - 2026-10-12
|
|
9
21
|
|
|
10
22
|
### Security
|
data/CLAUDE.md
ADDED
data/CONTEXT.md
CHANGED
|
@@ -66,7 +66,7 @@ The other half of the same problem is the reverse trip. Once a name is the decla
|
|
|
66
66
|
|
|
67
67
|
## Table name
|
|
68
68
|
|
|
69
|
-
The table a model reads. Rails builds it as `table_name_prefix` + the demodulized class name, pluralized unless `pluralize_table_names` is off, + `table_name_suffix`, unless the class assigns one itself or is an STI child, which reads its parent's. The static tier answers the same order from source: an explicit `self.table_name =`, else the table of the model it inherits from, else the prefix and suffix the enclosing modules declare around the file's own basename. That basename is pluralized unless the class, then its superclass chain, then the app sets `pluralize_table_names = false`. A class on a parent the app does not define (`Tag < ActsAsTaggableOn::Tag`) reads the parent's table, which the static tier takes from the
|
|
69
|
+
The table a model reads. Rails builds it as `table_name_prefix` + the demodulized class name, pluralized unless `pluralize_table_names` is off, + `table_name_suffix`, unless the class assigns one itself or is an STI child, which reads its parent's. The static tier answers the same order from source: an explicit `self.table_name =`, else the table of the model it inherits from, else the prefix and suffix the enclosing modules declare around the file's own basename. That basename is pluralized unless the class, then its superclass chain, then the app sets `pluralize_table_names = false`. A class on a parent the app does not define (`Tag < ActsAsTaggableOn::Tag`) reads the parent's table, which the static tier takes from the dumps: the one table the primary's schema holds among the parent's names and the class's own, else the one another database's dump holds. The app-wide affixes and pluralize setting come from `ActiveRecordSettings`, which reads config/application.rb, the environment file, the initializers and `on_load(:active_record)` blocks. Never the underscored constant as an answer - that turns `Admin::ActionLog` into `admin/action_logs` and `OAuthClientConfig` into `o_auth_client_configs`, neither of which is a table; a gem parent's underscored name is only a candidate the schema must hold.
|
|
70
70
|
|
|
71
71
|
`TableName` reads the five declarations of one class body (`table_name`, `table_name_prefix`, `table_name_suffix`, `pluralize_table_names` and `primary_key`) and holds the two derivations; walking the namespace and the superclass chain belongs to the caller, because only it has the other files. A reader that starts from a model name instead of a file asks `TableName.for_model_name`, which takes the table the model tier already recorded before falling back to the convention. A module prefix declared outside the model directories is still invisible, an engine's in `lib/**/engine.rb` aside, so the answer stays [STATIC].
|
|
72
72
|
|
|
@@ -153,6 +153,18 @@ Which filters a controller runs, and which of them a given action runs. `ActionF
|
|
|
153
153
|
|
|
154
154
|
**What it cannot see is stated rather than guessed.** The walk reads `ApplicationController`'s file by the one name Rails fixes, so its filters are in the chain; a parent the listing does not hold and the app has no file for - a gem-owned base other than Devise's or Doorkeeper's (there the walk resumes at the parent the initializer names), or one an inflection renames - still ends the walk. `docs/COMPATIBILITY.md` says both halves.
|
|
155
155
|
|
|
156
|
+
## Strong params
|
|
157
|
+
|
|
158
|
+
A controller method that returns permitted params: it calls `permit`, `permit!` or `expect` on params, or returns what `super`, another strong params method, or a call handed the whole params gives back. What it returns makes one, never its name: a `*_params` method that builds associations is not one. A controller has its own and each superclass's that no nearer class redefines.
|
|
159
|
+
|
|
160
|
+
**A call reaches the method Ruby would run.** That is the nearest class in the controller's chain that defines the name, so a parent's helper counts whatever it is called (Mastodon's `params_slice`), a child that redefines it decides for every class above it, and a class method or a nested class's method of that name redefines nothing. A name none of the controller's classes defines, a concern's, a gem's or Pundit's, is taken at its `*_params` or `permitted_*` name. ADR-0006 records why.
|
|
161
|
+
|
|
162
|
+
**An action and a strong params method can be one method.** An action that permits inline is an action, not strong params. A public `*_params` method that permits is strong params, and since Rails can dispatch to it, the **Action** reading lists it too.
|
|
163
|
+
|
|
164
|
+
## Notable gem
|
|
165
|
+
|
|
166
|
+
A gem the context calls out because it shapes how the app is built, counted only when the app itself runs it: the Gemfile names it (or a gemspec or path gem it pulls in does), it hooks into Rails on its own whichever gem brings it (a railtie or an engine, and OmniAuth), or it is a Rails framework the app loads. A gem that sits in the lockfile only because another gem needs it is not one.
|
|
167
|
+
|
|
156
168
|
## Payload
|
|
157
169
|
|
|
158
170
|
The introspection context hash, in the sense consumers read it. `Payload` is the reading side: a section guard and pinned list readers whose key pairs a spec checks against the producing introspector's own output, so a renamed key fails a test instead of silently emptying a section everywhere. Facts rendered from it live once (`SectionFacts`); membership judgments are applied at the introspector seam, and readers trust the payload rather than re-filtering it.
|
data/docs/COMPATIBILITY.md
CHANGED
|
@@ -293,6 +293,9 @@ Proof sources:
|
|
|
293
293
|
mounted HTTP endpoint and stdio, and the standalone CLI; an app that loads
|
|
294
294
|
a gem before `bundler/setup`; and the unit suite and the E2E harness on
|
|
295
295
|
Linux, macOS and Windows.
|
|
296
|
+
In the v5.34.1 release QA: the gem built from the release commit and its
|
|
297
|
+
file list read, and the unit suite and the E2E harness on Linux, macOS and
|
|
298
|
+
Windows; the code is v5.34.0's.
|
|
296
299
|
2. Non-crash coverage for every built-in tool including `get_view` in
|
|
297
300
|
`spec/e2e/in_gemfile_install_spec.rb`'s full-tool sweep; output correctness
|
|
298
301
|
(ivar cross-check, render-form detection, partial interfaces) verified
|
data/docs/TOOLS.md
CHANGED
|
@@ -254,7 +254,7 @@ defined, so was never mixed in.
|
|
|
254
254
|
|
|
255
255
|
Controller actions with inherited filters, render map, strong params. Includes schema hints for referenced models.
|
|
256
256
|
|
|
257
|
-
Strong params are the methods that return permitted params. A method named `*_params` counts when it calls `permit`, `permit!` or `expect` on params (directly, through a local or an ivar, on each item a block walks, or on `ActionController::Parameters.new`), or when what it returns comes from `super` (`super.merge(...)`), another strong params method (a call runs the nearest class's method of that name, so one the controller or a parent class defines counts whatever its name, such as `params_slice(:min_id)`; any other named `*_params` or `permitted_*`, such as a concern's or Pundit's `permitted_attributes(@post)`; and Devise's `devise_parameter_sanitizer`), or a call given the whole params (`Filter.new(params).call`), so a `before_action` that writes into another one's params is not one; a method of another name counts only when it returns the permitted params themselves. A parent controller's strong params are listed with the parent named unless the controller defines an instance method of that name itself, `permit!` is marked, and an action that permits inline is not one. A file that names another controller (`GoogleController = OAuth2Controller`) is listed as its alias, with that controller's actions.
|
|
257
|
+
Strong params are the methods that return permitted params. A method named `*_params` counts when it calls `permit`, `permit!` or `expect` on params (directly, through a local or an ivar, on each item a block walks, or on `ActionController::Parameters.new`), or when what it returns comes from `super` (`super.merge(...)`), another strong params method (a call runs the nearest class's method of that name, so one the controller or a parent class defines counts whatever its name, such as `params_slice(:min_id)`; any other named `*_params` or `permitted_*`, such as a concern's or Pundit's `permitted_attributes(@post)`; and Devise's `devise_parameter_sanitizer`), or a call given the whole params (`Filter.new(params).call`), so a `before_action` that writes into another one's params is not one; a method of another name counts only when it returns the permitted params themselves. A parent controller's strong params are listed with the parent named unless the controller defines an instance method of that name itself, `permit!` is marked, and an action that permits inline is not one. A file that names another controller (`GoogleController = OAuth2Controller`) is listed as its alias, with that controller's actions. [ADR-0006](adr/0006-strong-params-resolve-as-ruby-runs.md) records why a call is read as the nearest class's method.
|
|
258
258
|
|
|
259
259
|
Rails counts every public method that a concern or a parent controller gives among a controller's actions. A `page_info` in a concern that `ApplicationController` includes is an action of each controller. An app keeps the helpers its controllers share in such places, so the action lists take one of these methods only where a route names it for that controller, booted or not. An `action` lookup also finds one that no route names, under the rules the lists apply: no callback, no name that starts with `_` or ends in `?` or `!`, and no required argument. The answer reads the method from the file that defines it. It names the parent controller under **Inherited** when the method comes from one, and says under **Not listed** why the lists leave the method out. A private `def` of the same name lower down hides the method, as it does from Rails.
|
|
260
260
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Strong params resolve a call as Ruby would run it
|
|
2
|
+
|
|
3
|
+
Status: accepted
|
|
4
|
+
|
|
5
|
+
A strong params method can return another one's answer (`params_slice(:min_id).merge(page: true)`), so whether it counts depends on what the call reaches. We decide that the way Ruby dispatches: across the controller's classes the nearest one defining the name wins, and a method counts when the one it reaches is strong params, found as a least fixpoint over the whole chain. Only a name none of those classes defines (a concern's, a gem's, Pundit's) falls back to the `*_params` or `permitted_*` name.
|
|
6
|
+
|
|
7
|
+
## Considered Options
|
|
8
|
+
|
|
9
|
+
- **Each file on its own, any other name taken at its name.** Cheap and simple, and the rule until the last fixes before v5.34.0, where a real-app check and two review rounds found wrong answers it could not fix without another special case: a parent's helper named `params_slice` dropped, a parent's non-strong `*_params` counted, a child's redefinition of a grandparent's helper ignored, a class method of the same name hiding the parent's. Do not go back to it to save the chain walk; the cost is one memoized read per source.
|
|
10
|
+
- **Reading concerns as classes in the chain.** Ruby puts an included module between a class and its parent, so a concern's method does win. We take a concern's name instead, because listing a concern's strong params is a new answer no surface has asked for.
|
data/server.json
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails-ai-context
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.34.
|
|
4
|
+
version: 5.34.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- crisnahine
|
|
@@ -228,6 +228,7 @@ files:
|
|
|
228
228
|
- ".ruby-version"
|
|
229
229
|
- AGENTS.md
|
|
230
230
|
- CHANGELOG.md
|
|
231
|
+
- CLAUDE.md
|
|
231
232
|
- CODE_OF_CONDUCT.md
|
|
232
233
|
- CONTEXT.md
|
|
233
234
|
- CONTRIBUTING.md
|
|
@@ -260,6 +261,7 @@ files:
|
|
|
260
261
|
- docs/adr/0003-shared-tool-cache-semantics.md
|
|
261
262
|
- docs/adr/0004-install-e2e-stays-example-rich.md
|
|
262
263
|
- docs/adr/0005-workspace-mcp-entries.md
|
|
264
|
+
- docs/adr/0006-strong-params-resolve-as-ruby-runs.md
|
|
263
265
|
- docs/agents/domain.md
|
|
264
266
|
- docs/agents/issue-tracker.md
|
|
265
267
|
- docs/agents/triage-labels.md
|