Skip to content

feat(review): add API spec conformance step and vendor Anthropic spec - #973

Open
leseb wants to merge 1 commit into
praxis-proxy:mainfrom
leseb:leseb/openai-spec-review-hints
Open

feat(review): add API spec conformance step and vendor Anthropic spec#973
leseb wants to merge 1 commit into
praxis-proxy:mainfrom
leseb:leseb/openai-spec-review-hints

Conversation

@leseb

@leseb leseb commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Gives the automated PR review bot (.github/prompts/automated-review.md) a
dedicated 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

  • New Step 4 — API Spec Conformance Review. When a diff touches
    provider-API code under apis/src/ (or a cross-cutting provider filter in
    filters/src/), the bot checks schema conformance, endpoint coverage, enum
    values, field optionality, and validation boundaries against the vendored
    spec. Covers OpenAI (Responses, Chat Completions, Conversations) and
    Anthropic Messages. Later steps renumbered accordingly.
  • Vendored Anthropic spec. docs/conformance/specs/anthropic-spec.json is
    the verbatim gunzip of the upstream anthropic-sdk-python
    scripts/mock-spec.json.gz bundle (165 paths, 1321 schemas), pinned with a
    provenance manifest (anthropic-spec-source.json) recording the upstream
    commit and both digests. Marked linguist-generated.
  • Targeted extraction, not whole-file reads. Each spec is multiple MB
    (~600-700k tokens if read whole), which would exhaust the review context. The
    step mandates pulling only the operations/schemas a diff touches - jq for
    the Anthropic JSON, grep -n + Read offset/limit for the OpenAI YAML.
  • Docs. docs/conformance/README.md documents the Anthropic reference spec
    as 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 xtask that verifies the
vendored digest, plus a CI check).

Testing

make lint passes (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.

@leseb
leseb requested review from a team and alexsnaps September 7, 2026 13:53
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
leseb force-pushed the leseb/openai-spec-review-hints branch from ed72c35 to 31258dc Compare September 7, 2026 13:56
@leseb
leseb enabled auto-merge September 7, 2026 14:16
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