Skip to content

showcase-ops: replace GH Actions cron/alert workflows with in-cluster Railway service - #4113

Merged
jpr5 merged 12 commits into
mainfrom
feat/showcase-ops
Apr 22, 2026
Merged

jpr5 merged 12 commits into
mainfrom
feat/showcase-ops

Conversation

@jpr5

@jpr5 jpr5 commented Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

New in-cluster Railway service showcase-ops replaces four GitHub Actions cron/alert workflows for the CopilotKit showcase. PocketBase-backed state, declarative YAML alert DSL, a reusable probe-driver architecture, and server-side-filtered SSE into the dashboard.

Why

The legacy showcase alert stack was four ad-hoc cron workflows (showcase_smoke-monitor.yml, showcase_drift-detection.yml, showcase_drift-report.yml, showcase_redirect-report.yml) each persisting state via actions/cache + loose JSON + scattered jq -n --rawfile message assembly. This PR replaces that with:

  • One alert-state store (PocketBase) instead of four ad-hoc persistence mechanisms.
  • One structured-payload renderer (two-phase filter extraction, triple-brace safe-field allow-list) instead of ~20 scattered jq / toJSON(format()) / printf '%b' sites.
  • One typed PB client with unified 401 re-auth, 429 Retry-After, network/5xx backoff.
  • One transition detector (pure function) — state-machine logic exists in exactly one place.
  • One probe-driver contract (ProbeDriver<Input, Signal>) + discovery-source contract (DiscoverySource<Output>) so every future probe shares one loader + invoker + typed-error taxonomy, configured declaratively via YAML.

Adding a new dimension is now: add a driver + YAML + registry line. No core changes required.

Dimensions covered

health, smoke, image_drift, version_drift, pin_drift, e2e_smoke (scaffolded, runner deferred), redirect_decommission, aimock_wiring, deploy.

Deleted in this PR

  • .github/workflows/showcase_smoke-monitor.yml
  • .github/workflows/showcase_drift-detection.yml
  • .github/workflows/showcase_drift-report.yml
  • .github/workflows/showcase_redirect-report.yml
  • showcase/scripts/generate-status.ts
  • showcase/shell/src/data/status.json
  • showcase/shell-dashboard/src/lib/status.ts
  • The notify: job of showcase_deploy.yml (replaced by a signed POST to /webhooks/deploy)

Commit layout (12)

Each commit is a coherent area; commit-by-commit review works cleanly.

  1. `chore(repo)` — root workspace config + top-level showcase docs
  2. `feat(examples/v2)` — rename interrupts-langraph → interrupts-langgraph + integration cleanup
  3. `chore(showcase/packages)` — QA markdown parity across all packages + integration tooling
  4. `feat(showcase/shell-docs)` — error-boundary consolidation + docs components
  5. `feat(showcase/shell-dashboard)` — live PocketBase status wiring + tests
  6. `refactor(showcase/scripts)` — extract pure-TS cores for pin-drift + redirect-decommission
  7. `feat(showcase/pocketbase)` — service (migrations + hooks + Docker)
  8. `feat(showcase/ops)` — core service (HTTP + HMAC + metrics + orchestrator + rules + render + storage + scheduler + targets)
  9. `feat(showcase/ops)` — alert rule DSL + engine + YAML configs
  10. `feat(showcase/ops)` — probe driver architecture + 6 drivers + 2 discovery sources + YAML configs
  11. `feat(showcase/ops)` — Dockerfile + README + rotation drill
  12. `ci` — retire legacy cron workflows + `test_*` rename + showcase_deploy webhook wiring

