Skip to content

Doctor: make remote observers checkout-independent - #1059

Merged
jeffhuber merged 3 commits into
mainfrom
codex/1053-remote-doctor
Sep 20, 2026
Merged

jeffhuber merged 3 commits into
mainfrom
codex/1053-remote-doctor

Conversation

@jeffhuber

Copy link
Copy Markdown
Contributor

Summary

  • make doctor --adoption --orchestrator-only --repo OWNER/REPO select a labeled packaged-starter observer plan when no repository config is available
  • keep checkout, local wrapper, unselected provider/campaign/Cloud, and product-test checks out of remote-only reports while preserving repository GitHub and Actions checks
  • use stable package labels and redact executable, config, checkout, and workflow paths from the share-oriented observer report
  • document the observer contract and distinguish local wrapper credentials from repository Actions secret presence

Closes #1053.

Validation

  • pytest -q tests/test_doctor_*.py tests/test_adoption_*.py — 404 passed, 132 subtests passed
  • focused doctor/registry/GitHub/output/review-hygiene suite — 86 passed, 9 subtests passed
  • python -m ruff check .
  • git diff --check
  • live checkout-free command against codemower-ai/code-mower — PASS, 22 checks, 0 warnings, no local checkout or package path in JSON

Risk / Rollback

  • low behavior risk: the narrowed defaults apply only to orchestrator-only adoption; explicit --cloud, --probe-runtime, and --campaign selections remain available
  • v1.5.1: clarify status, Board version, and share-oriented privacy #1055 may broaden share-oriented privacy to other doctor/status/Board surfaces; this PR's redaction is opt-in and scoped to the packaged-starter remote-observer plan
  • rollback by reverting this commit restores the v1.5.0 preflight expansion

Data Or Secret Exposure

  • This change does not add source, raw diffs, raw transcripts, raw provider output, tokens, or machine-specific paths to public artifacts.

@jeffhuber jeffhuber added needs-claude-audit builder:codex Code Mower generated label labels Sep 20, 2026
Comment thread src/code_mower/doctor.py Outdated
Comment on lines +379 to +387
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

@gitar-bot gitar-bot Bot Sep 20, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ 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 👍 / 👎

@gitar-bot

gitar-bot Bot commented Sep 20, 2026

Copy link
Copy Markdown

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.
Learn more

Code Review ⚠️ Changes requested 0 closed / 1 findings

🟡 Medium risk

Makes remote observers checkout-independent by narrowing defaults for the packaged-starter remote-observer plan, but --orchestrator-only now silently disables cloud and probe-runtime checks for real repositories with code-mower.yml configs. Scope the suppression to match the packaged_observer_plan condition in runner.py rather than keying off posture alone, so explicit adoptions with real checkouts retain those checks as documented.

⚠️ Bug: --orchestrator-only now silently disables cloud/probe-runtime for real repos

📄 src/code_mower/doctor.py:379-387

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
🤖 Prompt for agents
Code Review: Makes remote observers checkout-independent by narrowing defaults for the packaged-starter remote-observer plan, but `--orchestrator-only` now silently disables cloud and probe-runtime checks for real repositories with `code-mower.yml` configs. Scope the suppression to match the `packaged_observer_plan` condition in runner.py rather than keying off posture alone, so explicit adoptions with real checkouts retain those checks as documented.

1. ⚠️ Bug: --orchestrator-only now silently disables cloud/probe-runtime for real repos
   Files: src/code_mower/doctor.py:379-387

   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.

   Fix (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

Review coverage

Rules No rules evaluated

Functional validation Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@github-actions

Copy link
Copy Markdown

Claude audit unavailable

Head SHA: 9d033298f6d0de2f6ca314a5b535446237303cf6
Verdict: UNKNOWN
No merge-authority verdict was published. The local artifact was quarantined, stale, or inconclusive. Check the local runner and requeue this audit.

@jeffhuber
jeffhuber force-pushed the codex/1053-remote-doctor branch from 499fdd6 to 1a620e0 Compare September 20, 2026 07:46
@github-actions

github-actions Bot commented Sep 20, 2026

Copy link
Copy Markdown

Claude audit (merge-authority lane)

Head SHA: 1a620e0ba65320c9539357db95296e87e3c7b186
Verdict: PASS
Review details remain in the local audit artifact.
Publication workflow: .github/workflows/local-audit-publication.yml at 7b7d748760aed196d49f83b1371a48fc2cca21f6

@jeffhuber
jeffhuber force-pushed the codex/1053-remote-doctor branch from 1a620e0 to 4fa841e Compare September 20, 2026 07:56
@github-actions

Copy link
Copy Markdown

Code Mower notice: previously audited head 1a620e0ba653 is no longer an ancestor of current head 4fa841eb1353; commits may have been dropped. Only current-head audit verdicts count.

@github-actions

github-actions Bot commented Sep 20, 2026

Copy link
Copy Markdown

Claude audit (merge-authority lane)

Head SHA: 4fa841eb1353f53fea45fcb9ebd5ac8e8418c2ac
Verdict: BLOCKED
Review details remain in the local audit artifact.
Publication workflow: .github/workflows/local-audit-publication.yml at 7b7d748760aed196d49f83b1371a48fc2cca21f6

@github-actions

Copy link
Copy Markdown

Code Mower notice: previously audited head 1a620e0ba653 is no longer an ancestor of current head 324b4925dab9; commits may have been dropped. Only current-head audit verdicts count.

1 similar comment
@github-actions

Copy link
Copy Markdown

Code Mower notice: previously audited head 1a620e0ba653 is no longer an ancestor of current head 324b4925dab9; commits may have been dropped. Only current-head audit verdicts count.

@github-actions

github-actions Bot commented Sep 20, 2026

Copy link
Copy Markdown

Claude audit (merge-authority lane)

Head SHA: 324b4925dab95ad3555507490cc55d6ea12e7486
Verdict: PASS
Review details remain in the local audit artifact.
Publication workflow: .github/workflows/local-audit-publication.yml at 7b7d748760aed196d49f83b1371a48fc2cca21f6

@jeffhuber
jeffhuber merged commit 8d2538b into main Sep 20, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builder:codex Code Mower generated label claude-audit-done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v1.5.1: make remote-observer doctor checkout-independent

1 participant