mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
7e4dad042c
apply_isolation previously mutated docker-compose.local.yml and local-ports.json in-place with .iso-bak backups. If the process crashed the originals stayed corrupted with +200 port offsets, breaking all subsequent showcase commands. Now writes modified copies to a temp directory and overrides COMPOSE_FILE/PORTS_FILE shell variables so downstream code reads from the overlay. Originals are never touched. restore_isolation just removes the temp dir. Also replaces hardcoded +200 port offset with atomic mkdir-based slot allocation. Two parallel --isolate runs now get different port ranges (slot 0 = +200, slot 1 = +400, etc.) instead of colliding on the same ports. Container names include the slot number for collision-free Docker naming. Stale slots from crashed runs are reclaimed via PID liveness checks and a 2-hour age fallback. TS harness files (config.ts, lifecycle.ts, doctor.ts) honor LOCAL_PORTS_FILE env var so they read offset ports from the temp overlay.
5.5 KiB
Executable File
5.5 KiB
Executable File