CB-576: release preserves a dirty worktree instead of deleting it #53

Merged
ltms merged 2 commits from worker/cb576-01a04b-17 into main 2026-08-15 08:54:33 +02:00
Member

Releasing a COMPLETED session whose worktree holds uncommitted work now preserves the directory and logs a WARN instead of --force-deleting the worker's only copy of its work (the exact shape lost in the incident: a worker that ended a turn without committing).

  • Worktrees gains hasUncommitted (git status --porcelain, incl. untracked-only).
  • SessionManager checks it before any non-preserving remove; dirty => preserve + WARN naming path/session/cause.
  • Worktrees.remove keeps its --force contract; the check lives at the caller layer.

Tests: mvn -f bridged/pom.xml clean install -> BUILD SUCCESS, Tests run: 678, Failures: 0, Errors: 0, Skipped: 0

Releasing a COMPLETED session whose worktree holds uncommitted work now preserves the directory and logs a WARN instead of --force-deleting the worker's only copy of its work (the exact shape lost in the incident: a worker that ended a turn without committing). - Worktrees gains hasUncommitted (git status --porcelain, incl. untracked-only). - SessionManager checks it before any non-preserving remove; dirty => preserve + WARN naming path/session/cause. - Worktrees.remove keeps its --force contract; the check lives at the caller layer. Tests: mvn -f bridged/pom.xml clean install -> BUILD SUCCESS, Tests run: 678, Failures: 0, Errors: 0, Skipped: 0
ltms added 1 commit 2026-08-15 07:59:54 +02:00
CB-576: release preserves a dirty worktree instead of deleting it
CI / contract (pull_request) Successful in 1m2s
CI / build (pull_request) Successful in 1m35s
9118ce2537
ltms force-pushed worker/cb576-01a04b-17 from 0b081deb5e to 9118ce2537 2026-08-15 07:59:54 +02:00 Compare
ltms added 1 commit 2026-08-15 08:48:59 +02:00
CB-576: hasUncommitted tolerates an already-gone worktree
CI / contract (pull_request) Successful in 1m8s
CI / build (pull_request) Successful in 1m37s
b525b0f08f
ltms merged commit 500bfa2c33 into main 2026-08-15 08:54:33 +02:00
Sign in to join this conversation.