Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneesstack72

Relationships

#3266 Run GC never removes run logs when a non-default datastore is configured

Opened by stack72 · 10/11/2026· Shipped 10/12/2026

Problem

Workflow run GC (YamlWorkflowRunRepository.deleteOlderThan) never removes a run's log file when the repository uses a non-default datastore (an external filesystem path or S3).

  • The executor always writes the log to the repo-local .swamp: execution_service.ts (~3309) builds join(swampPath(repoDir, "workflow-runs"), workflow.id, "workflow-run-<id>.log").
  • The run record is written under the datastore's resolved path: repository_factory.ts passes dsPath("workflow-runs") as the repository's baseDir.
  • deleteOlderThan works out the log path from the record path, as yamlPath.replace(/\.yaml$/, ".log"), so it lives under baseDir. It removes that path and swallows NotFound.

With the default datastore both paths are the same, so this works. With any other datastore the GC removes a log path that doesn't exist, and the real log under .swamp/workflow-runs/<workflowId>/ stays forever. Old run logs pile up in the local .swamp directory. No other code path removes run logs.

Expected

Run GC removes the log the run actually wrote. The run record already stores it as logFile, relative to the repo, so GC can read it from there, or rebuild the path from the local .swamp directory.

Notes

Found while planning swamp-club#3257 (v3 run staging). It is pre-existing v2 behaviour and is not fixed there.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 7 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

10/12/2026, 12:43:44 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack7210/11/2026, 11:42:26 PM

Sign in to post a ripple.