feat(status): protocol + styling foundation for a unified --status#527
Merged
Conversation
…tatus
Groundwork for the status/stats consolidation (renderers + --json land next).
No user-visible change yet — this adds the data + the shared styling.
- New `uffs-statusfmt` leaf crate (zero deps): one visual language for every
--status surface — TTY/NO_COLOR-aware `Palette`, health `Glyph`s, aligned
`field`s, `section`/`header`, `status_row`. Unit-tested (plain mode).
- Status protocol (StatusResponse) gains operator-relevant signals not exposed
before: `git_sha` (running build), `elevated` + `reading_via_broker`
(zero-UAC broker path vs elevated-direct; new cross-platform
`uffs_mft::registered_broker_handle_count`), `live_update`
(LiveUpdateInfo{active_loops}), and `paths` (DaemonPaths).
- `live_update` is recorded ONCE at loop spawn (a single relaxed store) and
read on demand — no per-patch bookkeeping on the live-indexing hot path.
- Daemon `live_update` module holds the loop-count signal + on-demand path
gather; the status build site populates every new field.
Verified: clippy on the four crates --all-targets -D warnings green;
manifest-inheritance audit clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
d65af83 to
6e2c2d0
Compare
This was referenced Jul 5, 2026
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Jul 5, 2026
…v / --json) (#529) Bring the combined system view to the same unified styling as `--daemon status`, with short / long / JSON levels and richer operator detail — no change to the broker's security-sensitive pipe protocol. - `uffs --status` (short): per-section health glyph + key fields for Daemon, Access Broker, MCP HTTP Gateway, MCP Stdio Sessions. - `uffs --status -v`: expands each section. Daemon adds commit / elevation / broker mode, live-update loops, memory, data dir (the #527 fields). Broker adds binary path + uptime + a stale-binary check (Windows). - `uffs --status --json`: machine-readable superset of all four sections. Broker "completeness" (binary path, uptime, stale check) is derived from the service PID via process introspection — a new `process_creation_time` FFI in `uffs-mft::platform::process` alongside the existing `process_image_path`, so NO new broker wire-protocol surface. Handle-adoption is already visible via the daemon's `reading_via_broker` (#527). TTY/NO_COLOR-aware colour via `uffs-statusfmt::Palette`; piped output stays plain. `health()` is shared with `--daemon status` so both agree on the daemon glyph + phase wording. `-v` / `--json` threaded through dispatch; `--status --help` documents them. Verified: host + xwin (Windows) clippy `--all-targets -D warnings`, rustdoc `-Dwarnings --document-private-items`, fmt — all green. Smoke-tested the daemon-down render for `--status`, `--status --json`, `--daemon status -v`. 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.
What
Checkpoint (A) of the
--status/ stats refactor: land the data + shared styling foundation now, so the renderer rewrite and--jsonwiring (Phase 2/3) build on a stable base. No user-visible change yet.uffs-statusfmt(new, zero-dep leaf crate)One visual language for every status surface — daemon, broker, combined-system, MCP:
Palette— TTY/NO_COLOR/TERM=dumb-aware color detection (detect()), plusplain()for--json/tests.Glyph— health markers (●up /○down /◐warn /·off), colored per palette.header/section/field(alignedkey: value) /status_row(short one-line summary).Status protocol gains operator-relevant signals it never exposed
On
StatusResponse(all#[serde(default)], back-compatible):git_sha— the running build's short SHA (semver alone can't distinguish two builds).elevated+reading_via_broker— is the daemon elevated-direct, or reading the live MFT via the zero-UAC Access Broker path? Backed by a new cross-platformuffs_mft::registered_broker_handle_count(real count on Windows,0elsewhere).live_update: Option<LiveUpdateInfo>— how many per-shard USN journal loops are running (is live update actually active?).paths: Option<DaemonPaths>— data/cache dir, socket/pipe, log dir, so an operator can find the index, connect, and read logs.Hot-path discipline
live_updateliveness is recorded once when the loops spawn (a single relaxedAtomicUsizestore) and read on demand at status time — deliberately not a per-patch "last applied" timestamp, which would add a store to every USN apply on the live-indexing hot path.Follow-ups (next PRs)
uffs-statusfmt(short /-vlong / color), consolidate--daemon statsinto--daemon status -v, thread--json.uffs-broker+uffs-broker-protocol).Verification
All local gates green before push (host + Windows xwin clippy
-D warnings, rustdoc-Dwarnings --document-private-items, doc-tests, tests, deny, manifest audit) — full 14-gate pre-push passed (109s).