ci: open a pull request when a new ACP schema is released - #54
Open
lx-wnk wants to merge 4 commits into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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/versionagainst the newestschema-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.Ztag scheme wasv0.14.0on 2026-06-18, and elevenschema-v*releases have shipped since.Notes on the implementation:
ci.yaml(actions/checkoutandjdx/mise-action) and drives the existingmake version,make fmtandmake testtargets rather than assembling its own toolchain.schema-v2.0.0-alpha.*line is ignored until it ships stable.actionlintandzizmor --no-online-auditsreport no findings.The
jqfilter was checked against live release data and resolves to1.20.0.Entirely optional relative to the other two — drop it if you would rather not have a job that opens PRs.