Skip to content

fix(doctor): reject conflicting lint check selection - #117495

Merged
steipete merged 1 commit into
mainfrom
codex/qa402-doctor-lint-selection-outcomes
Aug 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa402-doctor-lint-selection-outcomes

Conversation

@steipete

@steipete steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

openclaw doctor --lint --only <registered-check> --skip <registered-check> silently reported success despite running zero requested checks. The same valid health-check ID was selected and excluded, producing an empty finding set, ok: true, and exit status 0.

Why This Change Was Made

The canonical Doctor lint selection owner already detects unknown --only IDs but previously did not diagnose contradictory valid selectors. Reuse that same core/doctor/lint-selection structured error and the already-established exit status 1; preserve forward-compatible unknown --skip IDs, plugin-owned checks, array/Set selectors, and all existing public contracts.

User Impact

Contradictory lint selectors now fail visibly and actionably instead of falsely claiming a clean Doctor report. No database, repair, configuration, plugin SDK, credential, network, or public CLI surface changes.

Evidence

Authentic regression-first execution against the actual registered health-check owner failed 2 new cases while 10 existing cases passed before the production change. Frozen owner tests pass 12/12; untouched existing Doctor CLI consumer tests pass 13/13, including registered plugin checks and existing unknown-selector exit behavior.

Real production runDoctorLintCli, 56 actual registered core checks, selecting and skipping actual core/doctor/final-config-validation:

Before:

checkout=before; selected-check=core/doctor/final-config-validation
{"ok":true,"checksRun":0,"checksSkipped":56,"findings":[]}
actual-cli-exit-code=0; network-attempts=0

After:

checkout=fixed; selected-check=core/doctor/final-config-validation
{"ok":false,"checksRun":0,"checksSkipped":56,"findings":[{"checkId":"core/doctor/lint-selection","severity":"error","message":"Health check core/doctor/final-config-validation cannot be selected by --only and excluded by --skip.","path":"core/doctor/final-config-validation"}]}
actual-cli-exit-code=1; network-attempts=0

Configured type-aware lint, targeted formatter, and whitespace checks pass. The configured lint used documented OPENCLAW_OXLINT_SKIP_PREPARE=1 because unrelated baseline SDK declaration preparation fails at packages/terminal-core/src/ansi.ts:194; configured type-aware lint itself passed. More than seven independent hostile source reviews were clean. A fresh genuine gpt-5.6-sol high-reasoning autoreview through P3 returned zero findings and 0.99 confidence; actual TruffleHog 3.96.0 secret scanning passed. Frozen commit 88dc40eb2672848a8a849a7a3799343c9370b0f2, tree fd81fb1ea8e0a3e02160b29f14eef1ffb3e927e9, sole parent 7bcbe743bd421064010d6abba1a1859962e19ec2, one root cause, exactly two existing files, production net +6 lines.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 1, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 12:21 PM ET / 16:21 UTC.

ClawSweeper review

What this changes

The PR makes openclaw doctor --lint emit an error and exit status 1 when a registered health-check ID appears in both --only and --skip.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

This focused bug fix is still necessary: current main can silently report success when the same valid Doctor health-check ID is supplied through both --only and --skip. The patch repairs the canonical selection owner, has direct before/after CLI proof, and should remain open for normal maintainer handling because it carries the protected maintainer label.

Priority: P2
Reviewed head: 88dc40eb2672848a8a849a7a3799343c9370b0f2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused production logic, targeted regression coverage, and direct CLI proof support a normal merge-quality patch.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body includes real before/after Doctor lint output against a registered core check, showing the changed finding and exit code without exposing private values.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body includes real before/after Doctor lint output against a registered core check, showing the changed finding and exit code without exposing private values.
Evidence reviewed 6 items Current-main defect: Current main filters any ID in skip out of the selected checks, then validates only unknown only IDs. A valid ID in both sets can therefore produce no selected checks and no selection finding.
Public CLI path: The public openclaw doctor --lint command forwards repeatable --only and --skip arrays to the Doctor lint CLI, which consumes the shared lint-flow result.
Canonical owner-boundary repair: The branch extends the existing selector-validation loop, preserves the unknown---only error, and adds focused regression coverage for array/Set inputs, non-conflicting filters, and unknown --skip IDs.
Findings None None.
Security None None.

How this fits together

Doctor lint accepts repeatable CLI selectors, loads registered core and plugin health checks, filters the runnable checks, and returns findings that drive console/JSON output and process exit status. This patch validates contradictory selector input before the empty filtered result can be mistaken for a healthy run.

flowchart TD
  A[Doctor lint CLI options] --> B[Only and skip selectors]
  C[Registered health checks] --> D[Select runnable checks]
  B --> D
  B --> E[Validate selector conflicts]
  E --> F[Doctor findings]
  D --> G[Run selected checks]
  G --> F
  F --> H[JSON output and exit code]
