[P0] Break the author worktree bootstrap deadlock #892

Open
opened 2026-07-24 21:36:47 -05:00 by jcwalker3 · 0 comments
Owner

Parent epic: #887
Priority: P0

Problem

gitea_bootstrap_author_issue_worktree raises Durable author worktree resolution blocked (#618): workspace is the stable control checkout on every clean issue pick, with and without an explicit worktree_path, in dry-run and live, reproduced across at least five daemon generations and on clean picks #662–#666. The wall is inside the tool, not in the capability gate — the gate returns allowed and the tool then refuses.

Every documented substitute is also closed:

  1. gitea_bootstrap_author_issue_worktree -> RuntimeError (#618).
  2. scripts/worktree-start -> No session issue lock is bound.
  3. gitea_lock_issue -> #274 worktree path does not exist.
  4. git worktree add -> denied by the harness.

Doors 2 and 3 form a literal cycle: the script demands a bound lock, and locking demands an existing worktree. That cycle is independent of #618.

A partial bypass exists and should inform the fix, not substitute for it: gitea_lock_issue against an already existing, clean, master-equivalent branches/* worktree succeeds, because lock_issue is not walled the way bootstrap is. That only works when such a worktree happens to exist.

Prerequisites

This issue is strictly upstream of the atomic author finalization child — a branch that cannot be bootstrapped cannot be finalized.

Acceptance criteria

  • An author session starting from the stable control checkout can obtain a usable issue worktree through a sanctioned MCP path, with no shell git worktree add and no pre-existing branches/* directory.
  • The lock<->worktree cycle is broken: at least one of the two operations can bootstrap the other's precondition.
  • The bootstrap refusal, where it remains correct, reports which precondition is missing and the exact sanctioned call that satisfies it — not a bare RuntimeError.
  • Regression: from a clean control checkout with an empty branches/, a full allocate -> worktree -> lock sequence completes.
  • Regression: the #274 worktree path does not exist branch is distinguished from "does not belong", since the two need different recovery.

Duplicate verdict

NOT a duplicate. Related to #618 / #850 (referenced by the error text itself) and #274. Filed because the four-door shape — every documented recovery path also closed — is not captured by any single open issue.

Parent epic: #887 Priority: P0 ## Problem `gitea_bootstrap_author_issue_worktree` raises `Durable author worktree resolution blocked (#618): workspace is the stable control checkout` on every clean issue pick, with and without an explicit `worktree_path`, in dry-run and live, reproduced across at least five daemon generations and on clean picks #662–#666. The wall is inside the tool, not in the capability gate — the gate returns allowed and the tool then refuses. Every documented substitute is also closed: 1. `gitea_bootstrap_author_issue_worktree` -> `RuntimeError` (#618). 2. `scripts/worktree-start` -> `No session issue lock is bound`. 3. `gitea_lock_issue` -> #274 `worktree path does not exist`. 4. `git worktree add` -> denied by the harness. Doors 2 and 3 form a literal cycle: the script demands a bound lock, and locking demands an existing worktree. That cycle is independent of #618. A partial bypass exists and should inform the fix, not substitute for it: `gitea_lock_issue` against an *already existing*, clean, master-equivalent `branches/*` worktree succeeds, because `lock_issue` is not walled the way bootstrap is. That only works when such a worktree happens to exist. ## Prerequisites This issue is strictly upstream of the atomic author finalization child — a branch that cannot be bootstrapped cannot be finalized. ## Acceptance criteria - An author session starting from the stable control checkout can obtain a usable issue worktree through a sanctioned MCP path, with no shell `git worktree add` and no pre-existing `branches/*` directory. - The lock<->worktree cycle is broken: at least one of the two operations can bootstrap the other's precondition. - The bootstrap refusal, where it remains correct, reports which precondition is missing and the exact sanctioned call that satisfies it — not a bare `RuntimeError`. - Regression: from a clean control checkout with an empty `branches/`, a full allocate -> worktree -> lock sequence completes. - Regression: the #274 `worktree path does not exist` branch is distinguished from "does not belong", since the two need different recovery. ## Duplicate verdict NOT a duplicate. Related to #618 / #850 (referenced by the error text itself) and #274. Filed because the *four-door* shape — every documented recovery path also closed — is not captured by any single open issue.
jcwalker3 added the status:readyworkflow-hardeningsafetystale-runtimetype:bug labels 2026-07-24 21:36:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#892