58 lines
2.0 KiB
YAML
58 lines
2.0 KiB
YAML
name: "Showcase: Runtime-Route Wiring (PR)"
|
|
|
|
# Pre-merge guard for the OSS-451 failure class: a demo page whose CopilotKit
|
|
# `runtimeUrl` points at an `/api/copilotkit-<demo>` route that does not exist,
|
|
# so the page 404s on load (runtime_info_fetch_failed) and never mounts.
|
|
#
|
|
# The existing Showcase Build Check (showcase_build_check.yml) is a Docker
|
|
# *build* — it compiles a page that references a non-existent route just fine,
|
|
# because `runtimeUrl` is an opaque string with no build-time link to the
|
|
# route's existence. That blind spot is exactly how OSS-451 shipped. This
|
|
# static check runs alongside the build check and asserts that every SHIPPED
|
|
# demo (a demo listed in its integration's manifest `features`) wires its
|
|
# `runtimeUrl` to a route that actually exists.
|
|
#
|
|
# Fast, no Docker, no secrets. Should be added to the branch-protection
|
|
# required checks so it blocks merge like the build check does.
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "showcase/integrations/**"
|
|
- "showcase/scripts/validate-runtime-routes.ts"
|
|
- "showcase/scripts/validate-runtime-routes.baseline.json"
|
|
- "showcase/scripts/package.json"
|
|
- ".github/workflows/showcase_validate-wiring.yml"
|
|
|
|
concurrency:
|
|
group: showcase-validate-wiring-${{ github.event.pull_request.number }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
validate-runtime-routes:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: "22"
|
|
|
|
- name: Install validator deps
|
|
working-directory: showcase/scripts
|
|
run: npm ci --no-audit --no-fund --ignore-scripts
|
|
|
|
- name: Validate runtime-route wiring (OSS-451 guard)
|
|
working-directory: showcase/scripts
|
|
run: npm run validate-routes
|