feat!: claudebox becomes box — the Claude box is one template among several #52
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#52
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/box-rename"
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 #17 — the third act of the #12 split, unblocked by #16's measured close.
The three open calls, taken as recommended
box, noclaudeboxshim; the installer retires the old symlink on upgrade and says so. Dual-tag matching and the legacy-user fallback ship regardless (below).claude—box new --name workbehaves exactly likeclaudebox new --name workdid.heavy-duty/claudebox, binary isbox— the documented curl URL keeps working;CLAUDEBOX_*installer env vars stay (they name the repo, which didn't move).The mechanic (per the issue, with its audit receipts)
user.box=1,user.box.template,user.box.user.shell/exec/tmuxread the user back viabox_user()—${u:-}fallbacks, never||(audit B4) — andincus copycarriesuser.*(audit B2), so a clone knows its user without consulting the template (the A9 drill check already probes exactly this).templates/<t>/box.env+ verbatimuser-data.yaml. box.env is parsed against a strict allowlist, never sourced — and there is no key for a network or security flag, on purpose. Unknown key → hard error naming it (tested:BOX_NETWORK=lan→unknown key 'BOX_NETWORK' — … there is no key for a network, on purpose).box-netprofile — isolated NIC (security.port_isolation) + root disk, nothing else. Resources are per-instance from box.env, overridable at mint viaBOX_CPU/BOX_MEMORY/BOX_DISKenv — which is also how the drill shrinks boxes on a small host, since a profile edit no longer reaches limits.resolve_box(),list, the doctor's probe discovery, and the drill's tenant check all honoruser.claudebox=1forever; the legacy tag maps to theclaudeuser. A pre-rename box lists, shells into claude, and works as a--fromsource. (list --jsonfilters on the new tag only — the one documented compat edge.)Deliberate divergence from the issue's table
The host-stack resource names are not renamed:
claudenet,claude-isolate, the nft tables,claudebox-firewall.{sh,service}. They are host-internal, invisible to users of the CLI, and renaming them breaks every provisioned host for zero user-visible gain. What did change: setup-host now creates box-net (and no longer creates claude-dev); an existing claude-dev is left alone while legacy boxes reference it (Incus refuses to delete an in-use profile anyway) and teardown removes both.Drill and doctor stay green — by construction, to be proven by run
Every exact-string dependency was walked: command invocations, the
^box:announce-line skips, the'box info archive'pointer, the A-phase tag semantics (now probinguser.box), the hatch'suser.boxconfig check, the profile preflight/cleanup (both profiles), and the resource-lowering path (nowBOX_MEMORY/BOX_CPUexports). Verified locally:bash -non every script, plus livebox --version/templates/help/ did-you-mean / both template-rejection paths.To drill this branch before merging (the drill self-installs from main by default):
Expected: 47/47, with the resource note now reading
minting at 3GiB/2cpu via BOX_MEMORY/BOX_CPU. Acceptance items that need the live run: blank-template mint + isolation parity, and a pre-rename box on the host surviving every verb.VERSION: 0.3.0 → 0.4.0. After this merges, #46's verb is
box doctorand #6's isbox tmux— both already read the template user.🤖 Generated with Claude Code
Second commit, per operator direction — the host-name divergence is reversed and the cut completed:
box-rename:boxnet(on 10.88.0.0/24 — a pre-rename host may still carryclaudeneton 10.87, and two bridges must not claim one subnet),box-isolate, nftinet box/bridge box,box-firewall.{sh,service}.teardown-host.shnow strips both name generations, so one script uninstalls a host of any age.blank—box new --name xmints bare Debian; the Claude box is--template claude. The /login hint follows the effective template read off the instance (clones included).BOX_NETWORKrejected by name from a planted bad template, and a full blank mint — default resolves to blank, metadata stamped,box-netplacement,execlands indev, no claude binary, isolation parity (egress + pinned DNS).drill/wipe.sh— the staging-server reset button: both tag generations, every drill-named instance, networks/ACLs/profiles/firewall of both generations, cached images,--purge-storagefor the pool. Ends by asserting the absence of every artifact instead of trusting removal exit codes.Validation sequence for the staging server:
Expect the previous 47 checks plus ~12 template checks, everything rebuilt under the new names.