Skip to content

fix: startup plugin verification suggests restarting a container - #119508

Merged
vincentkoc merged 1 commit into
openclaw:mainfrom
sunlit-deng:sunlit/fix/local-plugin-verification-restart
Aug 5, 2026
Merged

vincentkoc merged 1 commit into
openclaw:mainfrom
sunlit-deng:sunlit/fix/local-plugin-verification-restart

Conversation

@sunlit-deng

@sunlit-deng sunlit-deng commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where operators on native or service installs were told to restart a container after gateway startup plugin verification failed.

Why This Change Was Made

The recovery guidance now asks operators to restart the gateway, matching the install-neutral wording established by #119406. Container-specific daemon guidance remains unchanged.

User Impact

Operators receive a recovery step that applies to container, native, and service-managed gateways.

Evidence

  • The same production formatter and diagnostic input were run at pinned base 75ef5aebecb8e808eaa8a0503fb4b466703c5306 and head edb593f4e8a38cbdb20ade3c6be0edb9f0ca60d6.
  • node_modules/.bin/vitest run src/commands/doctor-config-preflight-plugin-verification.test.ts src/commands/doctor-config-preflight.state-migration.test.ts: 30 passed.
$ pnpm exec tsx proof-live.ts
before: {"sha":"75ef5aebecb8e808eaa8a0503fb4b466703c5306","recovery":"Resolve the plugin verification errors above, then restart the container.","diagnosticPreserved":true}
after: {"sha":"edb593f4e8a38cbdb20ade3c6be0edb9f0ca60d6","recovery":"Resolve the plugin verification errors above, then restart the gateway.","diagnosticPreserved":true}
proof-live.ts
import { execFileSync } from "node:child_process";
import path from "node:path";
import { pathToFileURL } from "node:url";

async function main() {
  const moduleUrl = pathToFileURL(
    path.resolve("src/commands/doctor-config-preflight-plugin-verification.ts"),
  ).href;
  const { formatStartupPluginVerificationFailure } = await import(moduleUrl);
  const diagnostic = 'Plugin "demo": invalid payload. Run `openclaw update repair` to retry.';
  const output = formatStartupPluginVerificationFailure({
    kind: "plugin-verification",
    messages: [diagnostic],
  });

  console.log(
    JSON.stringify({
      sha: execFileSync("git", ["rev-parse", "HEAD"], { encoding: "utf8" }).trim(),
      recovery: output.split("\n").at(-1),
      diagnosticPreserved: output.includes(`- ${diagnostic}`),
    }),
  );
}

void main();

AI-assisted: built with Codex

Punchcard-Session: clear-orchard-lantern-bc

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: XS labels Aug 5, 2026
@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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Aug 5, 2026
@clawsweeper

clawsweeper Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 2:03 AM ET / 06:03 UTC.

ClawSweeper review

What this changes

This PR changes startup plugin-verification recovery text from restarting a container to restarting the gateway and adds a focused regression test.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open: current main still gives container-specific recovery guidance on the generic gateway startup plugin-verification failure path, and this PR fixes that exact owner. Likely related people: @steipete (high confidence).

Priority: P2
Reviewed head: edb593f4e8a38cbdb20ade3c6be0edb9f0ca60d6

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct owner-boundary fix with direct before/after behavior evidence and regression coverage.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The PR body includes redacted before/after terminal output from the production formatter at pinned base and head, showing the corrected recovery text while retaining the diagnostic.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body includes redacted before/after terminal output from the production formatter at pinned base and head, showing the corrected recovery text while retaining the diagnostic.
Evidence reviewed 5 items Current-main behavior: The generic plugin-verification formatter still instructs every affected operator to restart a container.
Owned startup path: Gateway startup passes a blocking plugin diagnostic to this formatter and emits it through the startup-refusal owner.
Sibling invariant: The adjacent startup-migration refusal already uses install-neutral gateway restart wording; merged #119406 established that parallel recovery direction without changing this formatter.
Findings None None.
Security None None.

How this fits together

Gateway startup runs config preflight and plugin verification before declaring itself ready. A blocking verification failure is rendered as an operator diagnostic and terminates startup.

