Skip to content

Doctor: expose dry-run preview reports#84472

Draft
giodl73-repo wants to merge 2 commits into
openclaw:mainfrom
giodl73-repo:doctor-dry-run-contribution-guard
Draft

Doctor: expose dry-run preview reports#84472
giodl73-repo wants to merge 2 commits into
openclaw:mainfrom
giodl73-repo:doctor-dry-run-contribution-guard

Conversation

@giodl73-repo

@giodl73-repo giodl73-repo commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Rebuild #84472 narrowly on current main to expose Doctor repair previews without carrying the old broad migration stack.

This draft now focuses on the public preview surface for already-structured Doctor repairs:

  • openclaw doctor --dry-run previews structured repair output without applying config repairs.
  • openclaw doctor --diff implies dry-run and includes structured repair diffs when checks provide them.
  • openclaw doctor --dry-run --json / --diff --json emits a machine-readable preview report.
  • Preview reports include findings, remaining findings, changes, warnings, effects, diffs, skipped entries, and repair counts.
  • JSON preview suppresses intermediate human note/log output so the final payload is clean.
  • Dry-run/diff config preflight skips state and legacy config migrations; repair mode keeps those migrations enabled.

Dry-run coverage proposal

This PR should not try to make every Doctor lint family previewable. After the 44/44 structured lint pass, the proposed dry-run bar is selective: dry-run should preview areas where Doctor already has, or should soon have, a concrete mutation path. Pure diagnostics, live service/account probes, optional inventory checks, and advisory findings should remain lint-only unless they gain a real repair owner.

Current checked-in structured repair substrate:

  • 44 tracked Doctor rule families have structured lint findings.
  • 48 registered lint checks exist because a few families split into multiple checks.
  • 13 checks/families currently expose structured repair hooks/effects.
  • A useful finished dry-run story is likely 15-18 of 44 families, roughly the 30-40% of Doctor that can truthfully preview file/config/state changes.

High-value dry-run families:

  • core/doctor/session-locks
  • core/doctor/session-transcripts
  • core/doctor/session-snapshots
  • core/doctor/config-audit-scrub
  • core/doctor/state-integrity
  • core/doctor/sandbox/registry-files
  • core/doctor/ui-protocol-freshness
  • core/doctor/browser-clawd-profile-residue
  • core/doctor/shell-completion
  • core/doctor/plugin-registry
  • core/doctor/configured-plugin-installs
  • core/doctor/skills-readiness
  • core/doctor/gateway-services/extra

Likely follow-up candidates, if the preview can be made truthful and scoped:

  • core/doctor/heartbeat-template
  • core/doctor/legacy-plugin-manifests
  • core/doctor/legacy-plugin-dependencies
  • core/doctor/stale-plugin-runtime-symlinks
  • selected config write previews where the output describes write blockers or exact config-file effects without implying broad lint mutation

Non-goal: dry-run parity for every lint finding. Gateway health/daemon, auth/profile readiness, channel/device/account probes, workspace inventory, disk-space, tool-result-cap, systemd linger, memory search, and other diagnostic/advisory checks can stay lint-only unless a separate PR proves a concrete repair effect.

Rebuild note

This PR branch was rebuilt from the historical doctor-dry-run-contribution-guard branch. The old branch mixed the dry-run preview surface with a broad older doctor migration stack. The replacement is intentionally smaller: CLI wiring, preview report plumbing, JSON output behavior, dry-run preflight guardrails, and focused tests around the existing structured repair runner.

Validation

