feat(dev): lab — per-instance worktrees + unified identity #139
No reviewers
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos!139
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/134"
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?
What
Slice 1/3 of #133. Make every manual lab instance run in its own git worktree (today only AFK runs are isolated), and unify session identity on
<project>~<label>with slots removed.allocateSlot/takenSlots/Slot). Session name is<project>~<label>;parseSessionNamesplits on the first~. Kind (parseAFKLabel), branch (afk/<N>|lab/<label>), worktree dir (<project>-<N>|<project>-<label>), and the rendered identity (AFK #N, or<label> · 15:30/15:30) all derive from the label. AFK Start is re-expressed through the sharedworktreePath/instanceBranchderivation but behaves identically.origin/<default>with rollback (mirrors AFK'steardownClaim) and a git-op timeout. No fallback base: a repo with no usable origin (or a failing fetch) fails Start with the git cause and leaves nothing behind.decideTeardown): a dirty worktree keeps worktree + branch; a clean one removes the worktree and deletes the branch only if merged intoorigin/<default>. AFK Stop is unchanged this slice — reaper unification is the next slice.docs/adr/0017-lab-per-instance-worktrees.md(full design); a focused superseding note on ADR-0007;CONTEXT.mdInstance entry;default.nixversion bump.Acceptance
<project>~<label>;allocateSlot/takenSlots/Slotgone;parseSessionNamesplits on the first~.label · 15:30(time-only when unlabelled); AFK rows still renderAFK #N.go test ./...passes (also under-race);gofmt/go vetclean; fw dry-build green.Closes #134
Validation: PASS — landing now.
afk/134:gofmt -lclean,go vetclean,go buildclean,go test -race ./...green (39.8s).secrets.yaml/stateVersionchanges;vendorHash = null(stdlib-only, no hash risk);Closes #134present.<project>~<label>identity unification is internally consistent; the newgit.goseam (WorktreeDirty,BranchMergedwith correctmerge-base --is-ancestorexit-code handling, 60s timeout on the one network op) is sound.Merging via merge-commit.
#140(stacked onafk/134) will be retargeted tomainnext.