Test plan

  • `pnpm -F @copilotkit/showcase-ops typecheck` — clean
  • `pnpm -F @copilotkit/showcase-ops test` — 692 tests passing across 37 files
  • `pnpm -F @copilotkit/showcase-ops build` — clean
  • `showcase/shell-dashboard` typecheck + test + build — clean
  • `docker build -f showcase/ops/Dockerfile .` — builds clean (Playwright chromium included)
  • `docker build -f showcase/pocketbase/Dockerfile showcase/pocketbase/` — builds clean
  • `docker build -f showcase/shell-dashboard/Dockerfile .` — builds clean
  • Deploy `showcase-ops` + `showcase-pocketbase` to Railway and observe one red→red and one red→green transition
  • Fire deploy webhook with valid HMAC — alert lands in `#oss-alerts`
  • Fire deploy webhook with stale timestamp (>300s) or wrong signature — request rejected, `webhook_rejections` counter increments
  • Playwright visual regression at iPhone SE (375×667), iPhone 14 Pro Max (430×932), Desktop (1440×900) under all-green, mixed, and all-unknown states

Design spec

Notion: showcase-ops design spec · Probe drivers design

@vercel

vercel Bot commented Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat-with-your-data Ready Ready Preview, Comment Apr 22, 2026 6:04pm
docs Ready Ready Preview, Comment Apr 22, 2026 6:04pm
form-filling Ready Ready Preview, Comment Apr 22, 2026 6:04pm
research-canvas Ready Ready Preview, Comment Apr 22, 2026 6:04pm
travel Ready Ready Preview, Comment Apr 22, 2026 6:04pm

Request Review

@jpr5
jpr5 force-pushed the feat/showcase-ops branch from f20a110 to d8d3ae8 Compare April 21, 2026 07:42
@vercel
vercel Bot temporarily deployed to Preview – form-filling April 21, 2026 07:45 Inactive
@vercel
vercel Bot temporarily deployed to Preview – chat-with-your-data April 21, 2026 07:45 Inactive
jpr5 added a commit that referenced this pull request Apr 21, 2026
…nvention (Bundle 6)

