Repository navigation
Validate Session, Vault, Credential and Template request shapes - #862
Merged
Merged
Conversation
SaladDay
force-pushed
the
fix/validate-request-shapes
branch
from
October 25, 2026 02:46
17298c7 to
52c4f5a
Compare
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.
Official API alignment (ST-07/08/09, VT-01, VT-02/03, VT-04, EC-02 + SES-20).
The pinned-shape walker that already checks Agent bodies now also checks Session create and update, Vault create, Credential create and rotate, Environment Template create and update, and Session events. Field errors carry the JSON path as
paramwith the official message forms (Unknown parameter: 'x'.,Missing required parameter: 'x'.,Invalid type for 'x': …,Invalid value: …), for examplemetadata,env.KEY,auth.type,auth.access_token,input[0].roleandevents[0].input[0].role. Core-local rules that the schema leaves open (HTTPSmcp_server_url, nonempty tokens, name limits, env names) keep Core's message but now name their field. Decoder branches and messages that became unreachable are deleted.scripts/generate-public-api.pyprojects the eight schemas (members with their own parser, such as Sessionagent/environmentand Templatenetwork, are checked as objects only) and a string-or-array union;official_shapes.gen.goregenerated.wire-semantics.md,vaults.md,sessions-events.md(+ zh).Checks:
go test ./internal/api ./internal/environmentconfig ./internal/environmenttemplates,make check-openapi, integration tests for credentials, MCP credentials, request bodies, input and templates against a test database,go vet ./..., gofmt.Need help on this PR? Tag
@codesmith-botwith what you need.