Skip to content

I1998 — A health command in an unsupervised repository does not exit 0

Make `majordomus doctor`, `session list` and the other read-only commands exit with the missing-artifact code when the repository has no .ai/manifest.yaml, so a caller can tell a healthy repository from one the tool is not installed in.

DONE wave 0 · p2 · implementation profile · parallel safe

Part of adopter-upgrades — An adopting repository survives a Majordomus upgrade, and what the tool vendors into it is adopter-neutral.

Objective

Make `majordomus doctor`, `session list` and the other read-only commands exit with the missing-artifact code when the repository has no .ai/manifest.yaml, so a caller can tell a healthy repository from one the tool is not installed in.

Why

Run by majordomus 0.14.0 on prismatic-platform's main branch on 2026-10-08, which has no layer, `majordomus doctor` and `majordomus session list` each printed only 'no .ai/manifest.yaml ... (run: majordomus init)' and exited 0. A script or an agent that runs doctor as its health check reads that as healthy. The Rust executable already answers the same state with exit 12 and the start directory named; the shell tool disagrees with it.

Current state

The shell tool's read-only commands print the missing-manifest line and exit 0 outside a supervised repository.

Desired state

Outside a supervised repository every command that reports on the layer exits 12 with the line it prints today. Commands whose purpose is to work there — init, version, help — are unchanged.

Scope

  • bin/majordomus
  • lib
  • docs/CLI.md
  • test/cases

Dependencies

None. This issue is a root of the graph.

Acceptance criteria

  • doctor and session list in a git repository with no .ai/manifest.yaml exit 12 and name the missing file
  • init, version and help in the same repository exit 0
  • The shell tool and the Rust executable exit with the same code for the same missing layer

Validation

  • bin/majordomus plan validate
  • MJ_TEST_JOBS=4 bash test/run.sh <the case this issue adds>

Evidence required

  • unsupervised_exit_code_case

Evidence

coverstypecommandresultat commit
unsupervised_exit_code_casetestMJ_TEST_JOBS=2 bash test/run.sh 3015_an_unsupervised_repository_exits_12_from_both_toolstests: 1 passed, 0 failed, 0 skipped (run 2026-10-14 11:14Z on master 981ad2c3ac plus this change)981ad2c

Timeline

started
2026-10-14T11:14:53Z
verified
—
completed
2026-10-14T11:15:00Z

Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.

Canonical record: .ai/repo/project/issues/I1998.yaml. Read it back with majordomus plan show I1998.

Searches the titles and descriptions of every page this site publishes.