Doctor: make remote observers checkout-independent - #1059
Conversation
| if args.adoption_posture == "orchestrator-only": | ||
| # The adoption preset predates observer postures and expands to local | ||
| # runtime plus optional Cloud checks. Those are useful on a reviewer | ||
| # host, but an orchestrator only needs the repository-facing checks it | ||
| # selected. Preserve deliberate additions to the command line. | ||
| if not cloud_explicit: | ||
| args.cloud = False | ||
| if not runtime_probe_explicit: | ||
| args.probe_runtime = False |
There was a problem hiding this comment.
⚠️ Bug: --orchestrator-only now silently disables cloud/probe-runtime for real repos
In src/code_mower/doctor.py:379-387, the new logic forces args.cloud = False and args.probe_runtime = False whenever adoption_posture == "orchestrator-only", gated only on the CLI flag, with no check on whether a real repository config or checkout is present. This is broader than the PR's stated goal of narrowing only the checkout-free packaged_starter_remote_observer plan (which in runner.py additionally requires using_packaged_example and a matching config_source). As a result, an orchestrator-only user with a real code-mower.yml checkout now silently loses the Cloud and runtime-probe checks that --adoption/--preflight previously enabled via apply_first_run_defaults, contradicting the --adoption-posture help text which still states orchestrator-only "keep[s] GitHub/cloud/setup checks visible." Scope the suppression to the same packaged_observer_plan condition used in runner.py (e.g., recompute or pass through the same using_packaged_example/config_source signal) rather than keying off posture alone.
Restrict the cloud/probe-runtime suppression to the checkout-free packaged-starter scenario instead of applying it to every orchestrator-only invocation.:
if args.adoption_posture == "orchestrator-only" and not explicit_config and args.config == "code-mower.yml":
# Only narrow defaults for the checkout-free packaged-starter case;
# a real repository config keeps cloud/probe-runtime as first-run defaults.
if not cloud_explicit:
args.cloud = False
if not runtime_probe_explicit:
args.probe_runtime = False
Was this helpful? React with 👍 / 👎
|
Note Automatic reviews are paused because your team has used its included automatic processing for this billing period (headroom scales with your seat count). You can still comment "Gitar review" to run one anytime, and automatic reviews resume on their own by October 1. Add seats for more headroom. Code Review
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Gitar
Claude audit unavailableHead SHA: |
499fdd6 to
1a620e0
Compare
Claude audit (merge-authority lane)Head SHA: |
1a620e0 to
4fa841e
Compare
|
Code Mower notice: previously audited head |
Claude audit (merge-authority lane)Head SHA: |
|
Code Mower notice: previously audited head |
1 similar comment
|
Code Mower notice: previously audited head |
Claude audit (merge-authority lane)Head SHA: |
Summary
doctor --adoption --orchestrator-only --repo OWNER/REPOselect a labeled packaged-starter observer plan when no repository config is availableCloses #1053.
Validation
pytest -q tests/test_doctor_*.py tests/test_adoption_*.py— 404 passed, 132 subtests passedpython -m ruff check .git diff --checkcodemower-ai/code-mower— PASS, 22 checks, 0 warnings, no local checkout or package path in JSONRisk / Rollback
--cloud,--probe-runtime, and--campaignselections remain availableData Or Secret Exposure