Skip to content

Rebuild the agent-worktree sweep on the decided unit #454

Description

@blooop

Work

Rebuild the agent-worktree sweep on the unit the keystone ticket decided, and on the safety predicate its ticket decided, so that the two surviving defects on PR #442 have no representation rather than a guard each.

Blocked deliberately: the whole lesson of the parked single-ticket map is that building before these are settled produces a correct fix per instance and the same shape again.

Scope:

  • Implement the decided unit and the decided predicate. Where the answer says a state should be unrepresentable, the test for it asserts the absence of a path, not a guard firing.
  • Close T1: a worktree nested inside one that is being removed. Three probes exist on the second review report and become tests: nested holding an uncommitted note, nested holding an unpushed commit, and nested git worktree locked. The locked case is dl --prune cannot reclaim agent worktrees inside live workspaces' clones (104 GB measured) #426's Ask 2 and must be impossible to lose.
  • Close T2: a registration created after the plan was printed. The gate's domain and the metadata prune's blast radius must be the same thing, or the prune must become per-registration if the git research says that is available.
  • Carry over what the first build got right rather than rewriting it: the four-way classification, the MetadataGate fold (S1 is genuinely closed and reproduced), the container-path-aware dirty check, the .bare-first reachability, --force-worktrees as a flag distinct from --force, and the --ls --size attribution. Also the open minors: T3 (a refused or partial removal feeding neither the removal nor the gate), T4, and N4 (Losses::of([one]) resolving its unreachable arm to NothingToLose, the deleting direction, in a module whose discipline is to fail towards keeping).
  • Decide and state PR Reclaim the agent git worktrees stranded inside live workspace clones #442's fate: rebase onto the decision, supersede it, or land it first as a floor. Whichever it is, no partial state where T1 is shipped unfixed, since that is an unflagged data-loss path.

Every check verified against the full 40-char head SHA before the review gate. wf-tdd to build, wf-review to review, stop at approved.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions