Skip to content

fix(backup): preserve discovery under concurrent state writes - #146912

Merged
obviyus merged 3 commits into
mainfrom
bugloop/backup-discovery-write-load
Sep 13, 2026
Merged

obviyus merged 3 commits into
mainfrom
bugloop/backup-discovery-write-load

Conversation

@obviyus

@obviyus obviyus commented Sep 13, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Concurrent state-database writes can make backup create report a valid config as invalid. Following its --no-include-workspace advice can then produce a verified archive with unresolved agent ownership and declared plugin databases copied as opaque bytes.

Why This Change Was Made

Discovery and config revalidation now use online SQLite read snapshots. Failed discovery refuses archive publication and reports the underlying error. --no-include-workspace changes file selection without changing plugin discovery; --only-config remains available for recovery.

#146700 introduced opaque handling, which remains unchanged for genuinely undeclared files.
#146713 made concurrent memory repair reachable from ordinary search, exposing this discovery failure.

User Impact

Backups retain agent and plugin protection under write load. Invalid or unreadable discovery cannot silently produce a partial state archive.

Evidence

Before: with a sustained root-database writer, full backup exited 1 blaming config; the no-workspace command exited 0 with empty agent roots and an opaque warning for a declared plugin database.
After: both commands succeed with verification, resolved agent roots, and managed plugin capture. Idle backup and legacy-audit capture remain covered.

Compatibility

No schema, config key, flag, or archive-format change. Invalid-config state archives now fail closed; --only-config still exports the active JSON file. Production growth provides one scoped online-read lifetime shared by discovery and revalidation.

This intentionally replaces the schema-invalid partial state archive supported by #143693. Both state archive modes now require resolved agent and plugin ownership. --only-config remains a raw root-file recovery export and does not include referenced config files.

Consumers

  • backup create: reliable discovery under concurrent state writes and truthful failure output.
  • backup create --no-include-workspace: the same agent/plugin ownership protection with workspace files excluded.

The decision which declared plugin resources backup protects is made by exactly one mechanism at src/commands/backup-resource-inventory.ts:126, supplied with resolved ownership before archive creation.

  • Pre-migration backup (src/commands/migrate/apply.ts:26) calls the same verified archive command before applying a migration. It consumes the archive path and propagates discovery failures. Only absent local state/config is treated as an empty installation.
  • Config staging revalidation (src/infra/backup-config-capture.ts:119) takes a fresh scoped state image while retaining authored config bytes, file identity, and include-graph checks.
  • Archive result, manifest, and text/JSON output no longer receive unresolved-ownership skipped entries. The existing manifest reader continues to accept earlier archives.

Invalidation

Each discovery or revalidation operation owns and closes its read snapshot. Config-file identity and include-graph checks remain active. Legacy-audit witnesses continue to read live state.

Contention

Real CLI backups run alongside a continuous SQLite writer. Both workspace modes retain their declared owners.

Tests

The registered backup CLI tests cover concurrent root-database writes in both workspace modes and unreadable-state refusal. Retained real CLI captures show the original full-backup failure and no-workspace ownership downgrade on the baseline, then successful verified archives on the candidate tree. Independent archive inspection confirms agent and declared plugin contents, workspace selection, and opaque handling for undeclared SQLite files.

All 79 focused tests passed on a fresh merge of 63ef2a8a4b44 with main a8a9114fb78784cb726ba271e3b4da74a40f01a9: four CLI cases, 23 command/publication cases, 30 state-reader cases, and 22 config-capture/legacy-audit cases. Workspace-only plugin discovery passes in both workspace modes. Restoring the previous workspace filter makes the no-workspace case fail with an opaque warning for its declared database. Eight real CLI cases also passed on that integration. The final test-only correction passed all 140 backup-create tests, and CI is green at the landing head.

AI-assisted.

@clawsweeper

clawsweeper Bot commented Sep 13, 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 cli CLI command changes commands Command implementations size: M maintainer Maintainer-authored PR labels Sep 13, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 13, 2026, 6:52 AM ET / 10:52 UTC (Revision 4).

ClawSweeper review

What this changes

Backup discovery and config revalidation use scoped SQLite snapshots, retain plugin discovery when workspace files are excluded, and refuse state archives when ownership discovery fails.

Merge readiness

⛔ Blocked before merge - 1 item remains

This remains a useful fix absent from pinned main, with no concrete introduced correctness or security defect found. The subsequent exact-head owner-review approval resolves the earlier ownership blocker; the intentional recovery compatibility change remains visible.

Priority: P2
Reviewed head: 8d386a45d3c29b7e18a17a48e8f202af0b8d670f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with meaningful CLI coverage and a documented, approved compatibility tradeoff.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored exemption applies. The captured body reports before/after real CLI backups under SQLite contention, and the inspected registered tests match the changed discovery and publication boundary; retained traces were not independently inspected.
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 exemption applies. The captured body reports before/after real CLI backups under SQLite contention, and the inspected registered tests match the changed discovery and publication boundary; retained traces were not independently inspected.
Evidence reviewed 8 items Introduced change and current-main necessity: The host-verified merge-base-to-head patch identifies the introduced changes. Comparing the three production files with pinned main independently confirms that main still lacks the scoped discovery reader, revalidation wrapper, and corrected workspace-independent plugin discovery; endpoint drift was not used to attribute unrelated changes.
Snapshot lifetime and admission: The new scope uses the existing snapshot preparer, checks fresh-open admission before and after preparation, redirects matching read-only operations, invalidates the scope, and awaits cleanup. Live writer handles are not redirected.
Production-boundary regression coverage: The registered CLI test runs both workspace modes alongside a SQLite worker and checks resolved agent roots, verification, declared plugin database inclusion, absence of opaque warnings, and workspace selection. A separate case checks unreadable-state refusal before archive publication. These tests were inspected, not executed during this read-only review.
Findings None None.
Security None None.

How this fits together

Backup creation combines configuration, agent ownership, and plugin declarations into an archive inventory. Discovery determines which databases receive managed capture before the archive is verified and published.

flowchart TD
  A[Config and shared state] --> B[Scoped SQLite snapshot]
  B --> C[Agent and plugin discovery]
  C --> D{Ownership resolved?}
  D -->|Yes| E[Select files and capture databases]
  E --> F[Verify and publish archive]
  D -->|No| G[Report error without publication]
  A --> H[Explicit config-only export]
Loading

Before merge

  • Resolve merge risk (P1) - After upgrading, users with schema-invalid configuration can no longer create partial state archives with --no-include-workspace. They must resolve discovery first; --only-config excludes ordinary state, external credentials, and referenced config files. This documented tradeoff remains operationally significant despite the recorded approval.
Agent review details

Security

None.

PR surface

Source +53, Tests +124, Docs -5. Total +172 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 3 93 40 +53
Tests 5 139 15 +124
Docs 1 3 8 -5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 235 63 +172

Review metrics

Metric Value Why it matters
Production and test growth production +53 net lines; tests/support +124 net lines Production growth supplies one shared snapshot lifetime, while the added coverage exercises the registered CLI under concurrent writes.

Merge-risk options

Maintainer options:

  1. Retain the documented recovery tradeoff (recommended)
    Proceed under the recorded exact-head approval, keeping clear that invalid-config state archives now refuse and config-only export is narrower.

Technical review

Best possible solution:

Use one scoped snapshot lifetime for reliable ownership discovery, preserve authored-config safeguards, and retain clear documentation of the accepted config-only recovery limitation.

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

Yes, a source-backed path is clear: sustained shared-state writes can defeat the synchronous artifact-preserving discovery copy, and the registered CLI cases target that condition. This review did not execute the reproduction.

Is this the best way to solve the issue?

Yes. Reusing the existing online snapshot owner addresses contention without a competing capture mechanism; the separately documented refusal policy has subsequent exact-head owner-review approval.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded backup reliability repair for concurrent state writes.
  • merge-risk: 🚨 compatibility: The patch intentionally removes a released invalid-config partial-backup path, even when workspace files are excluded.
  • 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 exemption applies. The captured body reports before/after real CLI backups under SQLite contention, and the inspected registered tests match the changed discovery and publication boundary; retained traces were not independently inspected.

Evidence

