refactor(runner): drop the redundant `svc-` prefix from service verbs #54
worktree-service-verb-rename
into main
Refs #35. Companion to fangorn/anvil#235 (tracked by fangorn/anvil#382).
anvil runner service svc-restart stutters — the group is already named
service. The four verbs are now start, stop, restart, and status.
The svc- spellings stay as hidden clap aliases: they are baked into install
scripts the server generates, into runbooks, and into shell history, so breaking
them outright would strand existing runners mid-upgrade. A test pins the
aliases.
⚠️ Merge order — this PR first
This PR must merge, and its release must publish, before fangorn/anvil#235.
Anvil deploys on merge to main. The moment #235 lands, /docs/runners and
/docs/cli instruct every reader to run anvil runner service start, and
priv/docs/runners.md asserts the svc- spellings “still work as aliases” —
neither is true until a released binary carries this change. main here still
has only svc-*, and the newest published release is 2026.07.12 (cut
2026-07-24); Anvil’s /runner/download streams whatever the latest published
release is. anvil-cli publishes a release on every push to main, so the
sequence is mechanical, but the release must actually have completed before
#235 merges.
This does not close #35
#35 asks for two things this PR does not deliver, so please leave it open:
- A vocabulary test across the command tree. #35’s suggested approach is
“pick one verb per operation, alias the losers for compatibility, and add a
test that asserts the chosen vocabulary across the command tree so it cannot
drift again.” This PR fixes one item on #35’s list and pins the aliases for
that item only.
editvsupdate,delete/remove/revoke,--statevs--status,--orgvs--organization, the three meanings of--repo, the four--limitdefaults, the four boolean encodings, andlistvs bare plural nouns are all untouched. - The residual near-collision #35 itself flags.
anvil runner stop(stop the foreground runner) andanvil runner service stop(stop the installed service) are now two similar names for different things — arguably more confusable than the oldsvc-stop, since the distinguishing token is no longer in the leaf verb. Dropping the prefix was still right, but #35’s objection survives it and needs its own answer.
Correction to #35
#35 says the prefix “only exists to avoid a Rust enum-variant clash with
RunnerCommand::Start/Stop/...”. That was never true. ServiceCommand is a
separate enum from RunnerCommand, and on main its variants are already
plainly named Start, Stop, and Restart (src/commands/runner.rs:264,271, 278 before this PR) — only the clap #[command(name = "svc-…")] attribute
carried the prefix, and only SvcStatus was genuinely prefixed at the Rust
level. There was no clash to avoid; the prefix was a user-facing choice, not an
implementation constraint. Worth fixing in #35 before anyone uses that rationale
to defend keeping a prefix elsewhere.
🤖 Generated with Claude Code