Skip to main content
← Back to list
01Issue
FeatureClosedSwamp CLI
Assigneesstack72

Relationships

#811 Could method-summary report artifacts get a default retention cap? They grow to dominate the datastore manifest

Opened by mgreten · 6/25/2026

Thanks for the quick turnarounds on #666 and #788 — both landed fast and have already helped. Here's a follow-on I turned up while profiling that looks worth addressing on its own.

What I found

Every swamp model method run emits two auto-generated report artifacts — report-swamp-method-summary and report-swamp-method-summary-json — and each is retained as a new data version indefinitely. For high-frequency runners these accumulate steadily and end up dominating the datastore index that gets pulled/pushed under the lock on every write.

Profiling one busy namespace (related to #666): of 109,152 catalog rows / 156.6 MB tracked, only 13,884 rows (7.1 MB) were current state — ~95% was non-latest versions. The auto-generated method-summary artifacts alone were roughly half the manifest:

  • one frequently-run model: ~67.6 MB of method-summary versions
  • a polling model: ~37.8 MB
  • another: ~3.3 MB

These are generated automatically rather than written by the user, so an unbounded version history of per-run summaries is probably not what anyone wants.

Why it matters

It sits upstream of (and independent from) the lock-scoping in #666 and the gc/S3-delete fix in #788:

  • The full ~110 MB index is pulled/pushed under the lock on every write, so manifest size gates the lock-hold for all writers in the namespace — even a trivial vault write or a 7-entry gc pays the full-index cost.
  • swamp data gc is the natural mitigation, but on S3 datastores it prunes the catalog without deleting backing objects (#788), so it doesn't shrink the manifest today — and even once that's fixed, a default cap keeps the manifest from re-bloating between gc runs.
  • Ephemeral lifetime also doesn't appear to be implemented yet, so tagging these artifacts ephemeral isn't currently an escape hatch.

A few directions that could work

  • A default retention cap on the auto-generated method-summary artifacts (e.g. keep the last N versions or N days), configurable per repo.
  • Implementing ephemeral lifetime and defaulting these auto-generated artifacts to ephemeral, so they auto-collect.
  • An opt-out for a model to disable method-summary artifact emission where it isn't useful.

Whichever fits the architecture best — I can share more profiling data if it'd help. Thanks again.

Environment

02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED+ 1 MOREASSIGNED+ 2 MOREREVIEW

Closed

6/25/2026, 9:54:24 PM

No activity in this phase yet.

03Sludge Pulse
stack72 assigned stack726/25/2026, 8:54:08 PM
Editable. Press Enter to edit.

stack72 commented 6/25/2026, 9:54:23 PM

Hey @mgreten — we've consolidated this with #806 (optional scheduled/automatic datastore GC) into #823, which covers opt-in automatic GC for datastore data. During triage we found that the core issue is the catalog export (.catalog-export.json) serializing all versions on every push — your profiling showed 95% of the 109K catalog rows were non-latest versions. We explored inline GC, latest-only export, and overwrite semantics, but landed on opt-in auto-GC as the cleanest approach that keeps data and catalog in sync without orphaning remote data. #823 captures all of this. Thanks again for the thorough profiling data and the clear write-up — really helped us understand the impact.

Sign in to post a ripple.