Skip to content

fix(doctor): import historical exec approval metadata - #118282

Merged
steipete merged 3 commits into
mainfrom
clawsweeper/issue-openclaw-openclaw-118242
Aug 31, 2026
Merged

steipete merged 3 commits into
mainfrom
clawsweeper/issue-openclaw-openclaw-118242

Conversation

@clawsweeper

@clawsweeper clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #118242.

What Problem This Solves

Fixes an issue where upgrading users with lastUsedAt: null or lastUsedCommand: null in the retired exec-approvals.json could not recover approvals with openclaw doctor --fix. The strict importer treated the file as malformed, and Doctor could reach approval-dependent config repairs before importing the file, sending the operator back to the command that had just failed. Partially valid legacy config exposed the same ordering problem.

Why This Change Was Made

Normalize only these two usage fields at the Doctor-owned legacy import boundary, then validate the complete policy with the unchanged strict parser. Run that state-root import before config-dependent repairs. Canonical SQLite policy, authorization fields, source-byte receipt identity, exclusive migration ownership, canonical-state precedence, and malformed-source preservation remain unchanged. No schema, protocol, dependency, or configuration-surface change is introduced.

Maintainer review reused the existing JSON parser helper, shared the existing preflight guard, consolidated duplicate migration tests, and added coverage for wildcard entries, retained non-null metadata, malformed policy, strict canonical parsing, node-host startup, and interrupted cleanup. The bounded compatibility decision is recorded in #118282 (comment).

User Impact

openclaw doctor --fix recovers otherwise-valid legacy approval policies without manual JSON editing, including while config itself needs repair. Verify with openclaw approvals get using the same state directory. Other malformed fields and conflicting legacy policies are still preserved for recovery rather than silently accepted.

Thanks @sercada for the report and reproduction, and @obviyus for the preflight ordering repair and CLI regression.

Evidence

  • Exact-head integration CI: run 33360006063, attempt 1 passed on 5b8920bc100913fdd3dfc804b5bcdae108e8b44f, including the merge-tree build with the main CSS repair.
  • Before/after built CLI, isolated synthetic HOME/state and external service-repair policy: exercised both valid config and partially valid legacy config. Before: Doctor exits 1, approvals remain unavailable, legacy bytes remain. After: Doctor exits 0, approvals get --json exits 0, the original allowlist is present without null usage fields, and source removal is recorded in the migration receipt. No operator Gateway or live state was used.
  • Regression proof: the null-metadata migration case fails on pre-fix main with Preserved malformed legacy exec approvals for operator recovery; the node-host null-metadata case also fails before the fix.
  • Focused tests: 91 passing tests in five files, using node scripts/run-vitest.mjs src/infra/state-migrations.exec-approvals.test.ts src/infra/exec-approvals-config.test.ts src/infra/exec-approvals-store.test.ts src/node-host/startup-state-migrations.test.ts src/commands/doctor-config-preflight.process.test.ts.
  • Static checks: node scripts/check-changed.mjs -- src/commands/doctor-config-preflight.ts src/commands/doctor-config-preflight.process.test.ts src/infra/state-migrations.exec-approvals.ts src/infra/state-migrations.exec-approvals.test.ts src/infra/exec-approvals-config.test.ts src/node-host/startup-state-migrations.test.ts docs/tools/exec-approvals.md passed, including types, formatting, lint, import cycles, and architecture guards. git diff --check passed.
  • Independent review: fresh Codex autoreview of the complete candidate and owner-contract evidence is scoped-clean at the configured P0 threshold.
  • Build caveat: pnpm build completed runtime compilation and postbuild checks but both the unchanged baseline and candidate hit the same existing Control UI CSS limit: 54,809 B against 54,784 B. This is already repaired on main by fix(ci): deduplicate Control UI skeleton styles #133787 (54,781 B, unchanged budget). The exact-head merge-tree CI build is now green; no budget or baseline was changed here. The supported cliStartup build profile was also rebuilt successfully at the exact published head for the terminal trace below.

Actual CLI commands run in each isolated fixture:

node openclaw.mjs approvals get --json
node openclaw.mjs doctor --fix --non-interactive --no-workspace-suggestions
node openclaw.mjs approvals get --json

Review summary

Best-fix verdict: best owner boundary. Runtime-wide nullable validation and indiscriminate null stripping were rejected because they would accept malformed canonical or authorization state. A downstream catch would preserve the recovery deadlock. The existing migration owner handles normalization, validation, transaction, receipt, and cleanup; preflight establishes the required order.

Production LOC: +50/-1 (net +49); tests: +160/-13 (net +147); docs: +8. Production growth is the necessary legacy-only normalization and early import sequencing; the maintainer pass removed 14 production lines from the incoming implementation. No new public surface or persistence representation.

Provenance: raw-parent diffs verify strict metadata validation in 9b1c36d23c3 and its reuse by the SQLite Doctor importer in 9eae43bd37c. Stable v2026.7.1 readers accepted and preserved null metadata; the exact writer that created the reported nulls remains unknown. The fix does not depend on any Codex runtime contract.

Follow-up: make genuinely malformed legacy-policy diagnostics identify a bounded field path without exposing commands, patterns, or credentials. That diagnostic improvement is separate from this null-recovery fix.

Exact-head terminal trace

Rebuilt the published head with node --import ./scripts/tsx.mjs scripts/build-all.mts cliStartup (exit 0), then ran the CLI commands above in three isolated synthetic HOME/state directories with OPENCLAW_SERVICE_REPAIR_POLICY=external. The successful fixtures contain lastUsedAt: null and lastUsedCommand: null; the malformed alternative adds argPattern: null, which must not be normalized because it is policy.

The trace below is the asserted command-runner output, including captured Doctor terminal lines and read-only SQLite receipt/policy checks. Only the temporary host path is omitted; beforeExit/afterExit refer to approvals get --json before/after Doctor.

{
  "head": "5b8920bc100913fdd3dfc804b5bcdae108e8b44f",
  "phase": "after",
  "results": [
    {
      "case": "valid-config",
      "beforeExit": 1,
      "doctorExit": 0,
      "afterExit": 0,
      "sourcePresent": false,
      "policyRecovered": true,
      "sourceRemovalReceipted": true,
      "doctorTrace": [
        "- Imported legacy exec approvals into shared SQLite state.",
        "- Removed retired exec approvals JSON after recording its migration",
        "└  Doctor complete."
      ]
    },
    {
      "case": "legacy-config",
      "beforeExit": 1,
      "doctorExit": 0,
      "afterExit": 0,
      "sourcePresent": false,
      "policyRecovered": true,
      "sourceRemovalReceipted": true,
      "doctorTrace": [
        "- Imported legacy exec approvals into shared SQLite state.",
        "- Removed retired exec approvals JSON after recording its migration",
        "└  Doctor complete."
      ]
    },
    {
      "case": "malformed-policy",
      "beforeExit": 1,
      "doctorExit": 1,
      "afterExit": 1,
      "sourcePresent": true,
      "sourceBytesUnchanged": true,
      "canonicalPolicyCreated": false,
      "receiptRemovedSource": 0,
      "runtimeStillBlocked": true,
      "doctorTrace": [
        "- Preserved malformed legacy exec approvals for operator recovery."
      ]
    }
  ]
}

@clawsweeper clawsweeper Bot added clawsweeper Tracked by ClawSweeper automation clawsweeper:autogenerated PR created automatically by ClawSweeper clawsweeper:autofix Maintainer opted this PR into bounded ClawSweeper-reviewed autofix without merge labels Aug 2, 2026
@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. P1 High-priority user-facing bug, regression, or broken workflow. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Codex review: passed. Reviewed August 31, 2026, 1:55 AM ET / 05:55 UTC.

ClawSweeper review

What this changes

The PR lets Doctor import retired exec-approval JSON with two historical null usage fields and performs that import before config-dependent migration work.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: current main still lacks the migration behavior, and the PR has credible exact-head CLI proof with no blocking code finding. Its explicit human-review label should remain the merge gate for this upgrade-time approval-policy change.

Priority: P1
Reviewed head: 5b8920bc100913fdd3dfc804b5bcdae108e8b44f
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong production-boundary proof and focused regression coverage support a sound patch, pending the intended human compatibility review.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR body supplies a head-pinned built-CLI trace through the production Doctor migration: valid and partially valid fixtures recover policy and remove the source, while malformed policy remains blocked with original bytes preserved.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body supplies a head-pinned built-CLI trace through the production Doctor migration: valid and partially valid fixtures recover policy and remove the source, while malformed policy remains blocked with original bytes preserved.
Evidence reviewed 7 items Current main still lacks the fix: The fetched main-to-head comparison contains the added nullable-field normalizer and early Doctor import; the PR head is not an ancestor of fetched main.
Narrow migration boundary: Only literal null values for the two usage-metadata fields are deleted from legacy allowlist entries, and the normalized result then passes through the unchanged strict parser.
Ordering and fail-closed ownership: Doctor repair enables Doctor-only migrations, performs the new import before the config-dependent migration graph, and runtime access remains blocked while the retired source or its claim exists.
Findings None None.
Security None None.

