feat(daemon): doctor engine refactor — typed CheckResult, disk-free, git-version #293

Merged
clawdie merged 1 commit from feat/doctor-engine into main 2026-06-28 20:34:30 +02:00
Owner

Refactor inline cmd_doctor checks from socket.rs into typed doctor.rs
module. 9 checks total (7 original + 2 new). JSON contract is additive:
existing keys (check, status, detail) unchanged. New keys: hint (optional
display tip, e.g. 'COLIBRI_AUTOSPAWN=1') and fixable (bool, always present,
true only for auto-fixable checks — today just binary_vs_git_version).

New checks:

  • disk_free: df -k (BSD+GNU portable), two-tier: <100MiB FAIL, <1GiB WARN
  • binary_vs_git_version: compares CARGO_PKG_VERSION vs baked git describe,
    warns on dirty/modified; fixable=true → colibri upgrade

Client changes:

  • colibri doctor --json prints raw JSON
  • print_doctor surfaces hint as trailing → tip

Frozen CheckResult JSON schema for doctor-upgrade (#292):
{ check, status, detail, hint?, fixable: bool }

Gates: 117 daemon tests pass. fmt clean. clippy clean.
Live-tested against debby daemon — all 9 checks report.

Refactor inline cmd_doctor checks from socket.rs into typed doctor.rs module. 9 checks total (7 original + 2 new). JSON contract is additive: existing keys (check, status, detail) unchanged. New keys: hint (optional display tip, e.g. 'COLIBRI_AUTOSPAWN=1') and fixable (bool, always present, true only for auto-fixable checks — today just binary_vs_git_version). New checks: - disk_free: df -k (BSD+GNU portable), two-tier: <100MiB FAIL, <1GiB WARN - binary_vs_git_version: compares CARGO_PKG_VERSION vs baked git describe, warns on dirty/modified; fixable=true → colibri upgrade Client changes: - colibri doctor --json prints raw JSON - print_doctor surfaces hint as trailing → tip Frozen CheckResult JSON schema for doctor-upgrade (#292): { check, status, detail, hint?, fixable: bool } Gates: 117 daemon tests pass. fmt clean. clippy clean. Live-tested against debby daemon — all 9 checks report.
feat(daemon): doctor engine refactor — typed CheckResult, disk-free, git-version
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
CI / port (pull_request) Has been cancelled
CI / agent-jail-pkgs (pull_request) Has been cancelled
5d5f1ce338
Refactor inline cmd_doctor checks from socket.rs into typed doctor.rs
module. 9 checks total (7 original + 2 new). JSON contract is additive:
existing keys (check, status, detail) unchanged. New keys: hint (optional
display tip, e.g. 'COLIBRI_AUTOSPAWN=1') and fixable (bool, always present,
true only for auto-fixable checks — today just binary_vs_git_version).

New checks:
- disk_free: df -k (BSD+GNU portable), two-tier: <100MiB FAIL, <1GiB WARN
- binary_vs_git_version: compares CARGO_PKG_VERSION vs baked git describe,
  warns on dirty/modified; fixable=true → colibri upgrade

Client changes:
- colibri doctor --json prints raw JSON
- print_doctor surfaces hint as trailing → tip

Frozen CheckResult JSON schema for doctor-upgrade (#292):
  { check, status, detail, hint?, fixable: bool }

Gates: 117 daemon tests pass. fmt clean. clippy clean.
Live-tested against debby daemon — all 9 checks report.
clawdie deleted branch feat/doctor-engine 2026-06-28 20:34:35 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
clawdie/colibri!293
No description provided.