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

Relationships

#3155 worker prune cannot delete worker models when auto-definitions live in a remote datastore

Opened by stack72 · 10/7/2026· Shipped 10/8/2026

Summary

Worker models are saved as auto-definitions in repoContext.autoDefinitionsDir (src/libswamp/worker/run_deps.ts), which is datastore-resolved. Worker prune deletes them through the shared modelDelete path, but its three callers build the delete deps with createModelDeleteDeps(repoDir, datastoreResolver, undefined, markDirty) and no injected definition repository:

  • src/cli/commands/worker_prune.ts
  • src/cli/commands/serve.ts (worker prune deps)
  • src/serve/handlers/admin_handlers.ts

createModelDeleteDeps (src/libswamp/models/delete.ts) then falls back to a YamlDefinitionRepository whose auto-definitions dir is the repo-local .swamp/auto-definitions, so with a remote datastore the worker model lookup fails and the model is not pruned.

Suggested fix

Pass repoContext.definitionRepo as injectedDefinitionRepo, as the serve model delete handler and server_token_gc_deps already do.

Found while triaging swamp-club#2382, which fixes the same gap for swamp model delete only. Not reproduced end to end; inferred from the shared code path that #2382 reproduced.

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

Shipped

10/8/2026, 12:16:12 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack7210/7/2026, 10:23:04 PM

Sign in to post a ripple.