Current head b3563d3f3404c61c7c8409ba6eb5329c254cbbc0:

  • pnpm build - passed
  • pnpm exec vitest run src/commands/doctor-config-flow.test.ts -t "does not run state or legacy config migrations for dry-run previews|does not run state or legacy config migrations for diff previews|keeps migrations enabled for repair runs" --reporter=dot --config test/vitest/vitest.commands.config.ts - 3 passed, 39 skipped
  • pnpm exec vitest run src/commands/doctor-config-flow.test.ts -t "does not run state or legacy config migrations for dry-run previews" --reporter=verbose --config test/vitest/vitest.commands.config.ts - passed
  • pnpm exec vitest run src/commands/doctor-config-flow.test.ts -t "does not run state or legacy config migrations for diff previews|keeps migrations enabled for repair runs" --reporter=verbose --config test/vitest/vitest.commands.config.ts - 2 passed, 40 skipped
  • pnpm exec oxlint src/commands/doctor-config-flow.ts src/commands/doctor-config-flow.test.ts - passed
  • git diff --check - passed

Not passing locally on current Windows checkout:

  • node scripts/run-vitest.mjs run src/commands/doctor-config-flow.test.ts --reporter=dot has one pre-existing Windows path assertion failure in warns when hooks transformsDir points outside the hook transforms root; expected /virtual/.openclaw/hooks/transforms, received a Windows-normalized \virtual\.openclaw\hooks\transforms. This PR does not modify that path-formatting code.

Real behavior proof

Behavior or issue addressed:
openclaw doctor --dry-run --diff --json --non-interactive now completes through the built launcher and emits a clean dry-run preview report while dry-run/diff config preflight skips state and legacy config migrations.

Real environment tested:
Windows source checkout at b3563d3f3404c61c7c8409ba6eb5329c254cbbc0, Node.js v24.14.0. The CLI was built first with pnpm build, then run with isolated HOME, USERPROFILE, OPENCLAW_HOME, and OPENCLAW_STATE_DIR under %TEMP%.

Exact steps or command run after this patch:

  1. pnpm build
  2. node openclaw.mjs doctor --dry-run --diff --json --non-interactive

Evidence after fix:
The command exited 0 in 73.8s from isolated proof root C:\Users\giodl\AppData\Local\Temp\openclaw-doctor-launcher-proof-f622d14d1b00488899570333a0acab39.

Stdout:

{
  "mode": "doctor-repair-preview",
  "dryRun": true,
  "diff": true,
  "ok": true,
  "checksRun": 1,
  "checksRepaired": 0,
  "checksValidated": 0,
  "findings": [],
  "remainingFindings": [],
  "changes": [],
  "warnings": [],
  "effects": [],
  "diffs": [],
  "skipped": []
}

Observed result after fix:
The built CLI produced only the final JSON preview on stdout and no stderr. The isolated proof root contained runtime cache/state files under the isolated OPENCLAW_STATE_DIR, but no openclaw.json, .clobbered*, or last-known-good config files were created.

What was not tested:
Cross-platform live Doctor repair scenarios were not run for this draft rebuild. The raw source command node --import tsx src/entry.ts doctor --dry-run --diff --json --non-interactive still hung before doctorCommand startup in this Windows checkout, so the successful real CLI proof uses the built source launcher path (node openclaw.mjs ...) after pnpm build.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes commands Command implementations agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels May 20, 2026
@clawsweeper

clawsweeper Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 6, 2026, 1:25 PM ET / 17:25 UTC.

Summary
The PR adds public openclaw doctor --dry-run and --diff preview wiring, JSON preview-report plumbing, dry-run preflight guardrails, and focused tests for structured Doctor repair previews.

PR surface: Source +234, Tests +166. Total +400 across 8 files.

Reproducibility: yes. for source-level review: the PR head routes dry-run through the normal config finalizer and legacy Doctor contribution chain where writes can still be authorized. I did not run a mutating live scenario because this review is read-only.

Review metrics: 1 noteworthy metric.

  • Public Doctor CLI surface: 2 flags added, 1 JSON help contract broadened. The new operator-facing flags and machine-readable output need a stable no-write and scripting contract before merge.

