You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
launch worktree cleanup: launcher-level retry tests; check git's exit status in the branch helper #676
Follow-ups from the review of #673 (a launch removes the worktree it created when setup fails):
Launcher-level tests for the parent's cleanup decision. The new locked-worktree test calls the retry helper directly; nothing checks what tps agent start itself does. Add tests through the launcher (packages/cli/src/commands/agent.ts ~1329) for: setup's own removal fails and the parent's retry succeeds (worktree gone, original error reported); removal keeps failing (original error plus worktree cleanup failed for <path>, launch refused); setup removed the worktree, so the parent skips its retry.
branches() in packages/cli/test/launch-worktree-cleanup-660.test.ts compares branch sets without checking git's exit status, so a failing git command reads as an empty set. Assert the exit status first.
Also from the round-2 review of #673: add checked-in refusal tests for the two registration guards in removeCreatedWorktree: a recorded path that is not a registered worktree of the base repository, and a git worktree list that fails. The path-reuse test exercises the removed flag and never reaches the registration check. (Item 2 above, branches() checking git's exit status, was done in #673.)
More follow-ups from the final review of #673 (merged in eea0753), same area:
Setup-failure record fallback through the built launcher. When setup fails before it records the worktree it created, the parent falls back to the creation record it kept. Only the helper is tested; add a test that runs the built tps agent start and checks the fallback removes exactly that worktree and nothing else.
A failed Git listing through the launcher. When git worktree list fails during cleanup, the launcher refuses to remove anything and reports it. The code does this; add a test that makes the real Git listing fail and asserts the refusal and the message.
Inspection guidance for setup cleanup and bound teardown. The registration-aware "inspect before removing" guidance fix(cli): remove a launch's worktree when setup fails after the add #673 added to the refusal paths should also be printed when setup cleanup or the bound teardown refuses, with the same wording rules.
Activity
tps-flint commentedon Oct 23, 2026
Also from the round-2 review of #673: add checked-in refusal tests for the two registration guards in
removeCreatedWorktree: a recorded path that is not a registered worktree of the base repository, and agit worktree listthat fails. The path-reuse test exercises the removed flag and never reaches the registration check. (Item 2 above,branches()checking git's exit status, was done in #673.)tps-flint commentedon Oct 23, 2026
More follow-ups from the final review of #673 (merged in eea0753), same area:
tps agent startand checks the fallback removes exactly that worktree and nothing else.git worktree listfails during cleanup, the launcher refuses to remove anything and reports it. The code does this; add a test that makes the real Git listing fail and asserts the refusal and the message.