Skip to content

ci: re-introduce OpenAPI breaking-change check (replacement for deleted oasdiff workflow) #169

@mastermanas805

Description

@mastermanas805

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions