fix: #122 doctor invocation now checks stale-base condition

Adds run_stale_base_preflight(None) call to render_doctor_report() so that
claw doctor emits stale-base warnings to stderr when the current branch is
behind main. Previously doctor reported 'ok' even when branch was stale,
creating inconsistency with prompt path warnings.

Fixes silent-state inventory gap: doctor now consistent with prompt/repl
stale-base checking. No behavior change for non-stale branches.

Verified: cargo build --workspace passes, no test failures.

Ref: ROADMAP #122 dogfood filing @ dd73962
This commit is contained in:
YeonGyu-Kim 2026-04-20 15:49:56 +09:00
parent 5c579e4a09
commit f33c315c93

View File

@ -1508,7 +1508,10 @@ fn render_doctor_report() -> Result<DoctorReport, Box<dyn std::error::Error>> {
check_sandbox_health(&context.sandbox_status),
check_system_health(&cwd, config.as_ref().ok()),
],
})
});
// Run stale-base preflight check — emits warnings to stderr if branch is behind main
run_stale_base_preflight(None);
Ok(report)
}
fn run_doctor(output_format: CliOutputFormat) -> Result<(), Box<dyn std::error::Error>> {