flowchart LR
A[Gateway startup] --> B[Config preflight]
B --> C[Plugin verification]
C --> D{Blocking failure?}
D -->|Yes| E[Diagnostic formatter]
E --> F[Recovery guidance]
D -->|No| G[Gateway ready]
Loading

Before merge

  • Complete next step (P2) - No repair job is needed because this PR already contains the narrow correct fix; it needs normal exact-head CI and merge review.
Agent review details

Security

None.

PR surface

Source 0, Tests +19. Total +19 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 1 19 0 +19
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 20 1 +19

Review metrics

Metric Value Why it matters
Production versus test delta production +1/-1; tests +19/-0 The patch is narrowly scoped to one operator-facing recovery sentence with dedicated coverage.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor-config-preflight-plugin-verification.test.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Merge the one-line formatter correction and its colocated regression test once exact-head checks complete.

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

Yes: a blocking plugin-verification diagnostic flows through the current formatter during gateway startup, where current main emits the container-only instruction.

Is this the best way to solve the issue?

Yes: changing the shared formatter is the narrowest maintainable fix, and the parallel startup-migration formatter already uses gateway-neutral wording.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 20bd49db8950.

Labels

Label changes:

  • add P2: A blocking startup path gives non-container operators an inapplicable recovery instruction, but the correction is small and localized.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes redacted before/after terminal output from the production formatter at pinned base and head, showing the corrected recovery text while retaining the diagnostic.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes redacted before/after terminal output from the production formatter at pinned base and head, showing the corrected recovery text while retaining the diagnostic.

Label justifications:

  • P2: A blocking startup path gives non-container operators an inapplicable recovery instruction, but the correction is small and localized.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes redacted before/after terminal output from the production formatter at pinned base and head, showing the corrected recovery text while retaining the diagnostic.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes redacted before/after terminal output from the production formatter at pinned base and head, showing the corrected recovery text while retaining the diagnostic.

Evidence

What I checked:

Likely related people:

  • steipete: Current formatter and caller blame to the preflight refactor commit; the same person also authored the merged sibling recovery-text correction. (role: recent feature and refactor owner; confidence: high; commits: 5ffd2dfbc3d6, 195b0ea3fa83; files: src/commands/doctor-config-preflight-plugin-verification.ts, src/commands/doctor-config-preflight.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.

@clawsweeper

clawsweeper Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix: startup plugin verification suggests restarting a container This is item 3/3 in the current shard. Shard 8/15.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@vincentkoc vincentkoc self-assigned this Aug 5, 2026
@vincentkoc

Copy link
Copy Markdown
Member

Maintainer review complete for edb593f4e8a38cbdb20ade3c6be0edb9f0ca60d6.

ClawSweeper's remaining normal exact-head CI/merge-review move is satisfied: required CI is green, the exact-head ClawSweeper review has no findings, 33 focused tests passed, fresh P1 autoreview was clean, and the hosted changed gate passed. Proceeding through the native squash-merge workflow.

@vincentkoc
vincentkoc merged commit 07ad811 into openclaw:main Aug 5, 2026
141 of 148 checks passed
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 5, 2026
Punchcard-Session: frost-brook-timber-mx

* origin/main:
  fix: cap local tsgo CPU usage (#119517)
  fix(tool-search): normalize dotted call arguments (#119418) (#119464)
  fix(qa): retain child output on CLI timeouts (#119524)
  fix(discord): preserve authored block order in presentation components (#119506)
  fix: make plugin verification restart guidance install-neutral (#119508)
  fix(qa): preserve profile execution contracts (#119519)
  test(qa): cover managed OTEL runtime paths (#118965)

Punchcard-Session: frost-brook-timber-mx
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 6, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 6, 2026
Punchcard-Session: frost-brook-timber-mx

* origin/main:
  fix: cap local tsgo CPU usage (openclaw#119517)
  fix(tool-search): normalize dotted call arguments (openclaw#119418) (openclaw#119464)
  fix(qa): retain child output on CLI timeouts (openclaw#119524)
  fix(discord): preserve authored block order in presentation components (openclaw#119506)
  fix: make plugin verification restart guidance install-neutral (openclaw#119508)
  fix(qa): preserve profile execution contracts (openclaw#119519)
  test(qa): cover managed OTEL runtime paths (openclaw#118965)

Punchcard-Session: frost-brook-timber-mx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

2 participants