How this fits together

Doctor moves retired approval JSON into OpenClaw’s shared SQLite state before runtime approval checks use the canonical policy. The preflight path coordinates that migration with configuration repair and other state migrations.

flowchart LR
  A[Retired approval JSON] --> B[Doctor repair flow]
  B --> C[Nullable usage cleanup]
  C --> D[Strict policy validation]
  D --> E[Shared SQLite policy]
  E --> F[Runtime approval checks]
Loading

Decision needed

Question Recommendation
Should the existing human-review gate be cleared to land the Doctor-only recovery for historical null usage metadata? Accept the bounded recovery: Confirm that only the two historical last-used fields are non-authoritative metadata and clear the human-review gate for normal merge handling.

Why: The patch changes how retired persisted execution-approval policy is accepted during upgrade, so the final compatibility decision belongs to a maintainer despite strong proof and no code defect.

Before merge

  • Resolve merge risk (P1) - This changes upgrade-time handling of persisted execution approvals; a human should confirm the narrow historical-null contract before clearing the existing human-review gate.
Agent review details

Security

None.

PR surface

Source +49, Tests +147, Docs +8. Total +204 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 2 50 1 +49
Tests 4 160 13 +147
Docs 1 8 0 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 218 14 +204

Review metrics

Metric Value Why it matters
Production versus test delta production +50/-1 (net +49); tests +160/-13 (net +147); docs +8 The added production code is limited to legacy-only normalization and migration sequencing, while boundary coverage is substantially expanded.

Stored data model

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

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #118242
Summary: This PR explicitly implements the reported legacy-null migration failure tracked by the canonical issue.

Members:

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

Merge-risk options

Maintainer options:

  1. Confirm the legacy compatibility contract (recommended)
    A maintainer should verify that the two nullable fields are historical usage metadata, then clear the human-review gate if the bounded migration is accepted.
  2. Pause pending provenance evidence
    Keep the PR open if maintainers require an audit of an older writer before allowing a retired approval file to migrate.

Technical review

Best possible solution:

Retain the strict canonical parser and fail-closed migration ownership, then land this bounded Doctor-only recovery after human approval of the legacy compatibility decision.

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

Yes, from source and the supplied head-pinned terminal trace: a retired allowlist entry with either null usage field reaches the strict parser on current main and is preserved as malformed instead of imported.

Is this the best way to solve the issue?

Yes: normalizing only non-authoritative null usage metadata at the Doctor-owned legacy boundary preserves strict canonical validation and avoids a runtime compatibility reader.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9ebf5aed2cfa.

Labels

Label justifications:

  • P1: Affected upgrade users remain unable to recover execution approvals until this repair lands.
  • merge-risk: 🚨 compatibility: The PR changes how a retired persisted approval-policy file is interpreted and removed during upgrade.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies a head-pinned built-CLI trace through the production Doctor migration: valid and partially valid fixtures recover policy and remove the source, while malformed policy remains blocked with original bytes preserved.

Evidence

