Document the config surface, filter grammar, and migration seams in the README - #8
Merged
Merged
Conversation
…he README
Audited the README against the actual config/DSL surface. One entry was
outdated and a lot of load-bearing surface was undocumented.
Outdated: `tool_provider` was documented as defaulting to `nil`. Since
0.5.0 it composes itself when unset (RegistryToolProvider when resources
are registered, plus `extra_tool_providers`). Documenting `nil` pushed
hosts into writing the provider plumbing 0.5.0 removed the need for —
and the README's own generic-tools example did exactly that.
Undocumented settings, now in the reference: `bare_filter_value_semantics`,
`non_numeric_pk_order`, `filter_operator_overrides`, `max_filter_values`,
`max_batch_size`, `sql_sanitizer`, `extra_tool_providers`,
`session_data_builder`, and all six `oauth_*` settings (of which
`oauth_signing_secret` and `oauth_authorization_code_ttl` appeared
nowhere in the README at all).
Undocumented grammar: the README never said how a client actually
filters. Added a "Reading data" section covering limit/offset, sparse
fieldsets, bare values vs `{ op:, value: }` conditions, IN sets, the
"null" token, the operator table by column type, and why the null/LIKE
combinations are refused rather than silently returning nothing.
Also adds `filter_requirements` + `extra` to the documented Resource DSL,
`register_upstreams_from_env` to the gateway section, and a migration
table pointing a host with a pre-gem endpoint at the compatibility seams
those settings exist for.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Audited the README against the actual
Configuration/Resource/Filteringsurface rather than reading it through. The prose is in good shape — it already covers 0.6.1's appended-discovery change — but one documented default is now wrong, and a lot of load-bearing surface is missing.The outdated bit
The config table documents
tool_provideras defaulting tonil. Since 0.5.0 it composes itself when unset:This is worse than a gap — it tells a host it must assign a provider, which is the plumbing 0.5.0 explicitly removed the need for. The README's own "Or serve the generic Registry-backed tools" example then demonstrated that boilerplate. Both are fixed: registering resources is now shown as sufficient, with the explicit assignment kept as the take-full-control escape hatch.
Settings that were undocumented
Ten had no mention anywhere in the README; six OAuth ones existed only in prose, never in the reference table. Two of those (
oauth_signing_secret,oauth_authorization_code_ttl) appeared nowhere at all.bare_filter_value_semantics,non_numeric_pk_order,filter_operator_overrides,sql_sanitizermax_filter_values(500),max_batch_size(50)extra_tool_providers,session_data_builderoauth_*, now in a table of their ownThe two caps are worth calling out — they are security limits added in 0.5.0 (an uncapped IN-set / JSON-RPC batch lets one valid token fan out unbounded work), and a host had no way to learn they existed, let alone tune them.
The filter grammar
The largest gap. The README never documented how a client actually filters — no mention of
not_eq,gteq,matches,does_not_match,{ op:, value: }, IN sets, or the"null"token anywhere in 766 lines.The grammar is served in the tool descriptions, so clients discover it at runtime. But a host evaluating the gem, or configuring
filter_operator_overrides, had nothing to read. Added a "Reading data" section:limit/offset/fields/filter, bare values vs operator conditions, AND-ed condition arrays, the operator table by column type, and why the null/LIKE combinations raise instead of silently matching nothing.Also
filter_requirementsandextraadded to the documented Resource DSL (both were missing).register_upstreams_from_envdocumented — the 0.5.0 helper for the two gotchas "every authority host re-discovers" (reload duplication, blank ENV vars).{ op: "in", value: "a,b" }now splits).Verification
Docs-only; no code changed.
bundle exec rubocopclean, and both new cross-reference anchors resolve against real headings.🤖 Generated with Claude Code