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

MGS3036: a project's configuration held whole

magus job fork, magus job apply, the client tool (magus\job.put) and a magusfile's magus\job.put refused a job because one of its write paths names a project's magusfile or magus.yaml whole:

[MGS3036] job: wave/slots holds a project's configuration whole: "magusfile.buzz",
  such as `magusfile.buzz#project.name`, `magusfile.buzz#project.targets.test`,
  `magusfile.buzz#build`. Every job that changes the workspace's configuration
  writes that file, so a whole-file hold blocks them all for one line; claim the
  declarations and keys the job changes instead

Nothing was written to the job store. A put that adds such a path to a job that already exists is refused the same way and leaves the job as it was.

Why

A target's slots, a source glob and a job setting are each one line of a magusfile or a magus.yaml, and every job that changes the workspace's configuration writes those files. A job that holds one whole serializes all of them behind its own line. Claims split the file: a magusfile's functions by name, its magus\project({...}) table by key path, and magus.yaml by key path.

Key claims

Inside the top-level magus\project({...}) call of a magusfile:

  • magusfile.buzz#project.<key> holds one top-level key, such as project.sources.
  • magusfile.buzz#project.<key>.<entry> holds one entry of a key whose value is a map: magusfile.buzz#project.targets.test holds the test entry of targets and nothing else.

In magus.yaml, magus.yaml#<key> holds a top-level key and magus.yaml#<key>.<sub> one key under it, such as magus.yaml#jobs.stale_after.

A claim on a key whose children are placed (project.targets, jobs) names every child, so fork refuses it as ambiguous with MGS3031. A key that does not exist yet is accepted, since the job may be about to add it.

What is refused

  • A literal path to a magusfile or magus.yaml a project loads, at the root or in any project, including a file under a magusfiles/ directory.

What is not refused

  • A claim (magusfile.buzz#project.targets.test) or a glob (**/*.buzz). A job holding one of these files through a glob narrows on its first write to it: its row gains a claim on each declaration or key the write changes, and the rest of the file is recorded as released, with its digest. From then on the glob no longer holds that file for the job.
  • A checkout that cannot place the file's lines, because .gitattributes has no *.buzz diff=buzz or *.yaml diff=yaml line or its version control places none. Nothing smaller than the file could be claimed there. Neither is a file that declares nothing yet.
  • A spell source a magusfile imports.

The release request

When another live job holds the file, the refusal also opens one attention request (outcome waiting) naming the holder and the file, with the claims the refused fork wanted as its files. A second refusal over the same holder and file lands on the same request, and a dry run (magus job apply --dry-run) opens none. The holder narrows its write paths, or exits, and the holder or the root closes the request:

magus session attention
magus session dispose <request>

What to do

Claim what the job changes:

magus job fork wave/slots --write-paths 'magusfile.buzz#project.targets.test'

See also

  • Leases: write paths, claims, and what the guard enforces.
  • MGS3031: a declaration claim nothing can grade.
  • MGS3032: an unordered share of one claimable file.
MGS3036jobsleaseswrite pathsforkagentsclaimsmagusfilemagus.yaml
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.

Magusfile

The magusfile.buzz that declares a project's targets (as export funs) and binds its spells. Magusfile in full.

Target

A named operation (build, test, ...) you invoke with magus run <target>; it may compose a spell's tool-native operations and depend on other targets. Target 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.

Spell

A language/runtime adapter (e.g. go, md) that maps generic targets onto a toolchain's real commands. Spell in full.

Buzz

The language magusfiles are written in (the .buzz engine). Buzz in full.

Slot

One unit of the pool's capacity. A target acquires the slots it needs to run (most take one) and releases them when it finishes; the pool tracks capacity (total slots), running (acquired), and queued (blocked). Slot 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.

Tool

An action a model can call through its host: a name, a description, a typed input and a result. magus serves its tools over MCP, each a read of the workspace model or a run of the CLI it already has. Tool in full.

Session

An agent host's conversation, by the id the host delivers to its hooks. magus never mints one: a record with no session is unattributed, and the OS user it carries says whose account ran it. Session in full.

Attention request

A durable record that an agent is blocked, opened by a magus session notify event and held until a person disposes it. Nothing closes one on its own. Attention request in full.

Dispose

The human act of closing an attention request: a judgment rendered, recorded with who and why. Distinct from resolving a review thread or a merge conflict: a disposition answers a request; it does not merge anything. Dispose 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.

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. Run 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.