Skip to content

fix: use latest Forge OpenAPI release - #334

Merged
petebacondarwin merged 2 commits into
mainfrom
codex/fix-openapi-release-order
Oct 16, 2026
Merged

petebacondarwin merged 2 commits into
mainfrom
codex/fix-openapi-release-order

Conversation

@petebacondarwin

@petebacondarwin petebacondarwin commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

The OpenAPI updater returns the first eligible release from GitHub's list, which can select an older spec when releases share a target commit. Fetch /repos/cloudflare/forge/releases/latest instead, using GitHub's latest-release marker with one lookup regardless of release-history size.

Validate that the response is a published, non-prerelease openapi@<sha> release with the required openapi.forge.json asset. Report missing or invalid latest releases without falling back to scanning history. Forge's publisher must keep its latest marker on the current OpenAPI spec.

Validation:

  • node --test scripts/update-openapi.test.ts — all 21 tests pass, covering the direct anonymous lookup, invalid releases, missing assets, 404 responses, and retries.
  • pnpm check — passes generation, builds, workspace type checks, lint, and formatting.
  • git diff --check — passes.

No changeset: this only changes internal update automation.

@ask-bonk

ask-bonk Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

@pkg-pr-new

pkg-pr-new Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
npm i https://pkg.pr.new/cf@334

commit: e1f0385

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

cf --help startup

mean stddev min max
PR 217.2 ms 8.6 ms 210.9 ms 248.9 ms
base 214.7 ms 3.8 ms 208.9 ms 221.8 ms

Δ (PR vs base): ↑ +2.6 ms (+1.2%)

Measured with hyperfine on ubuntu-latest (3 warmup runs, 20 timed runs). CI numbers carry ±a few ms of runner jitter; treat small deltas as noise.

@petebacondarwin petebacondarwin changed the title fix: select latest OpenAPI release by publication time fix: use latest Forge OpenAPI release Oct 16, 2026
Comment thread scripts/update-openapi.ts
@ask-bonk

ask-bonk Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

🤖 I've done a thorough review of your PR.

Updates OpenAPI release discovery to use GitHub’s /releases/latest endpoint.

  1. Warning: Release metadata accepts missing draft/prerelease fields. Posted an inline suggestion requiring explicit false values.

github run

@dario-piotrowicz dario-piotrowicz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 😄 🚀

@petebacondarwin
petebacondarwin added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit 027d6be Oct 16, 2026
12 checks passed
@petebacondarwin
petebacondarwin deleted the codex/fix-openapi-release-order branch October 16, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants