Skip to content

Reject unresolved origin worktree bases on user launches #143

Open

Description

@chrisohearn

checkWorktreeBase currently treats startFromOrigin: true as resolved unconditionally. This bypasses the MCP/composer refusal for a missing or remotely deleted baseRef; preparation can then fall back to the remote default branch or HEAD and silently launch on a different base.

Keep the provisioning-time stored-base rebase path, but validate user-supplied bases at launch entry points.

Acceptance:

  • MCP and composer launches with a nonexistent or remote-deleted base return ThreadLaunchBaseRefError.
  • Stored-base preparation that rebases a persisted base remains supported.
  • Focused tests cover both paths.

Reported as P2 in PR #140 review.

Activity

  1. chrisohearn commented on Nov 18, 2026

    @chrisohearn
    OwnerAuthor

    Exact-head reconciliation for PR #140: independent source review, base 78f183a40d8f9682ffb0bfbf05714aa4c11ac094, head 93ba9bf83a7f1e4bd937642ba43b92738d000e68.

    I confirmed the P2 against the reviewed source. checkWorktreeBase returns success for any unresolved startFromOrigin: true ref at ThreadLaunchService.ts:420-422; provisioning can then substitute the remote default branch or checked-out commit. The requested base is therefore not honored, through both web and MCP launch entry points.

    This is the same root cause already tracked here; no duplicate issue is needed. Keep the entry-point refusal, tolerate a disappeared saved base only during provisioning, and restore the refusal tests. This remains a P2 follow-up and does not hold PR #140's merge. No source changes were made in this reconciliation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions