From 3b76452c60b1d294784063df5400f4e5c0f35350 Mon Sep 17 00:00:00 2001 From: Manas Srivastava Date: Fri, 29 May 2026 14:00:03 +0530 Subject: [PATCH] ci(oasdiff): delete broken workflow, file follow-up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The oasdiff workflow references `go run ./cmd/openapi` which does not exist (there is no cmd/openapi/ — only cmd/smoke-buildinfo/). The fall- back chain (`go build ./... && ./api --emit-openapi`) also doesn't work — the api binary doesn't accept --emit-openapi. In practice the workflow's 'Build openapi.json from PR' step always fell through to the 'WARNING: no openapi-emit binary found' echo, comparing prod's spec to prod's spec, so it only ever emitted no-op output. Bug caught by reviews during PR #167 and #168 (mentioned in QA-session PR-3 brief). `fail-on-diff: false` means it was never an actual gate, just noise. Delete and file a tracking issue for the proper wire-up. A real replacement needs ONE of: (a) wire api binary to emit openapi via a CLI flag (--emit-openapi), then update the workflow to invoke it; or (b) add cmd/openapi/main.go that imports internal/handlers/openapi.go and writes the spec to stdout, matching the existing `go run ./cmd/openapi` invocation; or (c) use the live /openapi.json from a build-of-the-PR (run api in docker, hit the endpoint) — slowest but no Go-side code change. Tracking issue filed; until then we have no automated OpenAPI breaking- change check on PRs. The contract-PR surface checklist (CLAUDE.md rule 22) remains the manual gate. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/oasdiff.yml | 51 ----------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 .github/workflows/oasdiff.yml diff --git a/.github/workflows/oasdiff.yml b/.github/workflows/oasdiff.yml deleted file mode 100644 index 2314206c..00000000 --- a/.github/workflows/oasdiff.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: oasdiff (OpenAPI breaking-change check) - -on: - pull_request: - branches: [master] - paths: - - 'internal/handlers/openapi.go' - - 'go.mod' - - 'go.sum' - -permissions: - contents: read - pull-requests: write - -jobs: - diff: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout PR - uses: actions/checkout@v6 - with: - path: api - - uses: actions/checkout@v6 - with: - repository: InstaNode-dev/common - path: common - continue-on-error: true - - uses: actions/checkout@v6 - with: - repository: InstaNode-dev/proto - path: proto - continue-on-error: true - - uses: actions/setup-go@v6 - with: - go-version-file: api/go.mod - - name: Build openapi.json from PR - working-directory: api - run: | - go run ./cmd/openapi > /tmp/pr-openapi.json 2>/dev/null || \ - (go build ./... && ./api --emit-openapi > /tmp/pr-openapi.json 2>/dev/null) || \ - echo "WARNING: no openapi-emit binary found; fetching live spec" - - name: Fetch live prod openapi for comparison - run: | - curl -sSfL https://api.instanode.dev/openapi.json -o /tmp/master-openapi.json || \ - echo '{"openapi":"3.1.0","paths":{}}' > /tmp/master-openapi.json - - uses: oasdiff/oasdiff-action/breaking@main - with: - base: /tmp/master-openapi.json - revision: /tmp/pr-openapi.json - fail-on-diff: false # warn-only initially; flip to true once known-good baseline exists