fix: remediate all port drift (OLLAMA_PORT, TOKEN_SPY_PORT, external_…#359
fix: remediate all port drift (OLLAMA_PORT, TOKEN_SPY_PORT, external_…#359eva57gr wants to merge 2 commits intoLight-Heart-Labs:mainfrom
Conversation
Lightheartdevs
left a comment
There was a problem hiding this comment.
Review: REQUEST CHANGES
Good progress toward eliminating hardcoded ports, but two blockers and an incomplete sweep.
Blocker 1: macOS env-generator.sh — ${ollama_port} never declared
The diff changes line 137 to http://host.docker.internal:${ollama_port} and line 168 to OLLAMA_PORT=${ollama_port}, but there is no local ollama_port=... declaration anywhere in the file. The Windows env-generator.ps1 properly declares $ollamaPort, but the macOS equivalent is missing. This produces OLLAMA_PORT= (empty) and http://host.docker.internal: (broken URL) in generated .env files. New macOS installs are broken.
Blocker 2: Contradictory ports in macOS compose overlay
docker-compose.macos.yml line 49 uses ${OLLAMA_PORT:-11434} for OLLAMA_URL, but line 51 (untouched) hardcodes OLLAMA_PORT=8080 for dashboard-api. Dashboard-api will always see 8080 regardless of .env.
High: Split-brain defaults
PR changes overlay fallbacks to :-11434 but docker-compose.base.yml (untouched) still uses :-8080. Users without explicit OLLAMA_PORT get different behavior depending on which compose layer resolves first.
High: Incomplete sweep — still-hardcoded 8080 references
get_native_llama_status()— 2 health check URLs still hardcoded tolocalhost:8080install-macos.shhealth poll (~line 518) — hardcoded 8080install-windows.ps1health poll (~line 237) — hardcoded 8080config/backends/*.json— all have"public_health_url": "http://localhost:8080/health"install-macos.shgenerate_openclaw_configcall (~line 350) — hardcoded 8080
Note on coordination with PR #356
This PR and #356 (canonical ports.json) attack the same problem from different angles and contradict each other. Consider coordinating: let ports.json be the source, then sweep all files from that single source.
🤖 Reviewed with Claude Code
…port_env)