Problem
workspace worktree finalize can complete its mutation and remove the worktree, then remain alive without output until the caller kills it. This regresses the closed completion fixes in #964, #1068, and #1222.
Observed on DMC 0.69.12 with a clean, pushed worktree whose PR was already merged.
Reproduction
studio wp datamachine-code workspace worktree finalize \
markdown-database-integration@feat-244-native-comments \
--pr=https://github.com/Automattic/markdown-database-integration/pull/245 \
--owner-terminal-outcome=success \
--format=json
Observed:
- no stdout or stderr before an external 180-second timeout
- after timeout, the worktree path was gone, proving finalization/cleanup had committed
- the caller had no terminal receipt and could not distinguish committed success from partial failure without filesystem/GitHub spelunking
- the surviving command lifetime overlapped later SQLite lock contention
Impact
The explicit lifecycle handoff becomes ambiguous and non-idempotent from the caller's seat. Agents retry, inspect raw filesystem state, or bypass DMC exactly where DMC should provide deterministic terminal evidence.
Acceptance criteria
- Finalize emits and flushes its terminal receipt before optional cleanup work.
- The CLI process exits within a deterministic wall-clock bound after committed success.
- Every post-commit phase has a deadline and phase diagnostic.
- Interruption after commit is recoverable through an idempotent targeted status/finalize call.
- Process-level coverage proves no child process, DB transaction, WordPress shutdown callback, or lock survives successful output.
- A regression fixture uses a merged PR, clean pushed branch, and
owner-terminal-outcome=success.
Related
AI assistance
OpenAI GPT-5.6 Sol via OpenCode ran the finalizer, verified the worktree disappeared despite caller timeout, searched existing closed fixes, and drafted this regression report. Chris Huber directed the workflow and remains responsible.
Problem
workspace worktree finalizecan complete its mutation and remove the worktree, then remain alive without output until the caller kills it. This regresses the closed completion fixes in #964, #1068, and #1222.Observed on DMC
0.69.12with a clean, pushed worktree whose PR was already merged.Reproduction
Observed:
Impact
The explicit lifecycle handoff becomes ambiguous and non-idempotent from the caller's seat. Agents retry, inspect raw filesystem state, or bypass DMC exactly where DMC should provide deterministic terminal evidence.
Acceptance criteria
owner-terminal-outcome=success.Related
AI assistance
OpenAI GPT-5.6 Sol via OpenCode ran the finalizer, verified the worktree disappeared despite caller timeout, searched existing closed fixes, and drafted this regression report. Chris Huber directed the workflow and remains responsible.