Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLITeam
Assigneesstack72

Relationships

#1172 No retention/prune for .swamp/workflow-runs and .swamp/outputs

Opened by webframp · 7/16/2026· Shipped 7/17/2026

Problem

'swamp data gc' and 'swamp data prune' manage the versioned data catalog, but two other on-disk stores have no cleanup path at all:

  • .swamp/workflow-runs//*.yaml + *.log — one record per workflow run, kept forever regardless of status.
  • .swamp/outputs////... — one artifact per model method invocation, also kept forever.

In a repo with two workflows that ran every 2-5 minutes and failed 100% of the time for weeks (allowedFailure masked the failure as "succeeded"), these directories grew to 13.7G and a system health-check model polling every ~20-30s for 2.5 months produced 1M+ output files (4.2G) with zero retention. Neither 'swamp data gc --dry-run' nor 'swamp data prune --dry-run' saw any of this — it's completely outside the data catalog's visibility.

Total: ~19.6G of a 26G repo was unreclaimable dead weight, and the only fix was to manually 'rm -rf' specific workflow-run/output directories after identifying them by hand.

Proposed solution

  • A retention setting on workflows/models (e.g. max run-history age or count, similar to the existing data GC settings) that automatically prunes old workflow-runs and outputs entries.
  • A manual 'swamp workflow prune' / 'swamp run gc' command as a stopgap, with --dry-run support, that reports reclaimable bytes the same way 'data gc --dry-run' does.

Alternatives considered

  • Manually deleting files under .swamp/ works but goes around swamp entirely, risks corrupting any index that assumes those files exist, and isn't discoverable without spelunking the filesystem by hand.
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORECONTRIBUTOR_NOTIFIED

Shipped

7/17/2026, 1:00:57 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack727/16/2026, 8:09:02 PM
Editable. Press Enter to edit.

stack72 commented 7/17/2026, 1:01:06 AM

Thanks @webframp for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.