Doctor: expose write-config blocker findings#100093
Conversation
|
@clawsweeper please review this default-disabled Doctor write-config lint findings slice. It adds read-only blocker diagnostics only; no CLI, SDK, plugin, or config contract change. |
|
🦞👀 I queued a lightweight read-only assist pass. It will post a separate answer comment and will not edit the durable ClawSweeper review comment or trigger close, merge, repair, label, or branch changes. Request: please review this default-disabled Doctor write-config lint findings slice. It adds read-only blocker diagnostics only; no CLI, SDK, plugin, or config contract change. |
|
Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 12:14 PM ET / 16:14 UTC. Summary PR surface: Source +95, Tests +255. Total +350 across 2 files. Reproducibility: not applicable. this is a feature PR adding a Doctor lint diagnostic rather than a bug report with a failing current-main reproduction path. The behavior is checkable from PR-head source, tests, and the PR body's copied lint output. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Land the default-disabled diagnostic if maintainers accept selected/all lint failure for real write blockers, and leave the broader default-selection audit to #100361. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature PR adding a Doctor lint diagnostic rather than a bug report with a failing current-main reproduction path. The behavior is checkable from PR-head source, tests, and the PR body's copied lint output. Is this the best way to solve the issue? Yes, with maintainer acceptance of the opt-in policy: the implementation stays in the existing Doctor contribution boundary, keeps the check default-disabled, and mirrors config write directory requirements for a read-only diagnostic. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 286d0b9fb340. Label changesLabel justifications:
Evidence reviewedPR surface: Source +95, Tests +255. Total +350 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
Review history (21 earlier review cycles; latest 8 shown)
|
|
ClawSweeper assist: This needs a full correctness review, not a lightweight context answer. The slice touches Doctor health-check behavior and tests, so use Evidence:
Suggested next action: Run Source: #100093 (comment) |
5b22c21 to
8c3e9bc
Compare
|
@clawsweeper please re-review the rebased head. Scope is unchanged: default-disabled Doctor write-config blocker lint findings, now noted as the 44th of 44 tracked Doctor rule families with structured lint findings; no CLI, SDK, plugin, or config contract change. |
|
🦞👀 I queued a lightweight read-only assist pass. It will post a separate answer comment and will not edit the durable ClawSweeper review comment or trigger close, merge, repair, label, or branch changes. Request: please re-review the rebased head. Scope is unchanged: default-disabled Doctor write-config blocker lint findings, now noted as the 44th of 44 tracked Doctor rule families with structured lint findings; no CLI, SDK, plugin, or config contract change. |
|
ClawSweeper assist: This is a request for a full correctness re-review of the rebased PR head, so the right path is Evidence:
Suggested next action: Run Source: #100093 (comment) |
|
@clawsweeper review Addressed the P2 findings on the new head: missing config paths now check the nearest existing parent to match recursive config writes, and the unreachable unreadable-config diagnostic was removed from this slice. Focused validation passed: contribution Vitest 77 tests, changed-file oxfmt, changed-file oxlint, tsgo:core, and git diff --check. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper review Addressed the atomic-write parity P2 on the new head: existing and missing config paths now both check the containing directory / nearest existing parent, matching recursive mkdir plus atomic replacement semantics. Added regressions for read-only existing config in a writable directory and for an existing config whose directory is unwritable. Focused validation passed: contribution Vitest 78 tests, changed-file oxfmt, changed-file oxlint, tsgo:core, and git diff --check. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper review Addressed the latest P2 on the new head: the write-config detector now reports an existing file that blocks the config directory path before checking writability, matching recursive mkdir behavior. Added regression coverage for the file-path-component case. Focused validation passed: contribution Vitest 79 tests, changed-file oxfmt, changed-file oxlint, tsgo:core, and git diff --check. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper review Addressed the dangling-symlink P2 on the new head: nearest existing parent detection now treats lstat-visible path entries as blockers, while directory usability is still checked with stat. Added regression coverage for a dangling symlink blocking the config directory path. Focused validation passed: contribution Vitest 80 tests, changed-file oxfmt, changed-file oxlint, tsgo:core, and git diff --check. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper review Addressed the search-permission P2 on the new head: the write-config detector now requires both write and execute/search permission on the existing config directory or nearest parent, matching recursive mkdir traversal. Added regression coverage for a parent that fails the combined W_OK|X_OK check. Focused validation passed: contribution Vitest 81 tests, changed-file oxfmt, changed-file oxlint, tsgo:core, and git diff --check. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Maintainer note: accepting the opt-in lint compatibility tradeoff for this slice. The new |
b65aefa to
a09c8f6
Compare
a09c8f6 to
c1a0a58
Compare
|
Merged via squash.
|
* doctor: add write-config lint findings * doctor: align write-config lint with config writes * doctor: check config write directory permissions * doctor: detect blocked config directory paths * doctor: detect symlink config directory blockers * doctor: require searchable config write parents
Summary
core/doctor/write-configlint findings for config write blockersdoctor:write-configrun path; no CLI, SDK, plugin, or config contract changeValidation
corepack pnpm exec vitest run src/flows/doctor-health-contributions.test.ts --maxWorkers 1 --no-fileParallelism(81 tests)corepack pnpm exec oxfmt --check src/flows/doctor-health-contributions.ts src/flows/doctor-health-contributions.test.tscorepack pnpm exec oxlint --tsconfig config/tsconfig/oxlint.core.json src/flows/doctor-health-contributions.ts src/flows/doctor-health-contributions.test.tscorepack pnpm tsgo:coregit diff --checkReal behavior proof
Source lint entrypoint with isolated
OPENCLAW_CONFIG_PATH/OPENCLAW_STATE_DIRandOPENCLAW_NIX_MODE=1:doctor --lint --jsonpath:checksRun=23,checksSkipped=24, nocore/doctor/write-configfinding emitted--only core/doctor/write-configequivalent ranchecksRun=1,checksSkipped=46, emittedcore/doctor/write-configwithrequirement=mutable-config-write-pathNotes
defaultEnabled: false; default lint behavior is unchanged.