Skip to content

Every enforcement the policy declares is reconciled against what actually runs

The policy has an enforcement list: things that are supposed to run Majordomus (a pre-commit hook running doctor, a pre-push hook running finish --check). For each entry, doctor proves four things: the executable exists, it is executable, the hook or CI file named in wired_by exists and is executable, and that file actually invokes the command — without discarding its exit code. A declaration that fails any of these is reported as not wired. This is the single most important check in the tool.

declared statusdeclared status: guaranteed Declared deterministic and blocking, implemented, and naming the behavioural test that is to prove it. Whether a recorded run supports it is the evidence verdict, shown beside it.

recorded evidencerecorded evidence: not run Declared guaranteed, and not supported by a recorded run: the test is named, and no passing run of the current inputs is recorded. how evidence is recorded

The path must exist, be executable, and be invoked by the named dispatcher. A hook that invokes it and discards the exit code counts as not wired.

What it means

The policy has an enforcement list: things that are supposed to run Majordomus (a pre-commit hook running doctor, a pre-push hook running finish --check). For each entry, doctor proves four things: the executable exists, it is executable, the hook or CI file named in wired_by exists and is executable, and that file actually invokes the command — without discarding its exit code. A declaration that fails any of these is reported as not wired. This is the single most important check in the tool.

How it works

lib/doctor.sh resolves the enforcement's path (on PATH, repository-relative, absolute, or as the path written on the hook line itself), resolves the hook directory through core.hooksPath or .git/hooks/, reads the hook file, greps for majordomus <first-arg>, and then greps the same line for || true or || exit 0. wired_by: ci:<file> checks a CI file the same way; wired_by: manual is reported as unverified, never as wired. doctor runs this against the repository it is installed in — including this project's own hooks in CI.

How to see it

printf '#!/bin/sh\nmajordomus doctor || true\n' > .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
majordomus doctor
# FAIL wiring      doctor-on-commit — .git/hooks/pre-commit invokes it but swallows the exit code (|| true)

What it does not cover

It proves reachability, not execution history: a wired hook can still be bypassed by someone who edits .git/hooks or clones elsewhere. Those are documented limits of any local hook, stated in the security notes, not silent failures.

Why it exists

Seventeen independent cases were found in the source environment of a check documented as blocking, present on disk, executable, and invoked by nothing — including a well-engineered commit guard whose registration was silently dropped when unrelated tooling rewrote a settings file, while its tests and documentation stayed in place. Declared-but-not-wired is the default end state of enforcement, not an edge case; a check that fails on it is the product.

Detail rendered from docs/claims/wiring-reconciliation.md.

From the statement to the proof

  1. 1 · the public statement

    Every enforcement the policy declares is reconciled against what actually runs

    Made on Doctrine, Doctor.

  2. 2 · the canonical claim

    wiring-reconciliationdeclared status: guaranteed in docs/CLAIMS.yaml

    Defined in read it on this site · docs/DESIGN.md

  3. 3 · the implementation

    lib/doctor.sh · majordomus doctor

  4. 4 · the test and the scenarios

    Test: test/cases/03_update.sh

    Executed in Prove a rule is actually enforced, not merely written down, Trust the policy and the profiles only after they are validated, Gate CI on the tool itself, with an exit code that is a contract.

  5. 5 · the recorded runs

    recorded evidence: not run how evidence is recorded

Verify it yourself

The test runs in a disposable temporary repository and asserts the behaviour, not a string in the source.

from a clone of the repository
bash test/run.sh 03_update

Where this claim is used

Related claims same implementation

The moments this answers

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