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

MGS8001: output ref not found

Every target that runs is given a short reference id (out1a2b3c) for its captured output, retrievable later with magus query output <ref>. This code fires when the ref is well-formed but no store holds output for it - it aged out of the cache (the store keeps only the last few executions per target and prunes by age and size), it was mistyped or copied incompletely, or it was minted somewhere its output never reached.

A ref cannot be decoded back into a target - it is a truncated hash, not an encoding - but it CAN be predicted: magus sweeps every candidate target in the workspace, keys each exactly as a run would, and compares. That prints one of two outcomes alongside the diagnostic:

  • A match. Nothing here has produced this output, but a target's live cache key equals the ref, so magus prints the exact command that would mint it: magus run <target> [project].
  • No match. No target in this workspace keys to the ref at the current tree, which means the run that printed it had different inputs - a different commit, an uncommitted change, or a different environment - not that the lookup is broken.

Resolution

  • If magus found a match, run the printed command; it mints the ref and gives you the output.
  • If it found none and you know (or suspect) which target minted it, run magus describe target <target> --cache --against <ref> to name the exact input that drifted, instead of guessing.
  • If someone else already produced the output, ask them to share it: magus query output <ref> --publish on their machine uploads it as a signed bundle that resolves the same ref on yours.

A ref you copied short also lands here when it matches nothing, so check you took the whole id.

See also

MGS8001output refsquerycacheretrieval
Last updated (a103255f)
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.

Project

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

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. See targets.

Cache

The content-addressed store magus consults before running a target, so unchanged work is skipped. See cache.

CI

An ordinary magusfile-defined target you compose yourself with magus\needs - magus does not hardcode its stages. Magus.RunCI treats it specially only in that it strips the rw charm, it is the anchor magus affected ci keys off, and a selected scope with no project declaring it is a load error rather than a silent no-op. See targets.

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.