Skip to main content
← Back to list
01Issue
BugOpenSwamp CLIPublic
AssigneesNone

Relationships

#4467 swamp data get and data versions report Behavior not found for data whose behavior definition was deleted

Opened by zack · 11/5/2026

Description

swamp data get and swamp data versions resolve the behavior definition before reading, and fail with Behavior not found once it is deleted, although the data is still stored and swamp data query returns it with its recorded modelId, modelName and modelType. Serve's data.get and data.versions share the failure, since they run the same libswamp generators.

Found while triaging swamp-club#4465, which fixes the dashboard side for step logs with a run-scoped link and leaves the by-name read as is.

Cause

  • dataGet in src/libswamp/data/get.ts and dataVersions in src/libswamp/data/versions.ts look the definition up first and yield behaviorNotFound when it is gone.
  • Serve's resolveModelTarget returns status missing for a deleted definition, authorizes on the raw name, and lets libswamp report the not-found.

Expected

When no definition matches, the read falls back to the catalog's recorded owner, and serve authorizes on that recorded owner name and type as data.query does via CanonicalResources.modelOwners.

A per-run inline behavior can reuse one name across runs with different ids, so a by-name fallback can match several orphaned owners. The command needs a rule for that case, for example refusing and listing the matching owner ids, or accepting an id to choose one.

Steps to reproduce

  1. swamp behavior run @command/shell execute echo-orphan --input run="echo hi"
  2. Delete .swamp/auto-definitions/command/shell/echo-orphan.yaml
  3. swamp data get echo-orphan result reports Behavior not found: echo-orphan; swamp data versions echo-orphan result reports the same
  4. swamp data query 'modelName == "echo-orphan" && name == "result"' returns the item
02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

11/5/2026, 11:42:15 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.