feat(869-c5): mosaic doctor surfaces wired-but-unactivatable lease enforcement #878

Merged
Mos merged 1 commits from feat/869-c5-doctor-activation-check into main 2026-07-23 18:38:22 +00:00

1 Commits

Author SHA1 Message Date
mosaic-coder
e75e32386c feat(869-c5): mosaic doctor surfaces wired-but-unactivatable lease enforcement
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
Part of #869 (Point-1 C5). Adds runLeaseEnforcementDoctorCheck(), which
detects whether the Claude Code enforcement hooks (mutator-gate.py /
receipt-observer-client.py) are wired in ~/.claude/settings.json and, if so,
reuses C1's leaseEnforcementActivatable() and C3's
checkBrokerSupervisorHealth() to determine whether activation could actually
satisfy enforcement right now. Wired-but-not-activatable/unhealthy reports a
LOUD [mosaic-doctor] [ERROR] (forces mosaic doctor to exit non-zero even if
the underlying bash audit script is green); not-wired or wired-and-healthy
both pass silently, matching this file's existing checkMosaicHome/checkFile
conventions.

Red-first unit tests inject every dependency (settings read, activation
probe, broker-health check) — no real ~/.claude/settings.json or broker is
ever touched.
2026-07-23 13:24:32 -05:00