Skip to content

fix(cli): append current daemon URL below retired-palace banner - #284

Merged
jphein merged 1 commit into
mainfrom
fix/282-cli-daemon-routing
May 28, 2026
Merged

fix(cli): append current daemon URL below retired-palace banner#284
jphein merged 1 commit into
mainfrom
fix/282-cli-daemon-routing

Conversation

@jphein

@jphein jphein commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

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 check clean on the three edited files
  • scripts/check-docs.sh passes (test count bumped 3561 → 3563, llms-full.txt regenerated)

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings May 28, 2026 07:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, 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

  • Dynamic Daemon URL Reporting: Introduced a new helper function _emit_current_daemon_url to display the currently configured daemon URL when a local palace is marked as retired.
  • Improved User Feedback: Updated the CLI and palace logic to append the active daemon URL to the retired-palace banner, preventing confusion caused by stale URLs embedded in frozen marker files.
  • Regression Testing: Added comprehensive test cases to verify that the daemon URL is correctly appended when configured and remains silent when no URL is set.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@jphein
jphein merged commit 5577fe8 into main May 28, 2026
12 of 13 checks passed
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