Repository navigation
fields.describe answers the scope's scheme on its first call - #73
Merged
Merged
Conversation
… the answer On a client that had not loaded the Scope type the row was left untranslated, so the first call answered no scheme and no important fields. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rgicmffzzwb2CzyeDSEhBm
This was referenced Nov 27, 2026
Merged
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.
What was wrong
On a client that had not yet loaded the Scope type, the first
client.fields.describe(type, scope)answeredscheme: undefined,important: []andrequiredAtClose: false, whatever the scope's scheme said. A second call on the same client, or any earlier read of a Scope, got it right. Reported by a chat-bot consumer, who reproduced it against a live instance.Why
describereads the scope's scheme with a sub-select and hands the schema to the wire module to translate the row. Translation only uses types already loaded, anddescribenever loaded Scope (or Scheme), unlike the client's own read methods. Untranslated, the sub-select stays the endpoint's array, and nothing indescribereads an array.The existing tests missed it: the unit test seeded a full metamodel, and the live test ran on a client other tests had already warmed.
The change
describecallsschema.ensureForfor its scheme query before sending it, still in parallel withapi/visibleFields.meta.v1/Scopeis asked before the query, and a second call answers the same. It fails without the fix.describeequals a warm client's.client.schema.load("Scope")workaround can be removed.Generated by Claude Code