Loading

Before merge

  • Complete next step (P2) - The protected maintainer label keeps this PR in explicit maintainer review rather than an automated repair or cleanup lane.
Agent review details

Security

None.

PR surface

Source +6, Tests +86. Total +92 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 12 6 +6
Tests 1 86 0 +86
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 98 6 +92

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/flows/doctor-lint-flow.test.ts, migration/backfill/repair: src/flows/doctor-lint-flow.ts, unknown-data-model-change: src/flows/doctor-lint-flow.test.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Merge the canonical selector validation and focused regression coverage while retaining forward-compatible no-op behavior for unknown --skip IDs.

Do we have a high-confidence way to reproduce the issue?

Yes. Current main deterministically filters a valid --only ID out when it also appears in --skip, while validation only rejects unknown --only IDs; the PR body additionally provides before/after real CLI output for this path.

Is this the best way to solve the issue?

Yes. Validation in runDoctorLintChecks is the narrow owner-boundary repair: CLI-only validation would miss programmatic callers, and per-check validation would duplicate selector policy.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4cbbccd0a0d2.

Labels

Label changes:

  • add P2: The patch prevents a misleading clean Doctor result for an invalid command combination without changing ordinary health-check execution.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes real before/after Doctor lint output against a registered core check, showing the changed finding and exit code without exposing private values.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes real before/after Doctor lint output against a registered core check, showing the changed finding and exit code without exposing private values.

Label justifications:

  • P2: The patch prevents a misleading clean Doctor result for an invalid command combination without changing ordinary health-check execution.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes real before/after Doctor lint output against a registered core check, showing the changed finding and exit code without exposing private values.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes real before/after Doctor lint output against a registered core check, showing the changed finding and exit code without exposing private values.

Evidence

What I checked:

  • Current-main defect: Current main filters any ID in skip out of the selected checks, then validates only unknown only IDs. A valid ID in both sets can therefore produce no selected checks and no selection finding. (src/flows/doctor-lint-flow.ts:38, 4cbbccd0a0d2)
  • Public CLI path: The public openclaw doctor --lint command forwards repeatable --only and --skip arrays to the Doctor lint CLI, which consumes the shared lint-flow result. (src/cli/program/register.maintenance.ts:117, 4cbbccd0a0d2)
  • Canonical owner-boundary repair: The branch extends the existing selector-validation loop, preserves the unknown---only error, and adds focused regression coverage for array/Set inputs, non-conflicting filters, and unknown --skip IDs. (src/flows/doctor-lint-flow.ts:52, 88dc40eb2672)
  • Merge shape: The patch has no whitespace errors and a three-way merge preview produced merged results for both touched files against current main. (src/flows/doctor-lint-flow.ts:52, 88dc40eb2672)
  • History and ownership: The current lint-flow implementation is blamed to the recent feature commit by Peter Steinberger; the proposed correction is also authored by Peter Steinberger, matching the supplied steipete GitHub identity. (src/flows/doctor-lint-flow.ts:28, 9a2930437352)
  • Earlier Doctor lint ownership: The file history includes the original Doctor lint validation work and later Doctor lint expansion by Gio Della-Libera, making this a shared Doctor-area surface rather than an isolated new helper. (src/flows/doctor-lint-flow.ts:28, 9a5f2f61e76f)