Stored data model
Persistent data-model change detected: migration/backfill/repair: src/cli/program/register.maintenance.test.ts, migration/backfill/repair: src/cli/program/register.maintenance.ts, migration/backfill/repair: src/commands/doctor-config-flow.test.ts, migration/backfill/repair: src/commands/doctor-config-flow.ts, migration/backfill/repair: src/commands/doctor.types.ts, migration/backfill/repair: src/flows/doctor-health-contributions.test.ts, and 6 more. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🦐 gold shrimp
Patch quality: 🧂 unranked krab
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Make preview mode command-wide no-write before config finalization, legacy contributions, state migrations, and final persistence.
  • Document --dry-run and --diff in docs/cli/doctor.md, including JSON shape and exit behavior.
  • [P1] Add redacted real CLI proof where a repair would otherwise happen and the relevant artifacts remain unchanged.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The PR body shows a no-op built-CLI JSON preview, but not a repairable state proving config, legacy state, plugin registry, and service artifacts remain unchanged; contributor should add redacted terminal/live output and update the PR body for re-review.

Risk before merge

  • [P1] Preview mode may still write config or migrate state despite being presented as a dry-run surface.
  • [P1] The public CLI and JSON output contract is undocumented, so scripts and operators cannot safely rely on it yet.
  • [P1] The PR is draft, dirty against the current base, and protected by a maintainer label, so it needs explicit maintainer handling before merge.

Maintainer options:

  1. Enforce Preview As No-Write (recommended)
    Block preview mode from applying config finalizer writes, legacy contribution migrations, state migrations, and final persistence before merge.
  2. Document And Prove The Contract
    Add Doctor docs for the flags, JSON shape, exit behavior, and no-write scope, then provide redacted proof where a repair would otherwise happen.
  3. Pause For Contract Selection
    Maintainers can keep this draft paused if another candidate PR or a narrower preview contract should own the canonical dry-run issue.

Next step before merge

  • [P1] Manual maintainer review is needed because the PR is draft, dirty, protected by the maintainer label, and still needs a public no-write contract decision plus contributor proof.

Maintainer decision needed

  • Question: Should this draft own the public Doctor dry-run/diff contract, and if so should the contract require command-wide no-write behavior across config, state, plugin, service, and legacy repair paths before merge?
  • Rationale: The code defects are concrete, but choosing the permanent public preview scope and whether this draft or another candidate owns it is a maintainer product/API decision.
  • Likely owner: vincentkoc — The strongest current history for Doctor config finalization and repair sequencing runs through this owner path, which is where the public no-write contract must be enforced.
  • Options:
    • Require command-wide no-write in this draft (recommended): Keep this PR as the candidate, but require it to block config writes, state migrations, legacy contribution mutations, final persistence, and undocumented JSON behavior before merge.
    • Move scope to another candidate: Use feat(doctor): add --dry-run flag to preview config changes without applying #79734 or a replacement branch as the canonical implementation if maintainers want a narrower config-first preview contract.
    • Pause the public flag: Keep the structured repair substrate only and defer public doctor --dry-run until the no-write/output contract is settled separately.

Security
Needs attention: No supply-chain issue was found, but the advertised read-only preview can still reach local config, state, and SecretRef-adjacent repair paths.

Review findings

  • [P1] Prevent preview mode from persisting config repairs — src/flows/doctor-health.ts:88-95
  • [P1] Skip legacy state migrations during preview runs — src/flows/doctor-health.ts:115
  • [P2] Document the Doctor preview contract — src/cli/program/register.maintenance.ts:22-23
Review details

Best possible solution:

Make Doctor preview mode enforce a command-wide no-write boundary before config finalization, legacy contributions, state migrations, and final persistence, then document and prove the CLI/JSON contract with a repairable isolated state.

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

Yes for source-level review: the PR head routes dry-run through the normal config finalizer and legacy Doctor contribution chain where writes can still be authorized. I did not run a mutating live scenario because this review is read-only.

Is this the best way to solve the issue?

