Skip to content

Commit 577aec0

Browse files
committed
chore(showcase-aimock): remove wrapper Dockerfile (Phase 3)
Railway now pulls ghcr.io/copilotkit/aimock:latest directly via a startCommand that fetches fixtures from GitHub raw URLs. The wrapper Dockerfile that copied fixtures into the image is no longer needed. Also updates README.md to reflect the new architecture: - References Railway startCommand instead of Dockerfile - Removes the Dockerfile entry from the fixtures listing - Updates related workflow descriptions
1 parent 8504638 commit 577aec0

2 files changed

Lines changed: 5 additions & 17 deletions

File tree

showcase/aimock/Dockerfile

Lines changed: 0 additions & 11 deletions
This file was deleted.

showcase/aimock/README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Deterministic LLM fixture server for showcase E2E testing. Replaces real LLM API calls (OpenAI, Anthropic, Gemini) with pre-recorded responses so Playwright tests can run PR-gated in CI without API keys and without rate limits or non-determinism.
44

5-
The image built from this directory is [`ghcr.io/copilotkit/showcase-aimock`](https://github.com/orgs/CopilotKit/packages/container/package/showcase-aimock) and is deployed to Railway as a sidecar alongside the showcase packages.
5+
Railway pulls [`ghcr.io/copilotkit/aimock:latest`](https://github.com/orgs/CopilotKit/packages/container/package/aimock) directly (no wrapper image). The fixtures in this directory are loaded at boot via GitHub raw URLs configured in the Railway service's `startCommand`.
66

77
## What aimock is
88

@@ -12,9 +12,8 @@ The showcase deployment runs aimock in proxy mode — `--proxy-only` with real u
1212

1313
## Fixtures in this directory
1414

15-
- **`feature-parity.json`** — 35+ fixtures covering the nine showcase demos across 17 packages: agentic chat (weather, backgrounds, themes), tool rendering (pie/bar charts, weather cards), HITL (plans, steps, approvals), Sales Dashboard (deals, pipelines, todos), and assorted meeting/flight/greeting prompts. Consumed by the per-package `test_e2e-showcase-on-demand` Playwright suites and by the Dockerfile-baked image.
15+
- **`feature-parity.json`** — 35+ fixtures covering the nine showcase demos across 17 packages: agentic chat (weather, backgrounds, themes), tool rendering (pie/bar charts, weather cards), HITL (plans, steps, approvals), Sales Dashboard (deals, pipelines, todos), and assorted meeting/flight/greeting prompts. Consumed by the per-package `test_e2e-showcase-on-demand` Playwright suites and loaded at Railway boot via GitHub raw URL.
1616
- **`smoke.json`** — a single minimal fixture (`userMessage: "Respond with exactly: OK"``content: "OK"`). Used by `/api/smoke` endpoints in each package to verify the aimock → package → UI round-trip without depending on a real agent.
17-
- **`Dockerfile`** — pins the upstream `ghcr.io/copilotkit/aimock:latest`, copies both fixtures into `/fixtures/`, and boots with `--proxy-only --validate-on-load` plus the three provider upstream URLs.
1817

1918
Fixture match semantics: `userMessage` is a substring match against the last user turn. First fixture to match wins, so more specific prompts should appear before more generic ones (see the `"Based on the following context, write a concise"` entry that precedes the generic `report` / `plan` fixtures to protect CrewAI's startup probe).
2019

@@ -24,7 +23,7 @@ Fixture match semantics: `userMessage` is a substring match against the last use
2423

2524
The safety net is two-layered load-time validation, not behavioral verification:
2625

27-
1. **Load-time schema validation** (`--validate-on-load` in the `Dockerfile` and in every test entrypoint that boots aimock) — the container refuses to start if any fixture uses an unrecognized response key (e.g. `text` instead of `content`). See [#3973](https://github.com/CopilotKit/CopilotKit/pull/3973).
26+
1. **Load-time schema validation** (`--validate-on-load` in the Railway `startCommand` and in every test entrypoint that boots aimock) — the container refuses to start if any fixture uses an unrecognized response key (e.g. `text` instead of `content`). See [#3973](https://github.com/CopilotKit/CopilotKit/pull/3973).
2827
2. **CI schema validation** (`showcase/scripts/__tests__/aimock-fixtures.test.ts`) — the `showcase_validate` workflow runs `loadFixtureFile` + `validateFixtures` from `@copilotkit/aimock` against every `showcase/aimock/*.json` on every PR. A broken fixture fails the PR before merge.
2928

3029
Neither layer catches **behavioral drift** — if a package's agent code changes what it asks the LLM (new prompt, new tool, renamed tool), the existing fixture keeps matching and keeps returning the old response. The test either keeps passing (wrong assertion) or fails at the UI-assertion layer (missing tool call, missing text), and a human has to trace it back to the fixture.
@@ -43,7 +42,7 @@ The process is manual. There is no CLI for this directory specifically — aimoc
4342
```
4443
./showcase/scripts/run-e2e-with-aimock.sh <slug> [test-filter]
4544
```
46-
5. Ship it. The `showcase_deploy` workflow picks up `showcase/aimock/**` changes and rebuilds the Railway image.
45+
5. Ship it. Fixture changes take effect on the next Railway service restart (aimock fetches fixtures from GitHub raw URLs at boot).
4746

4847
When a package's agent code changes in a way that changes its LLM calls, the person making the change is responsible for updating the corresponding fixture. There is no automation to remind you.
4948

@@ -62,5 +61,5 @@ There is no scheduled drift-detection job that compares fixture responses agains
6261

6362
- **`test_e2e-showcase-on-demand.yml`** (historically `showcase_aimock-e2e.yml`) — triggered by `/test-aimock <slug>` PR comments or `workflow_dispatch`. Installs `@copilotkit/aimock@latest`, boots it with `feature-parity.json`, spins up the target package's dev server against `OPENAI_BASE_URL=http://localhost:4010/v1`, and runs the package's Playwright suite. Posts pass/fail back to the PR.
6463
- **`showcase_validate.yml`** — runs fixture schema validation (`aimock-fixtures.test.ts`) on every PR that touches `showcase/**`.
65-
- **`showcase_deploy.yml`**rebuilds and redeploys the `showcase-aimock` Railway service whenever `showcase/aimock/**` changes.
64+
- **`showcase_deploy.yml`**builds and deploys all showcase services. aimock is no longer in this workflow's matrix (Railway pulls the upstream `ghcr.io/copilotkit/aimock:latest` image directly).
6665
- **`showcase_smoke-monitor.yml`** — every 15 minutes, polls `/api/smoke` on all deployed showcase packages. Those smoke endpoints internally hit aimock's `smoke.json` fixture to verify the full stack.

0 commit comments

Comments
 (0)