Round 2 review (claude-bot, codex-bot — both raised this, independently). The `return` added in round 1 aborted all of reconcile_pr, not just the label edit. Everything below it is independent of the state:* taxonomy: `merge-next` clearing and the stale sweep both stopped running. So a cold-start repo left `merge-next` claiming "merge this one next" on a PR the board had moved to the agent — the original false-invitation bug, reintroduced inside the very fix meant to survive a cold start. It was also a regression against main, not just a missed improvement: the old code failed the `gh issue edit`, logged, and fell through to both blocks. Round 1 turned a per-edit failure into a per-PR abort. Now a `skip_edit` flag skips only the edit and control reaches the rest. Also from review: drop the dead `"$desired"` term from the filter loop (it was appended and then unconditionally continued past), and turn `[ -n "$missing" ] && log` into a proper `elif` rather than an &&-as-statement under `set -e`. Adds the first four fixtures that exercise reconcile_pr itself, stubbing run/gh to probe a cold-start repo against a bootstrapped one. Everything before this tested pure functions, which is exactly why a per-PR return got through: nothing could see it. Fixtures 68 -> 72. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
44 KiB
Changelog
History before 0.1.0 lives in git — rig grew its version surface (VERSION,
rig --version, the side-by-side versions/<v> install layout; #35/#36)
on the way to cutting its first release, and this file starts there.
Unreleased
Fixed
-
An unreadable check rollup no longer reads as "nothing is failing" (#90) — when
gh pr viewfailed, the fallback left thestatusCheckRollupkey absent entirely, and(.statusCheckRollup // [])collapsed that into the sameNONEas a PR that genuinely has no checks.NONEblocks nothing, so a transient API failure presented the PR as mergeable by a human: an unknown certified as green, which is the exact shape of the bug #87 was opened to stop, surviving in the one place that fix never looked.checks_statenow separates the two —UNREADABLEfor an absent key (a read that failed),NONEfor a present-but-empty array (a PR that really has no checks) — and the sweep leaves anUNREADABLEPR exactly as it found it rather than recomputing labels from facts it did not read. Deliberately not a blocker: blocking would flap the whole board on one bad API call, and the next tick is fifteen minutes away. Caught by the author after opening the PR, not by review. -
CI runs
test/labels-reconcile.sh, which it had never run (#90) — the file arrived with #87 andci.ymlwas not extended to call it, so the label state machine that gates every PR in this repo went covered only by whoever remembered to run its fixtures by hand. #88 merged reporting 51 passing fixtures: true on the author's machine, never once verified here. Box and cast both ran the suite already; only rig did not, so this closes a rig-local gap rather than a family-wide one. It was found by asking, while adding fixtures to the suite, where the suite actually ran. -
state:needs-humanno longer appears on PRs a human cannot merge (#87, heavy-duty/box#136) —decide_state()derived state from three inputs (draft flag, requested reviewers, submitted reviews) and read nothing about mergeability or checks. Combined with theif requested "$HUMAN"short-circuit at the top of its precedence, the label was sticky: once the maintainer was requested, the PR readstate:needs-humanthrough conflicts, through red CI, through a force-push that staled every approval. Nothing demoted it.This repo paid for it directly. During the ten-PR batch merged on 2026-07-20, every merge re-conflicted the PRs below it through
CHANGELOG.md— and each one kept itsstate:needs-humanlabel the whole time, inviting a merge that could not happen. It was noticed only by opening them one at a time, which is the exact work the label exists to save.The rule the label now keeps is that
state:needs-humanmeans a human could merge this right now, so anything making that false outranks the request that put it there. ACONFLICTINGbranch or a failing check is the agent's to fix: newstate:needs-rebase. Approvals staled by a push mean nobody reviewed this tree:state:addressing, because the agent owes a re-request. An unfinished round still yields to an explicit human request — a maintainer pulling a PR to themselves early is deliberate, andMISSING(nobody has reviewed yet) is a different fact fromSTALE(everyone reviewed something else). Precedence is applied to the round as a whole, after every verdict is collected: deciding inside the loop let the order ofBOTSpick the answer, so a round that was both unfinished and staled returned on theMISSINGbefore any later bot'sSTALEwas read — and came outneeds-humanover a head nobody had reviewed, the original bug wearing a different hat.Whether a check blocks is judged by listing the outcomes that don't —
SUCCESS,NEUTRAL,SKIPPED, and the pending set — rather than the outcomes that do. The rollup mixes two closed enums (CheckRun.conclusionandStatusContext.state), and an outcome the list forgets is one the label cannot certify as mergeable:ERROR,CANCELLEDandSTALEall read as green under an allow-list of failures. The costs are not symmetric — a false failure parks the PR on the agent, who looks; a false success invites a human to merge a tree that will not merge. Superseded runs are dropped first, each context collapsing to its newest entry: a re-run does not evict the run it replaced, so box#137's own tip carried aCANCELLEDscopebeside theSUCCESSscopethat superseded it, and judging every entry would have stranded every re-run PR inneeds-rebase.Which entry is newest is dated by when the run began —
startedAt, falling back only if it never recorded one — discarding both spellings of absent. A run still in flight has no completion, butghdoes not omit the field: its Go struct marshals the zero time as the string0001-01-01T00:00:00Z, and//falls throughnullandfalseonly. Dating by completion therefore sorted the live re-run to the bottom and letlastpick the very run it superseded — a green context with a replacement mid-flight readSUCCESS, inviting a merge the button had already disabled, which is #136 restored by the fix for it.Taking the newest stamp each run carries is not a fix either, and this is the subtle part: it compares a finished predecessor by when it ended against a live successor by when it began, which is not an ordering on runs at all. A run cancelled by the concurrency group does not stop the instant its replacement starts — the runner has to receive the signal and wind down — so the predecessor completing after the successor started is the ordinary case, 13s wide on the box#137 tip that motivated the supersede rule. For that whole drain window the dying predecessor out-dated its own replacement. One consistent quantity, start time, is the only ordering that holds. An entry carrying no usable timestamp at all sorts last rather than first, so something that cannot be dated is never discarded in favour of a stale success. Every ambiguity here resolves toward "not settled".
UNKNOWNmergeability is deliberately not treated as unmergeable: GitHub reports it for about a minute after every merge while it recomputes, and flapping every open PR throughneeds-rebaseon each merge would be worse than the bug. A failed read of either fact degrades to the same "do not know" value, for the same reason.Also adds
merge-next, because a correctneeds-humanstill does not say which PR to merge first, and order matters when they conflict. Queue order is intent, so the reconciler never sets it — it only clears it once the PR stops being mergeable-by-a-human, which is precisely the staleness that madeneeds-humanuntrustworthy. Both live shapes, the mixed round, the whole check-outcome enum, and the re-run in every temporal arrangement it occurs in — superseded, still in flight in both spellings of an absent completion, undateable, and still draining past its replacement's start — are pinned intest/labels-reconcile.sh. Ported from heavy-duty/box#137 so the three repos' reconcilers stay byte-identical; fixtures 19 → 51.
Added
-
rig platform— what is this machine, calculated at run time, stored nowhere (#64) — rig read no hardware at all; the single exception wasuname -minrunner-install.sh, used to pick a tarball and then discarded. So "is this the 32GB one, or the M900?" was answered by logging in and runningfree -h,nproc,df -handuname -rby hand, four commands deep, on a machine you were already unsure about.rig platformprints hostname, OS, kernel, CPU, memory, disk and virtualization, then a provenance block (which rig, when, and the role marker's traits). It computes rather than stores: specs change without rig doing anything — RAM added, root disk resized, the unattended-upgrades bootstrap itself enables patching the kernel — so a stored spec is stale the moment the machine changes, and refreshing one per run would collide with bootstrap's "a second run changes nothing" contract. Nothing is written, so nothing can go stale. The corollary is deliberate: reading only/proc,uname,/etc/os-release,dfandsystemd-detect-virtmeans it needs no root, makes no network call, and runs on a pristine Debian box rig has never bootstrapped — useful for deciding what to converge a machine into, not only for auditing it afterwards. That also makes it the rare rig command the harness can RUN for real instead of grepping: the tests assert the actual answer describes the actual test machine. Provenance is read, never written, and degrades per-file —/etc/rig/manifestis #61 and does not exist yet, so those lines readnot bootstrappedon every machine today and nothing else depends on it. The reader is keyed to #61's documented schema (schema,bootstrapped_by/_at,converged_by/_at) and fixtures pin that exact spelling, so the integration cannot land silently broken; birth and latest stay separate rather than one being inferred from the other. A fresh machine writes both pairs equal, so two identical lines read as "never re-converged"; a manifest missing the pair is partial rather than fresh, and says so instead of backfilling from birth. Namedplatformand notstatuson purpose:users statusandrunner statuscross-check recorded against live state and printDRIFT, and a command that records nothing cannot drift — which also leavesrig statusfree for the machine-wide roll-up. Known limitation, stated rather than guessed at:CPU/MEMORYare read from/procwith no cgroup awareness, and whether anlxcguest sees its own limits or the host's totals depends on whetherlxcfsis in play — it is unverified, so those two lines are unreliable there. -
/etc/rig/manifestrecords which rig converged a machine, and when (#61) — the entire durable output of a bootstrap run was one line in/etc/rig/role, and that line is about what the box is, never about what built it.VERSIONwas read in exactly one place (bin/rig:9, for--version) and that reports the currently installed tree, not the one that ran; there was no timestamp anywhere in the codebase. SSH into a control plane six months on and a machine converged by0.1.0-devwas indistinguishable from one converged by0.4.0. Bootstrap — both the machine roles and the box tenant roles — now stamps a second file beside the marker:schema=1,bootstrapped_by/bootstrapped_at(the rig that first converged this machine, pinned forever) andconverged_by/converged_at(the newest rig to have converged it), read back with a newrig manifest [<key>].key=value, one per line,0644— never JSON or YAML, because this is the one file that must stay readable on the most broken machine in the fleet and a rig-bootstrapped box has no YAML parser and nojq.Only decided facts go in, which is what keeps
bootstrap.sh:3's contract ("a second run changes nothing", enforced by cmp-guards at nine sites) intact:bootstrapped_*is first-write-wins, andconverged_*updates only when the version actually differs — it is the time the converging version last changed, not the time of the last run. A naive timestamp would have made every re-run a diff and had rig report a change it did not make. Observed facts — cores, RAM, disk, kernel — are deliberately absent: they go stale without rig doing anything, so they belong torig platform(#64), which computes them fresh and stores nothing./etc/rig/roleis untouched — the marker holds traits and has six readers; the manifest holds provenance. Readers must ignore keys they do not know, and the writer preserves lines it does not own, so a manifest written by a newer rig stays readable to (and survives a rewrite by) an older one.
Changed
-
PR labels split into two axes:
state:*(whose ball) andblocker:*(what is in the way) (heavy-duty/box#137) —state:needs-rebase, added here only days ago by #87, is retired in the same breath. In its place:blocker:conflict,blocker:ci-redandblocker:unrequested, applied additively. A single rule joins the axes —state:needs-humanrequires zero blockers — which is the invariant #87 was reaching for, stated once instead of defended at every branch of a precedence chain.The single-label design projected independent facts onto one totally-ordered value. Mergeability, check status and the review round move on their own clocks; a PR can be conflicted and red and stalled at the same instant. A total order has to pick one of those to say, so the rest vanish. Every precedence bug this machine has had lived on that ordering, #87's included: the fix there was to reorder the chain and collect the round before deciding, which bought correctness for one more configuration without removing the reason the next one would break.
state:needs-rebasewas the design's clearest tell — a single label fired by both a conflict and a failing check, two problems needing opposite work, telling an agent to rebase when what it owed was a bug fix. Box's board has the case in the open: #120 was conflicted and red, and could only ever say one of them.Blockers are a set. There is no precedence between them to get wrong, and adding a fourth one later cannot reshuffle the meaning of the other three. What stays on the ordered axis is purely the review round, which is the one place here where an ordering is genuinely meaningful — a round really does have a sequence.
state:bots-reviewingtightens with it, to mean strictly a request is live and an answer is coming. A ready PR nobody was asked to review used to read as "waiting on the reviewers" until the stale sweep caught up; it now readsstate:addressing+blocker:unrequested, because the agent owes the ask and the board should say so.blocker:unrequestedcovers both shapes of "this head has no verdict from somebody": nobody reviewed it, or everybody reviewed an older tree and the approvals staled behind a push. The second is the worse of the two, since it leaves approvals on the page that no longer describe the code. Drafts stay exempt — the bots ignore drafts by design — as does an explicit human request, since a maintainer claiming a PR early is deliberate.The reconciler strips
state:needs-rebaseon sight via aRETIREDlist, so the retirement heals the existing board instead of stranding a label that nothing recomputes. It also filters every label it is about to add against the repo's actual label set, read once per sweep:gh issue editrejects the whole call on one unknown name, so on a repo that has not yet bootstrapped the newblocker:*labels a single missing one would have taken the state convergence down with it — on exactly the PRs this change exists to heal. Now the state still converges and the missing labels are named in the log. Fixtures 51 → 72. -
BREAKING:
--class human|serveris now--root-door closed|open(#77) — the trait was named for who lives on a box; what it decides is one thing, and it is not occupancy: whether root SSH stays open as the control plane's automation door, orrig users close-rootshuts it once named operators can get in. The roles had been saying so for a while.dev-serveris an unattended VM-host appliance — nobody lives there, operators visit it to mint boxes and leave — and by occupancy it is plainly a server. It wasclass=humananyway, and correctly so, because operators enter it as themselves and its root door must close. The trait was right; its name described the wrong axis.That stayed cheap until a second thing wanted the word "server". After #76 the
-serversuffix names the machine family, sodev-servercarried a suffix saying server and a trait saying human, and nothing in the name told a reader that the two words were answering unrelated questions.dev-server --root-door closedsays exactly what is true, and-servermeans one thing everywhere. The values moved with the name:human→closed,server→open, and the marker field follows asroot-door=.Other names were considered.
--root-door open|closeddescribes a destination rather than the state at bootstrap time — bootstrap leaves root SSH open on every box, and the door only shuts later, whenclose-rootruns — so--root-door closes|stayswas on the table for naming the fate as a verb, as was--automation-door yes|nofor naming the thing itself. Both were rejected in favour of the plainer pair: the marker is already a declaration of intent rather than a report of observed state everywhere else in this repo (host=yesclaims a box hosts VMs; #58 settled that the marker's claim wins over probing the machine), so a trait that states the door's designed end state is consistent with how every other field is read. Every string that prints the trait says "once operators exist" or namesclose-rootexplicitly, so the tense never has to be inferred.Old markers still resolve, permanently, and that is the substance of this change. Unlike #76's role rename — role names are informational, nothing reads them back — this field is written into
/etc/rig/roleand read from there on live machines, where it gatesrig users close-root. Every box bootstrapped before this carriesclass=humanorclass=serverand carries it until someone re-bootstraps it, which for a fleet is never. Dropping the old read would have broken in both directions at once and both are incidents: a machine whose door is supposed to close loses the ability to close it, and — throughbootstrap-tenant's machine-marker guard, which used the presence ofclass=as its "is this a real fleet machine?" test — a live box stops looking like a machine at all, so a tenant converge sails past the refusal that exists to protect it and clobbers its marker. That second one is the fail-open direction and was the least obvious part of the change.So one resolver,
root_door_of, reads both vocabularies, and every consumer goes through it — close-root's gate, apply's root-SSH note, and the tenant guard — because a compat read that lives at three call sites is three chances to drift.root-door=wins where both fields are present and agree;class=answers alone on every pre-#77 marker. A marker carrying both and disagreeing resolves to a refusal rather than a winner: bootstrap writes one line fresh and never produces that state, so a marker in it was hand-edited, and rig declines to arbitrate between two equally-authored claims about a root door. A marker naming neither refuses too, unchanged from before. Both refusals fail closed, which here means the door stays open and the operator is told to re-run bootstrap — never a door welded shut on a machine whose only entrance it was.The resolver matches whole fields, not substrings — the marker is one line of space-separated
key=valuepairs, so it pads both ends and matches on field boundaries. Review caught the first cut doing unanchored matching, which resolved any value that extended a real one:root-door=closedishread asclosedand passed close-root's gate — the single arm that authorizes an irreversible act — andclass=humanoiddid the same through the compat arm, both contradicting the resolver's own promise that a value outside the set resolves empty and fails closed. Only reachable by hand- editing a marker, so never a live incident, but this is the one function every consumer trusts and it owes them exactness rather than nearly. Both vocabularies are anchored: fixing only the current spelling would have left every pre-#77 box carrying the hole. Whitespace is normalised first, so a hand-edit using tabs reads the same rather than trading one silent misread for another.New markers are written in the new vocabulary only. Writing both would keep an old rig reading a new marker, but it would entrench the retired spelling on every box rig ever converges and make the disagreement case reachable from rig's own hand instead of only from a text editor. The compat obligation runs the other way and only the other way: new rig reads old markers. The bounded consequence to know about is downgrade — flipping a box back to a pre-#77 rig with
rig useleaves that older code unable to recognize the new marker; the flip already WARNS on a bootstrapped host (#35), and re-running bootstrap under whichever rig you settle on rewrites the line.The suite proves the compat read rather than asserting it. Fixture markers are kept deliberately at the retired spelling — byte for byte as a real pre-#77 box reads, the same convention #76's
pre-rename-cpfixture established — and pinned at both consumers:close-rootstill passes onclass=humanand still refuses onclass=server, with today's refusal text naming today's flag, and the tenant guard still recognizes a pre-#77 machine marker as a machine. Deleting the compat arm turns ten of them red. -
BREAKING: the box tenant roles carry a
-boxsuffix (#76) — the other half of the rename below.claude→claude-box,codex→codex-box,grok→grok-box,staging→staging-box, so a role name always says which family it belongs to:-serverbuilds a fleet machine,-boxconverges a guest a box minted.The role carries the suffix; nothing inside the guest does. A tenant user is the account the box seed created (
BOX_USER) and each agent CLI reads its own dotdir, soclaude-boxstill converges theclaudeuser and still writes~/.claude/CLAUDE.md. The suffix is rig's word for "this is a guest", not a rename of anything the guest contains — no path, no account, and no CLI binary moved.Migration: hard cut, no aliases, same as the machine roles. The old names are refused as unknown tenant roles at both entrypoints —
rig bootstrap <name>and the tenant script directly — and the suite asserts each one at both, because an alias left in for a single tenant is exactly the shape that survives review: the taxonomy reads complete while one old name still quietly converges. The practical consequence is cross-repo: a box seed carryingBOX_BOOTSTRAP_ROLE="claude"now fails its own mint-time bootstrap, so heavy-duty/box#125 (closing heavy-duty/box#123) updates the seeds and must land after this. -
BREAKING: machine roles carry a
-serversuffix, and the VM host gets its name back (#76) — rig builds two kinds of thing that sit on opposite sides of a trust boundary: tailnet machines it converges, and guests a box mints. Both families lived in one flat namespace, and no role name said which one you were asking for.stagingis where that stopped being cosmetic — the word names the metal that hosts guests and the guests on it, only one of them could have the name, and #31 gave it to the guests. The VM-host shape was left with no name at all, spelledcustom --class server --host yes --join authkey, which is what every refusal in the tree recited at an operator who had confused the two.So the suffix names the family:
control-plane-server,workload-server,runner-server,dev-server, and the restoredstaging-server(class=server host=yes join=authkey— the preset #31 retired, back under a name that cannot be mistaken for its own guests).host=yesalready installs the box CLI and runs box'ssetup-host, sostaging-serveris a table row rather than new machinery, and it stays out of thetag:serverallow-list on purpose: a host is never managed by the control plane, its guests are, so mint its key withtag:local.customandworkstationkeep bare names, and that is the rule rather than an exception to it.custompresets nothing and can be any shape — a guest included — so a family claim is one it cannot make.workstationis somebody's own device rather than fleet infrastructure: it joins by interactive login, comes up user-owned and untagged, and the tailnet never manages it.Migration — this is a hard cut, with no aliases. The old names are refused as unknown roles; a box bootstrapped under one is re-bootstrapped rather than migrated, which at this fleet size costs less than four deprecation paths each quietly keeping an old name alive. Two consequences worth knowing before you re-run anything.
TS_HOSTNAMEdefaults to the role name, so a box that took the default now comes up ascontrol-plane-serverrather thancontrol-plane— pass--hostnameto hold a name steady, and check anything pinning one (ACL entries, acastenvironments.yamlserver name, host keys). Andrig coolify install/rig coolify backup installmatch the role name in/etc/rig/role, so they now look forrole=control-plane-server; a pre-rename control plane takes their warning branch until it is re-bootstrapped. That check has always been advisory and never a gate, so the run still proceeds and the warning names the repair.The rename also reaches every string that tells an operator to run a role, not just the code that accepts one —
bootstrap-tenant.shemits the staging guest's tailnet-join next step (sudo rig bootstrap workload-server), and two of its refusals recite the machine-role list. A stale next-step is worse than a stale flag: it fails when someone copy-pastes it, on a different box, minutes after the run that printed it reported success.test/cli.shsweeps every shipped script for pre-rename role names rather than pinning the known sites, because the next instance of this will be somewhere else.dev-serverwasclass=humanwhen this landed, which read like a contradiction and was not: the suffix names the family, the class named the root-SSH door policy, and operators enter a dev box as themselves soclose-rootshuts its door. The two axes genuinely shared the word "server", which was a wart — #77, above, renames the trait to what it actually controls and retires it. It stayed a separate change because it reaches markers on live machines that guard root SSH, and so needed a compat read this rename did not.
Fixed
-
CI's shellcheck sweep now reaches
.github/scripts/(#70) — the step ranshopt -s globstarand globbedbin/* **/*.sh, but globs skip dot-prefixed names withoutdotglob, so**/never descended into.github/and two tracked scripts were linted by nothing:labels-reconcile.shandrelease-lib.sh. The second is the one that stings — it holdschangelog_section, the extractionrelease.ymlsources to build the published release body and the same functiontest/release.sh'schangelog_armedguard (#66) calls to decide whether main is armed. The script deciding both what ships and whether the changelog is safe was the script CI never read. Addingdotglobpulls in exactly those two files and nothing else; both already pass, so this closes a hole in the net rather than fixing a defect behind it. Paired with a class check that fails the step when any tracked.shfalls outside the globbed set, so the gap cannot reopen quietly — including via a symlinked directory, whichglobstardeclines to traverse. -
Ctrl-D at the
rig uninstallconfirm no longer aborts in silence (#68) —uninstall_confirm'sread -r replywas unguarded. Underset -euo pipefail, and called as a plain statement, EOF madereadreturn non-zero and killed the shell at the read — thecaseon the next line never ran, sodie "aborted."never fired. The operator saw the question, pressed Ctrl-D, and got nothing back: no message, just exit 1, at the exact moment the tool had asked whether to delete their install. It failed closed (nothing was ever removed), but nothing said so. Nowread -r reply || reply="", so EOF falls through to the*)arm and aborts out loud — the spellingcommands/db.shalready used for the same[y/N]shape, one file away.test/cli.shgains the first drills of the interactive path, drivingyand Ctrl-D through a real pty (util-linuxscript, skipped where it is absent) and asserting the MESSAGE rather than the exit code, which the bug also produced. -
users applynow tells "revoke everyone" apart from "I truncated the file" (#65) — a users file naming zero users is a valid instruction to revoke every operator on the box, and it is indistinguishable from a file a stray>produced. The per-user warnings apply already emitted arrive after the decision and scale wrong: twenty operators is twenty lines of scrollback, so the signal was loudest exactly where it read as noise. The/etc/rig/usersledger draws the line apply needs — an empty file against an empty ledger is an unambiguous no-op; against a populated one it closes every named door — so only the second case now stops, states how many operators are about to be revoked, and requires explicit consent:--yes,RIG_YES=1(the installer-family variablerig uninstallalready reads), or ayon a TTY. Without a terminal and without consent it exits 2, inuninstall_confirm's words, rather than assume a yes it cannot ask for or hang on a prompt nothing can answer. A confirmation, notrig bootstrap's flat refusal of the same file (#57/#59): bootstrap asserts who lives on a box, apply converges, and converging to zero stays a legitimate de-provisioning. Ledger entries already markedrevokeddon't count toward the number, so a second identical run stays the silent no-op. Mass revocation below the empty-file bright line (a file dropping 19 of 20) is deliberately still ungated — that needs a threshold someone has to justify, and #65 stays open for it.
0.2.0 — 2026-07-19
Added
users applygrants the box tier, not just its socket (#49) — roleboxresolved to exactly one action,usermod -aG incus. That is the socket; it is step 1 of the fivebox grantperforms, so every box-role user still needed an admin to runbox grant <user>by hand before their firstbox newwould do anything but refuse ("your project has no box-net profile"), and until that admin arrived they held anincusmembership with no converged project — incus-user would lazily hand them a stock unhardened NAT bridge, which is worse than no grant at all. Onhost=yesapply now callsbox grantper box-role user, afteruseradd(grant refuses an unknown account) and with the group ADD deferred to grant, so a grant that fails partway can take the socket back with it. Failures split the way thehost=guard beside them already splits: a missingboxCLI onhost=yesdies (a broken VM host), a per-user grant failure warns and continues (one box-role user must not stop apply for the fleet).host=noand marker-less boxes keep their existing skip-with-warning. Anincus-adminmember is warned, not fatal —box grantrefuses them today, which heavy-duty/box#99 fixes box-side with no rig change needed.
Changed
-
BREAKING:
rig bootstraptakes the users file, and requires it (#51) — bootstrap already knew everything else about what a box is (class, host, join, hostname) and wrote/etc/rig/roleto say so; the users file was the last piece of that answer it did not take, so bring-up was two commands and the second was the forgettable one.--users <path>now runs theusers applyconvergence as bootstrap's final phase — after the traits, after the verified tailnet join, after the role marker (apply reads that marker), and after thehost=yesbox install (so box-role users find theincusgroup box's ownsetup-hostbuilt). One command, and the box has its people on it. The file is still passed per invocation and never persisted;--users -is refused, because bootstrap's stdin belongs to the pre-auth key prompt.Migration: every existing
rig bootstrapinvocation must add--users <path>or--no-users. Omitting both is now a usage error (exit 2) naming both flags, and passing both is a usage error too. Scripted bring-up that already ranrig users applyas a separate step can either fold it in (--users ./users, and drop the separate call) or keep the old shape verbatim by adding--no-users. Required onclass=serveras well asclass=human: a server nobody logs into routinely is exactly where shared-root access rots, and per-human accounts keep attribution intact for the times someone does go in — so the complete path is the default path, and skipping it is deliberate rather than an omission that looks identical to forgetting. The box TENANT roles (claude|codex|grok| staging) take neither flag: a guest is minted non-interactively by box, never joins the tailnet, and has no SSH door of its own — entry isbox shell, gated by the host'sincusgrants.A bad users file is caught up front now (the same parser apply uses, before
apt, the hostname change, and any spent pre-auth key), and onhost=yeswithRIG_SKIP_BOX_INSTALL=1a box-role user with noincusgroup refuses immediately instead of a hundred lines later — the one case where the outcome is already certain. rig still never installs Incus and never callsbox setup-hoston its own account; every other way that step can fail lands inusers apply's existing refusal, unchanged.
Fixed
-
A release no longer disarms the changelog under the PRs still in flight (#67) — the ceremony stamps
## Unreleasedto## X.Y.Z — YYYY-MM-DDand stops. Every PR authored before that merge wrote its entry under## Unreleased; with the heading gone, git files the entry under whatever now occupies the position — the release that already shipped. There is no conflict, because the stamped heading and the incoming entry never overlap textually, so the one signal an author relies on ("git told me to look") is absent exactly when the outcome is wrong. It happened here: #60's #58 entry landed inside## 0.1.0at67386b4and was repaired two minutes later by0ff520c; #54 would have filed a BREAKING entry the same way. The published release body is never affected —release.ymlextracts it from the tree at the tag, before the late merges land — so the only file that drifts is the one only maintainers read, which is why it survived a whole release batch unnoticed. Fixed in both halves the failure has. The ceremony now re-arms: it adds a fresh empty## Unreleasedabove the section it just stamped, so a late merge has somewhere correct to land with no author action. That belongs to the ceremony step in CONTRIBUTING.md, not torelease.yml— no workflow has ever touched the heading; the stamping was always by hand, and the-devre-arm the workflow does perform was only ever aboutVERSION. Andtest/release.shnow keys its guard toVERSIONrather than demanding a literal heading: a stamped top section is legal exactly whenVERSIONis bare, and the moment it carries-dev— main, where feature PRs merge — the top section must be## Unreleased. That distinguishes the two states the old check collapsed into one, so it catches a disarmed main without re-breaking the ceremony's own tree the way the pre-#44 guard did. The rule is proven against seven constructedVERSION+CHANGELOG.mdpairs, including a re-armed ceremony whose top section is legitimately empty — the state the old non-empty assert would have rejected. box and cast carry the same flow and the same exposure (heavy-duty/box#96); cast is disarmed onmainas of this writing and is getting the sibling fix. -
A
host=nobox with anincusgroup no longer hands out the bare socket (#58) —users applyconsulted thehost=trait only when groupincuswas ABSENT (die onhost=yes, skip onhost=no). When the group was PRESENT the trait was never asked, so ahost=noor marker-less box that nonetheless carried the group —box setup-hostran, then the box was re-bootstrapped with other traits — gave every box-role user a bareusermod -aG incus: the socket with no tier behind it, whichincus-useranswers by lazily building an UNHARDENED project under whoever opens it (incusbr-<uid>, NAT on v4 and v6, no ACL, nodns.mode=none, no port isolation). The marker now decides in BOTH directions, through one new pure gate (assert_marker_hosts_vms, testable against fixture markers non-root likeassert_marker_human): the box role applies only where the box CLAIMS to host VMs, so the verdict is identical whether or not the group exists. The machine deliberately does not overrule the marker — but the skip is not silent either: when the group exists and the trait disagrees, the warning names the contradiction andrig bootstrapas the repair. On such a box exact-membership convergence now strips box-role users out ofincus, on the same reasoning: a membership inherited from a previous life is the same half-grant as a freshly added one. -
Dropping the box role revokes through
box, not behind its back (#50) —users applyconverged groupincuswith a baregpasswd -d, the same move it makes forrig-adminandrig. Those two are rig's;incusis box's, andbox revokedoes strictly more with it: it says out loud that supplementary groups are read at LOGIN, so a session the dropped operator already holds keeps the Incus socket until it dies, and hands overloginctl terminate-user <user>as the remedy. rig loggedremoved <user> from incusand moved on, so an operator who dropped someone from the users file and watched apply succeed believed the VM access was gone — and was wrong for as long as that user held a session. Both removal paths (the per-user convergence and the dropped-user sweep) now callbox revoke, which keeps one owner for the group. Never--purge: that deletes the user's boxes, images and project, and destroying someone's running machines is not a convergence step — it stays an explicit admin act. The exit code is not trusted (#12's lesson): a revoke that returns 0 with the membership still standing has not closed the socket, and rig falls back to removing the group itself, as it also does where box is not installed. Every fallback path carries the session warning, because the silence was the bug. -
rig bootstraprefuses a users file that names no users (#57) — an empty, comments-only or whitespace-only file is not a parse error, so it passed pre-flight, converged nothing, and left the box root-only: the exact outcome--no-usersexists to make explicit, reached by the flag added to guarantee the opposite. Bootstrap's pre-flight now catches the zero-user parse — beforeapt, the hostname change, or a spent pre-auth key — and refuses, naming--no-usersas the way to ask for a root-only box out loud. Scoped torig bootstrap's contract only: a standalonerig users applyagainst an emptied file is a real de-provisioning operation and is unchanged.
0.1.0 — 2026-07-19
Fixed
-
The release suite accepts the ceremony's own tree (#44) —
test/release.shdemanded a literal## Unreleasedheading in the realCHANGELOG.md, extracting non-empty and containing#32. All three are false by construction on therelease: X.Y.Ztree the ceremony's own PR produces (it stamps that heading into## X.Y.Z — date), so the first real release PR turned CI red and the flow blocked itself — invisible to both fork rehearsals, which tag a branch (release.ymlruns;ci.ymlnever does). The guard now asserts what it was for: whatever the TOP##section is —Unreleasedbetween releases, the stamped version on and right after one — the exactchangelog_sectionthe workflow runs extracts it non-empty. The rotting issue-number grep is gone. -
The installer survives an environment with no
$HOME(#39) — cloud-init'sruncmdrunsinstall.shwith no$HOMEset, and underset -uthe first expansion died with a bash unbound-variable stack instead of an install — found live by box#88's template seed, which pinsHOME=/rootas its own scar. The installer now derives the home fromgetentfor the effective user (root included) before any path is built from$HOME, and when getent has no answer either it refuses by name. Driven with a shim getent both ways: the derived-home install lands, the no-answer refusal is pinned. (#41 — merged without its entry; restored here at the release gate.) -
Headless credential prompts refuse loudly instead of dying silently (#42) — the interactive credential prompts (
TS_AUTHKEYinbootstrap,RUNNER_TOKENinrunner install,RUNNER_REMOVE_TOKENinrunner remove, and both tokens inrunner repoint— a site the new no-bare-read test caught after the issue counted three) were bareread -rsp: with stdin not a tty (CI,box exec, any script),readfails,set -eends the run, and the log just stops — exit 1, no last word, measured live in the 2026-07-19 release drill. Each prompt now checks for a tty first and dies naming the variable that unblocks an unattended run (runner removealso names--local), and everyreadis|| die-guarded so EOF at a real prompt gets the same courtesy.db.shalready held the line here; now all of rig does.
Added
-
Merging a release-labeled PR IS the release — and the release re-arms main itself (#47) — the rig twin of heavy-duty/box#96, born of the ceremony retro: the tag was a separate, manual, silent-when-forgotten step, and a forgotten tag produces no red X.
release.ymlnow fires on pushes to main (fork-sourced ceremony PRs get a read-only token onpull_requestevents), reading the transition from the push itself:event.beforeto the pushed head. A decide step answers four states — release-flow work merged under thereleaselabel (-devendstates, the post-release window) no-ops green with a NOTICE; the two genuinely ambiguous bare states refuse loudly; a true transition then requires a merged,release-labeled PR behind the commit (read via the API — the label is the operator's declared intent). Then, in the same job, it API-creates the tag at the merge commit, publishes with the extracted notes — and bumps main toX.Y.(Z+1)-devitself, direct push with a loud open-a-PR fallback, so no follow-up bump PR exists on the paved road. AGITHUB_TOKEN-created tag never fires the tag-push trigger, so the paths cannot double-publish — and that tag-push path survives intact as the documented manual fallback and backfill. -
Tagged releases, and an installer that installs them (#32) — the rig half of the flow designed in heavy-duty/box#83, near-verbatim. A release is a PR, then a tag: the
release: X.Y.ZPR bumpsVERSIONand stamps this file's Unreleased section with version + date; the merge commit is tagged bareX.Y.Z(box's tag scheme — novprefix).release.ymlturns the tag into the GitHub release — after asserting tag ==VERSION(mismatch fails loudly and creates nothing) — with that version's section of this file as the body, extracted by the samechangelog_sectionthe test harness drives. No assets: for a pure-bash tree, GitHub's source tarball for the tag IS the package.install.shnow defaults to the latest release: the tag is resolved by following thereleases/latestredirect and reading theLocationheader — no API, no token — and the download isarchive/refs/tags/<tag>.tar.gz.RIG_REFpicks the other two channels: a tag pins (refs/tagsoutranks a same-named branch), a branch (RIG_REF=main) tracks the development tree. Until 0.1.0 is cut the default channel has nothing to resolve and dies saying exactly that, namingRIG_REF=mainas the way to install today — it never falls back to main silently, because "I installed the latest release" must not quietly mean "I installed whatever main was that second". Step 5 of #32 — pinningBOX_REFin the host-installs-box path — stays open until box cuts its next tagged release.