Skip to content

feat(update): single source of truth for the core binary set + uffs --update bins#447

Merged
githubrobbi merged 1 commit into
mainfrom
feat/centralize-core-binary-set
Jun 17, 2026
Merged

feat(update): single source of truth for the core binary set + uffs --update bins#447
githubrobbi merged 1 commit into
mainfrom
feat/centralize-core-binary-set

Conversation

@githubrobbi

@githubrobbi githubrobbi commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Foundation for the self-update completeness work (follow-up PR adds
missing-binary reconciliation; this one removes the drift risk first).

The core binary set was hardcoded in two places that could drift:

  • binaries::KNOWN_BINARIES (Rust)
  • BINS=(uffs uffsd uffsmcp uffs-mft uffs-update) in just/build.just (shell)

Changes

  • Single source of truth: binaries::KNOWN_BINARIES (now documented as such;
    it already includes uffs-mft, so KNOWN ≡ the core set — per the decision to
    treat the whole shipped suite as core).
  • uffs --update bins: new action that prints the platform-appropriate core
    stems (one per line; uffs-broker only on Windows) — the machine-readable
    accessor for tooling.
  • just/build.just copy-binary now queries uffs --update bins instead of
    keeping its own list. (use-local was already dynamic.)

So adding/removing a core binary is a one-line change in one place, and every
flow (detection, deploy recipes, and the upcoming update-completeness) honours it.

Host clippy (strict) clean; uffs-cli tests pass; uffs --update bins verified
(5 stems on macOS, +uffs-broker on Windows).

…--update bins`

The UFFS core binary set was hardcoded in two places that could drift:
`binaries::KNOWN_BINARIES` (Rust) and `BINS=(…)` in `just/build.just` (shell).
Centralize on the Rust definition (now documented as the single source of
truth — it already includes uffs-mft, so KNOWN ≡ the core set) and expose it
to tooling via a new `uffs --update bins` action that prints the
platform-appropriate stems (uffs-broker only on Windows), one per line.

`just/build.just`'s `copy-binary` now queries `uffs --update bins` instead of
keeping its own list, so adding/removing a core binary is a one-line change in
one place and every flow picks it up. (`use-local` was already dynamic.)

Host clippy (strict) clean; uffs-cli tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@githubrobbi githubrobbi enabled auto-merge (squash) June 17, 2026 15:03
@githubrobbi githubrobbi merged commit 18350f4 into main Jun 17, 2026
21 checks passed
@githubrobbi githubrobbi deleted the feat/centralize-core-binary-set branch June 17, 2026 15:16
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>
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