Skip to content

fix: remediate all port drift (OLLAMA_PORT, TOKEN_SPY_PORT, external_…#359

Open
eva57gr wants to merge 2 commits intoLight-Heart-Labs:mainfrom
eva57gr:pr-05-port-drift-remediation
Open

fix: remediate all port drift (OLLAMA_PORT, TOKEN_SPY_PORT, external_…#359
eva57gr wants to merge 2 commits intoLight-Heart-Labs:mainfrom
eva57gr:pr-05-port-drift-remediation

Conversation

@eva57gr
Copy link
Contributor

@eva57gr eva57gr commented Mar 17, 2026

…port_env)

Copy link
Collaborator

@Lightheartdevs Lightheartdevs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 to localhost:8080
  • install-macos.sh health poll (~line 518) — hardcoded 8080
  • install-windows.ps1 health poll (~line 237) — hardcoded 8080
  • config/backends/*.json — all have "public_health_url": "http://localhost:8080/health"
  • install-macos.sh generate_openclaw_config call (~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

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.

2 participants