No. The public preview direction is useful, but this is not the best fix until dry-run is enforced as command-wide no-write and documented with real repair-preview proof.

Full review comments:

  • [P1] Prevent preview mode from persisting config repairs — src/flows/doctor-health.ts:88-95
    Preview mode clears repair and yes, but it still enters the normal config finalizer with an interactive confirmation path. If pending config repairs exist and the user accepts the prompt, finalizeDoctorConfigFlow returns shouldWriteConfig: true, so a command advertised as dry-run can persist config changes.
    Confidence: 0.91
  • [P1] Skip legacy state migrations during preview runs — src/flows/doctor-health.ts:115
    Preview mode still runs the full Doctor contribution chain. runLegacyStateHealth treats --non-interactive as migration approval and calls runLegacyStateMigrations, so doctor --dry-run --non-interactive can mutate legacy session/agent/channel state before emitting the preview report.
    Confidence: 0.93
  • [P2] Document the Doctor preview contract — src/cli/program/register.maintenance.ts:22-23
    This adds public --dry-run and --diff flags and broadens JSON output, but the Doctor docs do not describe the flags, no-write scope, JSON shape, or exit behavior. Operators and scripts need that contract before relying on the new preview mode.
    Confidence: 0.88

Overall correctness: patch is incorrect
Overall confidence: 0.91

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 3ad77774f0e5.

Label changes

Label justifications:

  • P2: The PR changes a normal-priority Doctor CLI safety feature with bounded but meaningful operator impact.
  • merge-risk: 🚨 compatibility: The PR adds public Doctor CLI flags and a JSON preview shape that operators and scripts may rely on after merge.
  • merge-risk: 🚨 session-state: The preview path can still run legacy state migration code that may rewrite session, agent, or channel state.
  • merge-risk: 🚨 security-boundary: A command advertised as no-write preview can still reach config and SecretRef-adjacent local repair paths.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦐 gold shrimp and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body shows a no-op built-CLI JSON preview, but not a repairable state proving config, legacy state, plugin registry, and service artifacts remain unchanged; contributor should add redacted terminal/live output and update the PR body for re-review.
Evidence reviewed

PR surface:

Source +234, Tests +166. Total +400 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 5 274 40 +234
Tests 3 166 0 +166
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 440 40 +400

Security concerns:

  • [high] Dry-run can still reach mutating Doctor paths — src/flows/doctor-health.ts:115
    Preview mode still runs normal config finalization, legacy Doctor contributions, and final config persistence; state or config repairs can be applied while the command is presented as no-write preview.
    Confidence: 0.9

Acceptance criteria:

  • [P1] No tests were run; this was a read-only source review.
  • [P1] Suggested validation after fixes: pnpm test src/commands/doctor-config-flow.test.ts src/flows/doctor-health-contributions.test.ts src/cli/program/register.maintenance.test.ts.
  • [P1] Suggested proof after fixes: real openclaw doctor --dry-run --diff --json --non-interactive on a repairable isolated state showing target artifacts unchanged.

What I checked:

  • Repository policy read: Root AGENTS.md was read fully from the checkout; no scoped AGENTS.md exists for the changed src/commands or src/flows paths, and its PR review, compatibility, proof, and no-mutation rules apply. (AGENTS.md:1, 3ad77774f0e5)
  • Live PR state: Live GitHub data shows this PR is open, draft, unmerged, dirty, has the protected maintainer label, and is at head b3563d3. (b3563d3f3404)
  • Current main does not supersede the PR: Current main's Doctor command registration has no public doctor --dry-run or --diff option, so the central requested behavior is not implemented on main. (src/cli/program/register.maintenance.ts:18, 3ad77774f0e5)
  • Preview can still persist config repairs: On the PR head, preview mode clears repair and yes, then calls loadAndMaybeMigrateDoctorConfig; finalizeDoctorConfigFlow can still prompt and return shouldWriteConfig: true for pending config repairs if the user accepts. (src/flows/doctor-health.ts:88, b3563d3f3404)
  • Preview can still run legacy state migrations: On the PR head, preview mode still runs the full Doctor contribution chain, and runLegacyStateHealth treats non-interactive mode as migration approval before calling runLegacyStateMigrations. (src/flows/doctor-health-contributions.ts:673, b3563d3f3404)
  • Docs contract gap: The PR head adds --dry-run and --diff to CLI help, but docs/cli/doctor.md does not document those flags, the no-write scope, the JSON preview shape, or exit behavior. (docs/cli/doctor.md:61, b3563d3f3404)

