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

Relationships

#2109 serve data.get cannot resolve models stored in managed configuration

Opened by jamesakeech · 9/11/2026· Shipped 9/14/2026

With datastore-managed model definitions, swamp serve can find and execute a model, but its data.get WebSocket handler reports that the model does not exist. The failure occurs on the same server that just executed the model successfully. data.query returns the saved output.

Environment

  • Swamp: 20260910.194957.0-sha.ae1ed149; swamp update --check --json reported up_to_date before filing.
  • Provider: @swamp/s3-datastore@2026.09.10.1.
  • Backend: SeaweedFS 4.44, through its S3 API.
  • macOS; two real server processes with separate repository directories and SWAMP_HOME caches, sharing one repoId, bucket, prefix and namespace (shared).
  • managedConfig: true, full hydration. Loopback listeners, --auth-mode none, --no-schedule.
  • Two servers were used for the broader integration test, but this failure is observed on server A alone. Cross-server propagation is not needed to trigger the failing read.

Reproduction

  1. Create a command/shell model named serve-compat. Configure the execute method with a shell command that succeeds and prints a marker. Our fixture slept for two seconds and printed a unique marker.

  2. Configure the S3 datastore and run swamp datastore config migrate, so model definitions are resolved from managed configuration.

  3. Start swamp serve and wait for /ready to return 200. Confirm model.get can resolve serve-compat.

  4. Execute the model through the server and wait for successful completion. The test request specified modelIdOrName as serve-compat, methodName as execute, and both skipAllReports and skipAllChecks as true.

  5. Send this request to the same server:

{"id":"get","type":"data.get","payload":{"modelIdOrName":"serve-compat","dataName":"result","includeContent":true}}
  1. Compare with this request on that server:
{"id":"query","type":"data.query","payload":{"predicate":"modelName == 'serve-compat' && name == 'result'"}}

Expected and actual results

Expected: data.get resolves the managed model and returns the latest result resource, including its successful output.

Actual response (request ID shortened here):

{"type":"error","id":"get","error":{"code":"data_get_failed","message":"Model not found: serve-compat"}}

The run completed successfully and emitted data_artifact_saved and done. model.get resolved the definition, and data.query returned result version 1 with exitCode: 0 and the exact output marker. A peer later read the output through data.query, and restarting that peer with a previously nonexistent Swamp home recovered it from SeaweedFS. This distinguishes the model-lookup failure from missing or undurable output data.

Suspected cause and fix scope

This is classified as a Swamp core serve/data dependency-wiring bug. handleDataGet in src/serve/handlers/data_handlers.ts calls createDataGetDeps with an undefined datastore resolver and the resolved data/workflow repositories. It does not inject the resolved managed definition repository.

createDataGetDeps in src/libswamp/data/get.ts constructs a new YamlDefinitionRepository from repoDir, without the managed definition directory. This explains why a model that the serve model handler can resolve is missing from the data.get lookup.

The fix should make data.get use the same resolved definition location as model.get and method execution. Add a focused regression test with managed configuration, successful execution, and same-server data.get readback. The suspected fix has not been validated with a patched build. Simply changing the S3 backend would not address this dependency wiring.

No Swamp or provider source was modified in the test. The broader final run passed 11 of 13 assertions; the other failure concerned publication of model edits and is being reported separately.

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

Shipped

9/14/2026, 4:12:56 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
jamesakeech moved this from the private collective The Herc to public9/11/2026, 5:32:04 AM
stack72 assigned stack729/14/2026, 2:47:41 AM
Editable. Press Enter to edit.

stack72 commented 9/14/2026, 4:13:07 AM

Thanks @jamesakeech for reporting this! We shipped: Add injectedDefinitionRepo to all six data-domain createData*Deps functions (get, list, versions, delete, rename, prune) and pass ctx.repoContext.definitionRepo from all serve handlers. Extends the pre-warmed repos fix from PR #2432 which covered model/workflow handlers but missed data handlers entirely. Also fix handleDataGet and handleDataList passing undefined as datastoreResolver, and extend the architecture fitness test to catch this class of gap.. The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.