feat: make the command surface a table, add rename and an escape hatch
#13
No reviewers
Labels
No labels
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-triage
ready
release
scope:cli
scope:drill
scope:host
scope:installer
scope:templates
scope:tiers
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/box#13
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/command-table"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #11. Branches off
mainwith #9 and #10 merged — not stacked.Every Incus verb is a candidate feature request. This lands the rule instead of
the next wrapper.
The rule (now in
docs/claudebox-design.md)1. The table
CMDSinbin/claudeboxis now the single source of truth — existence,synopsis, preconditions, help line, what runs, what it prints:
Preconditions are declarative:
box(resolve + tag-check),arg2,stopped,confirm(thermprompt). Dispatch and help are both rendered from theserows, so the help can no longer describe a command that doesn't exist — the
drift that produced #8 is now impossible by construction rather than fixed by
hand. Adding a thin verb is one line; if a request can't be a row and enforces no
invariant of ours, it isn't ours.
2.
rename— one row, and not a proxy after allIncus refuses to rename a running instance, so the wrapper has real work to do:
3.
claudebox incus <box> -- <args...>— the door outBox resolved and tag-checked, the rest passed to Incus verbatim,
{}substituted(appended if absent), command echoed before it runs — no magic. "That's Incus's
job" is never "you can't do that".
⚠️ The boundary is now enforced, not assumed
Previously only
list/infofiltered on the tag —rm,down,start,shellandexecwould act on any Incus instance you named. They now allresolve through
user.claudebox=1:Breaking in one case: a box created before the tag existed (pre-#4) is now
refused as well as invisible. Re-tag it and it's back:
Testing
Same caveat as #9 and #10, and it matters more here: no real Incus — I work
inside a claudebox, which has neither
incusnor nested virt. Everything wasdriven against a stubbed
incus, including an untagged instance (payroll) forthe boundary, a running box for
rename's precondition, and the multi-addressdocker box. 21/21 cases pass with expected exit codes;
shellcheckandbash -nclean.
Two things I could not verify, and would smoke first:
incus config get <inst> user.claudeboxreturns1for boxes minted bynew. It's the same keynewsets, but this read path is new — and it is nowon the path of every box command. If it's wrong, everything fails closed
with "no such box", which is loud rather than dangerous.
renamereally does refuse a running instance rather thansilently working. If it doesn't, the precondition is merely conservative.
🤖 Generated with Claude Code