Relationships
#2108 serve model.edit does not publish managed configuration changes to the shared datastore
Opened by jamesakeech · 9/11/2026· Shipped 9/13/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 --jsonreportedup_to_datebefore 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_HOMEdirectories. 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
- Initialize a repository, install the pinned S3 provider, configure an S3 datastore with namespace
shared, then runswamp datastore config migrate. - Copy the repository bootstrap configuration to a second directory, retaining the same repoId and datastore settings. Start each server with its own
SWAMP_HOMEand a different loopback port. - Send this WebSocket request to A:
{"id":"create","type":"model.create","payload":{"typeArg":"command/shell","name":"propagation-probe"}}- Poll
model.geton B forpropagation-probe. In the test it became visible after 30.39 seconds. Keep the returned model ID. - Send
model.editto A withmodelIdOrName: "propagation-probe". Setpayload.contentto 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":{}}- Confirm
model.geton 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.
Shipped
Click a lifecycle step above to view its details.
stack72 commented 9/13/2026, 10:13:57 PM
Thanks @jamesakeech for reporting this! We shipped: Add markDirty + pushChanged sync call to handleModelEdit so managed-config definition edits propagate to the shared datastore, matching the pattern already used by handleModelCreate and handleModelDelete.. The fix has been merged and a release is on its way. We appreciate your contribution to swamp.
Sign in to post a ripple.