Gio Della-Libera
9a5f2f61e7
Doctor: add health-check contract and --lint validation ( #80055 )
...
* feat(doctor): add --lint mode + structured HealthFinding shape
Adds the core machinery for `openclaw doctor --lint` per the
doctor-lint-and-oc-rules upstream proposal. PR-1 of the proposal:
no new top-level verb, no public plugin SDK; everything internal.
Files:
- src/flows/checks.ts ? HealthFinding / HealthCheck / HealthCheckContext
types. Findings carry severity per-finding; checks return
readonly HealthFinding[]. Mode tag (doctor/lint/fix) lets a check
distinguish the calling posture.
- src/flows/health-check-registry.ts ? module-level registry with
duplicate-id rejection + test reset helper.
- src/flows/doctor-lint-flow.ts ? runner over registered checks.
Catches throws into synthetic error findings (anchored at check id;
message scrubbed of control chars, capped at 256 bytes). Sorts
findings by severity desc, check id, path. Exports
exitCodeFromFindings (1 if any warning/error, 0 otherwise).
- src/flows/doctor-core-checks.ts ? 4 modern HealthChecks rewriting
logic from existing legacy run*Health functions:
core/doctor/gateway-config (warning)
core/doctor/command-owner (info)
core/doctor/workspace-status (info)
core/doctor/final-config-validation (error)
Each was audited safe per the proposal's adapter constraints
(no writes, no repair calls, no prompts, no probes incl. local-bind).
Legacy run*Health contributions in doctor-health-contributions.ts
are unchanged ? doctor mode (no --lint) still runs the existing 35.
- src/commands/doctor-lint.ts ? CLI dispatch for --lint. Reads config
snapshot, builds HealthCheckContext (mode: "lint"), runs the registry,
filters by --severity-min, emits human or JSON output, returns exit
code from unfiltered set so --severity-min hides info findings
without changing CI signal.
- src/cli/program/register.maintenance.ts ? adds --lint, --json,
--severity-min, --skip, --only flags to existing doctor command.
--lint branches to runDoctorLintCli; without --lint, doctor runs
unchanged.
LoC: 382 src across 6 files. Tests + doc + oc-path-side rule packs
follow as separate commits on this branch.
* fix: avoid string spread in doctor errors
* chore: refresh plugin SDK API baseline
* docs: clarify doctor lint usage
* feat(doctor): prepare repairs for dry-run reporting
2026-05-17 12:29:57 -07:00
..
2026-05-17 02:05:22 +01:00
2026-05-11 15:33:31 +01:00
2026-05-10 00:18:36 -04:00
2026-04-20 15:21:20 +01:00
2026-05-17 06:42:28 +01:00
2026-05-17 06:42:28 +01:00
2026-04-08 10:18:22 +01:00
2026-04-20 15:21:20 +01:00
2026-04-06 17:56:41 +01:00
2026-04-17 16:05:09 +01:00
2026-05-17 08:25:14 +01:00
2026-05-13 08:27:26 +01:00
2026-05-17 08:25:14 +01:00
2026-05-17 08:25:14 +01:00
2026-05-10 12:37:10 +01:00
2026-05-05 20:07:49 +01:00
2026-04-25 16:07:04 -07:00
2026-05-17 11:54:03 +00:00
2026-04-23 05:35:17 +01:00
2026-04-28 03:40:57 +01:00
2026-05-13 13:33:38 +01:00
2026-05-16 12:38:51 +01:00
2026-05-13 07:16:27 +05:30
2026-05-13 07:16:27 +05:30
2026-04-29 16:35:37 +01:00
2026-04-18 22:06:45 +01:00
2026-04-07 15:53:50 +01:00
2026-05-14 07:46:58 +01:00
2026-05-17 06:23:30 +01:00
2026-05-17 06:23:30 +01:00
2026-04-13 12:00:13 +05:30
2026-04-13 12:00:13 +05:30
2026-04-23 11:51:17 -07:00
2026-04-23 11:51:17 -07:00
2026-04-07 15:37:28 -04:00
2026-04-11 13:42:17 +01:00
2026-04-07 16:06:02 -04:00
2026-04-07 16:06:02 -04:00
2026-04-07 16:06:02 -04:00
2026-05-13 13:33:38 +01:00
2026-04-28 01:13:01 +01:00
2026-04-07 14:40:26 -04:00
2026-05-17 14:18:23 +01:00
2026-05-17 14:18:23 +01:00
2026-05-17 14:18:23 +01:00
2026-04-25 02:41:24 +01:00
2026-05-13 13:33:38 +01:00
2026-04-07 13:01:23 +01:00
2026-04-09 08:48:49 +01:00
2026-04-29 12:14:59 +01:00
2026-04-17 20:26:14 +01:00
2026-04-20 21:46:35 +01:00
2026-04-20 21:46:35 +01:00
2026-04-20 21:46:35 +01:00
2026-04-17 20:26:14 +01:00
2026-05-07 04:16:13 +01:00
2026-04-29 12:14:59 +01:00
2026-04-25 12:30:35 +01:00
2026-04-10 20:06:00 +01:00
2026-05-06 02:15:17 +01:00
2026-05-07 03:16:42 -07:00
2026-05-10 00:18:36 -04:00
2026-04-23 04:59:42 +01:00
2026-04-27 20:50:35 +01:00
2026-05-11 11:50:40 +01:00
2026-04-29 16:35:37 +01:00
2026-05-07 03:16:42 -07:00
2026-04-28 23:10:10 -07:00
2026-05-07 03:16:42 -07:00
2026-04-30 02:58:40 +01:00
2026-04-30 02:58:40 +01:00
2026-05-13 13:33:38 +01:00
2026-04-22 02:56:23 +01:00
2026-05-17 09:24:42 +08:00
2026-05-13 13:33:38 +01:00
2026-04-24 05:19:36 +01:00
2026-05-14 14:37:23 +02:00
2026-04-24 05:07:28 +01:00
2026-04-10 17:34:41 +01:00
2026-05-17 00:10:29 +01:00
2026-05-17 00:10:29 +01:00
2026-05-11 11:52:06 +01:00
2026-05-10 00:18:36 -04:00
2026-05-10 00:18:36 -04:00
2026-04-29 06:21:09 +01:00
2026-05-11 15:41:25 +01:00
2026-05-10 12:37:10 +01:00
2026-04-17 16:05:09 +01:00
2026-04-17 16:05:09 +01:00
2026-04-27 22:34:21 +01:00
2026-05-10 00:54:15 +01:00
2026-05-10 00:54:15 +01:00
2026-05-13 13:33:38 +01:00
2026-05-13 13:33:38 +01:00
2026-04-21 01:32:27 +01:00
2026-05-13 13:33:38 +01:00
2026-04-17 16:05:09 +01:00
2026-05-11 13:08:43 +01:00
2026-05-10 00:18:36 -04:00
2026-05-06 01:46:42 +01:00
2026-04-17 17:14:44 +01:00
2026-05-11 15:33:31 +01:00
2026-05-06 01:46:42 +01:00
2026-04-28 01:13:01 +01:00
2026-04-28 01:13:01 +01:00
2026-04-11 21:03:44 +01:00
2026-04-11 13:26:50 +01:00
2026-04-07 13:09:12 +01:00
2026-05-10 12:37:10 +01:00
2026-04-07 13:09:12 +01:00
2026-05-08 05:28:12 +01:00
2026-04-27 11:36:08 +01:00
2026-05-12 19:00:01 +01:00
2026-05-09 11:26:43 +01:00
2026-05-17 08:13:39 +01:00
2026-05-17 08:13:39 +01:00
2026-04-28 02:03:15 +01:00
2026-04-26 07:03:25 +01:00
2026-05-13 15:04:49 +01:00
2026-05-04 18:13:53 +00:00
2026-05-13 13:33:38 +01:00
2026-05-13 20:07:10 +01:00
2026-05-11 20:52:41 +02:00
2026-05-10 00:18:36 -04:00
2026-05-11 15:33:31 +01:00
2026-05-10 12:37:10 +01:00
2026-04-17 16:05:09 +01:00
2026-04-24 02:55:09 +01:00
2026-04-14 09:55:02 +01:00
2026-05-13 13:33:38 +01:00
2026-05-13 13:33:38 +01:00
2026-04-09 01:35:15 +01:00
2026-05-01 19:16:10 +01:00
2026-05-07 12:52:48 -07:00
2026-04-27 20:50:35 +01:00
2026-05-13 14:59:47 +01:00
2026-04-27 14:58:32 +01:00
2026-04-11 13:26:50 +01:00
2026-04-22 16:06:55 -07:00
2026-05-13 13:33:38 +01:00
2026-05-10 12:37:10 +01:00
2026-05-10 12:37:10 +01:00
2026-04-17 16:05:09 +01:00
2026-04-22 22:29:48 +01:00
2026-05-10 12:37:10 +01:00
2026-05-01 14:38:29 +01:00
2026-05-15 12:25:31 +01:00
2026-05-13 13:33:38 +01:00
2026-04-27 20:50:35 +01:00
2026-05-11 15:41:25 +01:00
2026-05-09 07:04:04 +01:00
2026-04-27 21:58:48 +01:00
2026-05-10 00:18:36 -04:00
2026-04-17 16:05:09 +01:00
2026-05-13 13:33:38 +01:00
2026-05-13 13:33:38 +01:00
2026-04-18 01:36:15 +01:00
2026-04-11 13:26:50 +01:00
2026-05-13 13:33:38 +01:00
2026-05-10 12:37:10 +01:00
2026-04-24 17:15:05 -07:00
2026-05-14 13:11:42 +08:00
2026-04-10 12:11:57 +02:00
2026-05-17 06:23:30 +01:00
2026-05-17 06:23:30 +01:00
2026-05-03 19:07:27 +01:00
2026-05-17 09:24:42 +08:00
2026-05-06 02:15:17 +01:00
2026-05-17 03:25:42 +01:00
2026-05-17 03:25:42 +01:00
2026-05-09 19:19:14 +01:00
2026-04-18 22:06:45 +01:00
2026-05-13 02:44:01 +01:00
2026-05-06 15:40:33 +01:00
2026-05-17 02:51:20 +08:00
2026-05-17 06:23:30 +01:00
2026-05-06 02:15:17 +01:00
2026-05-14 08:49:00 +01:00
2026-05-14 08:49:00 +01:00
2026-05-11 15:33:31 +01:00
2026-05-15 11:44:58 +01:00
2026-05-15 11:44:58 +01:00
2026-05-07 09:07:18 +01:00
2026-05-10 12:37:10 +01:00
2026-05-11 15:33:31 +01:00
2026-05-10 12:37:10 +01:00
2026-04-24 05:19:36 +01:00
2026-05-17 12:29:57 -07:00
2026-05-09 20:31:40 +02:00
2026-05-10 12:37:10 +01:00
2026-05-10 12:37:10 +01:00
2026-04-06 22:21:00 +01:00
2026-04-28 04:01:43 +01:00
2026-05-13 13:33:38 +01:00
2026-05-13 13:33:38 +01:00
2026-05-15 13:06:25 +01:00
2026-05-17 02:05:22 +01:00
2026-05-13 13:33:38 +01:00
2026-05-17 14:18:23 +01:00
2026-05-08 00:28:43 +01:00
2026-05-13 13:33:38 +01:00
2026-05-11 16:48:31 +01:00
2026-04-13 16:24:24 +01:00
2026-04-18 22:06:45 +01:00
2026-04-13 15:22:44 +08:00
2026-04-26 05:18:54 +01:00
2026-04-18 22:06:45 +01:00
2026-05-10 12:37:10 +01:00
2026-04-24 05:19:36 +01:00
2026-04-18 22:06:45 +01:00
2026-05-03 01:30:43 -07:00
2026-05-15 18:44:04 +01:00
2026-05-10 12:37:10 +01:00
2026-05-08 00:28:43 +01:00
2026-05-13 15:04:49 +01:00
2026-05-13 15:04:49 +01:00
2026-05-11 03:24:08 +01:00
2026-05-11 03:24:08 +01:00
2026-04-29 13:23:36 +08:00
2026-05-13 13:33:38 +01:00
2026-05-13 13:33:38 +01:00
2026-05-17 02:04:17 +01:00
2026-05-13 13:33:38 +01:00
2026-04-28 11:36:28 +01:00
2026-05-13 13:33:38 +01:00
2026-05-10 12:37:10 +01:00
2026-05-10 12:37:10 +01:00
2026-05-10 12:37:10 +01:00
2026-04-28 11:48:59 +01:00
2026-05-13 13:33:38 +01:00
2026-04-28 11:36:28 +01:00
2026-05-03 00:59:55 +09:00
2026-05-13 13:33:38 +01:00
2026-05-14 12:50:22 +08:00
2026-05-14 23:21:34 +05:30
2026-05-13 13:33:38 +01:00
2026-05-10 12:37:10 +01:00
2026-05-02 11:28:01 +01:00
2026-05-02 11:28:01 +01:00
2026-04-11 13:26:50 +01:00
2026-05-10 12:37:10 +01:00
2026-05-15 00:35:15 +03:00
2026-05-13 13:33:38 +01:00
2026-04-29 12:14:59 +01:00
2026-04-07 06:22:35 +01:00
2026-04-27 14:58:32 +01:00
2026-05-16 10:34:49 +01:00
2026-05-10 12:37:10 +01:00
2026-05-17 02:05:22 +01:00
2026-04-27 14:58:32 +01:00
2026-04-27 22:34:21 +01:00
2026-04-27 20:50:35 +01:00
2026-05-10 12:37:10 +01:00
2026-05-11 20:16:47 +01:00
2026-04-14 16:48:02 +01:00
2026-04-18 22:06:45 +01:00
2026-04-10 15:14:27 +01:00
2026-04-14 17:04:31 -04:00
2026-04-21 19:20:26 +05:30
2026-05-09 07:04:04 +01:00
2026-04-25 22:19:09 +01:00
2026-05-13 14:59:47 +01:00
2026-05-13 14:59:47 +01:00
2026-04-11 13:26:50 +01:00
2026-05-13 13:33:38 +01:00
2026-04-28 05:21:57 +01:00
2026-05-11 03:24:08 +01:00
2026-05-10 12:37:10 +01:00
2026-05-11 03:24:08 +01:00
2026-05-01 23:43:31 +01:00
2026-04-28 01:14:19 +01:00
2026-04-17 16:05:09 +01:00
2026-04-15 21:59:16 -04:00
2026-04-23 05:23:40 +01:00
2026-05-16 20:52:12 +08:00
2026-05-10 12:37:10 +01:00
2026-05-10 12:37:10 +01:00
2026-05-12 13:31:42 +01:00
2026-05-12 13:31:42 +01:00
2026-05-16 20:25:07 +01:00
2026-05-16 20:25:07 +01:00
2026-05-17 22:39:00 +08:00
2026-04-29 04:33:15 +01:00
2026-05-11 01:26:05 +01:00
2026-05-17 01:55:16 +01:00
2026-04-07 11:42:24 +01:00
2026-04-07 11:55:02 +01:00
2026-05-16 03:02:07 +01:00
2026-05-16 03:02:07 +01:00
2026-04-27 21:58:48 +01:00
2026-04-28 02:52:30 +01:00
2026-05-16 12:16:42 +08:00
2026-05-10 18:53:08 +01:00
2026-05-10 18:53:08 +01:00
2026-05-11 21:16:17 +01:00
2026-05-10 12:37:10 +01:00
2026-04-07 09:44:43 +01:00
2026-05-12 04:14:35 +01:00
2026-05-11 15:33:31 +01:00
2026-05-08 08:14:29 +01:00
2026-04-13 15:22:44 +08:00
2026-04-06 17:56:41 +01:00
2026-05-13 13:33:38 +01:00
2026-05-15 16:17:50 +01:00
2026-05-13 13:33:38 +01:00
2026-05-10 12:37:10 +01:00
2026-05-09 02:34:56 -04:00
2026-05-11 15:41:25 +01:00
2026-05-10 12:37:10 +01:00
2026-04-27 21:58:48 +01:00
2026-05-13 13:33:38 +01:00
2026-04-07 11:42:24 +01:00
2026-05-02 06:39:48 +01:00
2026-04-08 09:57:59 +01:00
2026-04-11 13:26:50 +01:00
2026-05-09 05:36:12 +01:00
2026-05-02 05:35:58 +01:00
2026-05-02 06:39:48 +01:00
2026-05-10 12:37:10 +01:00
2026-04-27 22:34:21 +01:00
2026-05-17 20:18:48 +08:00
2026-05-17 20:18:48 +08:00
2026-04-09 09:10:05 +01:00
2026-05-17 20:18:48 +08:00
2026-04-11 16:10:13 +01:00
2026-04-15 09:39:51 -07:00
2026-05-11 17:40:33 +01:00
2026-05-12 22:44:33 +01:00
2026-04-28 21:10:24 -07:00
2026-05-01 13:47:09 +01:00
2026-05-09 05:37:40 +01:00
2026-04-15 21:59:16 -04:00
2026-04-23 03:35:32 +01:00
2026-05-08 09:16:04 -04:00
2026-04-27 21:58:48 +01:00
2026-04-24 05:19:36 +01:00
2026-05-15 08:41:09 +01:00
2026-05-15 18:44:04 +01:00
2026-05-17 01:15:12 -05:00
2026-05-17 14:18:23 +01:00
2026-04-11 22:24:55 +01:00
2026-05-15 08:41:09 +01:00
2026-05-13 15:04:49 +01:00
2026-05-12 04:43:55 -07:00
2026-04-22 02:56:23 +01:00
2026-04-07 02:03:34 +01:00
2026-04-28 06:05:27 +01:00
2026-05-05 01:51:23 +01:00
2026-04-26 10:47:36 +01:00
2026-04-17 17:44:11 +01:00
2026-05-10 12:37:10 +01:00
2026-05-10 12:37:10 +01:00
2026-04-28 03:28:17 +01:00
2026-04-15 12:35:18 -04:00
2026-05-09 11:26:43 +01:00
2026-05-06 02:15:17 +01:00
2026-05-09 05:36:12 +01:00
2026-04-18 21:27:27 +01:00
2026-04-27 14:58:32 +01:00
2026-04-17 16:05:09 +01:00
2026-05-10 12:37:10 +01:00
2026-04-27 20:50:35 +01:00
2026-05-10 12:37:10 +01:00
2026-05-10 12:37:10 +01:00
2026-04-17 16:14:28 +01:00
2026-04-17 17:04:31 +01:00
2026-05-15 21:53:14 +01:00
2026-05-13 13:33:38 +01:00
2026-05-13 13:33:38 +01:00
2026-05-07 07:30:37 +01:00
2026-05-10 12:37:10 +01:00
2026-05-15 15:33:27 +01:00
2026-05-15 15:33:27 +01:00
2026-04-21 21:29:44 +01:00
2026-05-13 13:33:38 +01:00
2026-05-07 06:47:31 +01:00
2026-04-17 16:05:09 +01:00
2026-05-15 11:00:29 +01:00
2026-05-15 11:00:29 +01:00
2026-05-15 11:00:29 +01:00
2026-05-13 13:33:38 +01:00
2026-04-22 08:52:55 +01:00
2026-05-10 12:37:10 +01:00
2026-05-10 12:37:10 +01:00
2026-04-18 22:06:45 +01:00
2026-04-27 20:50:35 +01:00
2026-04-27 14:58:32 +01:00
2026-05-11 15:41:25 +01:00
2026-04-28 22:41:23 -07:00
2026-05-10 12:37:10 +01:00
2026-05-11 17:31:59 +01:00
2026-05-06 02:15:17 +01:00
2026-05-13 13:33:38 +01:00
2026-04-28 03:40:57 +01:00
2026-05-01 12:20:50 +01:00
2026-05-17 03:00:39 +01:00
2026-04-28 03:52:19 +01:00
2026-05-13 13:33:38 +01:00
2026-04-17 16:05:09 +01:00
2026-05-10 12:37:10 +01:00
2026-05-10 12:37:10 +01:00
2026-05-10 12:37:10 +01:00
2026-05-11 04:53:10 +01:00
2026-04-06 17:18:36 +01:00
2026-04-21 01:07:09 +01:00
2026-04-28 05:52:19 +01:00
2026-05-11 11:44:55 +01:00
2026-05-09 09:54:43 +01:00
2026-05-17 11:45:18 +01:00
2026-05-17 11:45:18 +01:00
2026-04-11 13:26:50 +01:00
2026-04-27 20:50:35 +01:00
2026-05-09 11:26:43 +01:00
2026-05-07 06:47:31 +01:00
2026-05-13 11:40:37 +01:00
2026-04-18 22:06:45 +01:00
2026-05-09 02:34:56 -04:00
2026-04-06 18:15:53 +01:00
2026-05-11 02:04:17 +01:00
2026-04-24 13:34:37 -07:00
2026-04-27 13:07:54 +01:00
2026-05-08 05:28:12 +01:00
2026-05-10 12:37:10 +01:00
2026-05-09 11:26:43 +01:00
2026-05-11 15:41:25 +01:00
2026-04-11 01:23:34 +01:00
2026-04-07 15:53:50 +01:00
2026-04-18 22:06:45 +01:00
2026-04-30 04:13:39 +01:00