Skip to content

Add OpenAPI spec-drift detector#8

Open
andrewyu47 wants to merge 2 commits into
mainfrom
andrew-docs-drift-detector
Open

Add OpenAPI spec-drift detector#8
andrewyu47 wants to merge 2 commits into
mainfrom
andrew-docs-drift-detector

Conversation

@andrewyu47
Copy link
Copy Markdown

Draft. Adds a CI detector that flags when an OpenAPI spec change requires docs/SDK updates.

  • PR mode: comments a checklist of affected docs.pinecone.io guide pages + impacted SDKs, breaking changes first.
  • Scheduled (weekly) / manual: diffs the two newest version snapshots and opens a draft PR in pinecone-io/docs.
  • Breaking-change classification: removed/required-added params, type changes, removed properties/enum values, removed operations.
  • Pure Python stdlib + pyyaml. The symbol→docs/SDK mapping lives in .github/spec-manifest.json (hand-seeded; unmapped surface is logged to spec-gaps-unmapped.json so the manifest stays current).

Before the scheduled half can run: add a DOCS_GITHUB_TOKEN repo secret (PAT with repo scope on pinecone-io/docs). PR comments use the default GITHUB_TOKEN.

Validated locally on the 2025-04 → 2025-10 db_data diff: 42 changes, 25 breaking (e.g. the newly-required X-Pinecone-Api-Version header). Unit tests under .github/scripts/tests/.

Generated with Claude Code.

Flags affected docs.pinecone.io guide pages and impacted SDKs when an OpenAPI
spec changes, with breaking changes called out first. PR mode comments a
checklist on the PR; scheduled mode diffs the two newest version snapshots and
opens a draft PR in pinecone-io/docs. Breaking-change classification covers
removed/required-added params, type changes, removed properties/enums, and
removed operations. Pure Python stdlib + pyyaml.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@andrewyu47 andrewyu47 requested a review from austin-denoble May 29, 2026 22:55
@andrewyu47 andrewyu47 marked this pull request as ready for review May 29, 2026 22:55
…ion, removed response codes

Audit against the design's breaking-change rule table surfaced three rows
that weren't implemented or were misclassified:

- format changes (e.g. int32->int64, date->date-time) on params and schema
  properties are now flagged breaking (previously only type/$ref compared)
- parameter location change (e.g. query->path) is reported once as breaking
  instead of a misleading remove + add pair
- removed response codes are flagged breaking (responses were not diffed)

Adds 5 unit tests (11 total, all passing). On the real 2025-10 -> 2026-04
snapshot pair the detector now finds 33 changes / 5 breaking (was 30 / 2),
the extra items being genuine response-code removals and param changes.

Also dedups the breaking-changes section of the PR comment so a change
mapped to multiple guide pages is listed once.

Co-Authored-By: Claude Opus 4.8 (1M context) <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