fix(native): the fleet pass has been a no-op since 2026-08-05 #1088
No reviewers
Labels
No labels
burndown-2026-06
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/agentic-os!1088
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/gq98-worktree-guards"
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?
Implements Kai's "I want to do all 5 things" on #1084 and #1086. Four land here. Implementing them surfaced a sixth that supersedes the diagnosis in both issues, so it leads.
The pass was disabled, not merely skipping
I told Kai the fleet pass skipped her checkout because thirteen worktrees made it read as active. That was wrong, and the truth is worse.
nativePathKeyresolves throughEvalSymlinks, which fails on a path that no longer exists.add()read that as uncertain identity and setlive.uncertain, andcontains()answers true for every path once set. One purged session worktree therefore made every repository read as live, andnormalizeNativeRepositoryreturned at its first line for all of them.The oldest such lease has been dead since 2026-08-05. That is why no checkout was swapped, no
mainfast-forwarded, and no worktree released.Absence is an answer rather than uncertainty, so it now says "not live". Only a path unreadable for another reason still fails closed, which the existing fail-closed test now exercises with an
ENOTDIRpath rather than a missing one.A worktree on main locks it, and can repoint it
releaseNativeDefaultBranchdetaches a squatting worktree at its current commit, live ones included, leaving files untouched. Live ones matter:cleanUnleasedNativeWorktreesskips them, so nothing freedmainindeploy.repairNativeMainUpstreamresetsbranch.main.mergewhen it points elsewhere. Branch config is repository-global, so a worktree onmainpushing with-urewrote it for Kai's checkout, and withpull.rebaseher next pull rebasedmainonto a session branch.Reaping and lease reconciliation
reapNativeMergedBranchesdeletes local branches already wholly on origin, which nothing did before: 429 branches across eleven repositories, 253 reapable.The
aos/namespace is skipped because session-ID uniqueness reads it. I did not reason that out -TestNativeLaunchRetriesOccupiedShortSessionIDsfailed and showed me the reaper had deleted the branch marking an ID as taken.reconcileNativeArtifactBranchreads the worktree's actual branch rather than the lease's record, which a mid-session switch can leave stale.Tests
Four new, and each verified to fail without its fix rather than merely passing with it. Full suite green.
What is deliberately not here
The AGENTS.md doctrine line. That file is already 293 lines against its 290-line cap on
main, so any edit to it failsdocumentation-layout. Making room means moving someone else's doctrine out of the always-loaded base, and moving a rule todocs/is not equivalent to moving an explanation - agents read AGENTS.md every session and docs on demand. That is an editorial call, not a formatting one, and it is Kai's. Filed separately.Review notes
releaseNativeDefaultBranchdetaches live sessions. Non-destructive by construction, but it changes HEAD under a running agent. The alternative leavesdeploywedged for as long as that session lives.reapNativeMergedBranchesdeletes branches. Guarded byrev-list --not --remotes=origin, the same test the existing code uses, and stricter thangit branch --merged.docs/native-default-branch.md; the code carries pointers, per this repo's comment discipline.Refs #1084, #1086