Repository navigation
ci(quality): add OpenAPI breaking-change gate (oasdiff, advisory) + fix dangling $refs - #3951
Merged
Merged
Conversation
New advisory gate (Fase 8 B.4) that diffs the public API contract docs/reference/openapi.yaml against the base branch via oasdiff, surfacing removed endpoints, newly-required params, removed response fields, etc. - scripts/check/check-openapi-breaking.mjs: resolves base spec via git show <BASE_REF>:docs/reference/openapi.yaml to a temp file, runs oasdiff breaking --format json, parses+counts breaking changes, emits openapiBreaking=N (KEY=VALUE for collect-metrics). ADVISORY: exit 0 always; graceful SKIP when oasdiff is absent or the base spec can't be resolved. - package.json: check:openapi-breaking script. - .github/workflows/ci.yml (quality-extended, advisory): install oasdiff via gh release download, add the breaking-change step (BASE_REF via env, never shell-interpolated), fetch-depth: 0 so git show can read the base spec. - tests/unit/build/check-openapi-breaking.test.ts: parser counting/grouping + binary-absent SKIP integration. - docs/architecture/QUALITY_GATES.md: document the quality-extended job table. - docs/reference/openapi.yaml: define the BadRequest/NotFound/InternalError response components that were referenced (14 call sites) but never defined — a pre-existing dangling-$ref defect that blocked oasdiff from loading the spec. No path behavior changes; purely additive to components.responses.
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
diegosouzapw
added a commit
that referenced
this pull request
Jun 16, 2026
This was referenced Jun 16, 2026
Merged
diegosouzapw
added a commit
that referenced
this pull request
Jun 16, 2026
…drift) (#3962) The main quality-gate failed on the forward-merge release->main (run 27593205254): eslintWarnings 3769 > baseline 3760. Measured now on origin/release/v3.8.26 (273ecf7, all cycle merges) via quality:collect = 3769 — identical to CI. The later gate PRs (#3947/#3949/#3951/#3956/#3961) did not change the count (scripts/check/*.mjs are eslint-ignored; the new test files added no any/warnings). The +9 is pre-existing release-wide drift from v3.8.26 feature/other-session merges, not a product regression. Conscious re-baseline to the real measured value; tighten via --require-tighten at cycle-end (consistent with prior _eslint_rebaseline notes). Validated: ratchet passes with the real CI metrics (24 metrics OK, exit 0).
tkgo11
pushed a commit
to tkgo11/OmniRoute
that referenced
this pull request
Sep 23, 2026
…eaper-inference#3951) New advisory gate (Fase 8 B.4) that diffs the public API contract docs/reference/openapi.yaml against the base branch via oasdiff, surfacing removed endpoints, newly-required params, removed response fields, etc. - scripts/check/check-openapi-breaking.mjs: resolves base spec via git show <BASE_REF>:docs/reference/openapi.yaml to a temp file, runs oasdiff breaking --format json, parses+counts breaking changes, emits openapiBreaking=N (KEY=VALUE for collect-metrics). ADVISORY: exit 0 always; graceful SKIP when oasdiff is absent or the base spec can't be resolved. - package.json: check:openapi-breaking script. - .github/workflows/ci.yml (quality-extended, advisory): install oasdiff via gh release download, add the breaking-change step (BASE_REF via env, never shell-interpolated), fetch-depth: 0 so git show can read the base spec. - tests/unit/build/check-openapi-breaking.test.ts: parser counting/grouping + binary-absent SKIP integration. - docs/architecture/QUALITY_GATES.md: document the quality-extended job table. - docs/reference/openapi.yaml: define the BadRequest/NotFound/InternalError response components that were referenced (14 call sites) but never defined — a pre-existing dangling-$ref defect that blocked oasdiff from loading the spec. No path behavior changes; purely additive to components.responses.
tkgo11
pushed a commit
to tkgo11/OmniRoute
that referenced
this pull request
Sep 23, 2026
…(owner CI gates merged mid-release)
tkgo11
pushed a commit
to tkgo11/OmniRoute
that referenced
this pull request
Sep 23, 2026
…drift) (cheaper-inference#3962) The main quality-gate failed on the forward-merge release->main (run 27593205254): eslintWarnings 3769 > baseline 3760. Measured now on origin/release/v3.8.26 (19b37e6, all cycle merges) via quality:collect = 3769 — identical to CI. The later gate PRs (cheaper-inference#3947/cheaper-inference#3949/cheaper-inference#3951/cheaper-inference#3956/cheaper-inference#3961) did not change the count (scripts/check/*.mjs are eslint-ignored; the new test files added no any/warnings). The +9 is pre-existing release-wide drift from v3.8.26 feature/other-session merges, not a product regression. Conscious re-baseline to the real measured value; tighten via --require-tighten at cycle-end (consistent with prior _eslint_rebaseline notes). Validated: ratchet passes with the real CI metrics (24 metrics OK, exit 0).
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.
Item (b) — adiciona o gate de breaking-change no contrato
docs/reference/openapi.yamlvia oasdiff (Fase 8 B.4, backlog opcional). Advisory-first.O gate
scripts/check/check-openapi-breaking.mjs: fazgit show <BASE_REF>:openapi.yaml→ temp, rodaoasdiff breakingvs HEAD, conta breaking changes (endpoint removido, param novo obrigatório, campo de response removido…). Advisory (exit 0 sempre nesta versão; reporta + promove a bloqueante depois). Skip-gracioso se oasdiff ausente / base não-resolvível.quality-extended(advisory) comBASE_REF: ${{ github.base_ref }}+fetch-depth: 0+ oasdiff no install-step (gh release download).⭐ Defeito pré-existente corrigido (achado pelo oasdiff)
O
openapi.yamlreferenciava#/components/responses/{BadRequest,NotFound,InternalError}(14 usos em paths) mas nunca os definia —$refs pendurados. Os gates baseados em js-yaml nunca resolvem$ref→ nunca pegaram. O oasdiff (loader estrito) recusava carregar o spec. Adicionadas as 3components.responsescomo Response Objects próprios (description+content+schema→ApiErrorResponse+example), no mesmo estilo dos existentes (Unauthorized etc.). Aditivo, sem mudança de comportamento de path.Validação (auditada por mim)
Não gera versão.