What I checked:

  • Current main still lacks the fix: The fetched main-to-head comparison contains the added nullable-field normalizer and early Doctor import; the PR head is not an ancestor of fetched main. (src/infra/state-migrations.exec-approvals.ts:48, 9ebf5aed2cfa)
  • Narrow migration boundary: Only literal null values for the two usage-metadata fields are deleted from legacy allowlist entries, and the normalized result then passes through the unchanged strict parser. (src/infra/state-migrations.exec-approvals.ts:48, 5b8920bc1009)
  • Ordering and fail-closed ownership: Doctor repair enables Doctor-only migrations, performs the new import before the config-dependent migration graph, and runtime access remains blocked while the retired source or its claim exists. (src/commands/doctor-config-flow.ts:162, 5b8920bc1009)
  • Boundary regression coverage: Tests cover null-versus-absent usage metadata, preservation of non-null metadata and malformed policy bytes, cleanup retry, runtime gating, node-host startup, and a partially valid configuration through the Doctor process boundary. (src/infra/state-migrations.exec-approvals.test.ts:108, 5b8920bc1009)
  • Real behavior evidence: The captured PR body includes a head-pinned built-CLI terminal trace showing successful valid and partially valid migrations plus malformed-policy preservation; the updated maintainer comment identifies the exact-head green CI run. (5b8920bc1009)
  • Feature-history routing: History identifies the shared-SQLite exec-approval migration as prior work in commit 9eae43b; shallow promisor history prevented raw-parent introduction verification, so this is routing evidence rather than an introduction claim. (src/infra/state-migrations.exec-approvals.ts:35, 9eae43bd37cd)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • A maintainer should confirm the bounded historical metadata contract and clear the existing human-review gate if accepted.

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 (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-05T01:21:18.195Z sha c3e731b :: passed. :: none
  • reviewed 2026-08-06T01:51:00.538Z sha c3e731b :: needs maintainer review before merge. :: none
  • reviewed August 20, 2026, 6:17 PM ET / 22:17 UTC sha unknown :: needs maintainer review before merge. :: none
  • reviewed 2026-08-20T22:17:08.418Z sha c3e731b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-23T07:06:05.372Z sha c3e731b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-29T08:15:38.260Z sha c3e731b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-31T04:53:49.222Z sha 3301b6d :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-31T05:24:07.065Z sha 5b8920b :: needs maintainer review before merge. :: none

@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor Author

🦞🧹
ClawSweeper autofix is enabled.

  • Head: c3e731b0b347
  • Label: clawsweeper:autofix
  • Action: exact-head review queued (workflow sweep.yml, event repository_dispatch).
  • Flow: review this head, repair/rebase only if needed, then re-review the exact repaired head until no actionable findings remain.

This is fix-only; I will not merge this PR.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. clawsweeper:human-review Needs maintainer review before ClawSweeper can continue and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 6, 2026
@clawsweeper

clawsweeper Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor Author

🦞✅
ClawSweeper is pausing this repair loop for human review.

Source: clawsweeper[bot]
Reason: - [ ] Resolve merge risk (P1) - Merging intentionally converts a retired allowlist with only historical null usage metadata into active canonical approval state; a maintainer should confirm that this exact represent... (sha=c3e731b0b34789e47fb02b9d4556aa791016446e)

Why human review is needed:
ClawSweeper found a blocker that should be resolved or accepted by a maintainer before the repair or automerge loop continues.

What the maintainer can do as a next step:
If the maintainer accepts the current risk and wants ClawSweeper to continue merge gates, comment @clawsweeper approve. If more work is needed, resolve the blocker first, then comment @clawsweeper automerge to re-review and continue. If automation should stay paused, leave clawsweeper:human-review in place or comment @clawsweeper stop.

I added clawsweeper:human-review and left the final call with a maintainer.

@clawsweeper clawsweeper Bot added 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. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 20, 2026
@obviyus obviyus self-assigned this Aug 31, 2026
@obviyus
obviyus force-pushed the clawsweeper/issue-openclaw-openclaw-118242 branch from c3e731b to 898b24d Compare August 31, 2026 04:43
@obviyus obviyus changed the title fix(doctor): import legacy exec approvals with null usage metadata fix(doctor): import historical exec approval metadata Aug 31, 2026
@openclaw-barnacle openclaw-barnacle Bot added the commands Command implementations label Aug 31, 2026
@steipete

Copy link
Copy Markdown
Contributor

Reviewing and preparing this for landing under maintainer direction. @obviyus, I picked up your updated head 898b24d7e188b22e06290147b4e72fe8834c063e, including the early Doctor preflight repair, and will preserve it while completing the review and proof.

The bounded compatibility decision is to recover only lastUsedAt: null and lastUsedCommand: null inside retired agents.*.allowlist entries. The canonical SQLite parser, authorization fields, existing-policy precedence, source-byte receipt identity, exclusive migration ownership, and malformed-source preservation stay unchanged. No schema change or new runtime compatibility reader is needed. Broadly accepting null in the runtime parser or stripping all null fields would be the wrong fix.

I reproduced current-main behavior with the production migration boundary: the absent-metadata case passes, while the otherwise identical null-metadata case fails with Preserved malformed legacy exec approvals for operator recovery. I am checking the updated preflight flow, tightening regression coverage for preserved metadata and rejected policy values, and running built-CLI before/after proof plus fresh independent review before landing. This is an in-progress review, not a merge-ready claim.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

🦞✅
ClawSweeper is pausing this repair loop for human review.

Source: clawsweeper[bot]
Reason: - [ ] Add real behavior proof - Needs real behavior proof before merge: Authority-chain proof required: the changed owner imports exec authorization policy into shared SQLite, but the reviewed body only asserts a re...; Review finding: [medium] Confirm legacy-policy recovery authority — src/infra/state-migrations.exec-approvals.ts:69 (sha=3301b6ddcc554e3b062318f12e895122e7411c6e)

Why human review is needed:
ClawSweeper found a blocker that should be resolved or accepted by a maintainer before the repair or automerge loop continues.

What the maintainer can do as a next step:
If the maintainer accepts the current risk and wants ClawSweeper to continue merge gates, comment @clawsweeper approve. If more work is needed, resolve the blocker first, then comment @clawsweeper automerge to re-review and continue. If automation should stay paused, leave clawsweeper:human-review in place or comment @clawsweeper stop.

I added clawsweeper:human-review and left the final call with a maintainer.

@obviyus obviyus removed their assignment Aug 31, 2026
Reuse JSON normalization and the preflight guard, preserve strict canonical policy parsing, and consolidate migration regressions with node-host and cleanup-retry coverage.

Co-authored-by: Ayaan Zaidi <[email protected]>
@steipete

steipete commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Exact-head validation is complete for 5b8920bc100913fdd3dfc804b5bcdae108e8b44f: CI run 33360006063, attempt 1 is green.

The PR body now includes the requested auditable terminal trace, not only a prose summary. The supported CLI build profile was rebuilt at the published head. Both valid and partially valid legacy configs recover with Doctor/approvals exit 0, canonical policy present, and receipted source removal. The adjacent malformed case (argPattern: null) leaves exact source bytes unchanged, creates no canonical policy, records removed_source=0, and keeps runtime approvals blocked (exit 1).

This addresses every item in the latest ClawSweeper review: direct migration/preservation proof is attached inline, the 49 net production lines are confined to the necessary legacy-only normalization and early sequencing, and exact-head checks are complete. No runtime schema/policy relaxation or budget change. Proceeding through native prepare/merge.

@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor Author

🦞🧹
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: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor Author

🦞✅
ClawSweeper is pausing this repair loop for human review.

Source: clawsweeper[bot]
Reason: - [ ] Resolve merge risk (P1) - This changes upgrade-time handling of persisted execution approvals; a human should confirm the narrow historical-null contract before clearing the existing human-review gate. (sha=5b8920bc100913fdd3dfc804b5bcdae108e8b44f)

Why human review is needed:
ClawSweeper found a blocker that should be resolved or accepted by a maintainer before the repair or automerge loop continues.

What the maintainer can do as a next step:
If the maintainer accepts the current risk and wants ClawSweeper to continue merge gates, comment @clawsweeper approve. If more work is needed, resolve the blocker first, then comment @clawsweeper automerge to re-review and continue. If automation should stay paused, leave clawsweeper:human-review in place or comment @clawsweeper stop.

I added clawsweeper:human-review and left the final call with a maintainer.

@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: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Aug 31, 2026
@steipete
steipete merged commit 39d1d9f into main Aug 31, 2026
253 of 255 checks passed
@steipete
steipete deleted the clawsweeper/issue-openclaw-openclaw-118242 branch August 31, 2026 06:04
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 1, 2026
* fix(doctor): import legacy exec approvals with null usage metadata

* fix(doctor): migrate approvals before config repair

* refactor(doctor): tighten legacy approval recovery

Reuse JSON normalization and the preflight guard, preserve strict canonical policy parsing, and consolidate migration regressions with node-host and cleanup-retry coverage.

Co-authored-by: Ayaan Zaidi <[email protected]>

---------

Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:autofix Maintainer opted this PR into bounded ClawSweeper-reviewed autofix without merge clawsweeper:autogenerated PR created automatically by ClawSweeper clawsweeper:human-review Needs maintainer review before ClawSweeper can continue clawsweeper Tracked by ClawSweeper automation commands Command implementations merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: exec-approvals migration rejects null lastUsedAt/lastUsedCommand written by older versions and never names the offending entry

2 participants