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

Relationships

#4314 data prune through serve deletes data of an auto-definition whose declared type is invalid

Opened by zack · 11/2/2026· Shipped 11/21/2026

In swamp serve, data prune uses the injected definition repository with the definition id index attached. findById then finds auto-definitions through DefinitionIdIndex, which reads files with YamlDefinitionRepository.readDefinitionFile (readDefinitionEntry). That reader catches the ModelType.create failure for an invalid declared type and skips the file. So the index misses the auto-definition, isModelLive returns false, and the model's data is deleted as orphaned.

In the CLI, the same definition makes isModelLive throw on ModelType.create, which aborts the prune and deletes nothing. A definition in models/ also aborts in serve, because findAll(type) keeps it.

Expected: serve's prune fails the way the CLI does, or at least never treats a definition that declares the id as absent.

Found while triaging swamp-club#4300.

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

Shipped

11/21/2026, 1:37:12 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack7211/21/2026, 1:02:41 AM

Sign in to post a ripple.