Skip to content

refactor: prune superseded releases silently - #188

Merged
jiminu merged 1 commit into
mainfrom
refactor/quiet-release-pruning
Sep 10, 2026
Merged

refactor: prune superseded releases silently#188
jiminu merged 1 commit into
mainfrom
refactor/quiet-release-pruning

Conversation

@jiminu

@jiminu jiminu commented Sep 10, 2026

Copy link
Copy Markdown
Owner

What

selfishell update no longer prints Removed inactive Selfishell release: X.
when it prunes a superseded release directory.

Before, on every CLI update:

Update Selfishell CLI to 1.2.15? [y/N] y
Removed inactive Selfishell release: 1.2.13.
Synchronize developer profile packages and configuration? [y/N] y

Selfishell updated: 1.2.14 -> 1.2.15

After:

Update Selfishell CLI to 1.2.15? [y/N] y
Synchronize developer profile packages and configuration? [y/N] y

Selfishell updated: 1.2.14 -> 1.2.15

Why

Retention keeps exactly the active release and the rollback release, so each
update supersedes one directory and printed one line, permanently.

  • It restates a fixed contract rather than reporting news: docs/UPDATES.md
    already documents that only the active and rollback releases are retained.
  • The directory is managed product state under
    ~/.local/share/selfishell/releases, not user data. 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 available on demand and more reliably from selfishell status
    ([CLI] Current: X | Rollback: Y), and selfishell rollback on a pruned
    version already fails with Retained release not found: X.
  • The line count was not even fixed: a stale or interrupted update can leave
    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 printf removed from release_prune_inactive, plus a comment recording
why the removal is silent. release_prune_inactive is called only from
release_install, so rollback output is unaffected. No test asserted the
string, and per AGENTS.md an incidental presentation change of this kind does
not warrant a new regression test.

Note the output lands before the exec continuation, so the line still appears
on 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.sh passes locally (345 tests, 0 failures).

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>
@jiminu
jiminu merged commit ef44e2e into main Sep 10, 2026
7 checks passed
@jiminu
jiminu deleted the refactor/quiet-release-pruning branch September 10, 2026 03:30
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.

1 participant