Skip to content

fix: enable full recursive fixture loading + add git to Docker image#241

Merged
jpr5 merged 3 commits into
mainfrom
blitz/aimock-sparse-checkout-fix/aimock-release
May 27, 2026
Merged

fix: enable full recursive fixture loading + add git to Docker image#241
jpr5 merged 3 commits into
mainfrom
blitz/aimock-sparse-checkout-fix/aimock-release

Conversation

@jpr5
Copy link
Copy Markdown
Contributor

@jpr5 jpr5 commented May 27, 2026

Summary

  • Fixture loader -- replaced 2-level recursion cap with full recursive descent. Supports showcase per-integration layout (d6/<integration>/<feature>.json) which is 3+ levels deep.
  • Dockerfile -- added git binary to production stage (apk add --no-cache git) for sparse-checkout fixture fetching at Railway boot.
  • Version -- bumped to v1.27.2 across all 5 version surfaces.

Context

PR #5022 in CopilotKit reorganized showcase fixtures from flat bundles into per-integration subdirectories. The aimock fixture loader 2-level recursion limit prevented loading fixtures at depth 3+, causing the Railway showcase-aimock service to fail validation on boot.

Spec: https://www.notion.so/36d3aa381852815981a7f09d79d72422

Test plan

  • New tests for 3-deep and 4-deep directory traversal (RED then GREEN)
  • Updated existing depth-limit test to assert full recursion
  • All existing fixture-loader tests pass unchanged (backward compatible)
  • Local Docker build with --platform linux/amd64 succeeds
  • git --version works inside built image (v2.52.0)
  • Full e2e: sparse-checkout + --validate-on-load boots with 6900+ fixtures
  • Pre-push quality: format, lint, tests (3167), build all green

jpr5 added 3 commits May 26, 2026 17:39
The fixture loader previously capped recursion at 2 levels (root +
immediate subdirectories). This was insufficient for the
per-integration showcase layout where fixtures live at paths like
d6/langgraph-python/chat-basic.json (3 levels deep).

Replace the manual 2-level loop with a self-recursive call to
loadFixturesFromDir(), which naturally walks the entire directory
tree. Backward compatible: all existing single-file and 2-level
callers continue to work identically.
The Railway startCommand now uses git sparse-checkout to fetch
showcase fixtures at boot. node:22-alpine does not include git, so
this adds apk add --no-cache git (~15MB) to the production stage.
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 27, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@copilotkit/aimock@241

commit: b54125f

@jpr5 jpr5 merged commit 521e696 into main May 27, 2026
25 checks passed
@jpr5 jpr5 deleted the blitz/aimock-sparse-checkout-fix/aimock-release branch May 27, 2026 00:48
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