Commit f9d4342
fix(env_sync): use config port_bases instead of .env extraction to prevent compounding
sync_env_files was reading base ports from .env files, which caused ports
to compound by +20 on every restart (e.g., 3220 → 3381 over 9 restarts).
Now reads base ports from env_sync.port_bases in config — the same source
of truth used by show_ports and get_workspace_ports.
Also adds admin-app port management (PORT, API_PORT) which was previously
unmanaged, causing cross-workspace collisions.
Changes:
- Add port_bases config format (map of type → base port)
- Add get_port_base() and get_port_types() helpers
- Rewrite read_env_port() to handle new map format + old array backward compat
- Rewrite sync_env_files first pass to use config bases
- Dynamic show_ports columns from port types
- Update template_promptfoo_cloud with new format
- Handle missing .env files and vars (create/append)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent f1766b1 commit f9d4342
1 file changed
Lines changed: 266 additions & 145 deletions
0 commit comments