Skip to content

feat: verify action — read-only setup probe (Slice A)#132

Draft
reuvenharrison wants to merge 2 commits into
mainfrom
feat/verify-action
Draft

feat: verify action — read-only setup probe (Slice A)#132
reuvenharrison wants to merge 2 commits into
mainfrom
feat/verify-action

Conversation

@reuvenharrison
Copy link
Copy Markdown
Contributor

Draft — Slice A of Phase 2 (activation-gated-trial). Pairs with oasdiff-service #212 (the /tenants/{id}/verify endpoint).

Adds a dedicated verify/ action: a read-only "verify installation" probe for the setup step. Meant to be run manually via workflow_dispatch (the user clicks "Run workflow" in the Actions UI). Posts no PR comment, sets no commit status.

What it does

  1. Resolves + diffs the configured base/revision with oasdiff (the spec check).
  2. POSTs {owner, repo, specs_found, ...} to …/tenants/{token}/verify. Reaching a 2xx proves the token authenticated; the response carries App-installed.
  3. Renders a progressive checklist in the Step Summary:
    • ✅ GitHub Actions workflow is running
    • ✅/❌ Connected to oasdiff (OASDIFF_TOKEN secret)
    • ✅/❌ oasdiff GitHub App installed on owner/repo
    • ✅/❌ OpenAPI spec found and compared
  4. Reviewer-access (OAuth) is checked separately on the oasdiff.com setup page, not here.

Exits 0 only when all bot-chain checks pass; otherwise 1, with a targeted hint in the summary and a ::error:: annotation per red check — so the manual verify run is a clear red/green signal.

Naming

verify, deliberately distinct from the oasdiff validate spec-compliance command.

Verification

Locally exercised across all-green / app-missing / bad-token (401). CI: test-verify.yaml stubs oasdiff + curl for all-green (→ exit 0, full-green checklist) and app-not-installed (→ exit 1 + annotation). verify/Dockerfile added to release.sh's pin-bump list.

Follow-ups (not here)

  • w3 Slice D: the /setup progressive checklist polling a stored verify result, the background OAuth check, and arming trial_ends_at on the bot chain.
  • The generated workflow file (Slice C) should include a workflow_dispatch job that calls this action.
  • Needs an oasdiff-action release to be consumable by pinned users (after service #212 ships).

reuvenharrison and others added 2 commits June 2, 2026 11:15
Add a dedicated `verify/` action for the activation-gated-trial "verify
installation" step. It's meant to be run manually (workflow_dispatch) and
posts NO PR comment / sets NO commit status. It resolves + diffs the
configured specs (spec check), POSTs the outcome to the service
`/tenants/{id}/verify` endpoint (token + App checks come back in the
response), and renders a progressive checklist in the Step Summary:
workflow running / connected to oasdiff / App installed / spec found.
Reviewer-access (OAuth) is checked separately on the setup page.

Exits 0 only when all bot-chain checks pass; otherwise exits 1 with a
targeted hint + annotation per red check. Named "verify", distinct from
the oasdiff `validate` command. Pairs with oasdiff-service #212.

Adds test-verify.yaml (all-green → exit 0; app-not-installed → exit 1 +
annotation) and wires verify/Dockerfile into release.sh's pin list.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The spec check resolves in-repo / relative $refs via git (a broken one
fails the load → red, as intended). External $refs are refused by default
(allow-external-refs=false), which oasdiff signals with exit 123 — a
distinct case from a wrong path. Capture the exit code and, on 123, show
"OpenAPI spec found, but an external $ref was blocked" with the
allow-external-refs hint (mirroring pr-comment) instead of a misleading
path hint. Improves the spec-not-found hint to mention multi-file / git-ref
resolution. Adds a CI test for the exit-123 case.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant