Skip to content

fix(doctor): continue repairs after legacy agent directory collisions - #146092

Merged
steipete merged 17 commits into
mainfrom
steipete/upd-agent-dir-legacy-migration
Sep 13, 2026
Merged

steipete merged 17 commits into
mainfrom
steipete/upd-agent-dir-legacy-migration

Conversation

@steipete

@steipete steipete commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #146043

Additional instructions

Maintainer edits are welcome.

What Problem This Solves

Doctor stopped before later repairs when legacy ~/.openclaw/agent/ contents collided with the current agent directory. Whole destination subdirectories were skipped, and repeated runs accumulated quarantine directories. Standalone SDK state could also become unreachable when its selected directory or database owner disagreed with Doctor.

Reported by @steipete (#146043). The issue also credits the original community report.

Why This Change Was Made

One install resolver supplies the selected directory, recorded database owner, and migration state to the SDK and Doctor. Explicit environment directory selection precedes config inspection; other lookups use the shared tolerant, read-only config loader. Missing, unreadable, or invalid config records one warning and preserves default/legacy access without writing config, changing the process environment, or starting migration. Doctor retains its separate config-admission gate.

The compatibility source is the shipped SDK location, homedir()/.openclaw/agent, independent of state/home overrides. Nonempty legacy state remains selected until a matching completed migration receipt exists. Existing legacy sessions retain their recorded main owner even when configuration selects worker. An owner mismatch leaves the source in place and records both owners and the path.

SQLite families are deferred, never moved or quarantined by this directory migration. The planner reserves each database and its WAL, SHM, and rollback-journal files before merging ordinary entries. Each family appears once in the repair receipt with outcome=deferred, reason=sqlite-family, its source paths, and its planned destination. The warning names those paths and explains that the store keeps being used from its current location; a later release moves it. No completion marker is written for a deferred source. The SQLite family move and rollback path introduced during this repair has been removed.

An otherwise eligible deferred source retains its ancillary files so the SDK can still use installed tools, model definitions, and settings. Missing non-database destination entries are copied; identical files need no work, and conflicts remain at their existing source and destination paths with a warning. No new quarantine is created for that deferred source. Sources without SQLite families retain recursive move-and-quarantine behavior, including existing bin/ directories. Differing files preserve the destination and quarantine the source under the resolved state root; repeated runs without new conflicts create no new artifact. Quarantines older than 30 days receive a cleanup hint and are never automatically deleted.

Deferred warnings reach Doctor and update reporting while independent repairs continue. Explicitly selected directories are never drained, and copied-state plans cannot move unbound SDK home payloads.

User Impact

Doctor continues other repairs while leaving every legacy SQLite family intact and usable at its current location. SDK sessions keep their recorded owner and existing database; tools, models, and settings remain available. Eligible non-database files still merge, and collisions are reported without repeated quarantine copies for a deferred store.

Whole-store ownership transfer and atomic SQLite-family movement or recovery artifacts remain separate maintainer design decisions, pending Peter's approval. This PR implements neither. Operators can keep using the existing store until a later release provides that migration.

Release-note context: Doctor preserves legacy SQLite families in place, reports their deferred migration, merges eligible ordinary files, and continues later repairs.

Evidence

The updated regression uses two real SQLite families with committed WAL-only rows. A database-only copy cannot read the row. It injects a later ordinary-file failure and blocks database, WAL, or SHM restoration to prove those family operations are never attempted. Both families stay at source, the receipt lists both exactly once with planned destinations, ordinary-file merging makes progress, and opening each original database recovers its WAL rows. Repeating Doctor preserves the same facts without a quarantine artifact.

node scripts/run-vitest.mjs src/infra/state-migrations.recoverable-legacy-state.test.ts src/infra/state-migrations.caller-mode.storage.test.ts src/agents/sessions/sdk.auth-migration.test.ts -t 'leaves SQLite families|deferred main SQLite family|preserves existing standalone sessions'

Against the preceding head f9b91e0aa49bb4e9d5dc05455903a52a067e4b51:

Test Files 2 failed
Tests 13 failed | 37 filtered skips

The failures show database-family movement/quarantine, unsafe rollback, or SDK/Doctor cutover instead of the required deferral. After the repair, all five focused suites passed:

node scripts/run-vitest.mjs src/infra/state-migrations.recoverable-legacy-state.test.ts src/infra/state-migrations.caller-mode.storage.test.ts src/agents/sessions/sdk.auth-migration.test.ts src/infra/sqlite-recovery-files.test.ts src/infra/state-migrations.agent-owner-recovery.test.ts
Test Files 5 passed
Tests 84 passed

Test names:

  • leaves SQLite families in place while merging files ($relativeDatabase, destination: $destination, blocked restore: $blockedRestore)
  • shares the install directory between SDK and Doctor: $testCase.name (malformed: $malformed) — includes deferred SQLite state with valid and malformed config.
  • preserves existing standalone sessions (configured owner: $configuredOwner, Doctor: $doctor) — both same-owner and different-owner Doctor runs retain the original main-owned store, sessions, tools, and model discovery.
  • keeps standalone state after an incomplete migration, including a source-carried receipt (companion: %s).

The full proof command includes the required 21 files, both Doctor flows, registration boundary, and recovery suites:

node scripts/run-vitest.mjs src/infra/state-migrations.test.ts src/infra/state-migrations.recoverable-legacy-state.test.ts src/commands/doctor-state-migrations.test.ts src/infra/state-migrations.caller-mode.plugin-execution.test.ts src/infra/state-migrations.caller-mode.storage.test.ts src/infra/state-migrations.caller-mode.test.ts src/agents/utils/tools-manager.test.ts src/config/agent-dirs.test.ts src/config/agent-dirs.fs-identity.test.ts src/agents/agent-scope-config.test.ts src/agents/agent-scope.test.ts src/agents/sessions/sdk.test.ts src/agents/sessions/sdk.auth-migration.test.ts src/agents/sessions/settings-manager.test.ts src/agents/sessions/model-registry.test.ts src/agents/sessions/model-registry.sources.test.ts src/agents/sessions/auth-storage.test.ts src/agents/shell-utils.test.ts src/config/io.best-effort.test.ts src/infra/update-requester-authority.test.ts src/plugins/install-runtime-batch.test.ts src/flows/doctor-health-contributions.test.ts src/flows/doctor-health.test.ts extensions/codex/registration-imports.test.ts src/infra/sqlite-recovery-files.test.ts src/infra/state-migrations.agent-owner-recovery.test.ts

The full proof passed: 904 tests across 26 files, with two existing skips. The final focused rerun passed 84 tests across five files. node scripts/check-changed.mjs passed both TypeScript lanes, all unused-export scans, lint, storage guards, and zero runtime import cycles. A fresh independent P1 review of the final source found no actionable findings. pnpm build passed on committed head b21a10567f9beecb5069458a4c12365166dabadb in 7m 9s, including declarations, native Doctor loading checks, and the Control UI.

Round 12 numstat relative to f9b91e0aa49bb4e9d5dc05455903a52a067e4b51: production +108/-153 (net -45); tests +207/-203 (net +4); docs +4/-2. No new configuration options, dependencies, schemas, recovery stores, retention policy, or changelog changes.

Previously reviewed head: b21a10567f9beecb5069458a4c12365166dabadb. Exact-head CI run 34740729898 passed on attempt 1: 118 successful jobs, 14 skipped, zero failures. No failed-job rerun was used. The bounded watcher exited GREEN:

node scripts/watch-pr-ci.mjs 146092 b21a10567f9beecb5069458a4c12365166dabadb --completion ci-run
CI per job
Job Result
QA Smoke CI (${{ matrix.name }}) skipped
build-artifacts success
check-additional-boundaries success
check-additional-extension-package-boundary success
check-additional-runtime-topology-architecture success
check-bundled-channel-config-metadata success
check-dependencies success
check-docs success
check-guards success
check-lint success
check-lint-core-1 success
check-lint-core-2 success
check-npm-lock success
check-prod-types success
check-prompt-snapshots success
check-source-contracts success
check-test-types success
check-test-types-core-1 success
check-test-types-core-2 success
checks-fast-baseline-ratchets success
checks-fast-bun-launcher success
checks-fast-bundled-protocol success
checks-fast-coercion-helpers success
checks-fast-contracts-channels success
checks-fast-contracts-plugins success
checks-node-changed-extensions-bundle-10 success
checks-node-changed-extensions-bundle-11 success
checks-node-changed-extensions-bundle-12 success
checks-node-changed-extensions-bundle-13 success
checks-node-changed-extensions-bundle-14 success
checks-node-changed-extensions-bundle-15 success
checks-node-changed-extensions-bundle-16 success
checks-node-changed-extensions-bundle-17 success
checks-node-changed-extensions-bundle-18 success
checks-node-changed-extensions-bundle-19 success
checks-node-changed-extensions-bundle-20 success
checks-node-changed-extensions-bundle-22 success
checks-node-changed-extensions-bundle-26 success
checks-node-changed-extensions-bundle-27 success
checks-node-changed-extensions-bundle-28 success
checks-node-changed-extensions-bundle-29 success
checks-node-changed-extensions-bundle-30 success
checks-node-changed-extensions-bundle-31 success
checks-node-changed-extensions-bundle-32 success
checks-node-changed-extensions-bundle-33 success
checks-node-changed-extensions-bundle-34 success
checks-node-changed-extensions-bundle-35 success
checks-node-changed-extensions-bundle-37 success
checks-node-changed-extensions-bundle-38 success
checks-node-changed-extensions-bundle-7 success
checks-node-changed-extensions-bundle-8 success
checks-node-changed-extensions-bundle-9 success
checks-node-changed-extensions-config-1 success
checks-node-changed-extensions-config-2 success
checks-node-changed-extensions-config-3 success
checks-node-changed-extensions-config-4 success
checks-node-changed-extensions-config-5 success
checks-node-changed-extensions-config-50 success
checks-node-changed-extensions-config-53 success
checks-node-changed-extensions-config-54 success
checks-node-changed-extensions-config-55 success
checks-node-changed-extensions-config-6 success
checks-node-changed-extensions-config-78 success
checks-node-compact-large-1 success
checks-node-compact-large-10 success
checks-node-compact-large-11 success
checks-node-compact-large-12 success
checks-node-compact-large-13 success
checks-node-compact-large-14 success
checks-node-compact-large-2 success
checks-node-compact-large-3 success
checks-node-compact-large-4 success
checks-node-compact-large-5 success
checks-node-compact-large-6 success
checks-node-compact-large-7 success
checks-node-compact-large-8 success
checks-node-compact-large-9 success
checks-node-compact-small-1 success
checks-node-compact-small-10 success
checks-node-compact-small-11 success
checks-node-compact-small-12 success
checks-node-compact-small-13 success
checks-node-compact-small-14 success
checks-node-compact-small-15 success
checks-node-compact-small-16 success
checks-node-compact-small-17 success
checks-node-compact-small-18 success
checks-node-compact-small-19 success
checks-node-compact-small-2 success
checks-node-compact-small-20 success
checks-node-compact-small-21 success
checks-node-compact-small-22 success
checks-node-compact-small-23 success
checks-node-compact-small-24 success
checks-node-compact-small-25 success
checks-node-compact-small-26 success
checks-node-compact-small-27 success
checks-node-compact-small-28 success
checks-node-compact-small-29 success
checks-node-compact-small-3 success
checks-node-compact-small-30 success
checks-node-compact-small-31 success
checks-node-compact-small-32 success
checks-node-compact-small-33 success
checks-node-compact-small-34 success
checks-node-compact-small-4 success
checks-node-compact-small-5 success
checks-node-compact-small-6 success
checks-node-compact-small-7 success
checks-node-compact-small-8 success
checks-node-compact-small-9 success
checks-node-compat-node24 skipped
checks-ui-e2e (${{ matrix.shard }}/${{ matrix.shard_count }}) skipped
checks-ui-e2e-real-gateway skipped
checks-windows-node-test-1 success
checks-windows-node-test-2 success
control-ui-i18n skipped
control-ui-performance success
docker-seed-e2e success
ios-build (${{ matrix.phase }}) skipped
ios-screenshot-evidence skipped
ios-screenshots-${{ matrix.device_family }} skipped
macos-swift (${{ matrix.phase }}) skipped
[matrix.check_name
[matrix.check_name
native-i18n skipped
[needs.preflight.outputs.frozen_target == 'true' && 'checks-ui'
openclaw/ci-gate success
pnpm-store-warmup success
preflight success
security-fast success
skills-python skipped

Known limits: SQLite-family movement and whole-store ownership transfer are intentionally deferred pending their separate accepted persistence designs. The published-updater × candidate installation was not rerun this round.

ClawSweeper review

The completed review of 1d88ebf8fe3c8c1a3d8567136df43b8c0d959ac6 found no actionable code defects and confirms that the system-tool finding is resolved. SQLite families remain in place, preserving rollback dependencies and external cold transcripts. Optional managed-bin lookup permits system fd/rg and shell PATH access without an ambient owner while SDK admission remains strict.

The maintainer approved landing this exact head on the documented regression, SDK/Doctor boundary, build, and CI evidence, accepting the remaining qualification limit: published-updater × candidate installation was not rerun. SQLite relocation and whole-store ownership transfer remain deferred to separate accepted persistence designs.

Ownerless-tool regression

With a valid explicit alpha/beta roster, no ambient owner, no directory override, and no legacy payload, this command failed on the preceding head:

node scripts/run-vitest.mjs src/agents/utils/tools-manager.test.ts -t 'without an ambient agent owner'
keeps fd usable without an ambient agent owner: promise rejected instead of resolving
keeps rg usable without an ambient agent owner: promise rejected instead of resolving
keeps shell usable without an ambient agent owner: Select an agent owner or set OPENCLAW_AGENT_DIR before resolving the install directory.
Test Files 1 failed
Tests 3 failed | 46 skipped

After the fix, all five selected suites passed, including the three new cases, missing-tool/no-download behavior, strict SDK admission, and unchanged filesystem contents:

node scripts/run-vitest.mjs src/agents/utils/tools-manager.test.ts src/agents/shell-utils.test.ts src/agents/agent-scope-config.test.ts src/agents/sessions/sdk.auth-migration.test.ts src/infra/state-migrations.caller-mode.storage.test.ts
[test] passed 3 Vitest shards in 107.79s

Fixup head: 1d88ebf8fe3c8c1a3d8567136df43b8c0d959ac6. Fresh Codex autoreview of this fixup is scoped-clean at P1. Changed-file formatting, production/test typechecking, unused-export scans, lint, storage guards, and runtime-cycle checks all passed:

node scripts/check-changed.mjs -- docs/gateway/doctor/state-and-sessions.md src/agents/config.ts src/agents/install-agent-dir.ts src/agents/shell-utils.ts src/agents/utils/tools-manager.test.ts src/agents/utils/tools-manager.ts

Exact-head CI run 34742453855 completed successfully on attempt 2. Attempt 1 had one runner-side cancellation with zero executed steps in checks-node-compact-large-7; the aggregate gate failed because of it. One authorized failed/cancelled-job rerun passed, and the exact-head watcher returned GREEN. The earlier CI run above applies to the preceding head.

Merge legacy agent subdirectories recursively, preserve differing source
files in one quarantine, and record recoverable collision receipts so later
repairs continue. Reuse the canonical agent-directory resolver for SDK
fallbacks, validation, and migration, and report old quarantine artifacts
without deleting them.

Reported by a Discord user (Aristotelianism).

Fixes #146043
@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels Sep 12, 2026
@steipete
steipete marked this pull request as ready for review September 12, 2026 15:15
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 3:14 AM ET / 07:14 UTC (Revision 26).

ClawSweeper review

What this changes

Doctor preserves legacy directory conflicts, defers SQLite relocation, continues independent repairs, and keeps standalone SDK sessions and tools using the appropriate directory.

Merge readiness

✅ Ready for maintainer review

This remains a useful fix absent from current main. Earlier code findings are resolved, and the matching captured PR body explicitly records acceptance of the updater qualification exception. No actionable patch defects remain.

Priority: P1
Reviewed head: 1d88ebf8fe3c8c1a3d8567136df43b8c0d959ac6

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, bounded repair with meaningful preservation coverage, resolved prior findings, and an explicitly accepted qualification limit.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored PR is exempt from ordinary external-contributor proof. Documented SDK/Doctor and real-SQLite regressions cover the changed owners; the matching body explicitly accepts the unrerun published-updater scenario without claiming it passed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from ordinary external-contributor proof. Documented SDK/Doctor and real-SQLite regressions cover the changed owners; the matching body explicitly accepts the unrerun published-updater scenario without claiming it passed.
Evidence reviewed 9 items Current main still contains the reported mechanism: The fetched main implementation skips existing destination entries, quarantines the remaining directory, and returns unclassified warnings. The branch's recursive, recoverable migration is still necessary.
Released SDK directory contract: The latest supplied release selects the explicit environment directory or the OS-home .openclaw/agent directory. This supports retaining that legacy source independently of state-directory overrides.
SQLite preservation and recoverable outcomes: The migration inventories database families before ordinary entries, leaves those families at source, preserves ancillary files for deferred sources, and reports recoverable or deferred outcomes. Ownership mismatches do not transfer stores, and copied-source boundaries are checked before mutation.
Findings None None.
Security None None.

How this fits together

Doctor repairs older OpenClaw installation state during maintenance and updates. Its directory decisions also affect where standalone SDK sessions find databases, settings, models, and managed tools.

flowchart TD
  A[Configuration and directory overrides] --> B[Shared installation resolver]
  C[Legacy files and database owners] --> B
  B --> D[Doctor migration]
  D --> E[Merge files and preserve conflicts]
  D --> F[Leave SQLite families in place]
  E --> G[Report warnings and continue repairs]
  F --> G
  B --> H[SDK sessions and tool lookup]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +632, Tests +1391, Docs +12. Total +2035 across 31 files.

View PR surface stats
Area Files Added Removed Net
Source 21 823 191 +632
Tests 9 1443 52 +1391
Docs 1 12 0 +12
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 31 2278 243 +2035

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +822/-190; tests and test support +1444/-53 Production growth implements shared directory selection and preservation planning; the larger test delta covers migration failures, retained sessions, and repeated repairs.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor.e2e-harness.ts, migration/backfill/repair: src/infra/state-migrations.agent-dir-receipt.ts, migration/backfill/repair: src/infra/state-migrations.doctor.ts, serialized state: src/infra/state-migrations.agent-dir-receipt.ts, unknown-data-model-change: src/infra/state-migrations.agent-dir-receipt.ts, unknown-data-model-change: src/infra/state-migrations.doctor.ts. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #146043
Summary: This PR is the implementation candidate for the concrete legacy-directory collision report.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Doctor should complete independent repairs while keeping existing SDK state usable; database relocation and ownership transfer should remain separately approved work.

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

Yes, from source: a legacy entry colliding with its destination produces an unclassified warning on current main, which the migration runner treats as a refusal. This read-only review did not execute the reproduction.

Is this the best way to solve the issue?

Yes. The patch repairs the existing migration owner, shares directory resolution, and avoids unsafe SQLite movement; the remaining published-updater qualification limit has an explicit recorded acceptance.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3f849337ee97.

Labels

Label changes:

  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.

Label justifications:

  • P1: The linked report establishes that legacy-directory collisions block later Doctor repairs during real upgrade recovery.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from ordinary external-contributor proof. Documented SDK/Doctor and real-SQLite regressions cover the changed owners; the matching body explicitly accepts the unrerun published-updater scenario without claiming it passed.

Evidence

What I checked:

  • Current main still contains the reported mechanism: The fetched main implementation skips existing destination entries, quarantines the remaining directory, and returns unclassified warnings. The branch's recursive, recoverable migration is still necessary. (src/infra/state-migrations.legacy-sessions.ts:391, 3f849337ee97)
  • Released SDK directory contract: The latest supplied release selects the explicit environment directory or the OS-home .openclaw/agent directory. This supports retaining that legacy source independently of state-directory overrides. (src/agents/config.ts:127, 3a9d69db306c)
  • SQLite preservation and recoverable outcomes: The migration inventories database families before ordinary entries, leaves those families at source, preserves ancillary files for deferred sources, and reports recoverable or deferred outcomes. Ownership mismatches do not transfer stores, and copied-source boundaries are checked before mutation. (src/infra/state-migrations.legacy-sessions.ts:485, 1d88ebf8fe3c)
  • Earlier system-tool finding resolved: Managed-bin resolution is optional, system fd/rg remain available without an ambient owner, and shell PATH is preserved. The added cases also verify that missing tools do not initiate downloads or modify installation files. (src/agents/utils/tools-manager.test.ts:82, 1d88ebf8fe3c)
  • Database and session regression coverage: Reviewed regression cases retain WAL-only rows through ordinary-file failures, preserve both database families on repeated runs, and reopen original SDK sessions with their recorded owner after Doctor. These address the prior SQLite rollback, external-transcript, and owner-cutover concerns without moving databases. (src/infra/state-migrations.recoverable-legacy-state.test.ts:217, 1d88ebf8fe3c)
  • Captured-body identity and explicit exception: The retrieved body hashes to f209f08dd5225783195a2db13546c37d687d4a676c99851eb6e64394d7631990, matching the supplied snapshot. Its previously omitted closing section records maintainer approval for this exact head using the documented regression, SDK/Doctor, build, and CI evidence, explicitly accepting that published-updater × candidate installation was not rerun. This satisfies the previous review's alternative of recording an explicit exception; it does not establish that the updater scenario passed. (1d88ebf8fe3c)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

History

Review history (25 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-13T00:55:13.246Z sha a0a5427 :: blocked before merge. :: [P1] [P1] Preserve the existing SDK store owner through cutover | [P1] [P1] Keep system search binaries usable without an ambient owner | [P1] [P1] Preserve cold transcript archives when moving SDK databases
  • reviewed 2026-09-13T01:24:54.122Z sha 2a041c7 :: blocked before merge. :: [P1] Keep system search binaries usable without an ambient owner | [P1] Preserve external cold transcripts before moving SDK databases
  • reviewed 2026-09-13T01:50:26.476Z sha c69b43a :: blocked before merge. :: [P1] Keep system search binaries usable without an ambient owner | [P1] Preserve external cold transcripts before moving SDK databases
  • reviewed 2026-09-13T02:09:25.706Z sha c69b43a :: blocked before merge. :: [P1] Keep system search binaries usable without an ambient owner | [P1] Preserve external cold transcripts before moving SDK databases
  • reviewed 2026-09-13T04:22:47.609Z sha f9b91e0 :: blocked before merge. :: [P1] Keep system search binaries usable without an ambient owner | [P1] Preserve external cold transcripts before moving SDK databases
  • reviewed 2026-09-13T05:03:54.425Z sha f9b91e0 :: blocked before merge. :: [P1] Preserve complete SQLite families when rollback itself fails | [P1] Keep system search binaries usable without an ambient owner | [P1] Preserve external cold transcripts before certifying SDK cutover
  • reviewed 2026-09-13T06:01:24.878Z sha b21a105 :: blocked before merge. :: [P1] [P1] Keep system binaries usable without an ambient owner
  • reviewed 2026-09-13T06:24:54.808Z sha 1d88ebf :: blocked before merge. :: none

@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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 12, 2026
@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: L and removed size: M labels Sep 12, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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. labels Sep 12, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 13, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels Sep 13, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 13, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Sep 13, 2026
@steipete
steipete merged commit c40f15c into main Sep 13, 2026
331 of 333 checks passed
@steipete
steipete deleted the steipete/upd-agent-dir-legacy-migration branch September 13, 2026 07:16
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit '2acbeee461474b6ba41f5186ae1a4e0e80f4087a': (117 commits)
  fix(ui): import the shared deferred helper in sidebar scope tests (#146862)
  fix(ui): copy chat content from its context menu (#146679)
  perf(memory): defer legacy sidecar writer imports (#146815)
  fix(e2e): accept expected Kitchen Sink worker rejection (#146681)
  fix(ui): distinguish absolute and relative file links (#146572)
  feat(ui): keep file previews in tabs and render HTML (#146672)
  refactor: reuse shared deferred promises in UI tests (#146670)
  fix: gateway stop/restart refuses a healthy gateway when the Windows process snapshot misses (#146387)
  improve(crabbox): keep healthy cloud desktops warm on resume (#146816)
  fix: report blocked SQLite WAL checkpoints in status and doctor (#146775)
  feat: share browser dashboards with agents (#146702)
  fix(doctor): continue repairs after legacy agent directory collisions (#146092)
  feat(agents): retry cyber-refused embedded turns on Daybreak (#145291)
  fix: restore media uploads through protected egress (#144902)
  refactor(qa): share capture filter rendering (#146696)
  fix(cli): keep running stream jobs visible as running (#146793)
  refactor(parallels): share gateway readiness loop (#146694)
  fix(sessions): avoid rewriting already-consumed input on release (#146795)
  fix: preserve scheduled conversation delivery after Doctor (#146794)
  perf(ui): avoid redundant session-row provenance work (#146797)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
…openclaw#146092)

Doctor continues after legacy agent-directory collisions: non-database files merge recursively and conflicts are quarantined once, with a completion receipt. SQLite database families remain in place with a deferred receipt and a Doctor warning; moving them requires a separate persistence design. SDK and Doctor share one install-directory resolver carrying the directory, recorded owner, and migration state. Environment overrides take precedence; malformed config produces one warning without writes. Sessions keep their existing store when the configured owner differs, and system search tools and shell PATH remain usable without an ambient owner.

Validation includes failing-before/passing-after regressions, SDK/Doctor boundary suites, changed-file checks, a clean P1 review, and successful exact-head CI. Published-updater installation qualification remains a documented, maintainer-accepted limitation.

Fixes openclaw#146043

Reported by @steipete (openclaw#146043).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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.

[Bug]: doctor stops later repairs when a legacy ~/.openclaw/agent payload exists; quarantine directories accumulate

1 participant