fix(setup): stop leaking hal0.thinmint.dev as the dashboard URL#1092
Merged
Conversation
The `hal0 setup` completion banner hardcoded `_DASHBOARD_URL = "https://hal0.thinmint.dev"` — a maintainer's personal reverse-proxy domain — and printed it to every operator on both the in-process and via-API apply paths. A broken link and an information leak. Replace it with `_dashboard_url()`, which reads the canonical URL from `GET /api/config/urls` (the same source of truth the dashboard uses; it derives the host from the bind address / forwarded proxy headers) and falls back to the local API base when the service isn't up yet (install-time in-process path). No hardcoded public host can print. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
0da34be to
4014c35
Compare
Unblocks CI for #1092 — ruff `I001` flagged the import block as un-sorted/un-formatted because the last import group has no trailing blank line before the next def. Adds the blank line. No semantic change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The
hal0 setupcompletion banner hardcoded a maintainer's personal reverse-proxy domain and printed it to every operator:Shown on both apply paths — in-process (
setup_install.py:89) and via-API (:180) — so anyone runninghal0 setupgot a broken link pointing at someone else's box. An info leak and a bad first-run experience.Fix
Replace the constant with
_dashboard_url(), which:GET /api/config/urls— the same source of truth the dashboard itself uses (derives the host from the bind address / forwarded proxy headers)._api_base()) when the service isn't up yet (install-time in-process path).No hardcoded public host can ever print again.
Verify
tests/cli/test_setup_install.py→ 2 passed.thinmint/_DASHBOARD_URLreferences insrc/.Context
First fix out of the guided "Hal0 Installer Setup" redesign (WS-C, network/URL coherence). Plan:
handoffs/installer-setup-plan-2026-07-05.md. Follow-up: Hermes also reads aHAL0_DASHBOARD_URLenv var that should derive from the same/api/config/urlssource.🤖 Generated with Claude Code