Skip to content

feat(status): unify --daemon status (short/-v/--json), fold in stats#528

Merged
githubrobbi merged 1 commit into
mainfrom
feat/status-daemon
Jul 5, 2026
Merged

feat(status): unify --daemon status (short/-v/--json), fold in stats#528
githubrobbi merged 1 commit into
mainfrom
feat/status-daemon

Conversation

@githubrobbi

Copy link
Copy Markdown
Collaborator

What

Phase (B) of the --status refactor. Consolidates the daemon read-only surfaces onto the new uffs-statusfmt styling (from #527) and folds --daemon stats into --daemon status -v.

--daemon status — one command, three detail levels

  • short (default): health glyph, version, uptime, drives, query rate.
  • -v / --verbose (long): adds
    • Build — commit SHA + elevation / Access-Broker mode (elevated, reading_via_broker)
    • Live update — USN journal loop liveness (live_update.active_loops)
    • Memory — index heap / mimalloc-committed / RSS
    • Paths — data-dir / socket / logs (paths)
    • Performance — the folded-in stats (startup, records, queries, agg-cache)
    • Drives — full per-drive tier + memory breakdown
  • --json: machine-readable superset (status + drives + stats) for scripts/dashboards.

Surfaces the operator fields added to StatusResponse in #527 (git_sha, elevated, reading_via_broker, live_update, paths).

--daemon stats removed

The parser now returns a one-line redirect to status -v / status --json (chosen over a silent alias per "no history to worry about"). Elevation gate + dispatch updated.

Colour

TTY/NO_COLOR-aware via uffs-statusfmt::Palette. Piped/redirected output stays plain — so the live-Windows benchmark/validation harnesses keep scraping the same field labels (Total records:, Queries served:, Avg query time:, Agg cache:). Those harnesses + the two CLI test definitions are updated to invoke status -v (11-rpc.toml also picks up taplo's no-align normalization).

Verification

All local gates green before push (host + xwin Windows clippy --all-targets -D warnings, rustdoc -Dwarnings --document-private-items, fmt, taplo) — full 14-gate pre-push passed (147s).

Follow-ups

  • Phase C: rewrite combined uffs --status on uffs-statusfmt (+ -v / --json).
  • Phase D: broker protocol completeness (version / uptime / binary path / handles vended).

…] [--json]`

Consolidate the daemon read-only surfaces on the new `uffs-statusfmt` styling
and fold the former `--daemon stats` into `--daemon status -v`.

- `--daemon status` (short): health glyph, version, uptime, drives, query rate.
- `--daemon status -v` (long): adds Build (commit + elevation / broker mode),
  Live update (USN journal loop liveness), Memory (heap / mimalloc / RSS),
  Paths (data / socket / logs), Performance (the folded-in stats), and the
  full per-drive tier + memory breakdown. Surfaces the new StatusResponse
  fields (git_sha, elevated, reading_via_broker, live_update, paths).
- `--daemon status --json`: machine-readable superset (status + drives + stats).
- `--daemon stats` removed; the parser returns a one-line redirect to
  `status -v` / `status --json`. Elevation gate + dispatch updated.

TTY/NO_COLOR-aware colour via `uffs-statusfmt::Palette`; piped output stays
plain, so the live-Windows validation harnesses keep scraping the same labels
(the Performance section keeps `Total records:`, `Queries served:`,
`Avg query time:`, `Agg cache:`). Those harnesses + the two CLI test
definitions are updated to invoke `status -v` instead of the removed `stats`
(11-rpc.toml also picks up taplo's no-align normalization).

Verified: host clippy + xwin (Windows) clippy `--all-targets -D warnings`,
rustdoc `-Dwarnings --document-private-items`, fmt, taplo — all green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@githubrobbi githubrobbi enabled auto-merge July 5, 2026 03:44
@githubrobbi githubrobbi added this pull request to the merge queue Jul 5, 2026
Merged via the queue into main with commit 6e433ad Jul 5, 2026
22 checks passed
@githubrobbi githubrobbi deleted the feat/status-daemon branch July 5, 2026 04:00
deep-soft pushed a commit to deep-soft/UltraFastFileSearch-Rust that referenced this pull request Jul 5, 2026
…tatus` (skyllc-ai#531)

The status rewrite (skyllc-ai#528, skyllc-ai#529) restyled the output and folded `--daemon stats`
into `--daemon status -v`. Update the user manual to match:

- daemon.md: replace the old `Daemon PID:` / `Daemon Performance Stats` example
  blocks with the new short / `-v` long / `--json` examples; note the `stats`
  fold + redirect; add the `status -v` and `status --json` command rows.
- cli-overview.md: add `status -v` / `status --json`; document `--status`
  `-v` / `--json` and mention the Access Broker section.
- troubleshooting.md: point diagnostics at `status -v` and `--status --json`.

Docs-only.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
deep-soft pushed a commit to deep-soft/UltraFastFileSearch-Rust that referenced this pull request Jul 5, 2026
…i#532)

The status rewrite (skyllc-ai#528, skyllc-ai#529) restyled the human output, so the CLI
validation harness's text-scraping of `--daemon status` was stale (it looked
for `Daemon PID:`, `Ready`, `Total records:` labels that no longer print in
that shape). Point the CLI target at `--daemon status --json` and parse the
structured payload instead.

- cli-validation.rs RPC.1/2/4: parse the `--json` wrapper
  `{running, status, drives, stats}` — pid + lifecycle state (RPC.1), the
  tier-aware drives array (RPC.2, Parked/Cold may report 0 records), and the
  folded-in performance counters under `stats` (RPC.4). No more string
  scraping, so the checks are stable across cosmetic output changes.
- 11-rpc.toml RPC.1/2/4 + 01-general.toml T169: invoke `status --json` and
  assert JSON keys (`"running"`, `"pid"`, `"drives"`, `"total_records"`, ...).

api-validation.rs already validates the raw JSON-RPC responses, so its
RPC.1-4 validators needed no change. Verified cli-validation.rs compiles
clean (`cargo check` on the rust-script package); it runs live-on-Windows
only, so end-to-end execution is unverified here.

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