GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore(www): stop committing copies of the OpenAPI spec by kitlangton · Pull Request #58593 · anomalyco/opencode

Conversation

@kitlangton

@kitlangton kitlangton commented Oct 24, 2026 •
edited by opencode-agent Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

  1. OpenApiReference.astro imports packages/protocol/openapi.json directly, so services/www/openapi.json is no longer needed.
  2. 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.
  3. 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.
  4. .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.

All reactions
@kitlangton
chore(www): stop committing copies of the OpenAPI spec
82dd198
@github-actions github-actions Bot added the contributor label Oct 24, 2026
opencode-agent[bot]
opencode-agent Bot reviewed Oct 24, 2026
View reviewed changes

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
@kitlangton
kitlangton merged commit 8521baf into dev Oct 24, 2026
22 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@kitlangton
kitlangton deleted the slim-openapi-copies branch October 24, 2026 03:24
This was referenced Oct 24, 2026
perf(app): open sessions without downloading read-tool images #58586
Closed
refactor(protocol): define shared OpenAPI parameters once instead of inline on every route #58607
Closed
vleonbonnet added a commit to vleonbonnet/opencode that referenced this pull request Oct 24, 2026
@vleonbonnet
Merge upstream dev (v2.1.4) into main
99cc22f
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).
@opencode-agent opencode-agent Bot mentioned this pull request Oct 25, 2026
feat(core): accept a pasted redirect URL for MCP OAuth #58370
Open
@kitlangton kitlangton mentioned this pull request Oct 25, 2026
chore: merge dev into beta #59055
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencode-agent opencode-agent[bot] opencode-agent[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

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.

1 participant

@kitlangton
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.