5fe8f228c1
Add a read-only /ecosystem page that consumes the sibling services' JSON APIs (Nexus entities, Praxis attention, Hexis capabilities), fetched concurrently with honest per-panel error states. Siblings stay headless — mavweb is their human surface (arch §16). Wired via mavweb -nexus/-praxis/-hexis flags; mavweb joins the ecosystem compose network. Fix mobile horizontal overflow across all pages: .content is a flex child with default min-width:auto, so it refused to shrink below the tables' intrinsic width. min-width:0 lets wide tables pan inside .scroll instead of dragging the page sideways. Verified via CDP geometry check (scrollWidth === clientWidth at 430px). Also includes in-progress Ethos UI redesign, ecosystem deploy compose, and planning docs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2.5 KiB
2.5 KiB
Plan: Self-Update with Rollback
Goal: Maven can update her own code, config, skills (seed files), tool definitions, and integrations while running, with a rollback mechanism if the new state causes failures.
Done when:
internal/update/package manages versioned snapshots of the binary + config + models + seeds- Daemon can fetch a new release artifact (git pull +
go build, or download a pre-built binary) - On success: atomically swaps binaries/symlinks and sends SIGHUP to itself for graceful reload
- On failure (daemon crash within a grace window): init/systemd restarts the old binary automatically, or an in-process supervisor detects crash-loop and rolls back
- Rollback is automatic on crash-loop detection (>2 crashes in 5min) — previous known-good snapshot is re-deployed
- All state (sqlite store) is forward/backward compatible within the same schema version (
store.Migrate)
Scope:
- New
internal/update/package — snapshot manager, downloader, binary swap, health check - New
cmd/mavend/updater.go— the imperative orchestration (swap + SIGHUP + watch) - Reuses
internal/store.Migratefor schema compatibility - Config:
updateblock inconfig.Config(repo URL, auto-update channel, rollback max crashes) - New IPC methods:
MethodCheckUpdate,MethodApplyUpdate,MethodRollback
Steps:
- Design the update data model: versioned snapshots under
state_dir/updates/v<N>/— binary, config, models, seeds; current symlink atstate_dir/current - Create
internal/update/checker.go— checks GitHub releases (or a custom update server) for newer version; compares semver - Create
internal/update/downloader.go— downloads artifact, verifies checksum, extracts to new snapshot dir - Create
internal/update/swapper.go— atomically swaps symlink, sends SIGHUP to self (syscall.SIGUSR1orSIGHUP) - Wire SIGHUP handler in
cmd/mavend/main.go(already hassignal.NotifyContextwithSIGHUP) — re-read config, re-open store, swap phraser/router/delivery without dropping IPC connections - Create crash-loop detector in
internal/update/health.go— watches process start time, counts crashes in window, triggers rollback - Add IPC methods
MethodCheckUpdate,MethodApplyUpdate,MethodRollbacktointernal/ipc/api.goand wire throughipc.Serverdispatch - Add
updateblock toconfig.Configanddeploy/mavend.json - Test rollback: deploy a deliberately broken binary, verify crash-loop detection reverts to previous version