feat(review): add API spec conformance step and vendor Anthropic spec - #973
Open
leseb wants to merge 1 commit into
Open
feat(review): add API spec conformance step and vendor Anthropic spec#973leseb wants to merge 1 commit into
leseb wants to merge 1 commit into
Conversation
Give the automated PR review bot a dedicated API spec conformance step that cross-references changes against vendored provider specs. - Add Step 4 to .github/prompts/automated-review.md covering OpenAI (Responses, Chat Completions, Conversations) and Anthropic Messages conformance. It triggers on provider-API code under apis/src/ (and cross-cutting provider filters in filters/src/). Because each spec is multiple MB, the step mandates targeted jq/grep extraction of only the operations and schemas a diff touches instead of reading the whole file. - Vendor the complete upstream Anthropic OpenAPI document (the anthropic-sdk-python scripts/mock-spec.json.gz bundle, verbatim gunzip) as docs/conformance/specs/anthropic-spec.json, with a provenance manifest pinning the upstream commit and both digests. Mark it linguist-generated. - Document the Anthropic reference spec in docs/conformance/README.md as review-only (no oasdiff, capability, or CI gate) with source, scope, and manual refresh instructions. Signed-off-by: Sébastien Han <seb@redhat.com>
leseb
force-pushed
the
leseb/openai-spec-review-hints
branch
from
September 7, 2026 13:56
ed72c35 to
31258dc
Compare
leseb
enabled auto-merge
September 7, 2026 14:16
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.
Summary
Gives the automated PR review bot (
.github/prompts/automated-review.md) adedicated API spec conformance step, and vendors the complete Anthropic
Messages OpenAPI document as a local review reference so the bot can
cross-reference provider-API changes without a network fetch.
What changed
provider-API code under
apis/src/(or a cross-cutting provider filter infilters/src/), the bot checks schema conformance, endpoint coverage, enumvalues, field optionality, and validation boundaries against the vendored
spec. Covers OpenAI (Responses, Chat Completions, Conversations) and
Anthropic Messages. Later steps renumbered accordingly.
docs/conformance/specs/anthropic-spec.jsonisthe verbatim gunzip of the upstream
anthropic-sdk-pythonscripts/mock-spec.json.gzbundle (165 paths, 1321 schemas), pinned with aprovenance manifest (
anthropic-spec-source.json) recording the upstreamcommit and both digests. Marked
linguist-generated.(~600-700k tokens if read whole), which would exhaust the review context. The
step mandates pulling only the operations/schemas a diff touches -
jqforthe Anthropic JSON,
grep -n+ Read offset/limit for the OpenAI YAML.docs/conformance/README.mddocuments the Anthropic reference specas review-only, with source, scope, and manual refresh instructions.
Scope / non-goals
The Anthropic spec is a review reference only - there is no
oasdiff,capability, or CI gate wired to it (unlike the OpenAI conformance tooling). A
follow-up PR will add deterministic enforcement (an
xtaskthat verifies thevendored digest, plus a CI check).
Testing
make lintpasses (fmt, clippy, dependency, separator, filter-docs,example-tests, markdown-links, README syncs, inference, and responses-registry
checks all green). No Rust behavior changes - this is review guidance, a
vendored spec, and docs.