Skip to content

refactor: report one update result - #187

Merged
jiminu merged 1 commit into
mainfrom
plan/release-update-summary
Sep 10, 2026
Merged

refactor: report one update result#187
jiminu merged 1 commit into
mainfrom
plan/release-update-summary

Conversation

@jiminu

@jiminu jiminu commented Sep 9, 2026

Copy link
Copy Markdown
Owner

What

selfishell update now closes with one result line for a successful version
change, instead of a lower-level CLI success line, an aggregate
N items unchanged. summary, and a separate tools/configuration line.

Normal version update:

Installing node@24.19.0...
Updated managed configuration: nvim

Selfishell updated: 1.2.10 -> 1.2.14

--cli-only:

Selfishell updated: 1.2.10 -> 1.2.14

Already current, and --tools-only:

Selfishell is up to date (1.2.14).
Selfishell tools and configuration synchronized.

Release details stay on the GitHub Release rather than being reproduced in the
CLI.

Implementation

  • command_update owns the closing result; release_install no longer prints
    its own Selfishell CLI updated to ... line.
  • 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, so an update launched by a CLI
    that predates this change still reports the transition.
  • --cli-only keeps running in the process that performed the switch and
    reports the transition from the version it read before switching.
  • --tools-only closes with synchronized rather than updated: that phase
    resynchronizes 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.
  • The default N items unchanged. summary is gone from update.
    selfishell install keeps its own: an explicit one-shot setup reports
    idempotence 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.md records that and points at
selfishell version.

Tests

bash scripts/check.sh passes locally (345 tests, 0 failures).

  • --cli-only reports the transition exactly once and no longer prints the
    release-installation success line.
  • A default update reports OLD -> NEW after continuing with the new CLI,
    which also proves the previous-release link carried the source version
    across the exec.
  • --tools-only keeps its own result, prints no version transition, and no
    longer prints the unchanged-items summary.
  • Every assertion on the tools/configuration result follows the new wording,
    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.
  • The two release-failure tests that asserted no success line was printed now
    target the line that reports success, instead of a string that no longer
    exists.

Out of scope

No PR or issue summaries, CHANGES assets, changelog metadata, GitHub API
calls for update presentation, global --quiet/--verbose framework, output
aggregation abstractions, package-manager upgrade changes, or unrelated
update/rollback refactoring.

@jiminu jiminu changed the title feat: summarize release changes after update refactor: simplify update output Sep 10, 2026
@jiminu
jiminu force-pushed the plan/release-update-summary branch from 9247f2c to 56475e8 Compare September 10, 2026 01:56
@jiminu jiminu changed the title refactor: simplify update output refactor: report one update result Sep 10, 2026
@jiminu
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
jiminu force-pushed the plan/release-update-summary branch from 56475e8 to d636431 Compare September 10, 2026 02:24
@jiminu
jiminu merged commit ccb49dc into main Sep 10, 2026
7 checks passed
@jiminu
jiminu deleted the plan/release-update-summary branch September 10, 2026 02:31
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