Relationships
#4306 serve reload reports 0 types reloaded when it replaced edited repo-local behaviors
Opened by zack · 11/2/2026
swamp serve reload reports Reloaded 0 extension type(s) (JSON: reloadedCount: 0) even when the reload replaced edited repo-local behaviors. Only the serve log shows that the local refresh happened (Reloaded edited behavior "@example/reload-probe").
Found while verifying #4223 (a duplicate of #4214) on cdc40bce: an acknowledged reload correctly swapped two edited local behaviors and the remote describe showed the new versions, but the client printed Reloaded 0 extension type(s). Anyone checking a fix, or a script reading reloadedCount, sees "nothing reloaded" when the opposite is true.
Cause: in runServeReload (src/serve/extension_reload.ts), the local refresh modelRegistry.refreshSources(withExtensionMutation) returns void, and reloadedCount is assigned only from reloadPulledExtensions(...) plus extensionDiscoverer. Local types replaced by applyLocalModelChanges (src/domain/extensions/local_model_refresh.ts) are never counted. The renderers that read the count are src/presentation/renderers/serve_reload.ts, src/presentation/output/server_extension_change_output.ts and the SIGHUP path in src/cli/commands/serve.ts.
Repro:
swamp serve --hot-reload --remote-onlywith a repo-local behavior.- Edit the behavior (for example, bump its version).
swamp serve reload --server <endpoint> --jsonreturnssuccess: true, reloadedCount: 0, while remotebehavior type describeshows the new version.
Expected: the reload response counts the local behaviors it replaced, either in reloadedCount or in a separate field such as localReloadedCount, and log mode says so.
Open
No activity in this phase yet.
Sign in to post a ripple.