Likely related people:

  • giodl73-repo: Authored this PR and multiple related merged Doctor structured-repair PRs that this branch builds on, including repair-runner, contribution-order, and state-integrity groundwork. (role: recent Doctor structured-repair contributor; confidence: high; commits: 1d513afe7964, b3563d3f3404, 056378efd582; files: src/flows/doctor-health.ts, src/flows/doctor-health-contributions.ts, src/commands/doctor-config-flow.ts)
  • vincentkoc: Recent history shows Doctor config-flow finalization, repair sequencing, and plugin legacy rescan work in the code path that must carry a correct dry-run contract. (role: Doctor config-flow contributor; confidence: high; commits: ec59974a469f, 3362cccc20a9, b2380b3ab1ad; files: src/commands/doctor-config-flow.ts, src/commands/doctor/finalize-config-flow.ts, src/commands/doctor/repair-sequencing.ts)
  • steipete: Recent history shows Doctor orchestration moving into flow contributions and adjacent docs/test maintenance near the same repair and config-write surfaces. (role: adjacent Doctor orchestration contributor; confidence: medium; commits: 7d6d642cb825, ff7a8425090a, 40ffada812b9; files: src/flows/doctor-health-contributions.ts, src/cli/program/register.maintenance.ts, docs/cli/doctor.md)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • 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.
Review history (1 earlier review cycle)
  • reviewed 2026-06-30T20:18:59.744Z sha b3563d3 :: needs real behavior proof before merge. :: [P1] Prevent preview mode from persisting config repairs | [P1] Skip legacy state migrations during preview runs | [P2] Document the Doctor preview contract

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels May 20, 2026
@clawsweeper

clawsweeper Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

✨ Hatched: 🥚 common Moonlit Diff Drake

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

Rarity: 🥚 common.
Trait: purrs at green checks.
Image traits: location proof lagoon; accessory shell-shaped keyboard; palette violet, aqua, and starlight; mood curious; pose waving from a small platform; shell paper lantern shell; lighting tiny status-light glow; background small green status lights.
Share on X: post this hatch
Copy: My PR egg hatched a 🥚 common Moonlit Diff Drake in ClawSweeper.

What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@giodl73-repo
giodl73-repo force-pushed the doctor-dry-run-contribution-guard branch from 6ca0b39 to 99f3e29 Compare May 20, 2026 22:58
@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. and removed merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels May 20, 2026
@giodl73-repo
giodl73-repo force-pushed the doctor-dry-run-contribution-guard branch from 99f3e29 to 852500f Compare May 21, 2026 01:23
@giodl73-repo
giodl73-repo force-pushed the doctor-dry-run-contribution-guard branch 3 times, most recently from c1ac8e1 to c7aa398 Compare May 21, 2026 19:58
@giodl73-repo
giodl73-repo force-pushed the doctor-dry-run-contribution-guard branch 5 times, most recently from bb6ca95 to d1584bc Compare May 22, 2026 21:10
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label May 22, 2026
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 🛠️ actively grinding The PR author has acted after the latest ClawSweeper review and work remains. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 21, 2026
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please re-review the rebuilt #84472 branch at current head b951d040f9ca585a1e25ee310ff4e1dfc60d9485.

