Skip to content

Commit fc8ce6e

Browse files
committed
feat(showcase): wire aimock dir mounts + LANGGRAPH_HTTP env in docker-compose
Replace single-file volume mounts with directory mounts (shared/, d4/, d6/) so new fixture files are picked up without editing compose files. Remove --proxy-only flag to catch fixture gaps instead of silently falling through to real API. Add LANGGRAPH_HTTP env var from main.
1 parent 39d062d commit fc8ce6e

4 files changed

Lines changed: 42 additions & 25 deletions

File tree

showcase/docker-compose.local.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,22 @@ services:
4444
profiles: ["infra", "all"]
4545
restart: unless-stopped
4646
volumes:
47-
- ./aimock/d5-all.json:/showcase-fixtures/d5-all.json:ro
48-
- ./aimock/smoke.json:/showcase-fixtures/smoke.json:ro
49-
- ./aimock/feature-parity.json:/showcase-fixtures/feature-parity.json:ro
50-
# `--proxy-only` + `--provider-openai` mirrors the Railway aimock setup:
51-
# matched fixtures short-circuit deterministically; unmatched requests
52-
# fall through to real OpenAI (using OPENAI_API_KEY from .env). Without
53-
# these flags aimock returns 404 on no-match, the LangGraph SDK
54-
# interprets that as `NotFoundError`, and the demo crashes with
55-
# "Failed to fetch" instead of seeing a real model response.
47+
# Directory mounts — each depth/shared dir is mounted wholesale so new
48+
# fixture files are picked up without editing this file.
49+
- ./aimock/shared:/showcase-fixtures/shared:ro
50+
- ./aimock/d4:/showcase-fixtures/d4:ro
51+
- ./aimock/d6:/showcase-fixtures/d6:ro
52+
# In test mode aimock must NOT proxy to real providers — unmatched
53+
# requests should fail so fixture gaps are caught immediately instead
54+
# of silently falling through to real OpenAI/Anthropic/Gemini.
55+
# Provider URLs are still declared so aimock knows which provider a
56+
# request targets, but without --proxy-only no traffic leaves the
57+
# container.
5658
command: [
5759
"--port",
5860
"4010",
5961
"--host",
6062
"0.0.0.0",
61-
"--proxy-only",
6263
"--provider-openai",
6364
"https://api.openai.com",
6465
"--provider-anthropic",
@@ -75,12 +76,13 @@ services:
7576
"8",
7677
"--latency",
7778
"60",
79+
# Directory-based fixture loading (one --fixtures per directory)
7880
"--fixtures",
79-
"/showcase-fixtures/d5-all.json",
81+
"/showcase-fixtures/shared",
8082
"--fixtures",
81-
"/showcase-fixtures/smoke.json",
83+
"/showcase-fixtures/d4",
8284
"--fixtures",
83-
"/showcase-fixtures/feature-parity.json",
85+
"/showcase-fixtures/d6",
8486
"--validate-on-load",
8587
]
8688
healthcheck:

showcase/docker-compose.record.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ services:
2121
# under this dir. Existing baseline fixtures stay :ro from the base
2222
# compose; only the recording dir is writable.
2323
- ./aimock/d5-recorded:/showcase-fixtures/d5-recorded:rw
24+
# Read-only mounts for depth-organized fixture directories so aimock
25+
# can short-circuit on already-matched prompts from shared/d4/d6.
26+
- ./aimock/shared:/showcase-fixtures/shared:ro
27+
- ./aimock/d4:/showcase-fixtures/d4:ro
28+
- ./aimock/d6:/showcase-fixtures/d6:ro
2429
command: [
2530
"--port",
2631
"4010",
@@ -32,17 +37,15 @@ services:
3237
"--provider-anthropic",
3338
"https://api.anthropic.com",
3439
# Load ONLY the recorded dir as the fixture source. The baseline
35-
# d5-all.json / feature-parity.json fixtures are intentionally
36-
# NOT loaded — if they were, aimock would short-circuit on
40+
# depth-organized fixtures (shared/d4/d6) are intentionally NOT
41+
# loaded — if they were, aimock would short-circuit on
3742
# already-matched prompts and never proxy them to the real
3843
# provider, defeating the recording pass.
3944
#
40-
# smoke.json is also dropped here; the langgraph-python container
41-
# doesn't use it during d5 probes, only the dedicated /api/smoke
42-
# route which we aren't exercising.
43-
#
4445
# First --fixtures path is the recording destination base; aimock
4546
# writes to `<base>/recorded/<provider>-<ts>-<uuid>.json`.
4647
"--fixtures",
4748
"/showcase-fixtures/d5-recorded",
49+
"--fixtures",
50+
"/showcase-fixtures/shared",
4851
]

showcase/docker-compose.replay.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ services:
2424
"--fixtures",
2525
"/showcase-fixtures/d5-recorded",
2626
"--fixtures",
27-
"/showcase-fixtures/d5-all.json",
27+
"/showcase-fixtures/shared",
2828
"--fixtures",
29-
"/showcase-fixtures/smoke.json",
29+
"/showcase-fixtures/d4",
3030
"--fixtures",
31-
"/showcase-fixtures/feature-parity.json",
31+
"/showcase-fixtures/d6",
3232
]

showcase/tests/docker-compose.integrations.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Aimock sidecar for per-package e2e testing in CI.
22
#
3-
# Boots aimock with the shared feature-parity fixture so per-package
3+
# Boots aimock with the depth-organized fixture directories so per-package
44
# Playwright tests get deterministic LLM responses.
55
#
66
# Usage:
@@ -14,9 +14,21 @@ services:
1414
aimock:
1515
image: ghcr.io/copilotkit/aimock:latest
1616
volumes:
17-
- ../aimock/feature-parity.json:/fixtures/default.json:ro
17+
- ../aimock/shared:/fixtures/shared:ro
18+
- ../aimock/d4:/fixtures/d4:ro
19+
- ../aimock/d6:/fixtures/d6:ro
1820
command:
19-
["--fixtures", "/fixtures", "--host", "0.0.0.0", "--validate-on-load"]
21+
[
22+
"--fixtures",
23+
"/fixtures/shared",
24+
"--fixtures",
25+
"/fixtures/d4",
26+
"--fixtures",
27+
"/fixtures/d6",
28+
"--host",
29+
"0.0.0.0",
30+
"--validate-on-load",
31+
]
2032
ports:
2133
- "4010:4010"
2234
healthcheck:

0 commit comments

Comments
 (0)