Repository navigation
Compiler: type an untyped nested response field as any (unblocks Calendar events) - #161
Merged
Merged
Conversation
A response field below the top level that declares no type used to refuse the whole operation (Google Calendar's events.list, for one untyped field deep in an Event). It is now typed `any`: the API does return it, and an `any` source is never assignable to a typed input, so it cannot carry an unknown value into a typed wire. Still refused: a response untyped as a whole, a result list of untyped items, and any untyped input. Provider admission applies the same line (untypedResult), so the install dialog and provider proposals agree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sykosyber
enabled auto-merge
October 13, 2026 03:06
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Objective. Unblock Google Calendar
events.list(andevents.get,events.instances), refused because one field deep in the response (Event.workingLocationProperties.homeOffice) declares no type. This is the design call flagged in #159.Decision. A response field below the top level that declares no type becomes
{ kind: 'any' }with its description. It is kept, not dropped: the API returns it, and dropping it would hide data the person can see in the raw result. It cannot loosen wiring, becauseisAssignable(any → typed)is already false, so ananyfield can only feed ananyinput. The line is drawn where the block would otherwise know nothing:anyanywhere in an output. It now refuses the same two cases (untypedResultinadmission.ts), so the install dialog and provider proposals agree. Maxun's "no declared fields" robot is still refused by its own rule.What changed.
jsonSchema.ts:ConvertOptions { untypedBelowTop: 'any' }, threaded through refs, allOf, properties, map values and items (items of a result list stay as strict as the list).openapi.ts: response schemas convert with that option; parameters and request bodies do not.admission.ts:containsAny→untypedResult.DESIGN.md: the exception, stated next to the "fail instead of becomingany" rule.What did not change. Inputs, request bodies, MCP schemas (
mcp.tscallsfromJsonSchemawithout the option), wire admission, and existing digests (a manifest that compiled before has no untyped field).Tests run
npm run typecheck0 errors;npm run lint0 errors (8 existing warnings).npm test: 1632 passed, 1 failed (fieldHarness.test.ts, known Windows-only CRLF failure). Existing tests onany(maxunProvider,asyncExecutiontop-levelany) pass unchanged.untypedOutputFields.test.ts(6): a nested untyped field →anyand the operation compiles; an untyped whole response and a list of untyped items are refused; an untyped input is refused; the default converter still refuses;anyis not assignable tostring; a provider proposal with a nestedanyis admitted.npm run build+npm run scan:bundlePASS;npm run build:next+npm run test:e2e9 passed.Measurements. Real Google Calendar v3 spec (APIs.guru): 7 → 10 operations (
events.list,events.get,events.instancesadded). All remaining refusals are writes or write-capable scopes.Known failures.
fieldHarness.test.tson Windows only.Claim ceiling. Implemented and tested with fixtures. No Calendar call made (no OAuth client registered).
Architectural decisions introduced.
anyis admitted inside a typed response, never as the response or its items, and never on an input.Evidence that could falsify it. A wire admitted from an
anyfield into a typed input. A compiled input or request body containingany.Next permissible package. One
npm run catalog:buildafter this and #160 are on main.🤖 Generated with Claude Code