Renames 7 workflows to the `test_<layer>-<target>` naming scheme, with `name:` fields
normalized to `test / <layer> / <target>` for the CI UI. The showcase_smoke-monitor
rename from the source branch is intentionally SKIPPED — showcase-ops (#4113) deletes
that workflow entirely in favor of runtime probes.

Renames (git mv):
- e2e_dojo.yml               → test_e2e-dojo.yml
- e2e_examples.yml           → test_e2e-legacy-v1.yml
- showcase_aimock-e2e.yml    → test_e2e-showcase-on-demand.yml
- test_doc-examples.yml      → test_integration-docs.yml
- test_runtime-servers.yml   → test_integration-runtime.yml
- starter_deployed_smoke.yml → test_smoke-starter-deployed.yml
- starter-smoke.yml          → test_smoke-starter.yml

For test_e2e-showcase-on-demand.yml: `git mv` on main's current content (not the
source branch's older version) preserves the 5 hardening commits — readiness probes,
trust-gate layers, pip wheel fallback, CR5-CR8 security fixes. Only the `name:` field
is updated from the rename branch.

Consumer references updated:
- examples/e2e/AGENTS.md            — 2 refs to e2e_examples.yml
- showcase/QA-COVERAGE.md           — 2 refs to showcase_aimock-e2e.yml
- showcase/scripts/create-integration/index.ts — 4 refs to starter-smoke.yml
- showcase/scripts/__tests__/create-integration.test.ts — 1 ref to starter-smoke.yml
- showcase/TESTING.md               — full matrix + footnotes + dropped the now-deleted showcase_smoke-monitor row
- showcase/aimock/README.md         — inline prose ref consistency

Self-references inside each renamed workflow also updated where present.
@vercel
vercel Bot temporarily deployed to Preview – form-filling April 21, 2026 17:02 Inactive
@vercel
vercel Bot temporarily deployed to Preview – chat-with-your-data April 21, 2026 17:02 Inactive
@pkg-pr-new

pkg-pr-new Bot commented Apr 22, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@copilotkit/a2ui-renderer

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/a2ui-renderer@4113

@copilotkitnext/angular

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkitnext/angular@4113

copilotkit

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/copilotkit@4113

@copilotkit/core

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/core@4113

@copilotkit/react-core

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/react-core@4113

@copilotkit/react-textarea

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/react-textarea@4113

@copilotkit/react-ui

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/react-ui@4113

@copilotkit/runtime

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/runtime@4113

@copilotkit/runtime-client-gql

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/runtime-client-gql@4113

@copilotkit/sdk-js

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/sdk-js@4113

@copilotkit/shared

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/shared@4113

@copilotkit/sqlite-runner

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/sqlite-runner@4113

@copilotkit/voice

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/voice@4113

copilotkit-vscode-extension

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/copilotkit-vscode-extension@4113

@copilotkit/web-inspector

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/web-inspector@4113

commit: a1e9f40

jpr5 added 12 commits April 22, 2026 10:50
Bump pnpm-lock / package.json / pnpm-workspace / lefthook.yml for the
showcase-ops branch, add FRONTEND-STRATEGY / TESTING / QA-COVERAGE /
INTEGRATION-CHECKLIST top-level showcase docs + aimock README, refresh
showcase/.gitignore + showcase/shared/constraints.yaml.
…integration cleanup

Fix the long-standing typo across the example directory name + module
identifiers, align imports + package names. Also touches examples/integrations/adk
docker-compose fixtures and examples/e2e agents reference doc.
Rename hitl.md → hitl-in-chat.md across all 17 showcase packages,
add shared-state-read / shared-state-write / shared-state-streaming /
gen-ui-agent / subagents QA docs where missing, update demos/hitl
README cross-links. Refresh showcase/shell + shell-dojo registry +
demo-content JSON to match new QA shape. Update integration tooling
(audit, create-integration, bundle-demo-content, generate-registry,
validate-parity, capture-previews, manifest lib) + e2e tests to the
new parity contract.
…ents

Drop error-boundary-card in favour of Next.js error.tsx at each route,
refresh docs components (brand-nav, docs-callout, docs-page-view,
docs-steps, docs-tabs, framework-provider/selector/tabs,
property-reference, router-pivot, sidebar-link, snippet), update
docs-render + mdx-registry + reference-items for the new QA shape.
Replace the static status.json feed with a live PocketBase subscription
(useLiveStatus / useLastTransition hooks + live-status lib + pb client),
add vitest + playwright visual test setup, wire feature-grid + cell
pieces + badges to the live data model. Adds Dockerfile + .dockerignore
for Railway deployment of the dashboard.
…irect-decommission

Extract drift-comparison logic out of validate-pins.ts into
validate-pins-core.ts (pure module, CLI re-exports + remains thin
orchestrator) and extract the formatter out of
redirect-decommission-report.ts into redirect-decommission-core.ts.
Add vitest coverage for both cores with baseline fixtures so
showcase-ops ProbeDrivers can reuse the same logic without forking.
Drop legacy generate-status.ts — superseded by showcase-ops live
status feed.
PocketBase backend for showcase-ops: Dockerfile + entrypoint for the
Railway-hosted instance, JSVM main.pb.js hook for CORS + request
shaping, migration sequence creating status / status_history /
alert_state collections, CORS config, and the recreate_collections
v1/v2 + drop_history_fail_count schema drift corrections.
…r + rules + render + storage + scheduler + targets)

