echo6-docs/vault/projects/meshai-config-hot-apply.md
echo6-autocommit ef8b1e0bd9 auto: docs sync 2026-07-13T12:00:23+00:00
Files changed: engine/.embcache.json engine/changelog.md engine/lint-report.md vault/.trash/2026-06-19.md vault/docs/hardware/environment.md vault/docs/hardware/ip-allocation.md vault/docs/matrix/archivist.md vault/docs/matrix/matrix_host.md vault/docs/matrix/mautrix_signal.md vault/docs/matrix/synapse.md vault/docs/matrix/synapse_retention_discovery.md vault/docs/navi/cc-rules.md vault/docs/navi/deployment.md vault/docs/navi/themes.md vault/docs/services/ots-setup.md vault/docs/services/services.md vault/docs/services/usenet.md vault/docs/software/authentik.md vault/docs/software/caddy.md vault/docs/software/central.md vault/docs/software/dns.md vault/docs/software/geo-tools.md vault/docs/software/navi.md vault/docs/software/recon.md vault/docs/software/searxng.md vault/glossary.md vault/notes/echo6-landing-page-data-export.md vault/notes/ia-download-queue.md vault/projects/advbbs-project.md vault/projects/argus.md vault/projects/deploy-livesync.md vault/projects/fleet-patch-audit.md vault/projects/fleet-platform-baseline.md vault/projects/matrix-synapse-deployment.md vault/projects/meshai-config-hot-apply.md vault/projects/meshai-region-routing-plan.md vault/projects/meshai.md vault/projects/meshcore-transport.md vault/projects/meshtastic-headscale-runbook.md vault/projects/mmud-project.md vault/projects/nominatim-v5-reimport.md vault/runbooks/add-peertube-channel.md vault/runbooks/authentik-access-groups.md vault/runbooks/authentik-create-invitation.md vault/runbooks/authentik-oidc-application.md vault/runbooks/authentik-upgrade.md vault/runbooks/central-deploy-cutover.md vault/runbooks/ct-runbook.md vault/runbooks/edge2-access-reference.md vault/runbooks/expose-service-contabo.md vault/runbooks/expose-service-edge2.md vault/runbooks/expose-service-home.md vault/runbooks/fleet-magicdns-resolved-migration.md vault/runbooks/headless-browser-page-verification.md vault/runbooks/headscale-oidc-boot-order.md vault/runbooks/headscale-onboard-node.md vault/runbooks/ia-cli-reference.md vault/runbooks/ia-download-mirror.md vault/runbooks/idahomesh-bridge-setup.md vault/runbooks/idahomesh-vpn-device-setup.md vault/runbooks/lxc-service-migration.md vault/runbooks/mailcow-create-mailbox.md vault/runbooks/meshai-prod-compose-override.md vault/runbooks/meshmonitor-password-reset.md vault/runbooks/meshtastic-sidecar-node.md vault/runbooks/meshtasticd-sim-nodes-runbook.md vault/runbooks/nordvpn-lxc.md vault/runbooks/peertube-remote-runner.md vault/runbooks/pg-backup.md vault/runbooks/pi-nas-omv-runbook.md vault/runbooks/pipeline-patterns.md vault/runbooks/proxmox-create-ubuntu-vm.md vault/runbooks/proxmox-onboard-node.md vault/runbooks/pymc-repeater-kiss-tnc-reenumeration.md vault/runbooks/recon-operations.md vault/runbooks/recon-service-integration.md vault/runbooks/syncthing-add-node.md vault/runbooks/toc-cortex-pve9.2-update.md vault/session-resume/SESSION-HANDOFF-meshai-test.md
2026-07-13 12:00:23 +00:00

3.8 KiB

title type tags aliases related updated status
meshai Config Hot-Apply — Kill the Restart-Required GUI Friction project
mesh
meshai-region-routing-plan
meshai-prod-compose-override
meshai
SESSION-HANDOFF-meshai-test
meshcore-transport
2026-07-13 proposed

meshai Config Hot-Apply (proposed — backlog)

Goal (Matt, 2026-07-07): make GUI Save just apply instead of prompting a container restart. The restart-required system is high-friction and Matt loathes it. This doc captures the why + the fix so it can be picked up later. Surfaced while building meshai-region-routing-plan (coverage/region edits require a restart to take effect).

Why saves don't apply today

Split by who reads the config, and when:

  • Live sections (already hot): notifications, rules, toggles, timezone, etc. Their consumer reads config.<section> fresh on every use (e.g. the dispatcher reads config.notifications per event), so the save endpoint's setattr(app.state.config, section, new_value) (dashboard/api/config_routes.py:176) is enough — instant.

  • Restart-required sections snapshot config at BOOT and never re-read it. RESTART_REQUIRED_SECTIONS (config_routes.py:29-40) = connection, llm, mesh_sources, meshmonitor, dashboard, environmental, coverage, generic_sources. Examples:

    • CoverageFilter is built ONCE at pipeline start from areas_from_config(config.coverage) (notifications/pipeline/__init__.py:120-126) — frozen copy of the areas.
    • Adapters get their fetch bbox computed ONCE at boot via enclosing_bbox(coverage.areas) (main.py:413).
    • The radio connector opens the link ONCE with connection settings.

    A naive live mutate would leave these running objects on the OLD config while new data flows under new assumptions → a half-applied, inconsistent "transient AND-mode" (the exact thing the guard prevents). So the flag saves-to-disk-but-diverges-in-memory until restart. Crude but not arbitrary.

The fix: per-section reload hooks + a hot-apply framework

"Save just works" = on save, rebuild the component that snapshotted the config, atomically. Proposed framework: each section registers an optional apply_live(new_config) handler; the save endpoint calls it and only falls back to "restart required" when a section has no safe handler.

Tiers:

Tier Sections Effort
Easy wins coverage, llm, environmental thresholds Low — rebuild the filter / swap the LLM client / re-read next tick
Moderate generic_sources, mesh_sources, environmental adapters Medium — re-instantiate the adapter with new config
Genuinely disruptive connection, meshmonitor, dashboard (port) Replace full restart with an explicit "Reconnect" / "Rebind" action — a live half-swap of an open radio link is unsafe

Coverage is Tier-1: on save, rebuild CoverageFilter's area list + refresh the adapters' bbox → region edits apply fully live (both routing columns AND engine re-scoping). NOTE: the routing-column half is already solved in meshai-region-routing-plan (regions endpoint reads on-disk coverage, so columns are dynamic without restart); the remaining half is the engine re-scoping, which this work covers.

Two ways to scope

  1. Narrow: just make coverage hot-apply (rebuild filter + adapter bbox on save) — bounded, testable, closes the region-routing loop end-to-end.
  2. Broad: design the hot-apply framework and convert the whole GUI so Save just saves everywhere; restart becomes a last-resort scoped reconnect only. (Candidate for a local ultraplan.)

Payoff: kills ~90% of restart prompts (everything edited day-to-day) while keeping a safe, scoped reconnect for the handful of things that genuinely disrupt a live connection.