Repository navigation
openapi: response fidelity — per-status schemas, headers, readOnly/writeOnly filtering - #355
Closed
RhysSullivan wants to merge 1 commit into
Closed
RhysSullivan wants to merge 1 commit into
RhysSullivan wants to merge 1 commit into
Conversation
…iteOnly filtering
Extract the full { [status]: OperationResponse } map instead of only picking
a single 2xx output schema, lift documented response headers with their
schemas, and filter readOnly fields out of input schemas / writeOnly fields
out of output schemas. invoke() now records which documented status the
response matched (exact → NXX → default), returned as matchedResponseStatus
and as a span attribute.
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Apr 20, 2026
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 9d4cfc3 | Apr 20 2026, 10:20 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 9d4cfc3 | Commit Preview URL Branch Preview URL |
Apr 20 2026, 10:20 PM |
@executor/sdk
@executor/plugin-file-secrets
@executor/plugin-google-discovery
@executor/plugin-graphql
@executor/plugin-keychain
@executor/plugin-mcp
@executor/plugin-oauth2
@executor/plugin-onepassword
@executor/plugin-openapi
@executor/plugin-workos-vault
executor
commit: |
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.

Summary
{ [status]: OperationResponse }map per operation instead of picking a single 2xx schema. ExistingoutputSchemais kept as the "preferred single schema" used in LLM tool definitions (first 2xx with a body,defaultfallback).OperationResponse.headers.readOnly/writeOnlyschema filter: request-direction schemas havereadOnlyfields (and matchingrequiredentries) stripped; response-direction schemas havewriteOnlystripped.invoke()now recordsmatchedResponseStatuson theInvocationResultby walking the response map: exact status → NXX wildcard →default. Null stays distinct from "no match" so callers can tell them apart.Why
The LLM was being handed response schemas that included
readOnlyfields in the input surface and vice-versa — it would either send server-computed fields on creates (rejected) or not know response-only fields existed. Multi-status specs (e.g. 200/201 returning different shapes) also collapsed to whichever schemapreferredContenthappened to pick first.Test plan
response-fidelity.test.ts(new) — 8 tests across 4 scenariosoutputSchemaprefers 200,invoke()tagsmatchedResponseStatusfor 200/201/500readOnlystripped from POST body +required, kept on GET response, kept on POST's own responsewriteOnlykept on POST body, stripped from response +requiredfilterSchemaForDirection— real-world specs (Cloudflare, Stripe) with circular$refs no longer blow the stackbunx vitest runpasses across the package