Skip to content

ci: open a pull request when a new ACP schema is released - #54

Open
lx-wnk wants to merge 4 commits into
coder:mainfrom
lx-wnk:ci/schema-update-automation
Open

ci: open a pull request when a new ACP schema is released#54
lx-wnk wants to merge 4 commits into
coder:mainfrom
lx-wnk:ci/schema-update-automation

Conversation

@lx-wnk

@lx-wnk lx-wnk commented Aug 14, 2026

Copy link
Copy Markdown

Depends on #53, which depends on #52. The first three commits here are those PRs, so this diff shrinks as they merge.

A daily job compares schema/version against the newest schema-v* release, regenerates when they differ, runs the tests, and opens a pull request.

Tracking the schema by hand is how the generated code drifted: the last release cut under the old vX.Y.Z tag scheme was v0.14.0 on 2026-06-18, and eleven schema-v* releases have shipped since.

Notes on the implementation:

  • Uses the same pinned action SHAs as ci.yaml (actions/checkout and jdx/mise-action) and drives the existing make version, make fmt and make test targets rather than assembling its own toolchain.
  • Skips silently when a branch for that version already exists, so a rerun does not open duplicates.
  • Pre-releases are excluded, so the schema-v2.0.0-alpha.* line is ignored until it ships stable.
  • actionlint and zizmor --no-online-audits report no findings.

The jq filter was checked against live release data and resolves to 1.20.0.

Entirely optional relative to the other two — drop it if you would rather not have a job that opens PRs.

lx-wnk and others added 4 commits August 14, 2026 14:39
The protocol repository publishes its schema artifacts under `schema-vX.Y.Z`
tags. The Makefile still requested them from `vX.Y.Z`, so every schema target
resolved to a 404 and the generator could not be pointed at any release cut
under the new scheme.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A definition carrying both `properties` and `anyOf` is emitted as a union
wrapper, so the property-based validator referenced fields the wrapper does not
have. Suppressing that validator alone is not enough: the request and response
dispatchers call Validate unconditionally after unmarshalling, so a union
without one fails to compile.

Emit the generic union validator for anyOf as well, requiring at least one
variant rather than exactly one, which matches anyOf semantics. Types that
previously received a property validator over fields the wrapper had dropped
had an empty `return nil` body, so this replaces a validator that checked
nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Regenerated against the current schema release. Three call sites needed
adjusting:

- `TerminalId` is now a named type, so `ToolTerminalRef` converts explicitly.
- `session/delete` graduated from the experimental surface, so
  `UnstableDeleteSession*` became `DeleteSession*` and the method moved from
  `AgentExperimental` to `Agent`. Examples and test doubles implement it.
- `README.md` and `version` follow `schema/version`, matching what
  `make version` produces.

Adds tests for the union validators, which had no coverage.

A pre-existing generator gap becomes more visible with this schema: a
definition carrying both `properties` and `anyOf` is emitted as a union
wrapper only, so its sibling scalar properties are dropped. This is not new
here. At 0.13.5 the unstable `SetSessionConfigOptionRequest` already declares
`sessionId` and `configId` as required, and neither appears on the generated
struct. Emitting hybrid definitions faithfully needs work in emitUnion and is
left for a follow-up.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A daily job compares schema/version against the newest schema-v* release,
regenerates through the existing make targets, runs the tests, and opens a
pull request. Tracking the schema by hand is how the generated code drifted
several releases behind.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant