Skip to content

Call a provider through types generated from its OpenAPI description - #1246

Open
ndisidore wants to merge 3 commits into
mainfrom
nathan/gk-openapi-kit
Open

ndisidore wants to merge 3 commits into
mainfrom
nathan/gk-openapi-kit

Conversation

@ndisidore

@ndisidore ndisidore commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Lets a gatekeeper call its provider through types generated from the provider's OpenAPI description, instead of a hand-written fetch per endpoint. Adds a typed client (createOpenAPIClient in ./http) and a generator, gatekeeper-openapi-schema. The generator runs Forge in its own process to read the description and renders what Forge read (forge/emit.ts); it no longer goes through a Forge plugin. The client is Sri Krishna's commit. The generator started from his plugin and is co-authored.

  • Request types only reach the client; it sends and parses JSON, nothing else.
  • A call resolves to { data, status, headers }, the shape GitHub's and GitLab's hand-written clients already return. Some providers page only through a header (Sentry's Link), which a body-only result hid. data is undefined for an empty reply. A failure is unchanged: HttpError with the status, no headers.
  • A path that does not start with /, or has a . or .. segment, is refused before a request is built. Either could leave the base URL.
  • A space in a query value is sent as %20, not the + of a form. Some servers read + in a query as a plus.
  • scopeTo(client, prefixes) narrows a client to path prefixes with their parameters fixed, for a connection bound to one organization or project. Paths only: a provider that selects the tenant in a query or body still needs the gatekeeper to pass it.
  • A parameter is fixed under its own prefix only. Providers reuse names; PagerDuty calls every identifier id.
  • A path parameter is typed from the description, in a third commit added in review. An operation's pathParams holds each one with its comment. One the description limits to listed strings takes only those: 30 of GitHub's 2,540 path parameters and 257 of Cloudflare's 6,356. Any other takes a string or a number, and a schema without pathParams reads as before.
  • scopeTo takes only a value that every operation under the prefix accepts. Cloudflare has 138 operations under /{account_or_zone}/{account_or_zone_id}, where only accounts or zones is valid.
  • A parameter's comment shows where its value is passed, including the note that it is a secret. Cloudflare's deploy_hook_id is one.
  • The cost: GitHub's whole schema is 23% longer, and checking 250 calls over it takes 0.6% more type instantiations.
  • The generator fails where it used to leave gaps: a listed operation missing from the output, a URL without --sha256, an overlay action without a description, an overlay that leaves the description saying what it said, a hidden operation whose line does not say so, two groups that would write the same file or two that differ only in case, an --operations file that lists none. A document that is not OpenAPI 3.0, 3.1 or 3.2 is refused on load, before --list offers operations no run could generate.
  • An operation marked x-forge-skip is treated as Forge treats it: not listed and not generated. A list of x-forge-aliases stands in for its operation: it is read only if one of them names a method, by operationId or x-forge-method-name, and is not skipped. Forge makes no method of an alias with neither.
  • @cloudflare/forge is pinned to 0.4.0, the first release with forge openapi overlay, and exempt from the release-age rule, like Cloudflare's other packages on that list.
  • A description is corrected with an OpenAPI Overlay: --overlay <file>, repeatable, applied by forge openapi overlay before anything else reads the document. It replaces the JSON Patch file this PR had. An overlay is a standard format, and an action picks its target by name where a patch counted array positions.
  • The description and each overlay reach Forge as JSON. Forge reads a bare on, off, yes or no in YAML as a boolean and the generator reads it as a string, so a YAML description now reads the same with an overlay as without. What Forge warns of on a run that succeeds is passed on.
  • Forge reads a copy of the overlay, so a relative extends is resolved first, from where the overlay is. One with a scheme is passed as written. An action that refers to a reusable action (Overlay 1.2) may take its description from it.
  • "Changes nothing" compares the parsed description before and after, with keys sorted. Replacing an array takes a remove and an update, and putting back the same array only moves a key.
  • The output directory is replaced only if every file in it is a .d.ts that starts with Forge's preamble. The preamble alone is also on what Forge's own SDK generators write, and they write .ts.
  • Upstream ask: forge openapi overlay: an option to fail on an action whose target matches nothing forge#194. Forge passes over an action whose target matches nothing, as the Overlay specification has it, and has no flag to fail on one. The generator refuses only an overlay that changes nothing at all, so one dead correction among several is silent. The ask: a flag that fails on an action with no match. Forge already counts matches per action. Until then the check is the diff of the generated schema after pinning a new description.
  • Where a description carries Forge's extensions, an operation's comment says that it asks for confirmation (x-forge-require-confirmation), is hidden from listings (x-forge-hidden) or is short of general availability (x-forge-availability), and a field's comment says that it is a secret (x-forge-sensitive). --list prints the first three on the operation's line. Like scopes, they are written and not acted on: an action's verdict is its gatekeeper's. Cloudflare's description asks for confirmation on 239 of the 3,155 operations it lists.
  • A hidden operation's --operations line must still say "hidden":true, as --list prints it, so that one is chosen knowingly.
  • Aliases stand in for their operation here as they do in Forge, with one exception: an operation's own confirmation is kept where no alias has one. Four of Cloudflare's operations would otherwise lose theirs.
  • One schema per document unless --group-by tag. A provider's tags arrange its documentation, not a gatekeeper's authority.
  • --list prints one JSON line per operation, read before Forge runs, so it works on a document Forge cannot generate from whole. --operations reads a file of those lines.
  • Only operationId chooses. A kept line whose method or path no longer matches the description fails the run, so an operation that moved under the same id is noticed.
  • Declared scopes are written into each operation's comment and not acted on. Some descriptions list alternatives as if each were required. --scopes-extension is repeatable, for a description that keeps a kind of scope in each of several extensions, and the comment then names each beside its scopes. Cloudflare's keeps OAuth scopes in x-forge-oauth-scopes and API token permissions in x-api-token-group, so a gatekeeper holding both credentials reads what each can call.
  • Nothing on main calls this yet. A PagerDuty port exists on a branch outside this stack.
  • Checked against schemas generated from Sentry's and Cloudflare's descriptions, and a 3,778-operation schema for type-checking cost. The overlay and the comments above were run against Cloudflare's current description (3,951 operations, 30 MB). No request has been sent to any provider.
  • Kit suites pass locally: 951 Node, 195 workerd. pnpm lint passes.

Known limits, found in review and left for later. Each of these fails at compile time or as a provider's rejection:

  • A required body whose schema is {} is typed unknown, so the call compiles without one.
  • Declared fields beside typed additionalProperties give a type that refuses valid payloads.
  • A required in: cookie parameter is dropped. Forge ignores cookies.
  • Two operations without an operationId under one tag collide in --group-by tag.
  • OpenAPI 3.2's query and additionalOperations slots are not listed or filtered.
  • Keywords beside a $ref into part of a non-schema component, which OpenAPI 3.1 allows, are dropped when it is copied in.
  • --writable only clears a readOnly written directly on the property. One reached through allOf or a $ref stays read-only, and the flag does nothing.
  • An operation that overrides a path-item parameter is still judged by the path item's, so it can be marked left out when it need not be. Asking for it fails the run.
  • A parameter $ref that points at another $ref is followed one hop. --omit-header misses it, and an object-valued query parameter behind one fails the run.
  • A closed object with no writable field is typed {}, which accepts any non-null value.
  • A literal example that has a $ref key is read as a reference and fails the run. An overlay can drop the example.
  • A query parameter whose schema is a $ref to an array, or to a union that has one, leaves its operation out, and asking for it fails the run. An overlay can inline the schema. 23 of Cloudflare's 3,931 operations; none in GitHub's, Sentry's, PagerDuty's or Stripe's.
  • A request body given by $ref has mutable arrays where an inline one has readonly ones, so passing a readonly array needs a spread.
  • A path parameter the description types as a number, or limits to listed numbers, takes any string or number. None of the 9,935 path parameters in GitHub's, Cloudflare's, Sentry's and PagerDuty's descriptions is limited to listed numbers.
  • A path parameter whose listed strings are reached through an allOf of more than one member also takes any string or number. None of the 9,935 is. A single-member allOf, the usual way to describe a reference, keeps them.

These six may not fail at all: what a call sends or gets can differ from what its types say.

  • An explode: false query array and an array path parameter are passed as a joined string, and the comma is sent encoded.
  • A writeOnly property is required in the response type too.
  • An operation with servers of its own is emitted like any other, and a call to it goes to the client's base URL. None is reachable today in GitHub's, Cloudflare's, Sentry's or PagerDuty's description: GitHub's one is refused for its body, Cloudflare's nine are marked x-forge-skip. The client never acts on servers, so a credential only goes to the base the gatekeeper configured.
  • A response typed from a vendor +json media type is still requested with Accept: application/json.
  • An int64 is typed number and read by JSON.parse, so a value past 2^53 is rounded.
  • Where a 2xx response documents several JSON media types with different schemas, it is typed from one of them, so a call that sets another Accept gets data its type does not describe. 2 of GitHub's 1,281 operations.

Also found in review and left:

  • Under Node, a header value that Headers refuses is echoed in the error it throws. workerd's error names no value.
  • A base URL with no host, such as https://, is not refused: the first segment of the path becomes the host.
  • A base URL with a user or password is not refused. Node's Request throws with the URL in its message; workerd's does not throw.
  • scopeTo copies a call's arguments with a spread, so query, headers or body defined as prototype getters are lost.
  • --sha256 is of the decoded text, so a description served with a byte-order mark does not hash as its bytes do.
  • --out ., run from inside an output directory, replaces that directory and leaves the shell in the removed one. The files are in the new one. No script the scaffold writes passes it.
  • A description's relative $self is resolved from the working directory, because Forge reads the description on standard input. An overlay whose extends names that description matches only when the generator runs from the description's directory. The overlay applies the same without extends.

@github-actions github-actions Bot added the gatekeeper Changes to a gatekeeper integration label Nov 20, 2026
@github-actions

Copy link
Copy Markdown

Preview: pr1246-nathan-gk-openapi-kit

https://pr1246-nathan-gk-openapi-kit-router.cloudflare-os-previews.workers.dev

Dashboard · deleted when this PR closes

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Nov 20, 2026

Copy link
Copy Markdown

Review: 6 findings.

All six are posted in the inline review.

github run

@ndisidore
ndisidore added this pull request to stack #1249 November 20, 2026 16:17
github-advanced-security[bot]

This comment was marked as resolved.

@ndisidore
ndisidore force-pushed the nathan/gk-openapi-kit branch from e8a17d4 to 6cf61a2 Compare November 20, 2026 16:26
ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Nov 20, 2026

Copy link
Copy Markdown

Review: 7 findings.

All seven are posted in the inline review. I verified them against the pinned Forge build, the TypeScript compiler, or the client’s injected transport. No requests were sent to providers.

github run

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Nov 20, 2026

Copy link
Copy Markdown

Review: 6 findings.

All six are posted in the inline review. I verified them with local fixtures, the pinned Forge build, TypeScript, or a stubbed HTTP transport. No provider requests were sent.

github run

@ndisidore
ndisidore force-pushed the nathan/gk-openapi-kit branch from a92457a to bf57686 Compare November 20, 2026 17:18
ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Nov 20, 2026

Copy link
Copy Markdown

Review: 7 findings.

All seven are posted in the inline review. I verified them with local OpenAPI fixtures, the pinned Forge build, TypeScript, and a stubbed HTTP transport.

github run

@ndisidore
ndisidore force-pushed the nathan/gk-openapi-kit branch 2 times, most recently from 1fda710 to ac6e3ab Compare November 20, 2026 21:46
@ndisidore
ndisidore force-pushed the nathan/gk-openapi-kit branch from ac6e3ab to b0f7ef3 Compare November 20, 2026 23:02
ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Nov 20, 2026

Copy link
Copy Markdown

Review: 6 findings.

All six are posted in the inline review. I verified them with local OpenAPI fixtures, the pinned Forge build, TypeScript, and a stubbed HTTP transport.

github run

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Nov 20, 2026

Copy link
Copy Markdown

Review: 6 findings.

All six are posted in the inline review. I verified them using local fixtures, TypeScript, stubbed HTTP transports, and Forge’s upstream ABI history.

github run

@ndisidore
ndisidore force-pushed the nathan/gk-openapi-kit branch 5 times, most recently from 1364439 to c0af9b8 Compare November 23, 2026 16:45
ask-bonk[bot]

This comment was marked as resolved.

@ndisidore
ndisidore added this pull request to stack #1316 November 30, 2026 15:13
ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Nov 30, 2026

Copy link
Copy Markdown

Review: 2 findings.

Both are posted in the inline review. I verified them with local Node checks, following the Gatekeeper Kit guide: “Use Node tests for pure logic.”

github run

@github-actions

Copy link
Copy Markdown

Eval results

Verdict: 🟡 Inconclusive. No task can be compared: eval definition changed.

Task Score Δ score Fisher test Cache hits Avg min Avg steps
change-calendar (gpt-6-luna) 100% → 80% eval definition changed — 95% → 93% 2.4 → 3.6 27.6 → 21.8
chat-views (gpt-6-luna) 100% → 80% eval definition changed — 95% 1.8 → 1.6 11.9 → 11.1
chess (gpt-6-luna) 30% → 80% eval definition changed — 97% → 98% 3.1 → 5.6 31.6 → 41.1
compaction (claude-sonnet-5-5) 100% eval definition changed — 90% 2.5 → 1.6 43.0
compaction (gpt-6-luna) 100% eval definition changed — 93% 2.5 → 1.9 43.0
incident-desk (gpt-6-luna) 100% eval definition changed — 97% → 96% 2.5 → 3.9 31.8 → 32.7
ticket-triage-agent (gpt-6-luna) 100% eval definition changed — 97% → 98% 0.3 → 0.2 2.0 → 2.1
worker-logs (gpt-6-luna) 90% → 100% (1 run error) eval definition changed — 96% 2.6 → 3.6 23.8 → 22.6
Failed checks
Task Check Failed
change-calendar (gpt-6-luna) t1 agent.timedOut 0/10 → 1/10
change-calendar (gpt-6-luna) t1 schedules-and-lists-windows 0/10 → 1/10
change-calendar (gpt-6-luna) t1 rejects-invalid-windows-without-changing-anything 0/10 → 1/10
change-calendar (gpt-6-luna) t1 overlap-is-per-service-and-touching-is-allowed 0/10 → 1/10
chat-views (gpt-6-luna) t5 builds-a-gadget 0/10 → 2/10
chess (gpt-6-luna) t1 agrees-with-the-oracle-on-perft-positions 5/10 → 2/10
chess (gpt-6-luna) t1 agrees-with-the-oracle-through-random-games 5/10 → 2/10
chess (gpt-6-luna) t1 the-game-is-shared-across-connections 5/10 → 1/10
chess (gpt-6-luna) t1 agrees-with-the-oracle-on-the-hard-positions 4/10 → 2/10
chess (gpt-6-luna) t1 starts-from-the-standard-position 3/10 → 0/10
chess (gpt-6-luna) t2 exports-pgn-the-oracle-replays-to-the-same-position 1/5 → 0/8
chess (gpt-6-luna) t3 detects-threefold-repetition-and-the-fifty-move-rule 1/4 → 0/8
chess (gpt-6-luna) t3 repeats-a-position-only-with-the-same-rights 1/4 → 0/8
chess (gpt-6-luna) t3 counts-repetitions-from-an-imported-game 1/4 → 0/8
chess (gpt-6-luna) t3 still-refuses-invalid-fen 1/4 → 0/8
chess (gpt-6-luna) t3 detects-insufficient-material-after-a-capture 1/4 → 0/8
chess (gpt-6-luna) t3 judges-material-and-terminal-positions-like-the-oracle 1/4 → 0/8
chess (gpt-6-luna) t3 rules-still-agree-with-the-oracle-after-draws 1/4 → 0/8
worker-logs (gpt-6-luna) t3 latency-rises-match-the-reference 1/10 → 0/9
worker-logs (gpt-6-luna) t3 latency-rises-count-late-events 1/10 → 0/9

Run · trajectories and raw results

@ask-bonk

ask-bonk Bot commented Nov 30, 2026

Copy link
Copy Markdown

🔬 Eval runs review

Performance

change-calendar and chat-views went from 10/10 to 8/10, chess went from 3/10 to 8/10, and worker-logs had nine passes on each side: main missed a latency check, while the candidate lost a run to a provider error. The largest raw cache shift was in change-calendar: hits fell from 95.36% to 92.57%, and breaks rose from 0.009% to 2.57%. Chess added the most steps (31.6 → 41.1, 3.1 → 5.6 minutes) as more runs reached the draw-rules turn (4 → 8); both sides retried edits, and passing-run costs overlapped ($0.0317–$0.0532 → $0.0206–$0.0448).

🟡 VERDICT: INCONCLUSIVE

All eight cohorts are marked “eval definition changed,” and neither side exercised this PR’s typed OpenAPI client or schema generator, so the observed differences don’t establish a PR effect.

Triage

Failure modes

  • Valid chess positions rejected · chess 2/10 · model error · this PR: no — Turn 1 writeFile(server.js) reversed the en passant side checks in trial 2 and rejected - for no castling rights in trial 7; both implementations could fail to parse positions they had saved.
  • Expense Log shipped without a UI · chat-views 2/10 · model error · this PR: no — At turn 5, both agents wrote only server.js and finished. The expense RPC passed, but the standing instructions and unchanged gadget check require both entry points.
  • Calendar client would not parse · change-calendar 1/10 · model error · this PR: no — Turn 1 writeFile(client.js) left a quote unclosed in utcInputValue; later edits missed it, and the Worker could not start.
  • Calendar activation timed out · change-calendar 1/10 · harness bug · this PR: no — Turn 1 hit the 420-second activation limit after a successful editFile(client.js); the transcript doesn’t show what stalled.
  • Provider rejected the model request · worker-logs 1/10 (run error) · harness bug · this PR: no — The provider flagged the next turn 2 request after the agent’s writeFile calls, before the updated gadget could be checked.

Tool errors

  • editFile: No matching text was found in the file · chess 14 → 18, change-calendar 2 → 2, incident-desk 1 → 3, worker-logs 3 → 1 · model error — Both chess cohorts retried PGN edits with mismatched backslashes or surrounding text; shorter exact matches worked.
  • editFile: Validation failed · incident-desk 6 → 1, worker-logs 4 → 0, chess 2 → 3, change-calendar 1 → 0, chat-views 1 → 0 · model error — Calls omitted the required filename or, less often, replacement.
  • editFile: Multiple matches were found · chess 1 → 0, incident-desk 1 → 4 · model error — Agents supplied repeated fragments such as this.responder.trim() despite the tool’s unique-match requirement.
  • executeCode: This step already made code changes · worker-logs 0 → 2 · tool design — Agents batched an RPC smoke test with a file edit; the tool only told them to split the calls after rejecting the first attempt.
  • editFile: CHANGE_CALENDAR has no file named CHANGE_CALENDAR/server.js · change-calendar 0 → 1 · model error — The agent repeated the gadget name in filename; retrying with server.js worked.

What to do

  • In .github/workflows/workshop-evals-pr.yml, use the stacked base nathan/gk-lint-observer-contract for both the comparison and advisory diff, with identical eval definitions on both sides.
  • Optional: In packages/workshop-backend/src/agent.ts, tell agents in the executeCode description to run smoke tests in the step after file edits.
  • Optional: In packages/workshop-evals/evals/chat-views.eval.ts, explicitly ask for a form to add expenses if a client UI is required to pass.

github run

@ndisidore
ndisidore force-pushed the nathan/gk-openapi-kit branch from 3d6bb6d to f995fd4 Compare November 30, 2026 16:00
devin-ai-integration[bot]

This comment was marked as resolved.

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Nov 30, 2026

Copy link
Copy Markdown

Review: 2 findings.

Both are posted in the inline review. I verified them with local fixtures and Forge 0.4.0, following the Gatekeeper Kit guide: “Use Node tests for pure logic.”

github run

@ndisidore
ndisidore force-pushed the nathan/gk-openapi-kit branch from f995fd4 to e093d45 Compare November 30, 2026 19:36
devin-ai-integration[bot]

This comment was marked as resolved.

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Nov 30, 2026

Copy link
Copy Markdown

Review: 3 findings.

All three are posted in the inline review. I verified them with local Node fixtures and Forge 0.4.0, following the Gatekeeper Kit guide: “Use Node tests for pure logic.”

github run

@ndisidore
ndisidore force-pushed the nathan/gk-openapi-kit branch from e093d45 to 1214b17 Compare November 30, 2026 20:40
devin-ai-integration[bot]

This comment was marked as resolved.

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Nov 30, 2026

Copy link
Copy Markdown

Review: 2 findings.

Both are posted in the inline review. I verified them with local fixtures and Forge 0.4.0, following the Gatekeeper Kit guide: “Use Node tests for pure logic.”

github run

@ndisidore
ndisidore force-pushed the nathan/gk-openapi-kit branch from 1214b17 to 8706544 Compare November 30, 2026 21:46
ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Nov 30, 2026

Copy link
Copy Markdown

Review: 2 findings.

Both findings are posted in the inline review.

All 47 focused tests passed. I verified the findings separately with Forge 0.4.0, TypeScript, and a stubbed HTTP transport, following the Gatekeeper Kit guide: “Use Node tests for pure logic.”

github run

@ndisidore
ndisidore force-pushed the nathan/gk-openapi-kit branch from 8706544 to b727726 Compare December 1, 2026 13:00
ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Dec 1, 2026

Copy link
Copy Markdown

Review: 2 findings.

Both are posted in the inline review.

All 48 focused tests and the Gatekeeper Kit type check passed. I verified the findings separately with in-memory Forge 0.4.0 fixtures, following the package guide: “Use Node tests for pure logic.”

github run

srikrsna and others added 3 commits December 1, 2026 13:35
`createOpenAPIClient`, in `./http`, calls a provider through a type-only
schema of its OpenAPI paths, in place of a hand-written fetch for each
endpoint.

- Only an operation's types reach the client. It fills a path's `{name}`
  placeholders from a required `path` object, sends and parses JSON, and
  resolves an empty reply to undefined. It validates nothing at runtime.
- A path that does not start with `/`, or has a `.` or `..` segment or
  whitespace, is refused before a request is built: the URL parser could
  turn it into another route or origin. The types refuse a union of
  paths.
- It never follows a redirect, and a reply that is not 2xx throws
  HttpError.
- `scopeTo(client, prefixes)` narrows a client to path prefixes with
  their parameters fixed, for a connection bound to one organization or
  project. A parameter is fixed under its own prefix only, and nothing
  checks the method.

Co-authored-by: Nathan Disidore <nathan@cloudflare.com>
…on with Forge

The `gatekeeper-openapi-schema` bin writes the type-only schemas `./http`
calls through. It reads a JSON or YAML description, Forge reads the
document in the generator's process, and forge/emit.ts renders what
Forge read.

- One `index.d.ts` holds the models and an `Api` schema of every
  operation. With --group-by tag there is one file and schema per tag.
- --list prints one JSON line per operation, before Forge reads the
  document, and --operations keeps the lines a file lists. Only a line's
  `operationId` chooses, and a line whose method or path is no longer
  the document's fails the run.
- A URL needs --sha256, so that a run generates from the same document
  as the last one. --overlay applies an OpenAPI Overlay, with `forge
  openapi overlay`, whose every action gives a `description`; one that
  changes nothing fails the run. --omit-header and --writable correct
  what a description gets wrong for a client.
- Each operation's comment names the scopes it declares, from `security`
  or from the extensions --scopes-extension names. Where the description
  carries Forge's extensions, it also says that the operation asks for
  confirmation, is hidden or is short of general availability, and a
  field's comment that it is a secret. None is acted on. --list prints
  the first three, and a hidden operation's line must still say so.
- An operation the client cannot send, with a non-JSON body or reply, an
  object-valued query parameter or a parameter Forge does not read, is
  listed at the top of its file as left out, and fails the run if it was
  asked for. So does an operation missing from the output.
- An operation marked `x-forge-skip` is neither listed nor generated, as
  Forge does not read it, unless an alias names it.
- `@cloudflare/forge` is pinned to 0.4.0 and passes the release-age
  rule, as Cloudflare's other packages on that list do.

Co-authored-by: Sri Krishna <7254698+srikrsna@users.noreply.github.com>
A path's `{name}` placeholders were typed `string | number` from the
path alone, so a parameter the description limits to listed values was
not checked, and one it marks secret got no comment.

- An operation may declare `pathParams`. A placeholder it names takes
  that type, and any other still takes a string or a number, so a schema
  without `pathParams` reads as before. Nothing changes at runtime.
- `scopeTo` takes, for a prefix's parameter, only a value that every
  operation under the prefix takes for it.
- The generator writes `pathParams` for every operation, each parameter
  required and with its comment, which a call shows where the value is
  passed. One limited to listed strings takes only those. Any other
  takes a string or a number, whatever type the description gives it,
  since the path carries either as text.
- Checking 250 calls over GitHub's whole schema costs 0.6% more
  instantiations. That schema is 23% longer.
@ask-bonk

ask-bonk Bot commented Dec 1, 2026

Copy link
Copy Markdown

LGTM!

github run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gatekeeper Changes to a gatekeeper integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants