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

MGS3043: a job write path that claims too much

magus job fork, magus job apply and magus\job.put refused a job record because one of its write paths claims more of the workspace than its breadth thresholds allow:

[MGS3043] write_paths[0] "**/*.go" reaches 4 projects and 812 files: name the
  files the job edits, such as internal/job/*.go, or waive it

Nothing was written to the job store.

What fires it

  • A write path whose matches span more projects than the workspace allows.
  • A write path matching more files than the workspace allows.
  • A write path that opens with **, which reaches every project.

The thresholds are keys in magus.yaml.

Why

A broad write path overlaps every job that edits anything it matches, so the plan serializes work that never touches the same file, and the guard lets the job write files its brief never named.

What to do

Narrow the path to the files the job edits. magus refs <symbol> --occurrences lists the files a change to a symbol touches.

When the breadth is the job, such as a rename across the tree, waive the problem in the record with the path as its subject:

"waivers": [
  { "code": "MGS3043", "subject": "**/*.go", "reason": "renames the type everywhere" }
]

See also

  • MGS3018: a directory as a write path.
  • Leases: write paths and waivers.
MGS3043jobsleaseswrite pathsforkapplyagentswaiversvalidation
Last updated (29d8b3de)
Glossary

Workspace

The magus root directory that owns a set of projects and shared config; the unit magus operates over. Workspace in full.

Project

A directory magus recognizes as a unit of work (it has a magusfile); the unit of caching, scheduling, and dependency tracking. Project in full.

Op

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

Span

OpenTelemetry's name for one unit of work under a trace: a target execution, whose sub-operations are child spans. An output reference points at a span's captured output. Span in full.

Agent

A model working through an agent host such as Claude Code, Codex, Cursor or OpenCode. magus treats an agent as one more caller of its CLI, MCP tools and console, held to the same checks as a person. Agent in full.

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 daemon, for its own maintenance. The store records; the agent guard is what reads those facts back when grading a write. Job in full.

Lease

The grant a holder takes on a job: the write and read paths that job declared, enforced in the checkout that took it with magus job exec. A job is the piece of work; a lease is permission over it. Lease in full.

Conventions

Placeholders

Angle brackets mark a value you replace with your own; never type the brackets:

magus run <target>
magus completion <shell>    # e.g. bash, zsh, fish

<target>, <path>, <shell>, <name> and the like are stand-ins, not literal text.