Repository navigation
Conversation
The dev seed kept stopped threads with their active pull request watches. The dev server's PullRequestWatchReactor then read those PRs and could wake the thread, starting the developer's agent in its real worktree. Pruning now removes `watch` from every kept pull request link and keeps the links. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Development database copies now strip pull-request watch metadata while preserving links, preventing copied watches from triggering activity in the source installation. The change is confined to the development snapshot and leaves the source database unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Thank you @Lenoridev for the fix and regression test. #32744, merged as 0a9abddaee, already removes active watches from seeded threads while preserving their PR links. The remaining documentation wording is small; please feel free to open a focused PR for it if it still matters to you. |
Problem
vp run migrate-dev-db, and the automatic seed on a worktree's firstvp run dev, keep stopped threads together with their active pull request watches (pullRequests[].watchin the thread payload). The dev server'sPullRequestWatchReactorthen reads those PRs with this machine's credentials. When something changes, it wakes the thread, which can start the developer's agent in the thread's real worktree while the live install's agent works on the same PR.Fixes #32736.
Change
The prune transaction in
apps/server/scripts/migrate-dev-db.tsruns one moreUPDATEalongside the other clearing. It removeswatchfrom every element ofpullRequestson the kept threads. The links themselves stay, in their original order, because the UI shows them as thread history.endedWatchalso stays: the reactor never reads it, and it only seeds a later re-watch. The AGENTS.md sentence about what the seed drops now includes pull request watches.Scope and approval
This is the part of #15513 that remains. Julius's triage there named the gap: "an active PR watch on a stopped, unsettled thread survives it and can still wake" (comment). Theo closed #15513 as fixed by #22744 and asked for a new issue for any part that remains, which is #32736. #22744 does not touch watches.
Verification
stopped-threadfixture now has a PR link with an active watch. The case asserts that the copy keeps the link withoutwatch. Onmainit fails because the copy still haswatch: { startedAt: … }. With the fix, all 9 tests inmigrate-dev-db.test.tspass.PullRequestWatchReactor.sweeploads every watch on a non-archived thread. It skips the host read only for merged snapshots, settled threads, and subagents. A wake becomes amessage.dispatchthat starts a turn, and no environment or provider check blocks it.vp run check:changedpasses: format, lint, knip, typecheck, and tests.🤖 Generated with Claude Code