MGS2004: sandbox.allow entry failed to resolve
A sandbox.allow entry in magus.yaml (or an equivalent built-in
spell allowlist) referenced a path that magus could not resolve.
[MGS2004] sandbox.allow entry failed to resolve; skipped
path=$NONEXISTENT_VAR/cache
Why
sandbox.allow paths support ~ for the home directory and $VAR
references resolved against the current environment. When the expansion
yields an empty or invalid path, the entry is skipped (not fatal) and
this code is emitted so the user knows the rule did not take effect.
Resolution
- Check that any
$VARreferenced in the path is set in the environment magus runs in. - Replace
$VARwith an absolute path if the variable does not exist outside a specific shell. - Remove the entry if it was a typo.
The path is intentionally skipped rather than failing the run: a missing optional cache should not block a build. If your build then fails for a different reason (e.g. MGS2001 on the same path), you have a clear chain to follow.