MGS1001: no ci target defined
magus ci (or magus affected ci, magus affected --plan, magus x ci) was
asked to run the ci target, but no project in the selected scope declares one.
[MGS1001] no "ci" target defined in the selected project(s); it is the anchor
"magus affected ci" and "magus affected --plan" key off, so this run would do nothing
see: .../MGS1001.md
Why
ci is an ordinary magusfile target. Magus does not hardcode a CI chain.
You compose the gate yourself with magus\needs, ordering the stages your
workspace needs (build, test, lint, ...).
It is the one target magus treats as the CI anchor: magus affected ci and magus affected --plan key off it to decide what the affected
set should build and gate. Every other target fans out and silently skips
projects that don't declare it. That default suits build/test/lint, but
for ci it means a workspace with no ci target anywhere would let magus ci
exit 0 having run nothing, reporting a green check that checked nothing.
Magus fails fast instead. Both paths enforce the same rule:
- Run time.
Magus.RunCIreturns this diagnostic before executing anything when the scope has projects but none declareci. (An empty scope, such asmagus affected ciwith no changes, stays a legitimate no-op and is left alone.) magus doctor. Theci targetcheck fails when no project in the workspace declaresci, surfacing the gap before CI ever runs it.
Resolution
Define a ci target in your magusfile and compose the stages with
magus\needs:
export fun ci(ctx: magus\Context, _a: [str]) > void {
ctx.needs(build, test, lint);
}
Run magus describe targets to see the stages available to compose. The name
matches case- and delimiter-insensitively (magus normalizes CI/Ci to ci),
so any casing of the declaration is detected.
In a multi-project workspace the target only needs to exist in one project for the anchor to resolve. Declare it wherever you compose the workspace gate.
What this is NOT
- Not a missing-spell error.
ciis never a spell op; it lives in the magusfile and composes spell-backed targets viamagus\needs. Adding a spell will not satisfy this check. - Not triggered by an empty affected set.
magus affected ciwith no changed projects is a real no-op and does not raise MGS1001. The diagnostic fires only when the scope has projects yet none declareci.