Skip to content

wu:rebase

← Back to CLI Commands

Rebase a claimed WU onto its integration target, pausing content conflicts for governed continue or abort

pnpm wu:rebase

Recover a pause created in an older linked checkout by running the updated CLI from the canonical checkout and naming the paused checkout with --base-dir:

pnpm --dir /path/to/canonical-checkout wu:rebase --id WU-XXXX \
  --base-dir /path/to/paused-worktree --continue
pnpm --dir /path/to/canonical-checkout wu:rebase --id WU-XXXX \
  --base-dir /path/to/paused-worktree --abort

The canonical checkout supplies the executable; --base-dir supplies the target WU, pause record, refs, index, and worktree state. Do not run wu:brief while paused: its evidence commit moves the pinned pause HEAD. After supported recovery clears the pause, continue with the normal briefing flow if needed. A fresh session of the assigned user may continue or abort without a new brief only when its Git identity matches the canonical assignee and the live claim is reachable on origin. Otherwise, present a valid handoff receipt; invalid receipts are refused explicitly. Caller, claim or receipt, pause, ref, index, and staged-path guards still apply.

The rebase targets the claim’s pinned remote and branch, never the current workspace default. A missing pinned binding, or a drifted repository identity or generation, refuses and never falls back to the workspace default.

The target commit is pinned once per run. After fetching, wu:rebase reads the tracking ref as a commit id and uses that id for the behind count, the rebase, the check that the rebase really contains it, and the claim-source succession. Unrelated landings on the integration branch while the rebase runs no longer change what it lands on or skip the succession; the next wu:rebase takes them. A rewritten (non-fast-forward) integration branch refuses with WU_REBASE_TARGET_REWRITTEN and publishes nothing.

A stale policy pin (trusted policy content moved after the claim) refuses --continue, which creates lane commits, but never --abort, which only restores the pre-rebase state and grants nothing. wu:repair --refresh-policy refuses a lane paused mid-rebase, so abort first, then refresh the pin and run wu:rebase again. The abort clears the pause record itself.

With a stale pin and your own lifecycle dirt (the generated skip-gates audit append and native mem:checkpoint rows in the tracked ledger), wu:rebase checks the pin first: it refuses naming wu:repair --refresh-policy and leaves both appends byte-exact. The refresh takes the same custody, so either command can run first.

Repair: a claim that predates integration-target binding is upgraded through the governed same-target route. Run pnpm wu:repair --id WU-XXXX --claim --integration-target --check first, then the same command without --check. It adopts only the destination and policy that canonical and remote evidence prove, and refuses guesses and conflicts. No command retargets an active claim.

Options:

FlagDescriptionRequired
-i, --id <WU-ID>WU id (default: inferred from the lane branch)No
--dry-runReport how far behind the branch is, without rebasingNo
--continueContinue a governed, manually resolved content conflictNo
--abortAbort a governed content-conflict pause and restore the branchNo
--reconcile-brief-evidenceExplicitly attest and reconcile only verified same-WU brief checkpoint commits after a pause; does not continue or abortNo
--allow-staged <path>Authorize one additional staged path (repeatable; —continue only)No
--base-dir <dir>Base directory for git operationsNo
--handoff-receipt <receipt>Cross-session continuation: consume the durable lifecycle handoff receipt minted by pnpm wu:brief for this WU (same route wu:prep/wu:done accept). Present it unchanged; verification fails closed. During a native conflict pause, use the original receipt; the authenticated original branch anchors preserve its context, and success spends rebase once.No

← Back to CLI Commands