refactor: report one update result - #187
Merged
Merged
Conversation
jiminu
force-pushed
the
plan/release-update-summary
branch
from
September 10, 2026 01:56
9247f2c to
56475e8
Compare
jiminu
marked this pull request as ready for review
September 10, 2026 01:56
`selfishell update` closed with a lower-level "Selfishell CLI updated to
X." line, an aggregate "N items unchanged." summary, and a separate
tools/configuration line. None of them answered the question the command
exists to answer: which release is active now.
command_update now owns a single closing result for every successful
version change:
Selfishell updated: 1.2.10 -> 1.2.14
The continuation reads the version it replaced from the previous-release
link, which release_install rewrites immediately before switching
`current`. Nothing has to survive its `exec`, and an update launched by a
CLI that predates this change still reports the transition.
`--tools-only` closes with "Selfishell tools and configuration
synchronized." rather than "... updated.". That phase resynchronizes the
release's tools and configuration whether or not anything changes, and
with the unchanged summary gone its result is often the only output, so it
must not imply a change. "Synchronize" is already this phase's own word in
its confirmation prompt, its help text, and docs/UPDATES.md.
Release details stay on the GitHub Release. Output for work that actually
changed the environment, warnings, errors, confirmations, and --dry-run
previews are unchanged, as is the already-current message. Because the
result now closes the whole command, declining the tools/configuration
confirmation ends the run without reporting the version change even
though the CLI release has already switched; docs/UPDATES.md records that
and points at `selfishell version`.
`selfishell install` keeps its own "N items unchanged." summary: an
explicit one-shot setup reports idempotence usefully, a routine update
does not.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jiminu
force-pushed
the
plan/release-update-summary
branch
from
September 10, 2026 02:24
56475e8 to
d636431
Compare
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 updatenow closes with one result line for a successful versionchange, instead of a lower-level CLI success line, an aggregate
N items unchanged.summary, and a separate tools/configuration line.Normal version update:
--cli-only:Already current, and
--tools-only:Release details stay on the GitHub Release rather than being reproduced in the
CLI.
Implementation
command_updateowns the closing result;release_installno longer printsits own
Selfishell CLI updated to ...line.link, which
release_installrewrites immediately before switchingcurrent. Nothing has to survive itsexec, so an update launched by a CLIthat predates this change still reports the transition.
--cli-onlykeeps running in the process that performed the switch andreports the transition from the version it read before switching.
--tools-onlycloses withsynchronizedrather thanupdated: that phaseresynchronizes whether or not anything changes, and with the unchanged
summary gone its result is often the only output, so it must not imply a
change.
Synchronizeis already this phase's own word in its confirmationprompt, its help text, and
docs/UPDATES.md.N items unchanged.summary is gone fromupdate.selfishell installkeeps its own: an explicit one-shot setup reportsidempotence usefully, a routine update does not.
Trade-off
The result closes the whole command, so declining the tools/configuration
confirmation ends the run without reporting the version change even though the
CLI release has already switched.
docs/UPDATES.mdrecords that and points atselfishell version.Tests
bash scripts/check.shpasses locally (345 tests, 0 failures).--cli-onlyreports the transition exactly once and no longer prints therelease-installation success line.
OLD -> NEWafter continuing with the new CLI,which also proves the previous-release link carried the source version
across the
exec.--tools-onlykeeps its own result, prints no version transition, and nolonger prints the unchanged-items summary.
including the three failure-path checks that assert it is absent; leaving
them on the old string would have turned them into checks that always pass.
target the line that reports success, instead of a string that no longer
exists.
Out of scope
No PR or issue summaries,
CHANGESassets, changelog metadata, GitHub APIcalls for update presentation, global
--quiet/--verboseframework, outputaggregation abstractions, package-manager upgrade changes, or unrelated
update/rollback refactoring.