Recover an interrupted wu:done rebase
Recover an interrupted wu:done rebase
Section titled “Recover an interrupted wu:done rebase”For a linked-worktree claim, wu:recover reports a
PAUSED_COMPLETION_REBASE issue when Git has no unmerged paths but still has
rebase metadata from an interrupted wu:done. Once those facts are verified,
its context includes the registered worktree and lane branch, configured
target commit, whether HEAD already equals the retained lane tip, and whether
recovery can prove ownership. When proof is incomplete, the context includes
the refusal reason and only the fields already verified. Branch-pr and
branch-only claims keep their normal resume path and are not treated as local
worktree pauses. The automatic path is deliberately narrow: the authenticated
caller must own the canonical WU claim, and the registered worktree, lane
branch, completion transaction, and Git rebase records must prove the same
attempt.
From the claiming session, inspect the WU and then request the normal resume action:
When the evidence matches, resume safely aborts the paused completion rebase
to the retained pre-rebase lane tip. It restores the WU’s completion fields to
canonical active values while retaining authorized notes and sizing edits, and
records that repair. Source commits remain in the lane history. A rollback
where HEAD already equals the retained lane tip is also recognized when the
branch ref and all other ownership evidence agree. Append-only audit and event
residue is retained in Git common metadata before the abort and verified during
restoration.
Recovery refuses when there are unresolved conflicts, an unrelated staged,
unstaged, or untracked path, an unexpected owner or branch, a moved lane ref,
ambiguous Git control files, or an existing governed wu:rebase pause. Keep the
worktree intact and follow the refusal diagnostic; do not hand-edit WU metadata
or run raw git rebase, reset, or clean commands.
After a successful resume, run pnpm wu:prep --id WU-XXX in the linked
worktree, then use the exact wu:done command printed by prep from the primary
checkout. wu:done now verifies Git has left rebase state before it reports
completion, including when a continue command exits successfully after only
advancing to another still-active step.
Long-stale legacy lane: reclaim, then rebase from the primary checkout
Section titled “Long-stale legacy lane: reclaim, then rebase from the primary checkout”A WU released with wu:release --keep-branch keeps its lane. When that lane was cut
long ago, wu:recover --action resume points to an ordinary pnpm wu:claim, which
reclaims the retained work under a new claim generation. The reclaimed worktree still
pins the old lifecycle package, so its own lifecycle commands refuse; that check is
unchanged. Bring the lane up to date with the current CLI from the primary checkout:
With an explicit --id, wu:rebase run in the primary checkout operates on the one
registered worktree that holds the claim and reads the claim binding from that
worktree’s record, not from the primary checkout’s stale copy. Every lane commit is
kept. A claim with no verified binding is still refused with the
pnpm wu:repair --id WU-XXX --claim --integration-target route.
Claims whose publication never reached origin
Section titled “Claims whose publication never reached origin”If a claim’s publication was rejected, so origin holds no claim ref and no lane
branch while the record is in_progress, both recoveries still work.
--action reset clears the claim fields together with the claim provenance so
the ready record is valid, and removes the worktree only after that record is
written; a failed write leaves the worktree in place. --action resume
recreates a missing worktree from the local or origin lane branch before it
reconciles dependencies, instead of failing on the missing directory.
This is a source-level workflow fix. A frozen installed consumer receives it only through the repository’s supported immutable qualified consumer artifact and install/smoke process. Mutable source changes or an unverified package migration do not establish consumer availability.
Retire a done worktree with a pre-binding seed
Section titled “Retire a done worktree with a pre-binding seed”From the primary checkout, a completed WU whose registered worktree predates integration-target binding has a governed cleanup route:
The seed must parse successfully with no modern binding, generation or provenance
fields. The freshly fetched configured delivery tip (normally origin/main) must
independently prove the WU is done, contains its done stamp, and records the exact
registered path. The attached lane HEAD must already be an ancestor of that tip;
a backup branch alone does not qualify. No remote claim marker, visible directory
occupant, uncommitted files or registered child may remain. The full proof is
checked again immediately before removal. An unprovable legacy fact refuses with
RETIRE_LEGACY_UNPROVEN; malformed modern metadata keeps its existing refusal.
Successful directory removal writes legacy_seed_landed_proof audit entries in
the primary checkout, then deletes the merged local branch with Git’s ordinary
merge check. The canonical record, stamp and remote refs are preserved. Follow a
refusal’s diagnostic while keeping the worktree intact. Active pre-binding claims
continue to use the existing wu:repair --claim --integration-target route.