fix(daemon): emit version on uffsd --version - #71
Merged
Conversation
The `uffsd` binary was missing a `version` attribute on its clap
`#[command(...)]`, so `uffsd --version` exited silently. This is
visible in `just use`'s install-time `--version` probe:
Installed versions:
uffsmcp.exe uffsmcp 0.5.74
uffs.exe uffs 0.5.74
uffsd.exe ← empty
uffs_mft.exe uffs_mft 0.5.74
Peer binaries already pull `CARGO_PKG_VERSION` via clap's auto-version:
- `uffs-mcp/src/main.rs` → `#[command(name = "uffsmcp", version, about)]`
- `uffs-mft/src/cli.rs` → `#[command(author, version, about, ...)]`
- `uffs-cli/src/args.rs` → custom `print_version()` handler
This change brings `uffsd` into parity:
- Adds `version` to the `#[command(...)]` attribute.
- Aligns the clap `name` from `"uffs-daemon"` to `"uffsd"` to match
the actual `[[bin]] name = "uffsd"` in
`crates/uffs-daemon/Cargo.toml` (and the binary path users invoke).
Verified locally:
$ ./target/debug/uffsd --version
uffsd 0.5.74
$ ./target/debug/uffsd --help | head -1
UFFS background search daemon
Also adds two `just` recipes that fix a recurring friction in the
daily-driver oneliner:
git pull; just use
↓
error: Your local changes to the following files would be overwritten
by merge: Cargo.lock
`cargo build` rewrites `Cargo.lock` whenever a transitive dep
re-resolves (mtime drift, polars git pin movement, etc.); after a
`just ship` upstream the lockfile has moved, so a plain `git pull`
aborts.
- `just sync`: `git fetch origin main && git reset --hard FETCH_HEAD`,
guarded against running on any branch other than `main` so feature
branches with real WIP cannot be wiped by accident. Prints what's
being discarded. Both `[unix]` (bash) and `[windows]` (PowerShell)
variants, matching the existing `use` / `use-local` split.
- `just refresh`: `refresh: sync use` — drop-in replacement for the
`git pull; just use` leg of the daily-driver oneliner.
New oneliner becomes:
clear; Remove-Item ...; uffs.exe mcp kill; uffs.exe daemon kill; \
just refresh; uffs.exe daemon start; uffs.exe mcp start; \
uffs.exe status
Self-test on this branch (which is not `main`):
$ just sync
❌ just sync only runs on main (current: fix/uffsd-version-and-sync-recipes)
Use 'git pull --rebase' (or commit the WIP first) on feature branches.
The version fix is the user-visible behavior change driving the
patch-bump release; the recipe additions are dev-tooling-only and have
no effect on shipped binaries.
githubrobbi
enabled auto-merge (squash)
April 26, 2026 14:53
githubrobbi
added a commit
that referenced
this pull request
Apr 26, 2026
…sorts as empty (#73) Bug: T62 `--sort extension asc` fails on Windows live MFT with "Not asc: bash_history > 2008" because `scripts/windows/api-validation.rs` computes the per-row Extension column with a naive `name.rsplit('.').next()`. For `.bash_history` (leading-dot hidden file) that yields `"bash_history"` instead of `""`, mis-ordering it ahead of the digit-prefixed names. Why CLI + MCP already work, but API didn't: v0.5.74 fixed the MCP lane (`crates/uffs-mcp/src/tools/search.rs`) and v0.5.75 (PR #71) shipped alongside, but the same dot-gated fix for `extension_from_name` in `uffs-format`/`uffs-core` is what the CLI uses. The pure-RPC validation lane in `api-validation.rs` derives its own Extension column from the daemon's `name` JSON field via `rpc_field_computed("_ext")` and never picked up the fix. Fix: Add `extract_ext_dot_gated` helper mirroring `extract_extension_after_dot` in `crates/uffs-core/src/search/filters/ext_match.rs`. Returns empty string for: dotless names, leading-dot hidden files, trailing-dot names. Use it in (a) `_ext` computed column (sort + display) and (b) the `type_*` allowlist validator (so dotless rows are not classified by their full name as a phantom extension). Verification: - `rust-script -p` + `cargo check` on generated package: clean. - Existing dot-gated regression tests in `uffs-format` / `uffs-core` / `uffs-mcp` already pin equivalent semantics for the workspace lanes. Affects: T62 (sort extension asc) + type_code/document/executable/picture/system.
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.
Why
just use's install-time--versionprobe showsuffsdreturning empty:Root cause:
uffsd's clap#[command(...)]attribute was missingversion, soclapdoesn't wire a--versionhandler at all and the binary exits silently.Peer binaries already pull
CARGO_PKG_VERSIONvia clap's auto-version:uffs-mcp/src/main.rs→#[command(name = "uffsmcp", version, about)]uffs-mft/src/cli.rs→#[command(author, version, about, ...)]uffs-cli/src/args.rs→ customprint_version()handlerWhat
Daemon fix (
crates/uffs-daemon/src/main.rs):versionto#[command(...)].namefrom"uffs-daemon"→"uffsd", matching the actual[[bin]] name = "uffsd"incrates/uffs-daemon/Cargo.toml(and the binary path users invoke).Verified locally:
$ ./target/debug/uffsd --version uffsd 0.5.74 $ ./target/debug/uffsd --help | head -1 UFFS background search daemonBonus dev tooling (
just/build.just) — fixes a recurring friction in the daily-driver oneliner:cargo buildrewritesCargo.lockwhenever a transitive dep re-resolves (mtime drift, polars git pin movement, etc.); after ajust shipupstream the lockfile has moved, so a plaingit pullaborts.just sync—git fetch origin main && git reset --hard FETCH_HEAD, guarded against running on any branch other thanmainso feature branches with real WIP cannot be wiped by accident. Prints what's being discarded. Both[unix](bash) and[windows](PowerShell) variants, matching the existinguse/use-localsplit.just refresh—refresh: sync use. Drop-in replacement for thegit pull; just useleg of the daily-driver oneliner.New oneliner:
Self-test on this branch (which is not
main) confirms the safety guard:$ just sync ❌ just sync only runs on main (current: fix/uffsd-version-and-sync-recipes) Use 'git pull --rebase' (or commit the WIP first) on feature branches.Scope
Single PR, type
fixbecause the version-flag is the user-visible behavioral defect driving the patch-bump release. The recipe additions are dev-tooling-only and have no effect on shipped binaries.Tests / verification
cargo build -p uffs-daemon— clean./target/debug/uffsd --version/--help— both produce the expected outputjust lint-fast— green (file-size, fmt-check, lint-prod, lint-tests, lint-ci, typos, reuse)lint-pre-push— green across all 13 gates includingtests,rustdoc,doc-tests,check-windows,smokejust --summary | grepshowssync,refresh,use,use-localall parsedjust syncon this branch correctly refuses with the helpful errorFollow-up
After this lands I'll cut v0.5.75 via
just shipso~/bin/uffsd.exe --versionactually showsuffsd 0.5.75next time youjust refresh.