Context:

  • This PR was force-updated from the historical broad doctor-dry-run-contribution-guard branch to a focused rebuild on current main.
  • The rebuilt branch keeps the scope to CLI wiring, preview report plumbing, JSON output behavior, and focused tests around the existing structured repair runner.
  • The old durable review comment still describes the prior broad 48-file migration branch and is stale for the current branch shape.

Validation already recorded in the PR body:

  • node scripts/run-vitest.mjs run src/cli/program/register.maintenance.test.ts --reporter=verbose
  • node scripts/run-vitest.mjs run src/flows/doctor-health-contributions.test.ts --reporter=verbose
  • pnpm tsgo:test:src
  • targeted oxlint
  • targeted oxfmt --check
  • git diff --check

Known remaining proof gap, also recorded in the PR body:

  • A complete live/source openclaw doctor --dry-run --diff --json CLI transcript is still needed. The isolated source CLI attempt timed out locally after 180s before usable output.

@clawsweeper

clawsweeper Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. status: 🔁 re-review loop A fresh ClawSweeper review was explicitly requested after the latest review. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 🛠️ actively grinding The PR author has acted after the latest ClawSweeper review and work remains. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 21, 2026
@giodl73-repo
giodl73-repo force-pushed the doctor-dry-run-contribution-guard branch from b951d04 to 1d513af Compare June 22, 2026 15:42
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Rebased #84472 onto current upstream/main and force-with-lease pushed 1d513afe7964982e5cdf08997c3af007884c7b21.

Validation after rebase:

  • $env:OPENCLAW_VITEST_MAX_WORKERS='1'; node scripts\run-vitest.mjs run src\cli\program\register.maintenance.test.ts src\flows\doctor-health-contributions.test.ts --reporter=dot - 62 passed across 2 shards
  • changed-file oxlint
  • changed-file oxfmt --check
  • pnpm tsgo:test:src
  • git diff --check

pnpm tsgo:core is currently blocked on rebased upstream/main by untouched src/config/sessions/session-accessor.ts:1545 (sessionStore unused, TS6133), so I left that outside this dry-run preview PR.

@clawsweeper please re-review current head.

@clawsweeper

clawsweeper Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper assist is taking a look at your question.

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 current head.

@clawsweeper

clawsweeper Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper assist: This needs a full correctness re-review of current head 1d513afe7964982e5cdf08997c3af007884c7b21; the supplied context is enough to confirm the request and validation claims, but not enough to replace a code review.

Evidence:

  • PR head is 1d513afe7964982e5cdf08997c3af007884c7b21 on Doctor: expose dry-run preview reports #84472.
  • Author says the branch was rebased onto current upstream/main and force-with-lease pushed at 2026-06-22T15:42:23Z.
  • Reported validation at current head: 62 focused tests passed, changed-file oxlint, changed-file oxfmt --check, pnpm tsgo:test:src, and git diff --check.
  • Known blocker reported by author: pnpm tsgo:core fails in untouched upstream src/config/sessions/session-accessor.ts:1545 due to unused sessionStore / TS6133.
  • Previous ClawSweeper review was for older head b951d040f9ca585a1e25ee310ff4e1dfc60d9485, so it is stale for the current head.

Suggested next action: Use @clawsweeper review on #84472 to run the full re-review against 1d513afe7964982e5cdf08997c3af007884c7b21.


Source: #84472 (comment)
Assist reasoning: low.

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

Updated head b3563d3 fixes the dry-run/diff config preflight path so preview mode passes migrateState: false and migrateLegacyConfig: false, with regression coverage for dry-run, diff, and repair mode. PR body includes the new built-launcher proof for
ode openclaw.mjs doctor --dry-run --diff --json --non-interactive\ exiting 0 with clean JSON output.

@clawsweeper

clawsweeper Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed status: 🔁 re-review loop A fresh ClawSweeper review was explicitly requested after the latest review. labels Jun 22, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. and removed merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant