M3 vup CLI: sigil grammar + lifecycle + vault verbs#4
Merged
Conversation
…tore
Replace legacy verbs (init/backup/restore/snapshots/add) with the locked
sigil grammar `vup +<vault> <verb>`. New modules:
sigil.rs — argv preprocessor + vault-name validator + 16 tests
cmd/lifecycle — top-level ls / new +vault / drop +vault
cmd/vault — vault-scoped snap / history / restore / add / info,
wired against the new vault.recipients / sources /
blob_stores schema via existing TaskSpec RPCs
cmd/onboard — renamed from init.rs; writes the new schema
cmd/stubs — placeholders for verbs that still need infra
(mount / grant / pair / export / kick / etc.)
Bootstrap exception model: only `_daemon` and `onboard` skip the daemon
connection. Every other verb routes through the running node — the CLI
is an RPC frontend.
Single-letter aliases on every verb (`s` snap, `h` history, …).
Subject-first and verb-first phrasings both accepted.
`tasks::poll_until_done` made pub so vault verbs can drive their own
progress. Five legacy task helpers retained with #[allow(dead_code)]
as natural starting points for future sub-verbs.
Assisted-by: claude-opus-4-7
CI under `cargo clippy -- -D warnings` was failing on five sites that slipped through review: - `s5_node/src/tasks/publish.rs`: `field_reassign_with_default` in the recovery-secret test fixture (use struct-update syntax). - `s5_cli/src/cmd/blobs.rs`: drop `BlobsRead` from imports — unused since the v3 wire-format adapter pass. - `s5_node/tests/peer_load.rs` (×2): `cloned_ref_to_slice_refs` — `&[s.clone()]` → `std::slice::from_ref(&s)`. - `s5_node/tests/concurrent_publish.rs`: `doc_lazy_continuation` — indent the `window.` line so it nests under the `+` list item it continues. - `s5_cli/src/main.rs`: `enum_variant_names` on `SnapshotsCmd::*Fs` — silenced with a justified `#[allow]` rather than renamed, since the variants are user-visible CLI subcommand names (`snapshots list-fs`, etc.) and the `Fs` postfix is intentional (distinguishes from future non-FS variants). Also re-runs `cargo fmt --all` over `vup_cli/src/cmd/vault.rs` and `vup_cli/src/sigil.rs` — both had latent rustfmt drift (collapsed `println!` / argv arrays) that the previous commit didn't surface. Validation: `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --all -- --check` both pass. Assisted-by: claude-opus-4-7
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.
Replaces the legacy verbs (
init/backup/restore/snapshots/add) with the locked sigil grammarvup +<vault> <verb>. The CLI is now a thin RPC frontend over the running daemon: only_daemonandonboardskip the daemon connection; every other verb routes through the node.Grammar
Single-letter aliases on every verb (
ssnap,hhistory,rrestore,aadd,iinfo).+and++follow the sigil rules:+nameis a vault reference;++is reserved for future tag syntax and left untouched.What's in
sigil.rs. Argv preprocessor that rewritesvup +music snapintovup vault music snapbefore clap sees it, plus a vault-name validator (chars + length + reserved names). Walks known global flags (--config <path>,-v/-q/--verbose/--quiet) so prefix flags don't break the rewrite. 16 unit tests.cmd/lifecycle.rs. Top-levells/new/drop.new +vaultruns the onboard flow (paper key + recipient bundle);drop +vaultremoves the config entry after a confirm prompt.cmd/vault.rs. Vault-scopedsnap/history/restore/add/info, wired against the v3 vault schema (recipients/sources/blob_stores) via the existingTaskSpecRPCs.tasks::poll_until_doneis nowpubso vault verbs can drive their own progress bars.cmd/onboard.rs. Renamed frominit.rs; writes the v3 schema directly.cmd/stubs.rs. Placeholders that printnot yet implementedand exit 0. Stubbed:mount,snap --watch,export,join,grant,pair,kick,who,peers,unpair, and thestoresub-namespace. Each stub takes&S5NodeClienteven when unused, matching the production model.Five legacy task helpers retained with
#[allow(dead_code)]as natural starting points for the sub-verbs that replace them.Bundled
chore:commit cleans up five clippy lints + two fmt drifts that slipped past the previous two merges (4 of the 5 introduced by them) so the workspace once again builds clean undercargo clippy -- -D warnings. Includes a justified#[allow(clippy::enum_variant_names)]onSnapshotsCmdsince theFspostfix is user-visible (s5 snapshots list-fs, etc.).Validation