Skip to content

fix: repair subagent new_worktree cwd resolution (ADA-40)#68

Merged
adamfgr merged 22 commits into
mainfrom
t20-worktree-fix
Jul 6, 2026
Merged

fix: repair subagent new_worktree cwd resolution (ADA-40)#68
adamfgr merged 22 commits into
mainfrom
t20-worktree-fix

Conversation

@wizzoapp

@wizzoapp wizzoapp Bot commented Jul 5, 2026

Copy link
Copy Markdown

Fixes ADA-40.

Supersedes #66 (which superseded #60#49). Fresh PR opened solely to obtain a fresh Codex review allowance — #66 exhausted its per-PR allowance (4 review items today; the 3rd ready-cycle got no eyes/verdict for 25 min). No code changes — same branch t20-worktree-fix, same HEAD 20e58f9a.

Status of this HEAD:

  • Up-to-date with main (branch protection is strict + linear-history; branch synced via clean update-branch merges, no conflicts).
  • CI green — Check, Test, Release Smoke all pass.
  • All prior Codex findings triaged (P2, verified non-P1 / no data-loss), deferred as follow-ups:
    • ADA-59 — reclaim T3-created worktree when only an inherited current-checkout child remains.
    • ADA-61 — propagate/preserve worktree-removability metadata (explicit-null preservation + client detail reducer).

Summary:

  • Preserve package workspace cwd when creating child worktrees from MCP and web bootstrap paths.
  • Persist explicit worktree ownership/removal-root metadata so cleanup only removes worktrees T3 created.
  • Treat existing/current checkouts and legacy rows as non-removable; block root deletion while sibling package threads still reference it.
  • Validate workspace-relative paths before creating a worktree.

Verification: vp test (thread handlers, worktreeCleanup, contracts/orchestration, server, projection repos + migration 039, projector, messageOutbox), vp check, vp run typecheck, factory pre-commit gate PASS.

@wizzoapp wizzoapp Bot marked this pull request as ready for review July 5, 2026 23:12
@wizzoapp wizzoapp Bot marked this pull request as draft July 6, 2026 11:16
@wizzoapp wizzoapp Bot marked this pull request as ready for review July 6, 2026 15:34

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 20e58f9af6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/web/src/worktreeCleanup.ts
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
Comment thread packages/contracts/src/orchestration.ts
Comment thread apps/web/src/components/ChatView.tsx

@adamfgr adamfgr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved by wizzo-approve: all policy conditions verified against HEAD 20e58f9.

@adamfgr adamfgr added this pull request to the merge queue Jul 6, 2026
Merged via the queue into main with commit 944fd71 Jul 6, 2026
33 checks passed
@adamfgr adamfgr deleted the t20-worktree-fix branch July 6, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant