Files
rea/tests/boundary/android
morluto f986b25df9 fix(doctor)!: emit each check once and classify passing checks healthy (#14251)
* fix(doctor)!: emit each check once and classify passing checks healthy

Audit-wide doctor reports copied every check into both scope_checks and
checks. The audit-wide report now has no scope_checks, since every check
in checks is in scope. Explicit scopes keep scope_checks.

The CLI treated an unhealthy report like an error payload, so
--filter-output and the token count for a filtered selection were ignored
when healthy was false. An unhealthy report is now a completed result
for output controls. The exit status stays 1, and the JSONL and
full-output envelopes still mark it failed.

The provider check port typed classification as a failure class for every
check, so Ghidra, IDA, JADX and Kuna attached unsupported_host,
config_drift or runtime_failure to passing rows in providerInspections.
DoctorProviderCheck is now a union: a passing check is healthy with no
code, and only a failing check carries a failure class.

JADX and Kuna reported their not-configured state with the remediation
text as the reason, so detail repeated remediation. The reason now states
the observation (REA_JADX_MCP_JAR or REA_KUNA_COMMAND is not set).

BREAKING CHANGE: audit-wide doctor reports omit scope_checks; read
checks. Passing providerInspections checks report classification
"healthy".

Fixes #14166
Fixes #14200

* fix(doctor): filter unhealthy reports in full output and keep repairs

--filter-output still skipped an unhealthy report under --full-output,
because the envelope's failure payload was chosen before the filter. The
completed-report decision now has one owner in writeResult: it selects
from the report first and uses the selection as the envelope's error, so
the envelope keeps ok: false. JSON Lines keeps its documented framing of
a classified failure as one whole error record.

Shortening the JADX and Kuna not-configured reasons left their analysis
errors without a repair step, because those errors copied only the
reason. They now pass the configuration owner's existing remediation
(jadxFailureRemediation and the Kuna configuration remediation) as the
remediation action.

The installation guide now limits the healthy-classification statement
to provider checks and names the registration_environment exception.

* fix(kuna): accept a remediation action on capability gaps

* fix(cli): keep an unhealthy report failed when its selection drops the verdict

Under --full-output, the selected value doubled as the failure marker, so a selection that was missing (an audit-wide report has no scope_checks) made the envelope report ok: true. writeResult now decides failureReported before selection and uses the selection only as the payload. A missing or verdict-free selection keeps ok: false, and an invalid filter is still reported as a filter error.
2026-11-23 22:48:18 -05:00
..