fix(cli): append current daemon URL below retired-palace banner - #284
Conversation
The ~/.mempalace/RETIRED marker is written once at retirement time and never updated, so its embedded PALACE_DAEMON_URL goes stale the moment the daemon moves hosts. Result: every "palace missing" message showed the dead URL with no indication of the real one. Add a small _emit_current_daemon_url helper that reads MempalaceConfig ().daemon_url at print time and appends one line below the marker text when set. Both retired-banner sites call it — palace._emit_palace_missing and cli._print_retired_local_palace_or_default. Silent no-op when no daemon URL is configured. Slice of #282 (the daemon-routing fixes for cmd_rooms/cmd_wakeup/cmd_mined need palace-daemon endpoint work and will follow as a separate PR). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses an issue where users could be misled by stale daemon URLs contained within retired-palace marker files. By dynamically fetching and displaying the current daemon URL from the system configuration at runtime, the CLI now provides accurate connectivity information even after a migration. This change ensures that users are always directed to the correct active daemon endpoint. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a helper function _emit_current_daemon_url to append the currently-configured daemon URL below a retired-palace banner, preventing users from being misled by stale configuration text. This helper is integrated into both the CLI and palace modules, and corresponding unit tests have been added to verify its behavior. Additionally, documentation files were updated to reflect the new passing test count. I have no feedback to provide as there are no review comments.
Summary
~/.mempalace/RETIREDis frozen at retirement time. If the daemon later moves hosts (e.g., ourdisks.jphe.in→familiar:8085migration on 2026-05-24), the marker's embedded URL goes stale and every "palace missing" message shows a dead URL._emit_current_daemon_url(emit)inpalace.pythat readsMempalaceConfig().daemon_urlat print time and appends one line below the marker text when set. Silent no-op when no URL is configured.palace._emit_palace_missingandcli._print_retired_local_palace_or_default.rooms/wake-up(and possibly more) require local DSN — should fall back to daemon path likestatus/list#282. The bigger work in cli:rooms/wake-up(and possibly more) require local DSN — should fall back to daemon path likestatus/list#282 (daemon-routing forcmd_rooms/cmd_wakeup/cmd_mined) needs palace-daemon endpoint additions and will follow as a separate PR after that companion lands.Test plan
pytest tests/test_local_palace_retired.py— 6 tests pass (2 new: appends URL when set, silent when unset)pytest tests/test_cli.py tests/test_cli_daemon.py tests/test_cli_json.py— 132 tests pass (no regression)ruff format+ruff checkclean on the three edited filesscripts/check-docs.shpasses (test count bumped 3561 → 3563,llms-full.txtregenerated)🤖 Generated with Claude Code