What I checked:

  • Introduced change and current-main necessity: The host-verified merge-base-to-head patch identifies the introduced changes. Comparing the three production files with pinned main independently confirms that main still lacks the scoped discovery reader, revalidation wrapper, and corrected workspace-independent plugin discovery; endpoint drift was not used to attribute unrelated changes. (src/commands/backup-shared.ts:588, 8d386a45d3c2)
  • Snapshot lifetime and admission: The new scope uses the existing snapshot preparer, checks fresh-open admission before and after preparation, redirects matching read-only operations, invalidates the scope, and awaits cleanup. Live writer handles are not redirected. (src/state/openclaw-state-db-readonly.ts:44, 8d386a45d3c2)
  • Production-boundary regression coverage: The registered CLI test runs both workspace modes alongside a SQLite worker and checks resolved agent roots, verification, declared plugin database inclusion, absence of opaque warnings, and workspace selection. A separate case checks unreadable-state refusal before archive publication. These tests were inspected, not executed during this read-only review. (src/cli/program/register.backup.product-path.test.ts:54, 8d386a45d3c2)
  • Released recovery contract: The v2026.9.4 documentation explicitly supports partial state/config/external-credentials backup with invalid configuration through --no-include-workspace. The candidate deliberately removes that behavior; --only-config remains a root-file export, not an equivalent state backup. Local release-blob inspection failed, so the release document was read through GitHub's contents API. Public docs: docs/cli/backup.md. (docs/cli/backup.md, 3a9d69db306c)
  • Re-review disposition and verified decision context: The captured PR body explicitly accepts replacing schema-invalid partial recovery and explains the narrower config-only export. After the previous review, obviyus posted exact-head owner-review approval at fix(backup): preserve discovery under concurrent state writes #146912 (comment). GitHub independently reports role_name maintain. This resolves the acceptance component of the previous rank-up move; requiring equivalent full-state recovery would reverse the now-explicit design rather than validate its stated behavior. (8d386a45d3c2)
  • Compatibility behavior and retained safeguards: Coverage retains discovery through the stable upgrade compatibility view without rewriting authored config, explicitly expects invalid-config refusal in both state modes, and preserves config-only export. Config capture still checks authored bytes, file identity, include provenance, and root alias changes; the snapshot wrapper does not replace those checks. (src/commands/backup.test.ts:521, 8d386a45d3c2)

Likely related people:

  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Jason (Json): Raw commit 01cf08f adds src/infra/backup-config-capture.ts:127 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 01cf08fd4522; files: src/infra/backup-config-capture.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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-13T09:57:25.571Z sha 6269e0b :: blocked before merge. :: none
  • reviewed 2026-09-13T10:11:15.457Z sha 63ef2a8 :: blocked before merge. :: none
  • reviewed 2026-09-13T10:32:25.027Z sha 8d386a4 :: blocked before merge. :: none

@obviyus
obviyus marked this pull request as ready for review September 13, 2026 10:04
@obviyus

obviyus commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-admin-merge
pr: 146912
head: 8d386a4
scope: owner-review

@obviyus
obviyus merged commit 4d48e9c into main Sep 13, 2026
189 checks passed
@obviyus
obviyus deleted the bugloop/backup-discovery-write-load branch September 13, 2026 10:52
@obviyus

obviyus commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @obviyus!

Proof: Verified backups retain agent and declared plugin databases during concurrent state writes, with or without workspace files.

  • Bug: Concurrent writes caused false config errors and unprotected plugin databases in partial backups.
  • Fix: Discovery uses online SQLite snapshots and refuses archives when ownership cannot be resolved.
