Context
.github/workflows/oasdiff.yml was deleted in # because it was broken — go run ./cmd/openapi references a non-existent package (cmd/openapi/ does not exist; only cmd/smoke-buildinfo/ does). The fallback (./api --emit-openapi) is also not implemented. fail-on-diff: false masked the failure — every run silently compared prod's spec to prod's spec.
Caught during reviews of #167 and #168.
Wire-up options
(a) Add CLI flag to api binary — ./api --emit-openapi writes the spec to stdout and exits. Minimal Go change in api/cmd/api/main.go, then the existing oasdiff.yml fallback chain works as-is.
(b) Add cmd/openapi/main.go — a tiny main() that imports internal/handlers and calls the existing OpenAPI spec builder. Matches the original go run ./cmd/openapi invocation. Likely shortest path.
(c) Docker-build the PR, hit /openapi.json — slowest CI step but no Go-side code change. Reuses the existing buildinfo dockerfile.
Recommendation
(b) is the smallest diff. ~20 lines of Go + the workflow can be reinstated verbatim (then flip fail-on-diff: true once a known-good baseline lands).
In the meantime
The CLAUDE.md rule 22 contract-PR surface checklist (api/plans.yaml + api/internal/handlers/openapi.go + instanode-web/.../PricingPage.tsx + content/llms.txt synchronized) remains the manual gate. No automated breaking-change detection runs.
Related
Context
.github/workflows/oasdiff.ymlwas deleted in # because it was broken —go run ./cmd/openapireferences a non-existent package (cmd/openapi/does not exist; onlycmd/smoke-buildinfo/does). The fallback (./api --emit-openapi) is also not implemented.fail-on-diff: falsemasked the failure — every run silently compared prod's spec to prod's spec.Caught during reviews of #167 and #168.
Wire-up options
(a) Add CLI flag to api binary —
./api --emit-openapiwrites the spec to stdout and exits. Minimal Go change inapi/cmd/api/main.go, then the existing oasdiff.yml fallback chain works as-is.(b) Add
cmd/openapi/main.go— a tinymain()that importsinternal/handlersand calls the existing OpenAPI spec builder. Matches the originalgo run ./cmd/openapiinvocation. Likely shortest path.(c) Docker-build the PR, hit /openapi.json — slowest CI step but no Go-side code change. Reuses the existing buildinfo dockerfile.
Recommendation
(b) is the smallest diff. ~20 lines of Go + the workflow can be reinstated verbatim (then flip
fail-on-diff: trueonce a known-good baseline lands).In the meantime
The CLAUDE.md rule 22 contract-PR surface checklist (
api/plans.yaml+api/internal/handlers/openapi.go+instanode-web/.../PricingPage.tsx+content/llms.txtsynchronized) remains the manual gate. No automated breaking-change detection runs.Related