Files
archie/cmd
sam d8d4c93239 fix(config): share one config Holder between daemon and dashboard; re-apply model catalog on reload
Adversarial review findings (fresh reviewer, no memory of the code):

1. (major) web.Cfg was a second Holder the reload never swapped, so
   /api/config showed boot-time values forever after the first reload
   while the daemon ran the new config -- the exact 'code means
   something different from what it says' failure. web and d now
   share one Holder (web.Cfg = d.Cfg after construction), so a reload
   swaps both views atomically.

2. (minor) the model catalog merge ran once at boot; publishing the
   raw reloaded document dropped catalog-discovered providers from
   the running config even though the file was unchanged. The apply
   closure re-runs applyModelCatalog on the reloaded document before
   publishing (idempotent; a catalog that failed to load merges to
   identity).

3. (minor) changedNonReloadableFields parameter 'new' shadowed the
   predeclared identifier (predeclared lint finding). Renamed to
   'next'; the finding is gone from the branch diff.

Also: tightened --no-config-overlay help text to state the file
-config-overlay still applies (it gates the future DB overlay only),
and documented that the controller's apply callback must be non-nil.

task check clean; -race clean on cmd/archied and internal/daemon.
2026-08-10 00:30:26 +10:00
..