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 — CI does not check packages/protocol/openapi.json; committed spec drifts · Issue #53105 · anomalyco/opencode

CI does not check packages/protocol/openapi.json; committed spec drifts #53105

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
CI does not check packages/protocol/openapi.json; committed spec drifts#53105
Copy link
Assignees
neriousy
Labels
pending closetriaging

Description

@Blind-Striker
Blind-Striker
opened on Oct 4, 2026
Issue body actions

Description

packages/protocol/openapi.json is committed, and packages/protocol has a drift check ("check:generated": "bun run script/generate-openapi.ts --check"). CI never runs it. In .github/workflows/test.yml (same lines at v2.0.22 and on v2, ~164-172), the check:generated steps run only in packages/client and services/www:

  • packages/client generates from ClientApi in source, so it never reads openapi.json.
  • services/www/script/generate-openapi.ts only copies packages/protocol/openapi.json to services/www/openapi.json and services/www/public/openapi.json, so its check compares the copies with the committed file, not with the source.

So the committed document can drift from packages/protocol/src without any check failing. The published API reference serves the same file, so it carries the same drift.

On tag v2.0.22 (527f0b9):

  • The committed document has 136 operations. Regenerating gives 140. Missing from the committed file:
    • server.pair (POST /api/pair)
    • server.connect (GET /auth/connect/{code})
    • credential.list (GET /api/credential)
    • credential.create (POST /api/credential)
  • The optional message query parameter added to session.form.cancel in feat(core): let form cancellation carry a message #52137 (02c3891) is listed under session.form.reply in the committed file. The regenerated output puts it on session.form.cancel (DELETE /api/session/{sessionID}/form/{formID}). That matches packages/protocol/src/groups/session.ts and SessionFormCancelInput in the generated promise client.
  • At v2.0.18 the source already defined server.pair / server.connect, but the committed document did not list them.

On v2, 41516c7 (#51455) later regenerated the document, and session.form.cancel now carries message. The CI gap remains, so the drift can come back.

Proposal: add a step to the same set in test.yml, for example:

- name: Check generated protocol document
  if: runner.os == 'Linux'
  working-directory: packages/protocol
  run: bun run check:generated

Put it before "Check generated documentation", so a stale source document fails before its copies are compared.

Context: we consume this document to build a .NET SDK (opencode-dotnet/opencode-sdk-dotnet).

Plugins

None

OpenCode version

v2.0.22 (tag), also checked v2 at 077444b

Steps to reproduce

  1. git clone https://github.com/anomalyco/opencode && cd opencode && git checkout v2.0.22
  2. bun install --frozen-lockfile (bun 1.4.2)
  3. cd packages/protocol && bun run script/generate-openapi.ts --check
  4. Output: Generated OpenAPI document is stale. Run `bun run generate` from packages/protocol., exit code 1.
  5. bun run generate, then diff openapi.json: 4 operations are added and message moves from session.form.reply to session.form.cancel.

Screenshot and/or share link

N/A

Operating System

Windows 11 (the check is platform-independent; CI would run it on the Linux leg)

Terminal

Git Bash

Activity

  1. github-actions
    assigned
    neriousy
    on Oct 4, 2026
  2. opencodejr commented on Oct 27, 2026

    @opencodejr
    opencodejrBot
    on Oct 27, 2026
    Contributor
    More actions

    Thanks for the detailed write-up. I think this is a duplicate of #58262, which has been merged. #58262 is a pull request, not an issue.

    Possible duplicates and related items, ordered by likelihood:

    • fix: regenerate broken OpenAPI documents and check them in CI #58262: adds the step you proposed (bun run check:generated in packages/protocol, Linux only) to the CI workflow, now .github/workflows/check-test.yml on dev. It also regenerates packages/protocol/openapi.json and the two services/www copies. Its description names the same gap: CI compared the www copies with the committed file but never compared that file with ClientApi.
    • fix(app): restore Git initialization for non-Git projects #51455: the earlier regeneration you mentioned, which moved message onto session.form.cancel.

    The check isn't in v2.0.22, but it is in releases from v2.1.4 on (including v2.2.0), so the published document is now checked against the source in CI.

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different, for example if you still see drift on a current tag.

  3. opencodejr
    added
    pending close
    triaging
    on Oct 27, 2026
  4. opencodejr
    closed this as duplicateon Oct 28, 2026
  5. opencodejr commented on Oct 28, 2026

    @opencodejr
    opencodejrBot
    on Oct 28, 2026
    Contributor
    More actions

    Closing this as a duplicate of #58262, since there's been no reply in the past day. That merged pull request adds the packages/protocol check:generated step you proposed to CI and regenerates openapi.json. The check is in releases from v2.1.4 on.

    Thanks again for the careful report. If you still see drift between openapi.json and the source on a current tag, please comment here or open a new issue with the tag and the diff.

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

Metadata

Metadata

Assignees

  • @neriousy
    neriousy

Labels

pending closetriaging

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.