Before After
Full backup blamed valid config; partial backup copied declared databases as opaque bytes. Both modes preserve declared database protection and report discovery failures accurately.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* temp/pr-146802: (51 commits)
  improve: reduce worktree filesystem stalls and archive syncs (#146906)
  fix(ui): avoid extra chat rail work while replies stream (#146883)
  improve(ui): speed up populated Usage timelines (#146947)
  test(gateway): retain auth recovery failure diagnostics (#146925)
  fix(tests): create private temporary home directories (#146931)
  fix(backup): preserve discovery under concurrent state writes (#146912)
  fix: keep queued deliveries in their original state directory (#146917)
  fix(discord): settle voice waveform work before releasing input (#146885)
  fix(memory): preserve newer indexes and disclose automatic rebuild costs (#146908)
  fix: retain route ownership while discovering conversations (#146927)
  refactor: reuse plugin fixture shell runner (#146920)
  fix(worker): stop preparing disabled live previews (#146896)
  fix(runtime): support Bun across tooling suite (#146807)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  ...
obviyus added a commit that referenced this pull request Sep 13, 2026
…7476)

Supersedes #146725 by @SunnyShu0925.

## What Problem This Solves

Plugin inspection can fail during database writes without explaining the bounded failure or what to do next.

## User Impact

The error names ten attempts, identifies concurrent writes as a possible cause, and tells the operator to wait for writes to settle and retry. It does not promise success during continuous writes. Risk is low and limited to diagnostic text.

## Why This Change Was Made

The existing snapshot owner supplies the message for both strategies. The contributor's production change is unchanged; retries, source checks, canonical path, retained cause, and safe error propagation stay intact.

Each corrected test now captures one error per mode and checks the exact count, qualified explanation, complete guidance, source path, and source-change cause. Cause prose must stay out of the top-level message.

## Evidence

Retained real CLI proof for the unchanged production patch: `pnpm openclaw plugins info canvas --json`, with an isolated Gateway, synthetic SQLite state, and a sustained writer. Both versions exit 1 during writes and pass before writes and after the writer stops. The failure occurs during config readiness, before plugin inspection dispatch.

Main `8cba5e03ddb45`, stderr with the source path redacted:

```text
[openclaw] Reason: SQLite read-only worker SQLite source did not stabilize for read-only inspection: <source>
```

Contributor `5c76eff645e8`, with the same redaction:

```text
[openclaw] Reason: SQLite read-only worker SQLite source did not stabilize after 10 read-only inspection attempts (the database may be under concurrent write activity): <source>. Wait a moment for write activity to settle, then retry the inspection
```

The corrected tests fail on main `e0cf191e2557` for the three missing guidance fields and pass on this branch. The cause and privacy assertions pass on both.

Fresh merge `95650108b296` of `f7faef2077e1` with main `f6f241952b0e` passed 1,088 tests across 13 selected files, including both corrected cases, CLI inspection, snapshot readers, cleanup, error formatting, and routing assertions. One existing Linux-only case was skipped on macOS. The consistent no-color environment preserves the earlier stderr-fixture diagnosis; no assertion or skip was weakened. Changed-file lint, formatting, line limits, and assertion checks passed. Typechecks were not run locally.

## Consumers

- CLI startup and plugin inspection, ownership admission, shared-state reads, Doctor/schema checks, update inspection and recovery, task recovery, cron, legacy auth inspection, memory diagnostics, and public snapshot helpers retain their existing control flow.
- Backup discovery and config revalidation use the shared online snapshot scope introduced by #146912. Verified backup/checkpoint creation can also use journal-aware snapshot preparation. Failure still stops publication and carries the underlying diagnostic; no consumer parses the old exhaustion text.
- Worker output, CLI JSON/stderr, and startup diagnostic logs consume the owner-generated message. Existing wrappers may add their own operation context.
- Best-effort config-health reads and driving-updater inspection retain their existing suppression rules. Not every consumer displays the message.
- No persisted state, cache invalidation, public function signature, schema, migration, config key, protocol, or retry-policy change is included.

AI-assisted.

Co-authored-by: SunnyShu0925 <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
…aw#146912)

## What Problem This Solves

Concurrent state-database writes can make `backup create` report a valid config as invalid. Following its `--no-include-workspace` advice can then produce a verified archive with unresolved agent ownership and declared plugin databases copied as opaque bytes.

## Why This Change Was Made

Discovery and config revalidation now use online SQLite read snapshots. Failed discovery refuses archive publication and reports the underlying error. `--no-include-workspace` changes file selection without changing plugin discovery; `--only-config` remains available for recovery.

openclaw#146700 introduced opaque handling, which remains unchanged for genuinely undeclared files.
openclaw#146713 made concurrent memory repair reachable from ordinary search, exposing this discovery failure.

## User Impact

Backups retain agent and plugin protection under write load. Invalid or unreadable discovery cannot silently produce a partial state archive.

## Evidence

Before: with a sustained root-database writer, full backup exited 1 blaming config; the no-workspace command exited 0 with empty agent roots and an opaque warning for a declared plugin database.
After: both commands succeed with verification, resolved agent roots, and managed plugin capture. Idle backup and legacy-audit capture remain covered.

## Compatibility

No schema, config key, flag, or archive-format change. Invalid-config state archives now fail closed; `--only-config` still exports the active JSON file. Production growth provides one scoped online-read lifetime shared by discovery and revalidation.

This intentionally replaces the schema-invalid partial state archive supported by openclaw#143693. Both state archive modes now require resolved agent and plugin ownership. `--only-config` remains a raw root-file recovery export and does not include referenced config files.

## Consumers

- `backup create`: reliable discovery under concurrent state writes and truthful failure output.
- `backup create --no-include-workspace`: the same agent/plugin ownership protection with workspace files excluded.

The decision `which declared plugin resources backup protects` is made by exactly one mechanism at `src/commands/backup-resource-inventory.ts:126`, supplied with resolved ownership before archive creation.

- Pre-migration backup (`src/commands/migrate/apply.ts:26`) calls the same verified archive command before applying a migration. It consumes the archive path and propagates discovery failures. Only absent local state/config is treated as an empty installation.
- Config staging revalidation (`src/infra/backup-config-capture.ts:119`) takes a fresh scoped state image while retaining authored config bytes, file identity, and include-graph checks.
- Archive result, manifest, and text/JSON output no longer receive unresolved-ownership skipped entries. The existing manifest reader continues to accept earlier archives.

## Invalidation

Each discovery or revalidation operation owns and closes its read snapshot. Config-file identity and include-graph checks remain active. Legacy-audit witnesses continue to read live state.

## Contention

Real CLI backups run alongside a continuous SQLite writer. Both workspace modes retain their declared owners.

## Tests

The registered backup CLI tests cover concurrent root-database writes in both workspace modes and unreadable-state refusal. Retained real CLI captures show the original full-backup failure and no-workspace ownership downgrade on the baseline, then successful verified archives on the candidate tree. Independent archive inspection confirms agent and declared plugin contents, workspace selection, and opaque handling for undeclared SQLite files.

All 79 focused tests passed on a fresh merge of `63ef2a8a4b44` with main `d77d0ca76038309f1d2a4edc783be5b6cfc49928`: four CLI cases, 23 command/publication cases, 30 state-reader cases, and 22 config-capture/legacy-audit cases. Workspace-only plugin discovery passes in both workspace modes. Restoring the previous workspace filter makes the no-workspace case fail with an opaque warning for its declared database. Eight real CLI cases also passed on that integration. The final test-only correction passed all 140 backup-create tests, and CI is green at the landing head.

AI-assisted.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
…nclaw#147476)

Supersedes openclaw#146725 by @SunnyShu0925.

## What Problem This Solves

Plugin inspection can fail during database writes without explaining the bounded failure or what to do next.

## User Impact

The error names ten attempts, identifies concurrent writes as a possible cause, and tells the operator to wait for writes to settle and retry. It does not promise success during continuous writes. Risk is low and limited to diagnostic text.

## Why This Change Was Made

The existing snapshot owner supplies the message for both strategies. The contributor's production change is unchanged; retries, source checks, canonical path, retained cause, and safe error propagation stay intact.

Each corrected test now captures one error per mode and checks the exact count, qualified explanation, complete guidance, source path, and source-change cause. Cause prose must stay out of the top-level message.

## Evidence

Retained real CLI proof for the unchanged production patch: `pnpm openclaw plugins info canvas --json`, with an isolated Gateway, synthetic SQLite state, and a sustained writer. Both versions exit 1 during writes and pass before writes and after the writer stops. The failure occurs during config readiness, before plugin inspection dispatch.

Main `9977306fec733`, stderr with the source path redacted:

```text
[openclaw] Reason: SQLite read-only worker SQLite source did not stabilize for read-only inspection: <source>
```

Contributor `5c76eff645e8`, with the same redaction:

```text
[openclaw] Reason: SQLite read-only worker SQLite source did not stabilize after 10 read-only inspection attempts (the database may be under concurrent write activity): <source>. Wait a moment for write activity to settle, then retry the inspection
```

The corrected tests fail on main `56bde7c0bcd4` for the three missing guidance fields and pass on this branch. The cause and privacy assertions pass on both.

Fresh merge `95650108b296` of `f7faef2077e1` with main `fcf8cfbaba0b` passed 1,088 tests across 13 selected files, including both corrected cases, CLI inspection, snapshot readers, cleanup, error formatting, and routing assertions. One existing Linux-only case was skipped on macOS. The consistent no-color environment preserves the earlier stderr-fixture diagnosis; no assertion or skip was weakened. Changed-file lint, formatting, line limits, and assertion checks passed. Typechecks were not run locally.

## Consumers

- CLI startup and plugin inspection, ownership admission, shared-state reads, Doctor/schema checks, update inspection and recovery, task recovery, cron, legacy auth inspection, memory diagnostics, and public snapshot helpers retain their existing control flow.
- Backup discovery and config revalidation use the shared online snapshot scope introduced by openclaw#146912. Verified backup/checkpoint creation can also use journal-aware snapshot preparation. Failure still stops publication and carries the underlying diagnostic; no consumer parses the old exhaustion text.
- Worker output, CLI JSON/stderr, and startup diagnostic logs consume the owner-generated message. Existing wrappers may add their own operation context.
- Best-effort config-health reads and driving-updater inspection retain their existing suppression rules. Not every consumer displays the message.
- No persisted state, cache invalidation, public function signature, schema, migration, config key, protocol, or retry-policy change is included.

AI-assisted.

Co-authored-by: SunnyShu0925 <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
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 docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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