magus v0.4.3 is out. See what's new
¶ View markdown source · ✎ Suggest an edit
1 min read

MGS3025: server speaks the old socket protocol

A magus command dialed a server's unix socket and got an answer in the socket protocol magus used before the socket carried HTTP. The process on the other end was started by an older magus.

[MGS3025] the magus server at unix:///run/user/501/magus/server.sock was started by an
  older magus and speaks its old socket protocol; restart it: pkill -TERM -f 'magus server' && magus server start

Why

The server's socket carries HTTP: the control operations (forwarded runs, jobs, status, reload, stop), MCP and the Connect APIs are paths on it. The line protocol it replaced is gone, with no fallback, so a new client and an old server share no way to talk. A server keeps running across an upgrade of the binary it was started from, which is how the two meet.

Resolution

Restart the server so it runs the magus you just installed:

pkill -TERM -f 'magus server' && magus server start

magus server stop speaks the new protocol too, so against an old server it names this code and stops nothing. The old process handles SIGTERM as a clean shutdown.

A forwarded run that meets an old server says so once and runs in its own process, so nothing is lost while you restart.

See also

MGS3025serversocketprotocolrestartupgrade
Last updated (a43ac9db)
Glossary

Op

A single tool-native command a target composes (long form: operation); the middle of the work hierarchy (Spell to Op to Target). See operations.

Ward

A coded diagnostic that inspects a resolved op and nudges or blocks an anti-pattern before it runs. See wards.

Server

The background process a person starts with magus server start. It serves MCP, the console, background jobs and the warm knowledge graph, and adopts nested magus calls into one pool. See server.

Pool

The concurrency pool: the shared set of slots that caps how many targets run in parallel on one machine. Its capacity defaults to MAGUS_CONCURRENCY, then 4 on GitHub-hosted runners, then min(NumCPU, 8); magus status and the dashboard report it live. See server.

Job

The unit of delegated work, and one row of the job store: what an orchestrating agent handed out, with its goal, the checkpoint it was cut against, the paths it may write or must not touch, and the one check it runs. A job's holder is either a session, for work an orchestrator handed out, or the server, for its own maintenance. The store records; the agent guard is what reads those facts back when grading a write. See doctrine.

A job is not a run. magus run build web is a run, and no job exists for it. A job causes runs: its check executes as one, and a server job records the invocation of its last one. Jobs are listed with magus ls jobs and in the console's Jobs view; runs are listed in the Runs view.

Run

One target executing under one magus invocation, such as magus run test web or magus affected ci. A run keeps its captured output behind an output reference. Every magus run is a run whether or not any job asked for it; see Job for how the two relate.

Conventions

This page uses none of the site's convention markers. The full set is on the conventions page.