sam c4349deaac fix(config): clone the Services map so an overlay cannot mutate the published snapshot
Config.Clone deep-copies every reference-type field except Services, which became a
map[string]ServiceConnection. A value copy shares the map header, and yaml.Unmarshal
writes keys into whatever map it is handed -- so Loader.ApplyOverlay, which clones
precisely so it cannot corrupt the base document, rewrote the published snapshot in
place:

  ApplyOverlay(doc, {"services": {"state": {"target": "10.0.0.5:9090"}}})
  left doc.Config.Services["state"].Target changed

That defeats the reason Clone exists: a failed or partial overlay must not alter the
configuration still being served.

Red: TestConfigCloneDeepCopiesReferenceFields failed with "Services map is shared"
after the case was added; green with the one-line clone.
2026-09-19 03:07:14 +10:00
S
Description
Archie connects events from your systems to agents that can investigate, reason, and act. Define what an event means, map its data into a workflow, and give that workflow an agent equipped for the job: its own execution environment, tools, and identity.
https://archie.catlow.cloud
Apache-2.0
133 MiB
0 Stars 1 Watchers 0 Forks
2026-11-10 10:01:23 +00:00
Languages
Go 76.7%
Vue 13.1%
TypeScript 7.8%
JavaScript 1.2%
Shell 0.6%
Other 0.4%