feat: add uninstall dry-run mode - #46359
Closed
teknium1 wants to merge 1 commit into
Closed
Conversation
Port from nanocoai/nanoclaw#2719: let operators preview the uninstall plan without stopping services or deleting files.
Contributor
🔎 Lint report:
|
| Rule | Count |
|---|---|
unresolved-attribute |
2 |
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [unresolved-attribute] unresolved-attribute: Unresolved attribute `_credits_session_start_micros` on type `AIAgent`
run_agent.py:2920: [unresolved-attribute] unresolved-attribute: Object of type `Self@get_credits_spent_micros` has no attribute `_credits_session_start_micros`
✅ Fixed issues (1):
| Rule | Count |
|---|---|
invalid-assignment |
1 |
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to attribute `_credits_session_start_micros` of type `int`
Unchanged: 5733 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
Contributor
Author
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.
Summary
hermes uninstall --dry-runnow prints the uninstall plan without stopping services or deleting files.Ported the useful safety affordance from nanocoai/nanoclaw#2719: Hermes already has a mature uninstaller, but no no-op preview mode for operators to inspect scope before running it.
Changes
hermes_cli/subcommands/uninstall.py: adds--dry-runhermes_cli/uninstall.py: prints a non-mutating plan for gateway cleanup, PATH cleanup, wrappers/symlinks, GUI artifacts, code checkout, and data removal/preservationtests/hermes_cli/test_uninstall_dry_run.py: verifies dry-run skips_perform_uninstalland the parser accepts the flagValidation
python3 -m pytest tests/hermes_cli/test_uninstall_dry_run.py -qscripts/run_tests.sh tests/hermes_cli/test_uninstall_dry_run.py tests/hermes_cli/test_uninstall_node_symlinks.py tests/hermes_cli/test_gui_uninstall.pySource
Infographic