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

busy-wait

A deny rule: it refuses a loop polling for work you started, which announces its own completion, and names what to run instead.

What it catches

A loop polling for work you started, which announces its own completion.

Why

A backgrounded command is tracked and announces its own completion, so starting it and doing something else is strictly better than watching it. The loop also has no bound of its own: past the tool timeout it is BACKGROUNDED rather than killed, and goes on polling a condition that may never arrive, because a run that failed early never prints the line being grepped for. Several have had to be killed by hand. Waiting on something OUTSIDE this machine, a remote queue or a deploy nobody here started, is what a host's monitor surface is for. A shell script is judged by its content, so bash wait.sh and a write of wait.sh get the verdict the loop would get typed inline; so do the cd, output-pipe, output-redirect, capture-filter and unknown-env rules.

Seeing it

A verdict names its rule in brackets, which is how you got here:

deny [busy-wait]: ...

magus describe rule busy-wait prints the same entry at a terminal, and magus describe rules lists every rule this workspace enforces.

See also

  • All rules - what this workspace enforces, deny first
  • The guard - how a verdict is reached and wired
guardrulesbusy-waitdeny
Last updated (a9ff8609)
Earlier changes on this page (1)

Full history ↗ · Blame source ↗

Glossary

Workspace

The magus root directory that owns a set of projects and shared config; the unit magus operates over. See workspace.

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.

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.