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

Relationships

#2108 serve model.edit does not publish managed configuration changes to the shared datastore

Opened by jamesakeech · 9/11/2026

When two swamp serve processes share a datastore-managed repository, model.edit succeeds on server A but the edited definition does not reach server B. Model creation propagates successfully in the same setup.

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.
  • Two actual server processes on macOS, separate repository directories and separate SWAMP_HOME directories. Both copies use the same repoId, bucket, prefix and namespace (shared). No shared runtime cache.
  • managedConfig: true, full hydration, default 30-second configuration polling. Loopback listeners, --auth-mode none, --no-schedule.

Reproduction

  1. Initialize a repository, install the pinned S3 provider, configure an S3 datastore with namespace shared, then run swamp datastore config migrate.
  2. Copy the repository bootstrap configuration to a second directory, retaining the same repoId and datastore settings. Start each server with its own SWAMP_HOME and a different loopback port.
  3. Send this WebSocket request to A:
{"id":"create","type":"model.create","payload":{"typeArg":"command/shell","name":"propagation-probe"}}
  1. Poll model.get on B for propagation-probe. In the test it became visible after 30.39 seconds. Keep the returned model ID.
  2. Send model.edit to A with modelIdOrName: "propagation-probe". Set payload.content to a JSON string containing this full definition, substituting the returned ID:
{"id":"<MODEL_ID>","name":"propagation-probe","type":"command/shell","version":1,"tags":{"compat":"edited-on-a"},"globalArguments":{},"methods":{}}
  1. Confirm model.get on A returns the new tag. Poll the same read on B for 40 seconds. Perform no other writes during this interval.

Expected and actual results

Expected: the edit is published to the shared datastore and becomes visible on B through normal configuration polling, as model creation does.

Actual: model.edit returned status: "updated". A immediately returned tags: {"compat":"edited-on-a"}. After 40.30 seconds, A still returned that tag and B still returned tags: {}. The edit did not propagate within the observation period; the test does not claim an unlimited timeout result.

Suspected cause and fix scope

This is classified as a Swamp core serve-handler bug. In the source matching the tested binary, handleModelEdit in src/serve/handlers/model_handlers.ts uses the resolved definition repository, but does not call the sync service's markDirty or pushChanged. handleModelCreate does both with the configured namespace.

The fix should publish successful managed-definition edits through the normal datastore synchronization path. Add a focused regression test that edits through A and observes the change through B without another mutation or restart. This source diagnosis has not been verified with a patched build.

The same integration run passed shared model creation, cluster membership, data.query visibility, same-model locking, distinct output versions, and fresh-cache recovery from SeaweedFS. Those controls support investigating the Swamp edit path rather than assuming a SeaweedFS storage failure. No Swamp or provider code was patched for the test.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

9/11/2026, 5:28:33 AM

No activity in this phase yet.

03Sludge Pulse
jamesakeech moved this from the private collective The Herc to public9/11/2026, 5:32:15 AM

Sign in to post a ripple.