fix: clean up workspace directories on implementation retry failure - #285
fix: clean up workspace directories on implementation retry failure#285richardmilles wants to merge 1 commit into
Conversation
Remove leftover /tmp workspace directories when the implementation node retries after persistent failure.
3cce186 to
b65ac49
Compare
eshulman2
left a comment
There was a problem hiding this comment.
The orphan-target cleanup is still required on current main, but this branch is not safe to merge as-is. In implement_task, every prepare_workspace() exception now sets workspace_path to None. That includes a pull/rebase failure for an existing workspace, where prepare_workspace() intentionally preserves the directory because it may contain the only unpushed commit. Clearing the state reference makes the next attempt recreate elsewhere and can orphan or effectively lose that work. Please keep the existing workspace_path when the recorded workspace still exists, and add a regression test for an existing-workspace sync failure. The node-level retry cap/backoff also duplicates the graph-level configurable retry cap; the narrowly required part for #191 is cleanup of the empty target allocated when recreation fails.
Remove leftover /tmp workspace directories when the implementation node retries after persistent failure.
Fixes #191