Likely related people:

  • steipete: The current lint-flow implementation and this correction both trace to Peter Steinberger, whose PR identity is steipete. (role: introduced and recently maintained the lint-flow surface; confidence: high; commits: 9a2930437352, 88dc40eb2672; files: src/flows/doctor-lint-flow.ts, src/flows/doctor-lint-flow.test.ts)
  • Gio Della-Libera: History shows Gio Della-Libera introduced the Doctor health-check contract and later expanded lint behavior on the same files. (role: earlier Doctor lint contributor; confidence: medium; commits: 9a5f2f61e76f, 4fc504d321b6; files: src/flows/doctor-lint-flow.ts, src/flows/doctor-lint-flow.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 5816881 into main Aug 1, 2026
128 of 136 checks passed
@steipete
steipete deleted the codex/qa402-doctor-lint-selection-outcomes branch August 1, 2026 16:57
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

pull Bot pushed a commit to mcx/moltbot that referenced this pull request Aug 1, 2026
* origin/main: (44 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486)
  fix(doctor): reject contradictory lint check selectors (openclaw#117495)
  fix(anthropic): honor configured model pricing (openclaw#117275)
  refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373)
  refactor(test): derive changed tooling routes (openclaw#117407)
  fix(kova): clarify extension memory attribution (openclaw#117500)
  fix(imessage): sanitize private context on every outbound path (openclaw#117501)
  fix(ci): align release validation fixtures (openclaw#117494)
  fix(talk): preserve owner authorization in realtime consults (openclaw#114163)
  fix(ui): surface aborted-run diagnostics (openclaw#117497)
  perf(models): skip Ollama row runtime loading (openclaw#117465)
  fix(cli): report user profile command outcomes (openclaw#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412)
  fix(models): avoid waiting on promotions before listing models (openclaw#117322)
  refactor(plugins): inherit shared package boundary settings (openclaw#117474)
  fix(systemd): parse all inline environment assignments (openclaw#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545)
  fix(qa): Slack progress lane misses successful delivery (openclaw#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476)
  ...
abdulrahman305 pushed a commit to qenex-ai/openclaw that referenced this pull request Aug 1, 2026
* origin/main: (41 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486)
  fix(doctor): reject contradictory lint check selectors (openclaw#117495)
  fix(anthropic): honor configured model pricing (openclaw#117275)
  refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373)
  refactor(test): derive changed tooling routes (openclaw#117407)
  fix(kova): clarify extension memory attribution (openclaw#117500)
  fix(imessage): sanitize private context on every outbound path (openclaw#117501)
  fix(ci): align release validation fixtures (openclaw#117494)
  fix(talk): preserve owner authorization in realtime consults (openclaw#114163)
  fix(ui): surface aborted-run diagnostics (openclaw#117497)
  perf(models): skip Ollama row runtime loading (openclaw#117465)
  fix(cli): report user profile command outcomes (openclaw#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412)
  fix(models): avoid waiting on promotions before listing models (openclaw#117322)
  refactor(plugins): inherit shared package boundary settings (openclaw#117474)
  fix(systemd): parse all inline environment assignments (openclaw#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545)
  fix(qa): Slack progress lane misses successful delivery (openclaw#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (44 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486)
  fix(doctor): reject contradictory lint check selectors (openclaw#117495)
  fix(anthropic): honor configured model pricing (openclaw#117275)
  refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373)
  refactor(test): derive changed tooling routes (openclaw#117407)
  fix(kova): clarify extension memory attribution (openclaw#117500)
  fix(imessage): sanitize private context on every outbound path (openclaw#117501)
  fix(ci): align release validation fixtures (openclaw#117494)
  fix(talk): preserve owner authorization in realtime consults (openclaw#114163)
  fix(ui): surface aborted-run diagnostics (openclaw#117497)
  perf(models): skip Ollama row runtime loading (openclaw#117465)
  fix(cli): report user profile command outcomes (openclaw#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412)
  fix(models): avoid waiting on promotions before listing models (openclaw#117322)
  refactor(plugins): inherit shared package boundary settings (openclaw#117474)
  fix(systemd): parse all inline environment assignments (openclaw#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545)
  fix(qa): Slack progress lane misses successful delivery (openclaw#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (27 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486)
  fix(doctor): reject contradictory lint check selectors (openclaw#117495)
  fix(anthropic): honor configured model pricing (openclaw#117275)
  refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373)
  refactor(test): derive changed tooling routes (openclaw#117407)
  fix(kova): clarify extension memory attribution (openclaw#117500)
  fix(imessage): sanitize private context on every outbound path (openclaw#117501)
  fix(ci): align release validation fixtures (openclaw#117494)
  fix(talk): preserve owner authorization in realtime consults (openclaw#114163)
  fix(ui): surface aborted-run diagnostics (openclaw#117497)
  perf(models): skip Ollama row runtime loading (openclaw#117465)
  fix(cli): report user profile command outcomes (openclaw#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412)
  fix(models): avoid waiting on promotions before listing models (openclaw#117322)
  refactor(plugins): inherit shared package boundary settings (openclaw#117474)
  fix(systemd): parse all inline environment assignments (openclaw#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545)
  fix(qa): Slack progress lane misses successful delivery (openclaw#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (41 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486)
  fix(doctor): reject contradictory lint check selectors (openclaw#117495)
  fix(anthropic): honor configured model pricing (openclaw#117275)
  refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373)
  refactor(test): derive changed tooling routes (openclaw#117407)
  fix(kova): clarify extension memory attribution (openclaw#117500)
  fix(imessage): sanitize private context on every outbound path (openclaw#117501)
  fix(ci): align release validation fixtures (openclaw#117494)
  fix(talk): preserve owner authorization in realtime consults (openclaw#114163)
  fix(ui): surface aborted-run diagnostics (openclaw#117497)
  perf(models): skip Ollama row runtime loading (openclaw#117465)
  fix(cli): report user profile command outcomes (openclaw#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412)
  fix(models): avoid waiting on promotions before listing models (openclaw#117322)
  refactor(plugins): inherit shared package boundary settings (openclaw#117474)
  fix(systemd): parse all inline environment assignments (openclaw#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545)
  fix(qa): Slack progress lane misses successful delivery (openclaw#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant