GeezerVison is showing github.com — chore(www): stop committing copies of the OpenAPI spec by kitlangton · Pull Request #58593 · anomalyco/opencode
Conversation
kitlangton
commented
Oct 24, 2026
•
edited by opencode-agent
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
What it does. Every API change rewrote the OpenAPI spec three times: once in packages/protocol and twice as byte-for-byte copies in services/www. This stops committing the two www copies, which removes ~312 duplicated lines from every API PR, and marks the remaining generated files as generated so GitHub collapses them in diffs.
How it works.
OpenApiReference.astro imports packages/protocol/openapi.json directly, so services/www/openapi.json is no longer needed.
script/generate-openapi.ts now only copies the spec to public/openapi.json (served at /openapi.json). It already runs before dev and build, so that file is now gitignored and removed from the repo, like public/cli.json.
- With nothing committed left to compare, the www
check:generated script and its CI step are removed. Protocol's own check:generated still guards the source spec.
.gitattributes marks as linguist-generated: packages/protocol/openapi.json, the client's src/promise/generated, src/effect/generated and src/effect/api (all written by script/build.ts and checked by its check:generated), packages/core/src/database/schema.gen.ts (written by script/migration.ts) and packages/desktop/src/main/storage/migration.gen.ts.
Risk. Only affects the www build. deploy-www.yml runs bun run build, which runs generate first, so the deployed site still gets /openapi.json. Running astro dev or astro build directly, without the package scripts, would leave /openapi.json out; the API reference page itself would still render.
Proof. Mechanical change, no media.
bun run check:generated in packages/protocol: passes
bun run typecheck (astro check) in services/www with no public/openapi.json present: 0 errors, 0 warnings
bun run build in services/www: passes, including link validation; dist/client/v2/openapi.json is produced
Added by the opencode bot (AI-generated).
Related: #53105
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I deleted public/openapi.json and ran bun run typecheck and bun run build in services/www. Both pass, the generated /openapi.json is byte-identical to packages/protocol/openapi.json, and the API reference page renders the full spec. deploy-www.yml has no path filter, so changes that only touch packages/protocol still redeploy the site with the updated spec. No other references to the removed copies or to the www check:generated script remain.
Public API: unchanged (/openapi.json on the site serves the same content).
No concerns.
Related: #53105
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Oct 24, 2026
vleonbonnet
added a commit
to vleonbonnet/opencode
that referenced
this pull request
Oct 24, 2026
Conflicts:
- session/compaction.ts: the interface keeps the fork's due (used by the preflight) and gains upstream's precompute.
- test/session-step.test.ts and ai anthropic-messages.test.ts: both sides added a test at the same spot; both kept.
- schema.json: both columns (delegators, allowance) merged; the snapshot takes upstream's id, both ids having the same parent, and the generator finds no schema change.
- migration.gen.ts: both migrations, in filename order (m50 delegators, m51 allowance).
- services/www/openapi.json and public/openapi.json: deleted, as upstream stopped committing them (anomalyco#58593).
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|