Commit Graph

4085 Commits

Author SHA1 Message Date
Jordan Ritter 2cb4e26469 feat(showcase): add aimock-rebuild, diff-logs, doctor, and fixtures CLI commands
cmd-aimock-rebuild: full rebuild-redeploy cycle with Depot bypass and
  health check timeout.
cmd-diff-logs: time-windowed container logs with --since last-test
  integration.
cmd-doctor: 10 diagnostic checks (Docker, Depot, ports, stale images,
  env vars, compose config, aimock health, disk, network, DNS).
cmd-fixtures: jq-based fixture validation (syntax, duplicates,
  turnIndex gaps, empty responses, orphaned sub-agent references).
2026-04-28 22:29:34 -07:00
Jordan Ritter 75504f900b feat(showcase): add logs, test, and recreate CLI commands
cmd-logs: container log tailing with --grep, --since, -n, --no-follow.
cmd-test: probe runner with --d5/--d6 filtering, --cycle for aimock log
  dump on failure, --timeout forwarding, .last-test-ts marker.
cmd-recreate: force-recreate with optional --build, routes aimock to
  its dedicated compose file.
2026-04-28 22:29:27 -07:00
Jordan Ritter 58b423d167 feat(showcase): add unified CLI dispatcher and shared utilities
bin/showcase auto-discovers cmd-*.sh plugins, routes built-in commands
(up/down/build/ps/ports), and provides stage_shared/restore_symlinks
for Docker Compose volume management.

