Skip to content

Github issue fixes 07-28-2026 #3

Github issue fixes 07-28-2026

Github issue fixes 07-28-2026 #3

name: API Spec Drift
on:
push:
branches: [main]
paths:
- "lib/api-spec/**"
- "lib/api-zod/**"
- "lib/api-client-react/src/generated/**"
- "artifacts/api-server/**"
- "VOID_TECHNICAL_OVERVIEW.md"
- "package.json"
- "pnpm-workspace.yaml"
- "pnpm-lock.yaml"
- ".github/workflows/api-spec-drift.yml"
pull_request:
branches: [main]
paths:
- "lib/api-spec/**"
- "lib/api-zod/**"
- "lib/api-client-react/src/generated/**"
- "artifacts/api-server/**"
- "VOID_TECHNICAL_OVERVIEW.md"
- "package.json"
- "pnpm-workspace.yaml"
- "pnpm-lock.yaml"
- ".github/workflows/api-spec-drift.yml"
permissions:
contents: read
jobs:
codegen-drift:
name: Re-run codegen and fail on drift
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check VOID_TECHNICAL_OVERVIEW.md HTTP-surface scope vs openapi.yaml
run: pnpm --filter @workspace/api-spec run check-overview-http
- name: Check VOID_TECHNICAL_OVERVIEW.md signaling-spec scope vs asyncapi.yaml
run: pnpm --filter @workspace/api-spec run check-overview-asyncapi
- name: Re-run OpenAPI codegen
run: pnpm --filter @workspace/api-spec run codegen
- name: Fail on generated-file drift
run: |
if ! git diff --exit-code -- \
lib/api-zod/src/generated \
lib/api-client-react/src/generated; then
echo ""
echo "::error::OpenAPI codegen drift detected."
echo "The generated files in lib/api-zod/src/generated and"
echo "lib/api-client-react/src/generated do not match the"
echo "current openapi.yaml."
echo ""
echo "Fix: run the following locally and commit the result:"
echo " pnpm --filter @workspace/api-spec run codegen"
exit 1
fi
runtime-schema-smoke:
name: Boot api-server and validate every documented response
runs-on: ubuntu-latest
timeout-minutes: 10
needs: codegen-drift
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run runtime schema smoke
# The `smoke` script builds the api-server, spawns it in mock
# Lightning / dev mode, hits every documented operationId, and
# validates each response body against the matching generated
# Zod schema in lib/api-zod/src/generated. Fails the job on any
# status or schema mismatch, with a per-issue diff in the log.
run: pnpm --filter @workspace/api-spec run smoke