refactor(config): delete the runtime config overlay

The control plane replaces this, rather than extending it
(docs/prds/runtime-control-plane.md, "First implementation"). Until now both
paths existed: overlay kept dashboard edits in its own SQLite file beside
archie.db and layered them over the file config at boot and on every reload,
which is the duplicate configuration authority the PRD set out to remove.

Gone with it: the --no-config-overlay flag and ARCHIE_SKIP_CONFIG_OVERLAY
recovery hatch, which existed because a bad overlay row could brick the boot;
ReloadStatus.OverlayUnavailable; and the reload controller's overlay source.
The -config-overlay file overlay is a different thing and stays.

The dashboard's three write seams went too. UpdateConfig, ResetConfig and
UpdateRepoField were assigned only in internal/webui's own tests, so in
production they answered 503 and ConfigView.Editable was permanently false
(archie-core-j28m). Removing Editable would otherwise have flipped the SPA's
controls on, since configEditable read a missing field as true, so the config
pages become what they already were in practice: a read of what each process
is running with. Configuration is written through the control plane.

apply.go survives this deliberately; archie-core-xrux carries the question of
whether its map merge is still guarding the file overlay path.
This commit is contained in:
sam committed 2026-09-21 08:57:55 +10:00
1 parent d8dd9ac6d6
commit 2311529def
35 files changed
+58 -1519

No files matched your search

