refactor: prune superseded releases silently - #188
Merged
Conversation
Every CLI update printed one "Removed inactive Selfishell release: X." line, because retention keeps exactly the active release and the rollback release, so each update supersedes one directory. That line restates a fixed contract instead of reporting news: docs/UPDATES.md already says only the active and rollback releases are kept. The directory is managed product state under ~/.local/share/selfishell/releases, not user data, so unlike a package install or a managed configuration change it alters nothing the user owns or has to act on. The one actionable fact it carried -- which release can still be rolled back to -- is reported on demand and more reliably by `selfishell status` as "Current: X | Rollback: Y", and `selfishell rollback` on a pruned version already fails with "Retained release not found". The count was also not fixed: a stale or interrupted update could leave several directories behind and print a line for each. Follows the same rule as dropping update's "N items unchanged." summary: report work that changed the user's environment, warnings, errors, and required action; do not narrate an invariant. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
selfishell updateno longer printsRemoved inactive Selfishell release: X.when it prunes a superseded release directory.
Before, on every CLI update:
After:
Why
Retention keeps exactly the active release and the rollback release, so each
update supersedes one directory and printed one line, permanently.
docs/UPDATES.mdalready documents that only the active and rollback releases are retained.
~/.local/share/selfishell/releases, not user data. Unlike a package installor a managed configuration change, it alters nothing the user owns or has to
act on.
to -- is available on demand and more reliably from
selfishell status(
[CLI] Current: X | Rollback: Y), andselfishell rollbackon a prunedversion already fails with
Retained release not found: X.several directories behind and print one line for each.
This follows the same rule as dropping update's
N items unchanged.summary in#187: report work that changed the user's environment, warnings, errors, and
required action; do not narrate an invariant.
Scope
One
printfremoved fromrelease_prune_inactive, plus a comment recordingwhy the removal is silent.
release_prune_inactiveis called only fromrelease_install, sorollbackoutput is unaffected. No test asserted thestring, and per
AGENTS.mdan incidental presentation change of this kind doesnot warrant a new regression test.
Note the output lands before the
execcontinuation, so the line still appearson the update into the release that contains this change and disappears from
the one after it -- the same rollout lag as the removed
Selfishell CLI updated to ...line in #187.bash scripts/check.shpasses locally (345 tests, 0 failures).