fix(update): journal to_version, stdio-mcp restore, repair verb#446
Merged
Conversation
…d repair verb Three rough edges surfaced while exercising upgrade/downgrade/realign on a live Windows install: 1. `Applied + committed → unknown` — the CLI never wrote `to_version` into the snapshot, so `journal.to_version` always fell back to "unknown" (on both the bare auto-apply and explicit `--version` paths). The journal's record of what an apply committed to was therefore wrong, which matters for `recover`/rollback and audit. `write_snapshot` now takes the target tag (explicit `--version`, else resolved latest) and emits it; the schema already modelled the field. 2. "components failed to restart: [mcp]" — the stdio MCP server (`uffsmcp`) is spawned and OWNED by its LLM host (Claude Desktop / Cursor / Windsurf) over stdio. Quiesce rightly stops it to free the file lock for the swap, but `restore` then tried to relaunch it detached — which has no client to serve and spuriously warned. It's now a deliberate no-op success; the host respawns it on the next tool call. (The HTTP gateway is a separate binary, `uffs-mcp-http`, never captured here.) 3. `--repair` UX — the doctor hint said "re-run with `--repair`", but `uffs --update repair` errored and bare `uffs --update --repair` silently no-op'd; the working form was the non-obvious `doctor --repair`. Add `repair` as a first-class verb (= `doctor --repair`), route a bare `--repair` flag to it too, and fix the hints to name `uffs --update repair`. Host clippy (strict workspace lints) clean; uffs-cli + uffs-update tests pass (incl. new snapshot to_version + mcp-restore-noop coverage). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 17, 2026
githubrobbi
added a commit
that referenced
this pull request
Jun 17, 2026
… doc Dev-facing docs to match the user manual: - cli-grammar.md: add `repair` + `bins` to the `--update` action surface; note repair = doctor --repair alias, the doctor→update redirect, and that bare update reconciles the whole core set (adds a missing core binary). - UFFS-Self-Update-Feasibility-and-Design.md: add a §4.1 as-built addendum (action-based grammar) covering completeness (#447/#448), the repair verb + doctor redirect (#446/#449), and the journal to_version fix (#446). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
githubrobbi
added a commit
that referenced
this pull request
Jun 17, 2026
… issues (#449) * feat(update): doctor redirects to the update flow to fix update-class issues `uffs --update doctor` already diagnoses; now, when it finds an issue the update flow fixes — out of date, version-skewed, or **missing a core binary** — it redirects there instead of teaching the health-check helper the core set: - piped / non-TTY: prints a `→ run \`uffs --update\`` hint; - interactive TTY: asks "Run `uffs --update` now to fix this? [y/N]"; - `--repair` / `repair`: runs the update flow automatically (after the helper's local self-heal — resume/rollback, sweep backups, restart services). Keeps the architecture clean: the helper stays a dumb snapshot processor; the CLI (which owns the core set) decides what "incomplete" means and how to fix it. `--offline` skips the redirect (assess needs the release feed). The prompt never blocks a non-TTY caller — it returns "no" and falls back to the hint. Host clippy (strict) clean; uffs-cli tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs: note repair/bins actions + completeness in cli-grammar & design doc Dev-facing docs to match the user manual: - cli-grammar.md: add `repair` + `bins` to the `--update` action surface; note repair = doctor --repair alias, the doctor→update redirect, and that bare update reconciles the whole core set (adds a missing core binary). - UFFS-Self-Update-Feasibility-and-Design.md: add a §4.1 as-built addendum (action-based grammar) covering completeness (#447/#448), the repair verb + doctor redirect (#446/#449), and the journal to_version fix (#446). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <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.
Three rough edges surfaced while exercising upgrade → downgrade → realign on a
live Windows install (the mechanism itself is sound; these are polish).
1.
Applied + committed → unknown(real)The CLI never wrote
to_versioninto the snapshot, sojournal.to_versionalways fell back to
"unknown"— on both the bare auto-apply and explicit--versionpaths. The journal's record of what an apply committed to was wrong,which matters for
recover/rollback and audit.write_snapshotnow takes thetarget tag (explicit
--version, else resolved latest) and emits it (the schemaalready modelled the field).
2. Spurious
components failed to restart: [mcp](real, minor)The stdio MCP server (
uffsmcp) is spawned and owned by its LLM host (ClaudeDesktop / Cursor / Windsurf) over stdio. Quiesce rightly stops it to free the file
lock;
restorethen tried to relaunch it detached — no client to serve, so itwarned. Now a deliberate no-op success; the host respawns it on next use. (The HTTP
gateway is a separate binary,
uffs-mcp-http, never captured here — detectionscans only for
uffsmcp.)3.
--repairUX (minor)The doctor hint said "re-run with
--repair", butuffs --update repairerroredand bare
uffs --update --repairsilently no-op'd; the only working form was thenon-obvious
doctor --repair. Addedrepairas a first-class verb (=doctor --repair), routed a bare--repairflag to it, and fixed the hints to nameuffs --update repair.Best-practice note: verbs stay bare (
doctor,repair), options stay dashed(
--repair,--version) — git/cargo convention.repairbecomes a verb so usersnever have to guess whether it's a verb or a flag.
Validation
Host clippy (strict workspace lints) clean;
uffs-cli+uffs-updatetests pass,incl. new coverage: snapshot
to_versionprobe +mcp_restore_is_noop_success.