forked from heavy-duty/box
rig is growing a second family of roles, and once a 'staging' role can mean either a fleet machine or a box tenant, the bare name stops naming anything. rig's answer is a suffix on the role (heavy-duty/rig#76): '-server' for fleet machines, '-box' for box tenants. box's answer is that a template keeps being named for the role it converges, so the tenant templates move with it: claude -> claude-box codex -> codex-box grok -> grok-box staging -> staging-box Templates are the only surface that spells a rig role out loud (BOX_BOOTSTRAP_ROLE, auto-run at mint since #81), so a directory that says one thing and a role key that says another is a trap with a 15-minute fuse: it mints clean and dies at convergence. Renamed with 'git mv' so the history of each seed follows it. 'blank' keeps its name. It seeds no tenant role and sets no BOX_BOOTSTRAP_ROLE, so it has nothing to agree with — renaming it would only churn the default template's name for symmetry's sake. Two namespaces move apart here and only one of them moved: the template name and the role are now claude-box, while the seed USER stays 'claude' — that is the user rig's role converges and the one 'box shell' lands in. test/cli.sh pins the pair per tenant rather than each half alone, because a later rename that moves one and forgets the other mints a box whose role dies looking for a user nobody created. drill.sh keeps its bare box NAMES ('codex', 'grok' — what the pre-flight banner announces and what teardown deletes) and only moves the --template it passes. The mint-time hints in cmd_new match both spellings of user.box.template, and that is not an alias for the role: 'rig bootstrap claude' is gone and nothing here softens the cut. The stamp is a fact about an INSTANCE, written at its own mint time and carried forward by every clone; refusing the old spelling would cut nothing over and only drop the login hint on boxes that predate today — the same reason user.claudebox is honored everywhere else. migrate-host.sh stamps re-homed legacy boxes claude-box, the name the template has today, so a re-homed box looks like a fresh mint rather than a fossil. Ordered AFTER rig's rename, and that is not a preference. The seeds install rig from RIG_REPO/RIG_REF, defaulting to heavy-duty/rig@main and unpinned until rig#32's releases, so these templates ask whatever main happens to be for 'rig bootstrap claude-box'. Against a pre-rename rig that role does not exist and cmd_new refuses to call the box ready. Merged in the other order the window closes instead of opening: rig's cut is hard, with no aliases, so the day it lands every unmerged box seed naming a bare role is the broken one. Closes #123 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
21 lines
1.2 KiB
Bash
21 lines
1.2 KiB
Bash
# The grok-box template — a thin, creds-free seed (#81): Debian 13, the
|
|
# 'grok' user, tmux and rig. What the box BECOMES — the xAI Grok CLI,
|
|
# docker, the agent-context file with its #80 guard — is rig's job:
|
|
# box auto-runs 'rig bootstrap grok-box' after mint (heavy-duty/rig#31).
|
|
# The template is named for the role it converges, suffix and all
|
|
# (heavy-duty/rig#76): rig's roles carry a family suffix — '-server' for
|
|
# fleet machines, '-box' for box tenants — and a seed that named the bare
|
|
# 'grok' would ask a post-rename rig for a role that no longer exists.
|
|
# KEY="value" only. Parsed against an allowlist, never sourced; there is no
|
|
# key for a network or a security flag, on purpose — the shared box-net
|
|
# profile is the placement contract and no template can weaken it.
|
|
# BOX_USER must match the user user-data.yaml creates (the duplication is
|
|
# deliberate and by hand) — and it is the tenant user the rig role converges
|
|
# (rig dies loudly if the seed did not create it).
|
|
BOX_DESCRIPTION="xAI Grok CLI on Debian 13, creds-free — box mints, rig converges"
|
|
BOX_IMAGE="images:debian/13/cloud"
|
|
BOX_USER="grok"
|
|
BOX_CPU="4"
|
|
BOX_MEMORY="8GiB"
|
|
BOX_DISK="60GiB"
|
|
BOX_BOOTSTRAP_ROLE="grok-box"
|