ci: add openapi spec drift check on PRs#1129
Draft
mandarini wants to merge 4 commits into
Draft
Conversation
Coverage Report for CI Build 27703043149Coverage decreased (-0.09%) to 78.237%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions17 previously-covered lines in 1 file lost coverage.
Coverage Stats💛 - Coveralls |
7b8f921 to
1cec41c
Compare
Stop gitignoring static/api.json and static/api-admin.json and commit the generated snapshots so the spec drift gate has a baseline to diff against. These were previously build-only artifacts published to GH Pages; making the committed copy load-bearing is what lets downstream consumers (SDKs, type generators) pin to an accurate spec. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The committed static/api.json and static/api-admin.json are emitted minified by 'npm run docs:export' and verified by the drift gate, so they should not be subject to biome's formatter. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
What this is
static/api.jsonorstatic/api-admin.jsonhas drifted.Status
Spec drift check— passing. The committed snapshots are in sync with the Fastify route schemas.Lint & Build— passing.Coveralls— failing, but not caused by this PR. The patch-coverage check reports "No coverable files changed" (this PR adds no executable code — onlystatic/api*.json,.gitignore, andbiome.jsonc). The reported ~0.1% dip is coverage-measurement variance in the acceptance suite (previously attributed tosrc/internal/database/migrations/migrate.ts) combined with base-branch drift, not anything introduced here.Bootstrap — done in this PR
The one-time bootstrap is already complete on this branch:
static/api.json+static/api-admin.jsonwere previously gitignored (build-only artifacts published to GH Pages), so the committed copy never existed. This PR stops ignoring them and commits the generated snapshots, making the committed copy load-bearing.npm run docs:export, so they're excluded frombiome(the drift gate verifies them; they are not hand-formatted).What maintainers need to do
npm run docs:exportand commit the updatedstatic/api.json/static/api-admin.json. (Or download theopenapi-specsartifact from the failing run and commit those.)What it's used for
docs.yml; this change makes the committed copy load-bearing too.What was added and why
.github/workflows/openapi.yml— runsnpm run docs:exporton PRs touchingsrc/,package.json, or the committed specs; fails ongit diff. Mirrors the env block fromdocs.ymlso the export path is identical. Uploads the just-exported spec as an artifact.static/api.json+static/api-admin.json— committed baseline snapshots (bootstrap)..gitignore— stop ignoring the two snapshots.biome.jsonc— exclude the two generated, minified snapshots from the formatter.