From f33c315c9370ae64e86d2ed8662ce56697020c7d Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Mon, 20 Apr 2026 15:49:56 +0900 Subject: [PATCH] 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 --- rust/crates/rusty-claude-cli/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rust/crates/rusty-claude-cli/src/main.rs b/rust/crates/rusty-claude-cli/src/main.rs index 9385db8..b62db8b 100644 --- a/rust/crates/rusty-claude-cli/src/main.rs +++ b/rust/crates/rusty-claude-cli/src/main.rs @@ -1508,7 +1508,10 @@ fn render_doctor_report() -> Result> { 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> {