think/surfaces/health: add V1 consumer-surface Health with structural-note contract
Adds read-only meta-surface reporting journal trust state: capture
coverage, synthesis completeness, consumer-signal health. Emits explicit
HealthNotes for missing signals and stale state rather than silently
zeroing.
- think/surfaces/types.py: append 5 frozen dataclasses per LOCKED shape
(CaptureHealth, SynthesisHealth, ConsumerSignalHealth, HealthNote,
HealthReport). Field names/types/order fixed by scope contract.
- think/surfaces/health.py: summary/full/for_range returning HealthReport.
One shared range scan across get_facets() × days feeds capture and
synthesis builders; consumer-signals composes ledger.list() twice.
Silent-facet ladder emits at most one note per facet (highest
severity); stale/missing indexer and missing talent day-index emit
dedicated notes. Two structural info notes (coverage_ratio and
corrections-ledger) always emitted per scope.
- think/tools/health.py: Typer sub-app mounting summary / full /
for-range / pipeline under sol call health. Pipeline subcommand
relocated verbatim from apps/health/call.py (local-time default
preserved). Top-level help disambiguates from sol health (service
liveness).
- think/call.py: re-alphabetize built-in import/mount block; register
health_app once.
- apps/health/call.py + apps/health/tests/test_call.py deleted to free
the sol call health namespace for the new built-in. Web surface
(routes.py, workspace.html, app.json, talent/health/) left intact.
- tests/test_surfaces_health.py: 23 tests covering every LOCKED metric,
note-emission rule, range validation, deterministic sort order, CLI
JSON round-trip, and pipeline subcommand behavior preservation.
Note sort order: (severity_rank, category, message) with
critical=0/warn=1/info=2, applied once in _build_report. Never silently
zero a missing signal. coverage_ratio always None in V1; hours_total
denominator shipped, but the ratio is withheld until Sprint 5+ per
cpo/specs/in-flight/consumer-surface-health.md.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>