In-cluster Railway service replacing the legacy cron-based GH Actions
workflows. Core pieces:
- Hono HTTP server with HMAC-signed webhook ingress + Prometheus
  metrics + deploy webhook handler (src/http/*)
- structured logger with log-level filtering (src/logger.ts)
- event bus + transition detector (src/events/*)
- orchestrator wiring rule + probe + target registries and the
  scheduler loop (src/orchestrator.ts)
- rule loader + Zod schema for alert YAML (src/rules/*)
- Mustache renderer + regex filter helpers with triple-brace
  safe-field allow-list (src/render/*)
- scheduler loop + bounded concurrency (src/scheduler/*)
- PocketBase client + alert-state store + S3 backup (src/storage/*)
- Slack webhook target (src/targets/*)
- shared types (src/types/index.ts)
- legacy probes (aimock-wiring, smoke, pin-drift, redirect-decommission,
  deploy-result) kept as authoritative signal shapes; drivers wrap these
Plus load-test + notify-ops-jq scripts + valid/invalid rule test
fixtures.
Alert rule DSL with Mustache templates, trigger-flags + transition
matching, closed-enum registries for kind/dimension/signal-filter/
action, triple-brace safe-field allow-list enforcement, escalation +
suppress guards. Ships 8 alert YAML rules:
- _defaults.yml (shared template + severity)
- smoke-red-tick, aimock-wiring-drift, image-drift, deploy-result,
  pin-drift-weekly, version-drift-weekly,
  redirect-decommission-monthly, e2e-smoke-failure

Each rule maps 1:1 onto a retired GH Actions cron workflow + keeps the
existing Slack message shape so #oss-alerts consumers are unchanged.
…ry sources + YAML configs

Split the probe system into reusable contracts so every future probe
can share one loader + invoker + discovery enumeration path:
- ProbeDriver<Input, Signal> + DiscoverySource<Output> contracts
  (src/probes/types.ts)
- ProbeConfigSchema Zod union (static targets / discovery-driven /
  single-target) + chokidar-watched probe-loader + probe-invoker with
  AbortController-based per-target timeout + bounded concurrency
  (src/probes/loader/*)
- DiscoverySource typed error classes (Auth / Backend / Transport /
  Schema) + railway-services + pnpm-packages discovery sources
  (src/probes/discovery/*)
- 6 probe drivers: smoke (paired health side-emit), aimock-wiring,
  image-drift, pin-drift, version-drift, redirect-decommission.
  e2e-smoke driver scaffolded but unregistered pending runner wiring.
  redirect-decommission ships an inlined hermetic copy of the CLI
  formatter + seo-redirects catalogue to avoid runtime dynamic imports
  (src/probes/drivers/*)
- 6 probe YAML configs: smoke.yml, aimock-wiring.yml, image-drift.yml,
  pin-drift.yml, version-drift.yml, redirect-decommission.yml.
  Orchestrator registers these at boot; YAML edits hot-reload via
  chokidar + reloads/failures emit on the event bus.

Tests: 95% line-coverage floor on drivers + discovery, fixtures for
every driver's happy + error paths.
Multi-stage Dockerfile built on bookworm-slim with Playwright chromium
pre-installed (e2e-smoke runner) + pnpm-workspace.yaml + every
workspace package.json COPYd so the runtime stage resolves workspace:*
deps. README organised operate-first / build-second so an on-call
operator can configure + inspect the service before needing to rebuild
it. Rotation drill doc captures the weekly / monthly schedule for
pin-drift + redirect-decommission audits.
…bhook wiring

Retire 4 cron-based GH Actions workflows now replaced by showcase-ops
probe drivers:
- showcase_drift-detection.yml
- showcase_drift-report.yml
- showcase_redirect-report.yml
- showcase_smoke-monitor.yml

Standardise workflow naming (test_* prefix):
- e2e_dojo.yml → test_e2e-dojo.yml
- e2e_examples.yml → test_e2e-legacy-v1.yml
- showcase_aimock-e2e.yml → test_e2e-showcase-on-demand.yml
- test_doc-examples.yml → test_integration-docs.yml
- test_runtime-servers.yml → test_integration-runtime.yml
- starter_deployed_smoke.yml → test_smoke-starter-deployed.yml
- starter-smoke.yml → test_smoke-starter.yml

showcase_deploy.yml: POST deploy-result webhook to showcase-ops after
every deploy so the alert engine ingests the outcome (replaces the
inline Slack curl + GitHub status update).

static_check-binaries.yml: minor refresh for the new workflow names.

This branch had an error being deployed

1 failed (outdated) and 5 active deployments
Preview – travel — 89eb0734 Deployed Apr 22, 2026 by vercel[bot]
Preview – research-canvas — 89eb0734 Deployed Apr 22, 2026 by vercel[bot]
Preview – docs — 89eb0734 Deployed Apr 22, 2026 by vercel[bot]
Preview – chat-with-your-data — 89eb0734 Deployed Apr 22, 2026 by vercel[bot]
Preview – form-filling — 89eb0734 Deployed Apr 22, 2026 by vercel[bot]
showcase / production — 9d3ab58c Deployed Apr 21, 2026 by railway-app[bot]
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