Skip to content

Fix leaked workspaces after worker restarts - #237

Merged
eshulman2 merged 3 commits into
mainfrom
fix/workspace-teardown-leak
Jul 30, 2026
Merged

Fix leaked workspaces after worker restarts#237
eshulman2 merged 3 commits into
mainfrom
fix/workspace-teardown-leak

Conversation

@eshulman2

Copy link
Copy Markdown
Collaborator

Summary

  • persist ticket and repository identity inside each workspace
  • delete state-recorded workspaces when the process-local manager registry is unavailable
  • validate the workspace root, name, identity, and symlink status before fallback deletion
  • prevent cross-repository feature workflows from deleting another repository's workspace

Validation

  • uv run pytest tests/sandbox/test_task_execution.py tests/unit/workflow/nodes/test_workspace_setup.py -q (19 passed)
  • uv run ruff check src/forge/workflow/nodes/workspace_setup.py tests/sandbox/test_task_execution.py
  • git diff --check

eshulman2 and others added 2 commits July 30, 2026 10:21
- Add test for symlink-to-valid-workspace rejection
- Add clarifying comment at the raise ValueError site
- Match sort_keys=True in test identity file writes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@eshulman2
eshulman2 force-pushed the fix/workspace-teardown-leak branch from 841b671 to 07c03b2 Compare July 30, 2026 07:23
@eshulman2
eshulman2 merged commit 2771ad7 into main Jul 30, 2026
6 checks passed
@eshulman2
eshulman2 deleted the fix/workspace-teardown-leak branch July 30, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant