Problem
When an execution fails after workspace creation (e.g., hostScript exits non-zero, Docker times out), the workspace directory at <workspaceRoot>/ws/<owner>/<repo>/<eventType>/<eventId>/ is left on disk.
If GitHub retries the same webhook delivery (same X-GitHub-Delivery UUID), Workspace/Preparer.mjs:99 (assertWorkspaceIsAbsent) throws:
Execution workspace already exists: /home/agentess/app/github-flows/var/work/ws/owner/repo/eventType/eventId
This blocks the retry from ever executing, because hostScript and Docker runtime are never reached.
Expected behaviour
The runtime should either:
- Clean up the workspace directory when execution fails (in
Coordinator.start() catch block or in WorkspacePreparer), or
- Recreate the workspace if it already exists (remove and re-clone), or
- Include a unique execution attempt counter in the workspace path so retries get a fresh directory.
Affected code
src/Execution/Workspace/Preparer.mjs:91-100 — assertWorkspaceIsAbsent
src/Execution/Start/Coordinator.mjs:243-257 — only logs and rethrows, no cleanup
Problem
When an execution fails after workspace creation (e.g.,
hostScriptexits non-zero, Docker times out), the workspace directory at<workspaceRoot>/ws/<owner>/<repo>/<eventType>/<eventId>/is left on disk.If GitHub retries the same webhook delivery (same
X-GitHub-DeliveryUUID),Workspace/Preparer.mjs:99(assertWorkspaceIsAbsent) throws:This blocks the retry from ever executing, because
hostScriptand Docker runtime are never reached.Expected behaviour
The runtime should either:
Coordinator.start()catch block or inWorkspacePreparer), orAffected code
src/Execution/Workspace/Preparer.mjs:91-100—assertWorkspaceIsAbsentsrc/Execution/Start/Coordinator.mjs:243-257— only logs and rethrows, no cleanup