You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What unit does the agent-worktree sweep reason about: the directory, the clone, or the registration graph?
This is the keystone. Three fix rounds on #426 each closed an instance and left the shape intact, and both surviving defects on PR #442 are the same idea wearing different clothes:
T2: the gate's domain is the plan's enumeration, but git worktree prune's blast radius is the whole clone. A worktree the container registers after the plan is in neither the plan's keeps nor the acting pass's outcomes, so the gate stays open and the prune takes its registration. Run 2 then removes the directory as Forgotten.
Both reach past the list the pass walked. So the question is not "which guard is missing" but what the sweep's unit of reasoning is, such that reaching past it has no representation.
Candidate shapes, to be argued rather than assumed:
Directory (status quo): each candidate path classified independently. Cheap; both defects live here, because a directory does not know what contains it and the metadata prune is not per-directory.
Clone: the clone is the unit, its worktrees a set decided together, and the metadata prune is an operation on the whole set. Matches git worktree prune's actual blast radius, which is the T2 mismatch, at the cost of a coarser plan.
Registration graph: nodes are registrations and directories, edges are containment and registration, and removal is defined on a subtree. Makes T1 structural, at the cost of being the largest of the three.
Whatever wins must make it unrepresentable, not merely guarded, that (a) a removal takes anything the plan did not name, and (b) an operation's blast radius exceeds the unit the gate reasons over. Principle 3's constructive-modeling clause is the test: if the answer is "and then we check", it has not answered.
Note that TOCTOU is unclosable from the host, so the answer cannot depend on the plan still being true when it is acted on. It has to be sound when the plan is stale, which is what the re-check plus fold achieved for S1 and what T2 shows was not enough one level up.
Run /constructive-modeling on the shape before settling.
How the answer gets tested: the three T1 probes and the T2 reproduction become tests that fail against the current design and pass against the new one, with at least one asserting the absence of a representable path rather than a guard firing.
Question
What unit does the agent-worktree sweep reason about: the directory, the clone, or the registration graph?
This is the keystone. Three fix rounds on #426 each closed an instance and left the shape intact, and both surviving defects on PR #442 are the same idea wearing different clothes:
git worktree prune's blast radius is the whole clone. A worktree the container registers after the plan is in neither the plan's keeps nor the acting pass's outcomes, so the gate stays open and the prune takes its registration. Run 2 then removes the directory asForgotten.sweep_clonedescends only into worktrees it keeps, anddirt_indrops nested worktrees from the parent's dirt, so a worktree nested inside one that is going is protected by neither path. Reproduced three ways, includinggit worktree locked, which breaks dl --prune cannot reclaim agent worktrees inside live workspaces' clones (104 GB measured) #426's Ask 2 outright.Both reach past the list the pass walked. So the question is not "which guard is missing" but what the sweep's unit of reasoning is, such that reaching past it has no representation.
Candidate shapes, to be argued rather than assumed:
git worktree prune's actual blast radius, which is the T2 mismatch, at the cost of a coarser plan.Whatever wins must make it unrepresentable, not merely guarded, that (a) a removal takes anything the plan did not name, and (b) an operation's blast radius exceeds the unit the gate reasons over. Principle 3's constructive-modeling clause is the test: if the answer is "and then we check", it has not answered.
Note that TOCTOU is unclosable from the host, so the answer cannot depend on the plan still being true when it is acted on. It has to be sound when the plan is stale, which is what the re-check plus fold achieved for S1 and what T2 shows was not enough one level up.
Run
/constructive-modelingon the shape before settling.How the answer gets tested: the three T1 probes and the T2 reproduction become tests that fail against the current design and pass against the new one, with at least one asserting the absence of a representable path rather than a guard firing.