Skip to content

feat(update): bare uffs --update updates end-to-end (ordinary-user default)#441

Merged
githubrobbi merged 1 commit into
mainfrom
feat/update-automatic-by-default
Jun 17, 2026
Merged

feat(update): bare uffs --update updates end-to-end (ordinary-user default)#441
githubrobbi merged 1 commit into
mainfrom
feat/update-automatic-by-default

Conversation

@githubrobbi

@githubrobbi githubrobbi commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

The surgical phases (snapshot/acquire/apply/doctor/recover) are a power-user toolkit. The ordinary user types uffs --update and expects it to update — so now it does, and only when needed.

uffs --update (no action)

  1. Detects the install + reads the latest release — one non-mutating fetch via a new lean uffs-update check helper subcommand (latest=<tag>, no download).
  2. If a newer release is available or the install is version-skewed → runs the full journaled acquire + apply (auto-rollback on failure).
  3. Otherwise prints ✓ UFFS is already up to date (vX.Y.Z) and touches nothing — crucially it will not stop/restart services when already current.

The old detect-only view → uffs --update check

Non-mutating "is an update available?":

  • ✓ Up to date (vX) / ⬆ Update available: vX — run \uffs --update` to install`. Offline → a clear notice, no error.

snapshot / acquire / apply / doctor / recover are unchanged.

Implementation

  • uffs-update: check subcommand (resolves latest via the existing github::fetch_release, prints latest=<tag>).
  • uffs-cli: acquire::latest_version() spawns it; assess()UpdatePlan::{UpToDate,Available,Offline} drives bare-update vs check; normalize_tag strips a leading v for comparison (unit-tested).
  • Help, module docs, and cli-grammar.md §5 updated (none = update; + check).

Verification

  • Full pre-push gate green; host + Windows-MSVC clippy clean; 129 uffs-cli/uffs-update tests pass.
  • Smoke: check → "Up to date (v0.6.5)"; bare uffs --update → no-op when current (no service restart).

…default)

The surgical phases (snapshot/acquire/apply/doctor/recover) are a power-user
toolkit; the ordinary user types `uffs --update` and expects it to *update*.
Make the bare command do exactly that — and only when needed.

`uffs --update` (no action) now:
1. detects the install + reads the latest release (one non-mutating fetch via
   a new lean `uffs-update check` helper subcommand that prints `latest=<tag>`),
2. if a newer release is available OR the install is version-skewed → runs the
   full journaled acquire+apply (auto-rollback on failure),
3. otherwise prints "✓ UFFS is already up to date (vX.Y.Z)" and touches
   nothing — crucially it does NOT stop/restart services when current.

The old detect-only behaviour moves to the explicit, non-mutating
`uffs --update check` ("is an update available?" → "✓ Up to date" /
"⬆ Update available: vX — run `uffs --update` to install"). Offline → a clear
notice, no error.

- uffs-update: `check` subcommand (resolves latest via the existing
  `github::fetch_release`, prints `latest=<tag>`).
- uffs-cli: `acquire::latest_version()` spawns it; `assess()` →
  `UpdatePlan::{UpToDate,Available,Offline}` drives bare-update vs `check`;
  `normalize_tag` strips the leading `v` for comparison (unit-tested).
- Help, module docs, and cli-grammar.md §5 updated (none = update; + `check`).

Host + Windows-MSVC clippy clean; 129 uffs-cli/uffs-update tests pass; smoke:
`check`→"Up to date (v0.6.5)", bare→no-op when current.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@githubrobbi githubrobbi enabled auto-merge (squash) June 17, 2026 00:05
@githubrobbi githubrobbi merged commit 082ff6e into main Jun 17, 2026
21 checks passed
@githubrobbi githubrobbi deleted the feat/update-automatic-by-default branch June 17, 2026 00:17
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