+3 -86
View File
@@ -150,10 +150,6 @@ type ConfigView struct {
// dashboard to the reason. The UI renders these rows disabled rather
// than silently omitting the edit affordance.
Locked map[string]string `json:"locked,omitempty"`
// Overridden lists the dotted config keys currently set by the
// runtime overlay, so the UI can mark those rows (their file value
// is shadowed until reset) and offer a per-row reset.
Overridden []string `json:"overridden,omitempty"`
// MultiIdentity reports that the deployment configures [[identities]],
// so Identity and Repositories describe the default identity alone.
// Identities below carries the rest; a consumer attributing a task to
@@ -167,11 +163,6 @@ type ConfigView struct {
// Server.resolveForge (api_tasks.go). Empty for a single-identity
// deployment, whose forge is Identity above.
Identities []ForgeIdentityView `json:"identities,omitempty"`
// Editable reports whether this process can apply configuration
// changes. False makes the page render values without edit controls,
// which is what a process that only displays a published snapshot can
// honestly offer -- its write routes answer 503.
Editable bool `json:"editable"`
// Schema is the field-descriptor catalog (archie-core-b6ew) attached to
// this view's own values, locked reasons, and overridden markers -- see
// config_schema.go. The dashboard's generic renderer (archie-core-b6ew.3)
@@ -330,9 +321,6 @@ func (s *Server) handleConfig(w http.ResponseWriter, r *http.Request) {
writeJSON(w, map[string]any{})
return
}
// Editable belongs to the process that would perform the write, not to
// the document: whoever holds the update path is the writer.
view.Editable = s.UpdateConfig != nil
writeJSON(w, view)
}
@@ -346,8 +334,6 @@ type ConfigViewInput struct {
// Provenance is the file chain that produced Config, in precedence
// order.
Provenance []ConfigOrigin
// Overridden lists the dotted keys the runtime overlay currently sets.
Overridden []string
// Reload is the most recent reload outcome, or nil when unavailable.
Reload *config.ReloadStatus
}
@@ -411,7 +397,6 @@ func BuildConfigView(in ConfigViewInput) ConfigView {
ChannelConfigured: chatChannelConfigured(cfg.Chat),
},
Provenance: provenance,
Overridden: in.Overridden,
Reload: in.Reload,
Locked: lockedConfigKeys(),
}
@@ -450,83 +435,15 @@ func RemoteConfigView(snapshots storecontract.ConfigSnapshotStore) ConfigViewSou
}
}
// handleConfigReset deletes one runtime-overlay row via ResetConfig,
// restoring the file value for that key. The dashboard offers this on
// overridden rows so it can remove an override it created.
func (s *Server) handleConfigReset(w http.ResponseWriter, r *http.Request) {
if s.ResetConfig == nil {
http.Error(w, ErrConfigUpdateUnavailable.Error(), http.StatusServiceUnavailable)
return
}
var body struct {
Key string `json:"key"`
}
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
http.Error(w, "invalid request body: "+err.Error(), http.StatusBadRequest)
return
}
if body.Key == "" {
http.Error(w, "key required", http.StatusBadRequest)
return
}
if err := s.ResetConfig(r.Context(), body.Key); err != nil {
switch {
case errors.Is(err, ErrConfigUpdateUnavailable):
http.Error(w, err.Error(), http.StatusServiceUnavailable)
case errors.Is(err, ErrConfigUpdateInvalid):
http.Error(w, err.Error(), http.StatusBadRequest)
default:
http.Error(w, "config reset failed: "+err.Error(), http.StatusInternalServerError)
}
return
}
writeJSON(w, map[string]any{"ok": true})
}
// lockedConfigKeys returns the dotted config keys the overlay refuses
// to set, with the reason shown in the UI. These are the daemon's own
// bootstrap inputs; changing them from the dashboard could break the
// next boot.
// lockedConfigKeys returns the dotted config keys that stay bootstrap-owned,
// with the reason shown in the UI. These are the daemon's own startup inputs,
// which the control plane deliberately does not manage.
func lockedConfigKeys() map[string]string {
out := make(map[string]string, len(configuration.DeniedKeys))
maps.Copy(out, configuration.DeniedKeys)
return out
}
// handleConfigUpdate applies a set of dotted-path config updates via
// UpdateConfig, which the composition root wires to the same
// validate-persist-publish path as reload. The dashboard can then
// change runtime-tunable settings without hand-editing TOML.
func (s *Server) handleConfigUpdate(w http.ResponseWriter, r *http.Request) {
if s.UpdateConfig == nil {
http.Error(w, ErrConfigUpdateUnavailable.Error(), http.StatusServiceUnavailable)
return
}
var body struct {
Updates map[string]any `json:"updates"`
}
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
http.Error(w, "invalid request body: "+err.Error(), http.StatusBadRequest)
return
}
if len(body.Updates) == 0 {
http.Error(w, "no updates provided", http.StatusBadRequest)
return
}
if err := s.UpdateConfig(r.Context(), body.Updates); err != nil {
switch {
case errors.Is(err, ErrConfigUpdateUnavailable):
http.Error(w, err.Error(), http.StatusServiceUnavailable)
case errors.Is(err, ErrConfigUpdateInvalid):
http.Error(w, err.Error(), http.StatusBadRequest)
default:
http.Error(w, "config update failed: "+err.Error(), http.StatusInternalServerError)
}
return
}
writeJSON(w, map[string]any{"ok": true})
}
func reposView(repos []config.Repo) []RepoView {
out := make([]RepoView, 0, len(repos))
for _, r := range repos {
-62
View File
@@ -1,62 +0,0 @@
package webui
import (
"encoding/json"
"errors"
"net/http"
)
// RepoEditableFields are the per-repository fields the dashboard may change
// through handleConfigRepoUpdate. Deliberately narrow: these three are
// booleans/small ints with no cross-field validation, unlike Gate or
// Protect, which stay file-edited (archie-core-b6ew.4/.6).
var RepoEditableFields = map[string]bool{
"allow_concurrent": true,
"max_retries": true,
"review_enabled": true,
}
// handleConfigRepoUpdate applies one field change to one repository,
// identified by owner/name in the path. It exists because the repository
// list is a []config.Repo, not a flat dotted key -- PATCH /api/config's
// generic path (overlay.Nest + configuration.ApplyOverlayValues) has no way
// to address "element N of this slice." UpdateRepoField's implementation
// (wired by the composition root) reads the daemon's own live config.Repo
// values (never the trimmed, wire-safe RepoView), changes just the one
// field, and republishes the full repository list through the same
// validate-persist-publish path PATCH /api/config already uses -- see
// bootstrap.go's installUpdateConfigHandler for why that matters: the wire
// view omits fields (Preflight, TestGlob) that a naive round-trip through
// ConfigView would silently drop.
func (s *Server) handleConfigRepoUpdate(w http.ResponseWriter, r *http.Request) {
if s.UpdateRepoField == nil {
http.Error(w, ErrConfigUpdateUnavailable.Error(), http.StatusServiceUnavailable)
return
}
owner := r.PathValue("owner")
name := r.PathValue("name")
var body struct {
Field string `json:"field"`
Value any `json:"value"`
}
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
http.Error(w, "invalid request body: "+err.Error(), http.StatusBadRequest)
return
}
if !RepoEditableFields[body.Field] {
http.Error(w, "field "+body.Field+" is not editable from the dashboard", http.StatusBadRequest)
return
}
if err := s.UpdateRepoField(r.Context(), owner, name, body.Field, body.Value); err != nil {
switch {
case errors.Is(err, ErrConfigUpdateUnavailable):
http.Error(w, err.Error(), http.StatusServiceUnavailable)
case errors.Is(err, ErrConfigUpdateInvalid):
http.Error(w, err.Error(), http.StatusBadRequest)
default:
http.Error(w, "repo update failed: "+err.Error(), http.StatusInternalServerError)
}
return
}
writeJSON(w, map[string]any{"ok": true})
}
-88
View File
@@ -1,88 +0,0 @@
package webui
import (
"context"
"net/http"
"net/http/httptest"
"strings"
"testing"
)
func TestHandleConfigRepoUpdateAppliesViaSeam(t *testing.T) {
srv := newTestServer(t)
type call struct {
owner, name, field string
value any
}
var got call
srv.UpdateRepoField = func(_ context.Context, owner, name, field string, value any) error {
got = call{owner, name, field, value}
return nil
}
req := httptest.NewRequestWithContext(t.Context(), http.MethodPatch, "/api/config/repos/acme/widget",
strings.NewReader(`{"field": "allow_concurrent", "value": true}`))
w := httptest.NewRecorder()
srv.Handler().ServeHTTP(w, req)
if w.Code != http.StatusOK {
t.Fatalf("status = %d, body = %s", w.Code, w.Body)
}
if got != (call{"acme", "widget", "allow_concurrent", true}) {
t.Errorf("seam called with %+v", got)
}
}
// TestHandleConfigRepoUpdateRejectsUneditableFields proves the handler
// itself refuses a field outside RepoEditableFields before ever calling the
// seam -- Gate, Protect, and every other repo field stay file-edited.
func TestHandleConfigRepoUpdateRejectsUneditableFields(t *testing.T) {
srv := newTestServer(t)
called := false
srv.UpdateRepoField = func(context.Context, string, string, string, any) error {
called = true
return nil
}
req := httptest.NewRequestWithContext(t.Context(), http.MethodPatch, "/api/config/repos/acme/widget",
strings.NewReader(`{"field": "gate", "value": [["rm", "-rf", "/"]]}`))
w := httptest.NewRecorder()
srv.Handler().ServeHTTP(w, req)
if w.Code != http.StatusBadRequest {
t.Fatalf("status = %d, want 400", w.Code)
}
if called {
t.Error("UpdateRepoField was called for a field outside RepoEditableFields")
}
}
func TestHandleConfigRepoUpdateUnavailableMapsTo503(t *testing.T) {
srv := newTestServer(t)
srv.UpdateRepoField = nil
req := httptest.NewRequestWithContext(t.Context(), http.MethodPatch, "/api/config/repos/acme/widget",
strings.NewReader(`{"field": "allow_concurrent", "value": true}`))
w := httptest.NewRecorder()
srv.Handler().ServeHTTP(w, req)
if w.Code != http.StatusServiceUnavailable {
t.Fatalf("status = %d, want 503", w.Code)
}
}
func TestHandleConfigRepoUpdateSeamErrorMapsTo400(t *testing.T) {
srv := newTestServer(t)
srv.UpdateRepoField = func(context.Context, string, string, string, any) error {
return ErrConfigUpdateInvalid
}
req := httptest.NewRequestWithContext(t.Context(), http.MethodPatch, "/api/config/repos/acme/widget",
strings.NewReader(`{"field": "max_retries", "value": 5}`))
w := httptest.NewRecorder()
srv.Handler().ServeHTTP(w, req)
if w.Code != http.StatusBadRequest {
t.Fatalf("status = %d, want 400", w.Code)
}
}
-180
View File
@@ -3,7 +3,6 @@ package webui
import (
"context"
"encoding/json"
"fmt"
"net/http"
"net/http/httptest"
"strings"
@@ -480,149 +479,6 @@ func TestHandleConfigSchemaNeverLeaksSecrets(t *testing.T) {
}
}
// TestHandleConfigUpdateAppliesViaSeam proves the PATCH handler passes
// the decoded updates to the wired UpdateConfig seam and answers ok.
func TestHandleConfigUpdateAppliesViaSeam(t *testing.T) {
srv := newTestServer(t)
var got map[string]any
srv.UpdateConfig = func(_ context.Context, updates map[string]any) error {
got = updates
return nil
}
req := httptest.NewRequestWithContext(t.Context(), http.MethodPatch, "/api/config",
strings.NewReader(`{"updates": {"budgets.max_steps": 12}}`))
w := httptest.NewRecorder()
srv.Handler().ServeHTTP(w, req)
if w.Code != http.StatusOK {
t.Fatalf("status = %d, body = %s", w.Code, w.Body)
}
if got["budgets.max_steps"] != float64(12) {
t.Errorf("updates = %#v, want budgets.max_steps=12", got)
}
}
// TestHandleConfigUpdateInvalidMapsTo400 proves a rejected update (the
// seam wraps its error with ErrConfigUpdateInvalid) answers 400.
func TestHandleConfigUpdateInvalidMapsTo400(t *testing.T) {
srv := newTestServer(t)
srv.UpdateConfig = func(context.Context, map[string]any) error {
return fmt.Errorf("%w: label is not runtime-tunable", ErrConfigUpdateInvalid)
}
req := httptest.NewRequestWithContext(t.Context(), http.MethodPatch, "/api/config",
strings.NewReader(`{"updates": {"label": "x"}}`))
w := httptest.NewRecorder()
srv.Handler().ServeHTTP(w, req)
if w.Code != http.StatusBadRequest {
t.Fatalf("status = %d, want 400, body = %s", w.Code, w.Body)
}
}
// TestHandleConfigUpdateUnavailableMapsTo503 proves a disabled overlay
// (ErrConfigUpdateUnavailable) answers 503, as does a server with no
// UpdateConfig seam at all.
func TestHandleConfigUpdateUnavailableMapsTo503(t *testing.T) {
srv := newTestServer(t)
srv.UpdateConfig = func(context.Context, map[string]any) error {
return fmt.Errorf("%w: overlay disabled by recovery flag", ErrConfigUpdateUnavailable)
}
req := httptest.NewRequestWithContext(t.Context(), http.MethodPatch, "/api/config",
strings.NewReader(`{"updates": {"label": "x"}}`))
w := httptest.NewRecorder()
srv.Handler().ServeHTTP(w, req)
if w.Code != http.StatusServiceUnavailable {
t.Fatalf("status = %d, want 503, body = %s", w.Code, w.Body)
}
}
func TestHandleConfigUpdateWithoutSeamMapsTo503(t *testing.T) {
srv := newTestServer(t)
req := httptest.NewRequestWithContext(t.Context(), http.MethodPatch, "/api/config",
strings.NewReader(`{"updates": {"label": "x"}}`))
w := httptest.NewRecorder()
srv.Handler().ServeHTTP(w, req)
if w.Code != http.StatusServiceUnavailable {
t.Fatalf("status = %d, want 503, body = %s", w.Code, w.Body)
}
}
// TestHandleConfigIncludesOverridden proves the overridden dotted keys
// reach the view so the UI can mark rows shadowed by the runtime overlay.
func TestHandleConfigIncludesOverridden(t *testing.T) {
srv := newTestServer(t)
localView(srv, ConfigViewInput{
Config: configWithFakeSecrets().Get(),
Overridden: []string{"budgets.max_steps", "label"},
})
req := httptest.NewRequestWithContext(t.Context(), http.MethodGet, "/api/config", nil)
w := httptest.NewRecorder()
srv.Handler().ServeHTTP(w, req)
var got ConfigView
if err := json.Unmarshal(w.Body.Bytes(), &got); err != nil {
t.Fatalf("decode: %v", err)
}
if len(got.Overridden) != 2 || got.Overridden[0] != "budgets.max_steps" || got.Overridden[1] != "label" {
t.Errorf("Overridden = %v, want [budgets.max_steps label]", got.Overridden)
}
}
func TestHandleConfigResetCallsSeamAndAnswersOk(t *testing.T) {
srv := newTestServer(t)
var got string
srv.ResetConfig = func(_ context.Context, key string) error {
got = key
return nil
}
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/config/reset",
strings.NewReader(`{"key": "budgets.max_steps"}`))
w := httptest.NewRecorder()
srv.Handler().ServeHTTP(w, req)
if w.Code != http.StatusOK {
t.Fatalf("status = %d, body = %s", w.Code, w.Body)
}
if got != "budgets.max_steps" {
t.Errorf("ResetConfig called with %q, want budgets.max_steps", got)
}
}
func TestHandleConfigResetWithoutSeamMapsTo503(t *testing.T) {
srv := newTestServer(t)
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/config/reset",
strings.NewReader(`{"key": "label"}`))
w := httptest.NewRecorder()
srv.Handler().ServeHTTP(w, req)
if w.Code != http.StatusServiceUnavailable {
t.Fatalf("status = %d, want 503, body = %s", w.Code, w.Body)
}
}
func TestHandleConfigResetRejectsEmptyKey(t *testing.T) {
srv := newTestServer(t)
srv.ResetConfig = func(context.Context, string) error { return nil }
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/config/reset",
strings.NewReader(`{"key": ""}`))
w := httptest.NewRecorder()
srv.Handler().ServeHTTP(w, req)
if w.Code != http.StatusBadRequest {
t.Fatalf("status = %d, want 400, body = %s", w.Code, w.Body)
}
}
// TestHandleChannelsWithoutManagerIsEmpty: channel lifecycle is the status
// manager's to report. A process without one answers an empty list rather
// than deriving channels from configuration, which could only ever describe
@@ -710,42 +566,6 @@ func TestRemoteConfigViewRendersThePublishedSnapshot(t *testing.T) {
}
}
// TestConfigViewEditableFollowsThisProcessWritePath: Editable describes the
// rendering process, not the document. A published snapshot cannot make a
// reader editable, and a process that holds the update path says so even
// when the document it renders says otherwise.
func TestConfigViewEditableFollowsThisProcessWritePath(t *testing.T) {
render := func(t *testing.T, wireUpdate bool) ConfigView {
t.Helper()
srv := newTestServer(t)
srv.ConfigSource = func(context.Context) (ConfigView, bool, error) {
// The document claims editable; only the process decides.
return ConfigView{Editable: true}, true, nil
}
if wireUpdate {
srv.UpdateConfig = func(context.Context, map[string]any) error { return nil }
}
req := httptest.NewRequestWithContext(t.Context(), http.MethodGet, "/api/config", nil)
w := httptest.NewRecorder()
srv.Handler().ServeHTTP(w, req)
if w.Code != http.StatusOK {
t.Fatalf("GET /api/config = %d, want 200", w.Code)
}
var got ConfigView
if err := json.Unmarshal(w.Body.Bytes(), &got); err != nil {
t.Fatalf("decode: %v", err)
}
return got
}
if render(t, false).Editable {
t.Error("Editable = true without an update path; the write routes answer 503")
}
if !render(t, true).Editable {
t.Error("Editable = false with UpdateConfig wired; the page would hide controls that work")
}
}
// TestRemoteConfigViewRefusesAnUnknownSchema: a document whose shape this
// build does not know is not something to render half of.
func TestRemoteConfigViewRefusesAnUnknownSchema(t *testing.T) {
+4 -13
View File
@@ -51,9 +51,6 @@ type ConfigField struct {
// LockedReason is set per instance from the running config's denied
// keys (configuration.DeniedKeys), not hand-authored here.
LockedReason string `json:"locked_reason,omitempty"`
// Overridden is set per instance from the running config's overlay
// state, not hand-authored here.
Overridden bool `json:"overridden"`
// Options lists the valid values for a FieldEnum field.
Options []string `json:"options,omitempty"`
// RestartRequired reports that changing this field through the
@@ -77,7 +74,7 @@ type ConfigSection struct {
// configFieldDescriptors is the hand-authored catalog: one entry per field
// ConfigView exposes today, in the section grouping settings.js already
// renders. Values, LockedReason and Overridden are attached separately
// renders. Values and LockedReason are attached separately
// against a live ConfigView (archie-core-b6ew.2); this list is the
// data-independent half of the contract -- key, label, type, and the two
// safety-relevant properties (editable, restart_required) that must be
@@ -212,23 +209,17 @@ func configFieldValues(view ConfigView) map[string]any {
// overridden markers to the static descriptor catalog, producing the
// sections handleConfig returns to the dashboard. The catalog
// (configFieldDescriptors) and the per-request state (configFieldValues,
// view.Locked, view.Overridden) are kept as two separate functions
// deliberately: one is data-independent and safe to unit-test as a fixed
// catalog, the other is "what does this specific running config say."
// view.Locked) are kept as two separate functions deliberately: one is
// data-independent and safe to unit-test as a fixed catalog, the other is
// "what does this specific running config say."
func buildConfigSchema(view ConfigView) []ConfigSection {
values := configFieldValues(view)
overridden := make(map[string]bool, len(view.Overridden))
for _, key := range view.Overridden {
overridden[key] = true
}
sections := configFieldDescriptors()
for i := range sections {
for j := range sections[i].Fields {
f := &sections[i].Fields[j]
f.Value = values[f.Key]
f.LockedReason = view.Locked[f.Key]
f.Overridden = overridden[f.Key]
}
}
return sections
+1 -4
View File
@@ -45,7 +45,7 @@ func TestConfigFieldDescriptorsAreComplete(t *testing.T) {
if f.Type != FieldEnum && len(f.Options) != 0 {
t.Errorf("field %q has options but is not type enum", f.Key)
}
// Value/LockedReason/Overridden are attached per-instance
// Value/LockedReason are attached per-instance
// against a live ConfigView (archie-core-b6ew.2), not part of
// the static catalog -- the catalog must not pre-populate them.
if f.Value != nil {
@@ -54,9 +54,6 @@ func TestConfigFieldDescriptorsAreComplete(t *testing.T) {
if f.LockedReason != "" {
t.Errorf("field %q has a static LockedReason; that is attached per-request", f.Key)
}
if f.Overridden {
t.Errorf("field %q has a static Overridden; that is attached per-request", f.Key)
}
}
}
-24
View File
@@ -53,27 +53,6 @@ type Server struct {
// of them is about configuration.
TaskLogs TaskLogSource
// UpdateConfig applies a set of dotted-path config updates through
// the same validate-persist-publish path as reload (wired by the
// composition root). Optional: when nil, PATCH /api/config answers
// 503. The handler never touches the Cfg Holder directly -- see the
// Cfg field doc.
UpdateConfig func(context.Context, map[string]any) error
// ResetConfig deletes one runtime-overlay row and republishes file +
// remaining overlay. Optional: when nil, POST /api/config/reset
// answers 503. Like UpdateConfig, it never touches the Cfg Holder
// directly.
ResetConfig func(context.Context, string) error
// UpdateRepoField changes one editable field (RepoEditableFields) on
// the repository identified by owner/name, republishing the full
// repository list through the same path as UpdateConfig. Optional:
// when nil, PATCH /api/config/repos/{owner}/{name} answers 503. See
// handleConfigRepoUpdate for why this needs its own seam rather than
// going through UpdateConfig's dotted-key path directly.
UpdateRepoField func(ctx context.Context, owner, name, field string, value any) error
// Channels reports actual adapter lifecycle, independently of configuration
// presence. Nil preserves the configuration-only fallback for tests and
// minimal embedding.
@@ -276,9 +255,6 @@ func (s *Server) registerConfigAndLogRoutes(mux *http.ServeMux) {
mux.HandleFunc("POST /api/identities", s.handleIdentityCreate)
mux.HandleFunc("POST /api/identities/{id}/{command}", s.handleIdentityCommand)
mux.HandleFunc("GET /api/config", s.handleConfig)
mux.HandleFunc("PATCH /api/config", s.handleConfigUpdate)
mux.HandleFunc("POST /api/config/reset", s.handleConfigReset)
mux.HandleFunc("PATCH /api/config/repos/{owner}/{name}", s.handleConfigRepoUpdate)
mux.HandleFunc("GET /api/logs", s.handleLogs)
mux.HandleFunc("GET /api/logs/stream", s.handleLogStream)
}