Skip to main content

Module prepare

Module prepare 

Source
Expand description

agentmux-srv migrate --prepare: everything a version’s data needs before srv opens it, as one step a supervisor runs while srv is stopped.

In order: copy the newest older version’s databases forward when this version has none yet (migrations/carry_forward.rs), then the same locked batch the daemon runs (runner::apply_pending), whose backup leaves out objects.db after a copy-forward. Each part is reported on stderr in the agentmux_common::srv_stderr protocol (STEP and MIGRATION lines), so the launcher’s native splash can show it; the NDJSON summary on stdout is the one plain migrate prints.

The upgrade step of docs/specs/SPEC_FAST_STARTUP_UPGRADE_OWNS_MIGRATIONS_AND_UPDATES_2026_09_15.md §10. The launcher runs it (srv_spawner::spawn_srv) after srv exits with AGENTMUXSRV-NEEDS-PREPARE, its boot gate having found data that needs preparing (migrations/gate.rs).