_common.sh provides shared variables (SHOWCASE_ROOT, COMPOSE_CMD,
COMPOSE_FILE), output helpers (die/info/warn/success), and container
utilities (slug_to_container, slug_to_port, wait_healthy).
2026-04-28 22:29:21 -07:00
Jordan Ritter 8d7e850c22 chore: bump @copilotkit/aimock to latest (v1.16.1)
Needed for turnIndex/sequenceIndex fixture matching in D5 multi-turn
conversations. Updated in both packages/runtime (devDep) and
showcase/scripts (dep).
2026-04-28 22:21:02 -07:00
Jordan Ritter 17e7e0a406 fix(showcase): add missing D5 demo entries and feature IDs to manifests
Add demo entries for hitl, hitl-in-app, hitl-in-chat, tool-rendering,
shared-state-read-write, and gen-ui-tool-based across 14 integrations.
Ensure every demo ID also appears in the features list so the showcase
matrix and D5 probes discover them correctly.
2026-04-28 22:20:58 -07:00
Jordan Ritter 2fc196aa8b fix(showcase): guard preferences-card.tsx against undefined interests
STATE_SNAPSHOT can deliver a Preferences object with interests undefined,
crashing .includes(), .filter(), and spread at 4 sites per file. Add
(value.interests ?? []) guards across all 17 integrations.
2026-04-28 22:20:53 -07:00
github-actions[bot] aa2c727996 style: auto-fix formatting 2026-04-29 04:27:05 +00:00
Jordan Ritter 7a25435c8b fix(showcase): correct Mastra createTool execute signatures in packages/mastra 2026-04-28 21:17:55 -07:00
Jordan Ritter 15025c8012 Merge slot B2 into blitz/d5-mastra-fixes/integration 2026-04-28 20:45:43 -07:00
Jordan Ritter 6a4c25a24d fix: add nested sub-agent fixtures for D5 mcp-subagents demo
Add 3 fixtures for the independent LLM calls made by each sub-agent
tool (research_agent, writing_agent, critique_agent) so the demo works
without --proxy-only mode. Interleave them with supervisor fixtures for
readability. Rebuild d5-all.json bundle.
2026-04-28 20:45:00 -07:00
Jordan Ritter 2bbfa86747 fix: correct Mastra createTool execute callback signature
The first parameter of Mastra ToolAction.execute is the raw
Zod-validated input, not a destructured wrapper. Changed all 4
tools from ({ context }, executionContext) to (inputData,
executionContext) and updated field accesses accordingly.
2026-04-28 20:43:21 -07:00
github-actions[bot] 45a71343c7 style: auto-fix formatting 2026-04-29 02:56:56 +00:00
Jordan Ritter bd0b32525f fix: resolve merge conflict in aimock-wiring.ts (ops→harness rename + starter exclusions) 2026-04-28 19:55:29 -07:00
Jordan Ritter 2001a40862 Merge slot B3 into blitz/dash-fixes/integration 2026-04-28 19:32:54 -07:00
Jordan Ritter 28ada130ed Merge slot B4 into blitz/dash-fixes/integration 2026-04-28 19:32:50 -07:00
Jordan Ritter 0f15d507df Merge slot B2 into blitz/dash-fixes/integration 2026-04-28 19:32:46 -07:00
Jordan Ritter 1a05269d4f test: add overlay selector integration tests with real UI components
Renders ComposedCell with real CellStatus, DocsRow, DepthChip, and Badge
components (only data layer mocked) to verify that overlay toggles
actually control visible content. Covers all 5 overlays individually,
key combinations (Health+Docs, Health-without-Docs), all 3 presets
(Catalog, Assessment, Parity Review), testing-kind D5/D6 hiding, and
the critical regression test proving Health-only no longer leaks docs
indicators after the CellStatus DocsRow removal fix.
2026-04-28 19:31:50 -07:00
Jordan Ritter a66b59cc50 fix: exclude decommissioned showcase-starter-* services from all probes
All 17 showcase-starter-* Railway services were stopped and deployments
halted (PR #4390), but the probe discovery still enumerated them via the
namePrefix: "showcase-" filter. This caused probes to scan dead endpoints
and generate false-red alerts.

Add all 17 starter service names to nameExcludes in every probe YAML
that uses railway-services discovery (smoke, e2e-smoke, e2e-deep,
e2e-demos, e2e-parity, image-drift) and to the EXCLUDE_SERVICES set
in aimock-wiring.ts.
2026-04-28 19:28:18 -07:00
Jordan Ritter 0b28c07946 fix: convert raw UTC timestamps to browser-local timezone in dashboard
Add shared formatTs() utility that converts ISO 8601 UTC strings to
the user's local timezone via toLocaleString(). Apply it to all raw
timestamp interpolation sites in tooltip/badge/drilldown rendering:
- live-status.ts formatTooltip() (4 sites)
- cell-pieces.tsx formatTransitionLine() (3 sites)
- level-strip.tsx resolveBadge() (1 site)
- cell-drilldown.tsx refactored to use shared formatTs()

Update existing live-status tests to expect formatted timestamps.
Add unit tests for formatTs() covering valid/invalid inputs.
2026-04-28 19:26:50 -07:00
Jordan Ritter 9af3e727f5 fix: remove duplicate DocsRow rendering from CellStatus
CellStatus unconditionally rendered DocsRow for non-testing features,
causing docs indicators (docs-og, docs-shell) to appear in matrix cells
whenever the Health overlay was active — even when the Docs overlay was
toggled OFF. DocsLayer in ComposedCell already handles docs rendering
correctly, gated on overlays.has("docs"). Remove the redundant DocsRow
from CellStatus so docs indicators respect the overlay toggle.
2026-04-28 19:26:25 -07:00
Jordan Ritter abf835d327 fix(showcase): migrate D5 fixtures from toolCallId to turnIndex (#4404)
## Summary

Migrates all D5 (e2e-deep) fixtures from the `toolCallId` workaround (PR
#4398) to aimock's native `turnIndex` matching shipped in v1.16.0.

- Removes all `toolCallId` match criteria from 9 fixture files (8 source
+ 1 bundle)
- Adds `turnIndex` values (counts assistant messages in request history)
- Reorders fixtures to natural 0→N reading order
- Response bodies and tool call IDs in responses untouched

## Why

`toolCallId` was a stateless workaround for the broken `sequenceIndex`
global counter. It required agent frameworks to return the exact
`tool_call_id` from the fixture response — if they generated their own
ID, the second-leg fixture never matched. This was the likely cause of
the remaining 10 e2e-deep failures (shared-state: 9, subagents: 8).

`turnIndex` counts `role: "assistant"` messages in the request's message
array. Zero server-side state, concurrent-safe,
fixture-ordering-insensitive, and agnostic to what `tool_call_id` the
agent framework generates.

## Test plan

- [ ] All JSON files parse successfully (validated locally)
- [ ] Merge to main → aimock restarts and fetches updated fixtures
- [ ] Trigger e2e-deep probe, verify improvement (expect shared-state +
subagents to fix)
2026-04-28 18:15:06 -07:00
Jordan Ritter 23e8ed312f fix(showcase): showcase-harness build + test fixes (#4403)
## Summary
- Add missing `commander` dependency to showcase-harness
- Fix CLI runner type alignment with renamed driver input schemas
(SmokeInput, ChatToolsInput)
- Fix 16 pre-existing test failures from smoke-red-tick.yml deletion in
#4388
- Fix e2e-deep test timeout (5s → 15s for stall-evaluate retry pattern)

## Test plan
- [x] `tsc -p tsconfig.build.json` passes
- [x] 1316/1316 tests pass locally (0 failures)
2026-04-28 18:11:32 -07:00
Jordan Ritter a2bc64692f fix(showcase): migrate D5 fixtures from toolCallId to turnIndex
aimock v1.16.0 ships native turnIndex matching — counts assistant
messages in the request's message array instead of relying on
toolCallId in the last tool message. Stateless, concurrent-safe,
fixture-ordering-insensitive.

Removes all toolCallId match criteria from 9 D5 fixture files (8
source + 1 bundle), adds turnIndex values, and reorders fixtures
to natural 0→N reading order.
2026-04-28 18:10:25 -07:00
Jordan Ritter 00462bccbc fix(showcase): fix pre-existing test failures from smoke-red-tick deletion and e2e-deep timeout
The rename PR (#4388) deleted smoke-red-tick.yml from config/alerts/
and test/fixtures/rules/valid/ but left 16 tests referencing it:

- render-red-tick.test.ts: removed smoke-red-tick.yml from YAMLS array
  and deleted two smoke-specific tests (endpoint link rendering)
- rule-loader.test.ts: replaced smoke-red-tick.yml fixture references
  with agent-red-tick.yml; created matching valid fixture; removed the
  smoke-red-tick describe block from full YAML contract coverage
- e2e-deep.test.ts: increased timeout on failure_turn test from 5s to
  15s -- fillAndVerifySend retry loop (3 x 2s) exceeds 5s when
  stallEvaluate prevents user message count growth
2026-04-28 18:06:18 -07:00
Jordan Ritter 016f355cd3 fix: hydration-safe initialization for useOverlays and useCollapsible 2026-04-28 18:05:55 -07:00
Jordan Ritter 795a56953e fix(showcase): fix showcase-harness build — commander dep + cli runner type alignment
Add missing `commander` dependency to showcase-harness package.json
(imported in cli.ts but never declared). Add index signatures to
SmokeInput and ChatToolsInput interfaces in targets.ts so they satisfy
the `{ [k: string]: unknown }` constraint from the Zod `.passthrough()`
schemas used by the liveness and e2e-chat-tools drivers.
2026-04-28 17:55:46 -07:00
Jordan Ritter b6e58e7429 fix: TallyTrigger hydration mismatch causing production crash
Remove conditional early return that rendered different DOM structures
on server vs client (bare fragment vs div>button wrapper). All hooks
now run unconditionally; interaction is disabled via guards when items
array is empty. Fixes React errors #418 and #310.
2026-04-28 17:53:27 -07:00
Jordan Ritter 57988fe9bc fix: persistent browser pool to eliminate Chromium thundering herd (#4343)
## Summary

- Pre-launches 4 Chromium instances at service boot; probes check
out/return `BrowserContext` handles instead of spawning fresh processes
per tick
- Eliminates `pthread_create: EAGAIN` failures when multiple e2e probes
fire simultaneously (root cause of crewai-crews + langgraph-fastapi
timeouts at aligned cron ticks)
- Recycles browsers after 100 contexts (configurable via
`BROWSER_POOL_RECYCLE_AFTER`) to prevent native memory drift
- Staggers e2e-demos cron from minute 0 → minute 5 to reduce probe
alignment overlap

## Validation

- **Benchmark**: 1.16x speedup, +46MB resident cost, recycling at 55ms
with zero degradation
- **Docker red-green test**: Pool of 4 browsers serving 12 simultaneous
contexts succeeds under the same `ulimit nproc` constraint that causes
12 simultaneous `chromium.launch()` to fail with EAGAIN
- **Test suite**: 1320 tests pass, typecheck + build clean

## Test plan

- [ ] Verify showcase-ops builds and deploys on Railway
- [ ] Monitor next e2e-smoke + e2e-deep overlap tick for absence of
EAGAIN errors
- [ ] Confirm pool stats visible in /metrics endpoint (future: expose
pool.stats())
- [ ] Verify e2e-demos fires at :05 past the hour instead of :00
2026-04-28 17:49:11 -07:00
Jordan Ritter a75f4c5258 feat(showcase): local CLI for Dn parity testing (#4396)
## Summary

- Adds a local CLI (`showcase/harness/src/cli.ts`) that lets developers
run Dn parity tests against Docker Compose containers without Railway or
CI
- Hardens `docker-compose.local.yml` with YAML anchors, healthchecks on
all 20 services, profiles, and switches aimock to the published GHCR
image
- CLI supports `up`/`down`/`test`/`rebuild`/`ps`/`logs`/`status`
commands with `--smoke`/`--d4`/`--d5` shorthand flags

## Why

Debugging Dn failures currently requires pushing to a branch and waiting
for CI + Railway. This gives Claude and developers a fully local loop:
`showcase test --d5 langgraph-python` spins up the container, runs
probes, and reports results in seconds. Three use cases: (1) Claude
debugging Dn failures by cutting Railway out of the loop, (2) developers
building new columns/cells/rows and testing iteratively, (3) background
automation testing during development.

## What changed

| Commit | Area |
|--------|------|
| `fix(showcase): harden docker-compose.local.yml` |
x-integration-defaults anchor, aimock→GHCR, healthchecks, profiles,
pocketbase/dashboard infra |
| `feat: CLI entry point + config` | Commander CLI, flags, mutual
exclusion, config loader |
| `feat: lifecycle manager` | Profile-aware compose wrapper, ENOENT
detection, caching |
| `feat: target resolution` | Driver input builders, manifest validation
|
| `feat: test runner` | Probe orchestration, Playwright adapter, SIGINT,
PB reuse |
| `feat: results formatter` | Console table output, createPbWriter
factory |
| `chore: format` | oxfmt cleanup |

## Test plan

- [ ] `docker compose -f showcase/docker-compose.local.yml --profile
infra up -d` starts aimock + pocketbase + dashboard with healthchecks
passing
- [ ] `docker compose -f showcase/docker-compose.local.yml --profile
langgraph-python up -d` starts the integration container and depends_on
aimock healthy
- [ ] CLI `--smoke` and `--level smoke` produce equivalent behavior
- [ ] CLI `--smoke --level d4` exits with mutual exclusion error
- [ ] `down` with no args tears down all profiled services
- [ ] `isRunning` correctly reports infra services (which have
`["infra", "all"]` profiles, not per-name profiles)
2026-04-28 17:46:40 -07:00
github-actions[bot] b1146b2c2a style: auto-fix formatting 2026-04-29 00:40:27 +00:00
Jordan Ritter 342b1604df docs(showcase): note CLI works from any directory 2026-04-28 17:37:58 -07:00
Jordan Ritter c31f75382c feat(showcase): add bin/showcase wrapper for simpler CLI invocation
Shell script resolves cli.ts relative to its own location, so it works
from any cwd. Update README quick start to use the wrapper.
2026-04-28 17:36:02 -07:00
Jordan Ritter 132070f998 docs(showcase): fix quick start to use CLI for container lifecycle
The CLI manages up/down/rebuild directly — no need to drop to
dev-local.sh in the quick start flow.
2026-04-28 17:34:32 -07:00
Jordan Ritter c312a09e76 feat(shell-dashboard): tally breakdown tooltips on column header counts (#4397)
## Summary

- Hovering/clicking a tally count (✓ N, ~ N, × N) in column headers now
shows a popover listing which features/signals fall in that bucket
- `computeColumnTallyDetail()` returns per-bucket feature lists (health
+ e2e dimensions) alongside the existing aggregate counts
- `TallyTrigger` wrapper handles hover-to-preview (200ms delay) +
click-to-pin semantics with click-outside-to-close
- 16 new unit tests (6 for the data function, 10 for the popover
component)

## Test plan

- [ ] Verify tally breakdown popover appears on hover/click of ✓/~/×
counts
- [ ] Verify popover lists correct feature names per bucket
- [ ] Verify click-outside closes the popover
- [ ] Verify 0-count items show no interaction
- [ ] Run `npx vitest run src/components/__tests__/` — 110 tests pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-28 17:33:22 -07:00
Jordan Ritter 5288ef4d32 docs(showcase): add local CLI section to README
Document the parity-testing CLI (commands, test levels, options, config,
architecture diagram, use cases). Reorder so the CLI appears before the
lower-level docker-compose workflow it wraps.
2026-04-28 17:32:55 -07:00
github-actions[bot] 6d664ce101 style: auto-fix formatting 2026-04-29 00:13:58 +00:00
Jordan Ritter 3d48abde15 feat(shell-dashboard): merge B2 — TallyBreakdownPopover + header wiring 2026-04-28 17:09:15 -07:00
Jordan Ritter 9241c50190 chore(showcase): format CLI files with oxfmt 2026-04-28 17:09:06 -07:00
Jordan Ritter 34681013b8 feat(shell-dashboard): add TallyBreakdownPopover and wire into column headers
TallyTrigger wraps each tally count (green/amber/red) in OverlayColumnHeader
with hover-open (200ms delay) and click-pin semantics. The popover lists
which features/signals fall in each bucket with colored dots and dimension tags.
2026-04-28 17:08:38 -07:00
Jordan Ritter 4bd57eb88f feat: add computeColumnTallyDetail() and wire tallyDetails memo into FeatureGrid
Add companion function to computeColumnTally() that returns per-bucket
TallyItem arrays instead of numeric counts. Wire a tallyDetails memo
into FeatureGrid and pass tallyDetail prop to OverlayColumnHeader.

Includes 6 unit tests covering connection error, health routing,
e2e tone bucketing, and demo-less feature filtering.
2026-04-28 17:08:20 -07:00
Jordan Ritter c95bf2384e feat(showcase): add results formatter with PocketBase writer factory
Table-formatted console output for probe results. createPbWriter
factory enables client reuse across multiple result writes in a single
test run.
2026-04-28 17:07:06 -07:00
Jordan Ritter 033450240d feat(showcase): add local test runner with Playwright adapter
Orchestrates probe execution across liveness/D4/D5 levels. SIGINT
handler installed before container startup. Simplified headed Playwright
adapter using Object.assign+getDiagnostics passthrough. PocketBase
client reuse via createPbWriter for reduced auth overhead.
2026-04-28 17:07:02 -07:00
Jordan Ritter 9554256952 feat(showcase): add target resolution and driver input builders
Resolves CLI slug arguments to probe driver inputs for liveness, D4,
and D5 levels. Validates manifest demos and features arrays. Filters
empty feature lists from deep inputs.
2026-04-28 17:06:54 -07:00
Jordan Ritter bee0ba1d16 feat(showcase): add Docker Compose lifecycle manager
Profile-aware compose wrapper with ENOENT detection for missing Docker.
Handles up/down/rebuild/ps/logs with correct --profile flags for both
targeted slugs and full-stack operations. Caches loadPortsFile result.
stageSharedModules wrapped in try/finally for cleanup on failure.
2026-04-28 17:06:49 -07:00
Jordan Ritter 43d574113a feat(showcase): add local CLI entry point and config loader
Commander-based CLI with up/down/test/rebuild/ps/logs/status commands.
Shorthand flags (--smoke, --d4, --d5) with mutual exclusion against
--level. Default test level is smoke. Config loader reads
showcase.local.json for PocketBase and port overrides.
2026-04-28 17:06:44 -07:00
Jordan Ritter 2a22fc32a8 fix(showcase): harden docker-compose.local.yml for CLI parity testing
Add x-integration-defaults YAML anchor to DRY 17 service definitions.
Switch aimock from local build to ghcr.io/copilotkit/aimock:latest.
Add healthchecks to all 20 services (internal ports, not host-mapped).
Add pocketbase and dashboard infra services with proper depends_on
conditions. Add profiles to every service so compose enumeration works.
2026-04-28 17:06:38 -07:00
Jordan Ritter 8e17586418 feat(shell-dashboard): add TallyDetail/TallyItem types for tally breakdown 2026-04-28 17:03:36 -07:00
Jordan Ritter bd32bcff78 fix(showcase): replace sequenceIndex with toolCallId in D5 fixtures
aimock sequenceIndex counter is server-global, causing fixture match
failures when multiple integrations run concurrently. Replace with
stateless toolCallId matching.
2026-04-28 16:55:46 -07:00
github-actions[bot] 9b3253df0c style: auto-fix formatting 2026-04-28 23:34:04 +00:00
Jordan Ritter f6f90595f7 fix: correct recycleSlot mutation ordering and always shutdown pool
Move the isShutdown check before slot mutation in recycleSlot to prevent
a double-close race where shutdown() closes a browser that was already
assigned to the slot and mapped in browserToSlot.

Always call browserPool.shutdown() in the orchestrator stop path
regardless of browserPoolReady flag, so partially-initialized pools
(where init threw after launching some browsers) get cleaned up.
2026-04-28 16:32:20 -07:00