retirer: retire a stack in one command #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "change/retire-tool"
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 #9.
Status: review round done, every finding addressed (comment below); merging. Handoff:
docs/handoffs/2026-11-05T1223Z-retirer-done.md. Nothing to deploy: the tool runs in a checkout.Plan
The user, 2026-11-05: "check the raised issue as well we can do it like that a simple tool". Retiring a stack used to
take four manual steps: stop it,
git rmit, find a commit that still has it, and write theRETIRED.mdrow. Onecommand now does them and asks only what it can't infer. The user also asked, through the move-scripts session, for
the name
retirer, a command run asretirer <stack>with no.sh../retirer <stack>(or<machine>/<stack>when both machines have one) sits at the repo root. The repo-layoutspec's D1 allows only
backup/ docs/ nixos/ vps/as directories, so it is a root file.mainthat still has the stack: the merge-base withorigin/main, because a branch's own commits are gone after the squash merge.--for/--why.git rm -rs the directory and puts the row first inRETIRED.md's table, both staged. Itdoesn't commit, so the Caddy block, the DNS record and the doc mentions it lists (with
git grep) go in the samecommit.
RETIRED.md, a machine's caddy, a stack not onorigin/main, a path that already has a row, or a stack name both machines use..env,data/, …) or a volume. It lists what stays.--down, which runscompose downwithout-v:podmanundernixos/,dockerundervps/, or the stack's owncompose.shorbin/docker-composewhen it has one.--downisrefused in the agent microVM (
agentvm-*), because agents don't deploy.Rules this PR rewrites (instructions): in
AGENTS.md, Project in brief, "a stack that stops running is deleted andgets a row in
RETIRED.md" now adds "both by./retirer <stack>". The rule stays where it is and nothing isremoved.
RETIRED.md's intro gains the same pointer.Check (run): a throwaway clone covers each of these:
./retirer --for … --why … wallosstages the deletion, andRETIRED.md's first row iswalloswithorigin/main's commit andvps/wallos/;git cat-file -e <commit>:vps/wallosexits 0..envanddata/.nixos/spliitprints thepodmancommands.overleaf-toolkitworks and prints the project caveat.x\nyanda | bstay in their cells.--downonagentvm-repos, a dirty stack, a dirtyRETIRED.md, a bad path,caddy, a rowthat already exists, a branch-only stack, a name both machines use, and running outside a repo.
shellcheckis clean apart from style warning SC2001.AGENTS.mdSetup check exits 0.🤖 Generated with Claude Code
WIP: retire.sh: retire a stack in one commandto retire.sh: retire a stack in one command1606baf826to167ecdd441retire.sh: retire a stack in one commandto retirer: retire a stack in one commandLocal review round (correctness and methodology reviewers). Each finding and its fix, in
1989280unless noted:Correctness
docker-compose.yaml(overleaf-toolkit) exited silently underpipefail. Fixed: thename:parse now runs only when the file exists, and a caveat is printed that the project name is a guess.awk -vread backslashes as escapes. Fixed: the row now goes throughENVIRON["ROW"], and the testshowed
x\nyanda \| bstay in their cells.git rmran before the table check, so a failure could leave the tree half-changed. Fixed: the row isbuilt before
git rm.git greptreated the name as a regex. Fixed: the duplicate check now compares thepath column literally, so
nixos/xandvps/xare distinct, andgit grepuses-F.RETIRED.mdwould be staged too. Fixed: a dirtyRETIRED.mdis refused.rev-parseresult is checked before thecd.(
<engine> exec caddy caddy reload …).Methodology
HEAD, a branch commit the squash merge drops. Fixed: it now uses the merge-base withorigin/main, and a stack that is only on the branch is refused.ruling is recorded in the handoff.
5–6. (info) Nothing else is stale; sign-off, sync and size all pass.
Also in
1989280: renamed toretirer, run asretirer <stack>, at the user's request (relayed). The machine isnow inferred too.
Checks: AGENTS.md Setup check command: exit 0