Skip to content

fix(plugins): sanitize human update reports - #186449

Closed
Leon-SK668 wants to merge 1 commit into
openclaw:mainfrom
Leon-SK668:leon/fix-plugin-update-terminal-reports-20261027
Closed

Leon-SK668 wants to merge 1 commit into
openclaw:mainfrom
Leon-SK668:leon/fix-plugin-update-terminal-reports-20261027

Conversation

@Leon-SK668

Copy link
Copy Markdown
Contributor

What Problem This Solves

openclaw plugins update writes returned plugin/hook outcome messages directly to stdout or stderr. Plugin IDs accepted by normal local installation can contain terminal controls, so even an ordinary dry-run skip can ring the bell or forge a report line. Direct selection/ownership diagnostics and integrity-drift prompts share this missing human-text boundary.

Why This Change Was Made

Sanitize each outcome message once before its existing severity styling, preserving success/skipped/error routing and exit decisions. Use the same existing sanitizer on command-owned dynamic diagnostics and integrity prompt fields, retaining the prompt's deliberate three-line layout. Raw updater outcomes, install IDs, package/config persistence and source-selection policy are unchanged. Both plugin and hook outcomes use this renderer.

Existing-solutions preflight: the maintained terminal-core/SDK sanitizer already owns this contract, so this reuses it. No new library, wrapper sanitizer, plugin or service is required. The selected complete owner is src/cli/plugins-update-command.ts; its registration, callers, sibling reports, tests, source handling and sanitizer were read. All-state title/symptom/symbol/path searches and complete Leon/Alix public open-footprint/changed-file checks found no viable same-invariant competitor. Latest checked main 8cebac4847362f4d5b9f94656551789e9f3756c7 leaves the report owners and exercised update/policy call paths unchanged. Terminal-core now also exports terminalText; the existing sanitizeTerminalText behavior is unchanged. Updated root/contribution, review-flow and test-authoring guidance was read; the recorded Node 24.22.1 meets the new minimum. This head merges cleanly with that main without changing its recorded source/build proof.

User Impact

Operators can read update results without package-derived control sequences reaching the report. Café, 中文 and emoji survive. JSON/storage identities and exit meanings do not change; this adds no update source or automatic action.

No new or changed config/default, protocol/schema, dependency, migration, permission or storage contract. Existing trusted report layout and severity styling are retained. Release-note context: safely render human plugin CLI reports without rewriting machine/raw values.

Evidence

  • Actual native RED source/build: 173c8537d5ae4ea1da4200ba59da584b76bb5600. Exact GREEN source/build: 52d6150dc3e59ed981670e173070661e9bc8d3e0, tree 55d6fa1f64e779c9c23b7fdfb077aa2aef9a17d4; clean independent worktree, Node v24.22.1, Linux, task-owned isolated HOME/state/config/files. No production instance, external service, model call or real channel was used.
  • Six public CLI calls per revision: install two task-owned local plugins with the plugin system disabled, then run selected and bulk --dry-run updates for each. Both supported path-source installs succeed; both update selections correctly skip path sources with exit0. RED report bytes contain BEL/C1/data-newline controls; GREEN renders them safely. An independent reader reopens both authoritative SQLite installed-index rows, both configs and all twelve original/installed source files, verifying unchanged raw IDs/bytes and absent register() markers. Four status classes and both plugin/hook output channels are additionally covered by focused regressions.
  • Same proof command before/after: node openclaw.mjs plugins update --all --dry-run; full setup, companion calls, original lengths/hashes and complete stdout/stderr are below.
  • Frozen recorder SHA256 5059d75346efe1b42885420e04cd5608999b08d95833eacbb152947679ad7e92; separate disk/SQLite reader SHA256 3cde35321991104e90ea6cee5d04f9b16fe3f39e00c902a86014755e67d13e8f. Both RED/GREEN readbacks PASS and launch zero additional product calls. These are saved real subprocess/PTY streams and actual file/SQLite readbacks, not merely test outcomes or script assertions.
  • Author simplification and test audit completed. The user explicitly waived independent autoreview; no independent review pass is claimed. Production/test LOC below are separate; no generated/lock/proof asset files are committed.
Gate Actual result
Tests-only baseline 27 PASS / 5 intended FAIL; 213.61 s
Focused GREEN 32/32 PASS; 210.32 s
Strict source/test types PASS; 25.47 s
Canonical typed lint 293 rules, 2 files, zero diagnostics; 79.36 s
Format / whitespace PASS
Exact source build PASS; 282.79 s
Native RED / GREEN 6/6 actual calls; child wall totals 47.918 s / 49.682 s

Commands (one worker; wrapper/preparation time included above):

OPENCLAW_VITEST_RUNTIME=node OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/cli/plugins-cli.update.test.ts --maxWorkers=1
OPENCLAW_LINT_TOOL=oxlint OPENCLAW_TYPECHECKER=tsgo node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.source.json --format json src/cli/plugins-update-command.ts src/cli/plugins-cli.update.test.ts
OPENCLAW_TYPECHECKER=tsgo node scripts/run-tsgo.mjs -p .artifacts/tsconfig.plugin-update-report.json --incremental
OPENCLAW_FORMAT_TOOL=oxfmt node scripts/run-format.mts --check src/cli/plugins-update-command.ts src/cli/plugins-cli.update.test.ts
git diff --check
node --import ./scripts/tsx.mjs scripts/build-all.mts sourcePerformance

The local ignored typecheck project only scopes the repository's existing strict test config to the two touched files plus ambient declarations; no compiler/lint setting is weakened. Full Vitest test timing includes startup/compilation; no hosted CI duration is claimed. Diff numstat is additions/deletions:

51	0	src/cli/plugins-cli.update.test.ts
27	16	src/cli/plugins-update-command.ts

Eleven net production lines cover the shared outcome renderer, all command-owned direct dynamic diagnostics and the existing integrity prompt's layout; no new helper, API, state or update path. Required CI and the first durable bot/human review can only occur after publication; neither is preclaimed here.

The following subprocess captures are complete. Within each JSON string, decode [U+hhhh] to that control code point, and [JSON-ESCAPE-U+hhhh] to a literal backslash, lowercase u and the shown four hex digits. The collision-checked codec round-trips every original string and survives the publication transport. Only task-root/checkout/executable paths are normalized. Hashes/lengths refer to original captured bytes; synthetic fixture values are preserved. SQLite rows also contain unrelated bundled catalog metadata: only that metadata is omitted below; the complete selected install record, its raw key/JSON path, whole-row byte count/hash and unchanged-row comparison are included. All original rows remain retained locally.

Exact native identities and independently reopened disk/SQLite evidence
{
  "red": {
    "head": "173c8537d5ae4ea1da4200ba59da584b76bb5600",
    "receiptSha256": "262fc1ee5a1316773720c12d30d7e30bbe4b7306f7dae4790cb0285d61fe7429",
    "at": "2026-10-27T02:25:55.823Z",
    "node": "v24.22.1",
    "build": {
      "version": "2026.10.7",
      "commit": "173c8537d5ae4ea1da4200ba59da584b76bb5600",
      "builtAt": "2026-10-27T02:13:59.897Z",
      "buildId": "2026.10.7-173c8537d5ae-2026-10-27T02-13-59.897Z"
    },
    "driverSha256": "5059d75346efe1b42885420e04cd5608999b08d95833eacbb152947679ad7e92",
    "childElapsedMs": 47918
  },
  "green": {
    "head": "52d6150dc3e59ed981670e173070661e9bc8d3e0",
    "receiptSha256": "f3fb57921e3008bfa050b62650511be5138e9a335eb9dbb6f24e7fa88460be96",
    "at": "2026-10-27T03:06:03.414Z",
    "node": "v24.22.1",
    "build": {
      "version": "2026.10.7",
      "commit": "52d6150dc3e59ed981670e173070661e9bc8d3e0",
      "builtAt": "2026-10-27T02:54:05.986Z",
      "buildId": "2026.10.7-52d6150dc3e5-2026-10-27T02-54-05.986Z"
    },
    "driverSha256": "5059d75346efe1b42885420e04cd5608999b08d95833eacbb152947679ad7e92",
    "childElapsedMs": 49682
  },
  "redReadback": {
    "status": "PASS",
    "lane": "update",
    "head": "173c8537d5ae4ea1da4200ba59da584b76bb5600",
    "phase": "RED",
    "receiptSha256": "262fc1ee5a1316773720c12d30d7e30bbe4b7306f7dae4790cb0285d61fe7429",
    "readerSha256": "3cde35321991104e90ea6cee5d04f9b16fe3f39e00c902a86014755e67d13e8f",
    "savedStreams": 12,
    "files": [
      {
        "path": "<PROOF_ROOT>/ordinary/source-plugin/package.json",
        "sha256": "48d75f3f1ae8c6b7d9342b951808a1456147d109846d8b89b53c750eaf7c8f37",
        "raw": "{\"name\":\"leon-owned-update-proof\",\"version\":\"1.0.0\",\"type\":\"module\",\"openclaw\":{\"extensions\":[\"./index.js\"]}}"
      },
      {
        "path": "<PROOF_ROOT>/ordinary/state/extensions/leon-plain-café-🦀/package.json",
        "sha256": "48d75f3f1ae8c6b7d9342b951808a1456147d109846d8b89b53c750eaf7c8f37",
        "raw": "{\"name\":\"leon-owned-update-proof\",\"version\":\"1.0.0\",\"type\":\"module\",\"openclaw\":{\"extensions\":[\"./index.js\"]}}"
      },
      {
        "path": "<PROOF_ROOT>/ordinary/source-plugin/openclaw.plugin.json",
        "sha256": "b61563a6a060e99823b211194764b35167b208de5daedb41c01c7b67b144918e",
        "raw": "{\"id\":\"leon-plain-café-🦀\",\"name\":\"Owned isolated plugin\",\"configSchema\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}}"
      },
      {
        "path": "<PROOF_ROOT>/ordinary/state/extensions/leon-plain-café-🦀/openclaw.plugin.json",
        "sha256": "b61563a6a060e99823b211194764b35167b208de5daedb41c01c7b67b144918e",
        "raw": "{\"id\":\"leon-plain-café-🦀\",\"name\":\"Owned isolated plugin\",\"configSchema\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}}"
      },
      {
        "path": "<PROOF_ROOT>/ordinary/source-plugin/index.js",
        "sha256": "f80364c4b22d0b3ed5e7bdf13df067588438263eddfb9868344561f00d8c4bc6",
        "raw": "import fs from \"node:fs\";\nexport default { id: \"leon-plain-café-🦀\", name: \"Owned isolated plugin\", register() { fs.writeFileSync(\"<PROOF_ROOT>/ordinary/register-was-called\", \"invoked\"); } };\n"
      },
      {
        "path": "<PROOF_ROOT>/ordinary/state/extensions/leon-plain-café-🦀/index.js",
        "sha256": "f80364c4b22d0b3ed5e7bdf13df067588438263eddfb9868344561f00d8c4bc6",
        "raw": "import fs from \"node:fs\";\nexport default { id: \"leon-plain-café-🦀\", name: \"Owned isolated plugin\", register() { fs.writeFileSync(\"<PROOF_ROOT>/ordinary/register-was-called\", \"invoked\"); } };\n"
      },
      {
        "path": "<PROOF_ROOT>/ordinary/openclaw.json",
        "sha256": "b070ca548e3aae7c86a9ad54d9a0f5734263ebedc3426f4aef795e798afb4228",
        "raw": "{\n  \"gateway\": {\n    \"mode\": \"local\",\n    \"port\": 38525\n  },\n  \"plugins\": {\n    \"enabled\": false\n  },\n  \"agents\": {\n    \"entries\": {\n      \"main\": {\n        \"workspace\": \"<PROOF_ROOT>/ordinary/workspace\"\n      }\n    }\n  },\n  \"logging\": {\n    \"consoleLevel\": \"error\",\n    \"file\": \"<PROOF_ROOT>/ordinary/runtime.log\"\n  },\n  \"meta\": {\n    \"migrations\": {\n      \"modelPolicyAllowlist\": true,\n      \"utilityModelSeparation\": true\n    },\n    \"lastTouchedVersion\": \"2026.10.7\"\n  }\n}\n",
        "pluginExecutionAbsent": true
      },
      {
        "path": "<PROOF_ROOT>/controls/source-plugin/package.json",
        "sha256": "48d75f3f1ae8c6b7d9342b951808a1456147d109846d8b89b53c750eaf7c8f37",
        "raw": "{\"name\":\"leon-owned-update-proof\",\"version\":\"1.0.0\",\"type\":\"module\",\"openclaw\":{\"extensions\":[\"./index.js\"]}}"
      },
      {
        "path": "<PROOF_ROOT>/controls/state/extensions/leon-café\nFORGED[U+0007][U+0085]🦀/package.json",
        "sha256": "48d75f3f1ae8c6b7d9342b951808a1456147d109846d8b89b53c750eaf7c8f37",
        "raw": "{\"name\":\"leon-owned-update-proof\",\"version\":\"1.0.0\",\"type\":\"module\",\"openclaw\":{\"extensions\":[\"./index.js\"]}}"
      },
      {
        "path": "<PROOF_ROOT>/controls/source-plugin/openclaw.plugin.json",
        "sha256": "fc94169564994a40f1b83f1b1723c75372c162c1cf6b617b93fe9a05eedbe2ee",
        "raw": "{\"id\":\"leon-café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\",\"name\":\"Owned isolated plugin\",\"configSchema\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}}"
      },
      {
        "path": "<PROOF_ROOT>/controls/state/extensions/leon-café\nFORGED[U+0007][U+0085]🦀/openclaw.plugin.json",
        "sha256": "fc94169564994a40f1b83f1b1723c75372c162c1cf6b617b93fe9a05eedbe2ee",
        "raw": "{\"id\":\"leon-café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\",\"name\":\"Owned isolated plugin\",\"configSchema\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}}"
      },
      {
        "path": "<PROOF_ROOT>/controls/source-plugin/index.js",
        "sha256": "9a6dc25b546d9a3bfbebfdc0f33a01088668aa5001a8a936c710276d48e397da",
        "raw": "import fs from \"node:fs\";\nexport default { id: \"leon-café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\", name: \"Owned isolated plugin\", register() { fs.writeFileSync(\"<PROOF_ROOT>/controls/register-was-called\", \"invoked\"); } };\n"
      },
      {
        "path": "<PROOF_ROOT>/controls/state/extensions/leon-café\nFORGED[U+0007][U+0085]🦀/index.js",
        "sha256": "9a6dc25b546d9a3bfbebfdc0f33a01088668aa5001a8a936c710276d48e397da",
        "raw": "import fs from \"node:fs\";\nexport default { id: \"leon-café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\", name: \"Owned isolated plugin\", register() { fs.writeFileSync(\"<PROOF_ROOT>/controls/register-was-called\", \"invoked\"); } };\n"
      },
      {
        "path": "<PROOF_ROOT>/controls/openclaw.json",
        "sha256": "d442437389126fbcf8a0fcb84362f3682ea21177de8dfe33d41fcfb3df2b0945",
        "raw": "{\n  \"gateway\": {\n    \"mode\": \"local\",\n    \"port\": 38525\n  },\n  \"plugins\": {\n    \"enabled\": false\n  },\n  \"agents\": {\n    \"entries\": {\n      \"main\": {\n        \"workspace\": \"<PROOF_ROOT>/controls/workspace\"\n      }\n    }\n  },\n  \"logging\": {\n    \"consoleLevel\": \"error\",\n    \"file\": \"<PROOF_ROOT>/controls/runtime.log\"\n  },\n  \"meta\": {\n    \"migrations\": {\n      \"modelPolicyAllowlist\": true,\n      \"utilityModelSeparation\": true\n    },\n    \"lastTouchedVersion\": \"2026.10.7\"\n  }\n}\n",
        "pluginExecutionAbsent": true
      }
    ],
    "sqliteRows": [
      {
        "path": "<PROOF_ROOT>/ordinary/state/state/openclaw.sqlite",
        "stateKey": "plugins.installedIndex",
        "sha256": "133831e1ed63f20ab0dd4be8b8be7b622411ff1106f642026bc8edc5943fc083",
        "valueBytes": 333928,
        "revision": 1793067966320,
        "selectedJsonPath": [
          "index",
          "installRecords",
          "leon-plain-café-🦀"
        ],
        "selectedRecord": {
          "source": "path",
          "sourcePath": "<PROOF_ROOT>/ordinary/source-plugin",
          "installPath": "<PROOF_ROOT>/ordinary/state/extensions/leon-plain-café-🦀",
          "version": "1.0.0",
          "installedAt": "2026-10-27T02:26:02.766Z",
          "acceptedSurface": {
            "channels": [],
            "providers": [],
            "tools": [],
            "contracts": [],
            "hooks": [],
            "mcpServers": [],
            "cliCommands": [],
            "cliBackends": [],
            "skills": [],
            "dangerousConfigFlags": []
          },
          "acceptedSurfaceHash": "e9ee055fdf3a7d0f5c8f4db342886ceca40fecac78cbd94febb73acd562e45fd",
          "acceptedSurfaceAt": "2026-10-27T02:26:02.759Z"
        },
        "wholeRowMatchesPreUpdate": true,
        "omitted": "Unrelated bundled catalog metadata; full original row retained with the SHA256 above."
      },
      {
        "path": "<PROOF_ROOT>/controls/state/state/openclaw.sqlite",
        "stateKey": "plugins.installedIndex",
        "sha256": "e93c2b0108fd510caa850f21b13135a7d572f608555da825084788c13e176171",
        "valueBytes": 333995,
        "revision": 1793067990094,
        "selectedJsonPath": [
          "index",
          "installRecords",
          "leon-café\nFORGED[U+0007][U+0085]🦀"
        ],
        "selectedRecord": {
          "source": "path",
          "sourcePath": "<PROOF_ROOT>/controls/source-plugin",
          "installPath": "<PROOF_ROOT>/controls/state/extensions/leon-café\nFORGED[U+0007][U+0085]🦀",
          "version": "1.0.0",
          "installedAt": "2026-10-27T02:26:26.681Z",
          "acceptedSurface": {
            "channels": [],
            "providers": [],
            "tools": [],
            "contracts": [],
            "hooks": [],
            "mcpServers": [],
            "cliCommands": [],
            "cliBackends": [],
            "skills": [],
            "dangerousConfigFlags": []
          },
          "acceptedSurfaceHash": "e9ee055fdf3a7d0f5c8f4db342886ceca40fecac78cbd94febb73acd562e45fd",
          "acceptedSurfaceAt": "2026-10-27T02:26:26.674Z"
        },
        "wholeRowMatchesPreUpdate": true,
        "omitted": "Unrelated bundled catalog metadata; full original row retained with the SHA256 above."
      }
    ],
    "productInvocations": 0
  },
  "greenReadback": {
    "status": "PASS",
    "lane": "update",
    "head": "52d6150dc3e59ed981670e173070661e9bc8d3e0",
    "phase": "GREEN",
    "receiptSha256": "f3fb57921e3008bfa050b62650511be5138e9a335eb9dbb6f24e7fa88460be96",
    "readerSha256": "3cde35321991104e90ea6cee5d04f9b16fe3f39e00c902a86014755e67d13e8f",
    "savedStreams": 12,
    "files": [
      {
        "path": "<PROOF_ROOT>/ordinary/source-plugin/package.json",
        "sha256": "48d75f3f1ae8c6b7d9342b951808a1456147d109846d8b89b53c750eaf7c8f37",
        "raw": "{\"name\":\"leon-owned-update-proof\",\"version\":\"1.0.0\",\"type\":\"module\",\"openclaw\":{\"extensions\":[\"./index.js\"]}}"
      },
      {
        "path": "<PROOF_ROOT>/ordinary/state/extensions/leon-plain-café-🦀/package.json",
        "sha256": "48d75f3f1ae8c6b7d9342b951808a1456147d109846d8b89b53c750eaf7c8f37",
        "raw": "{\"name\":\"leon-owned-update-proof\",\"version\":\"1.0.0\",\"type\":\"module\",\"openclaw\":{\"extensions\":[\"./index.js\"]}}"
      },
      {
        "path": "<PROOF_ROOT>/ordinary/source-plugin/openclaw.plugin.json",
        "sha256": "b61563a6a060e99823b211194764b35167b208de5daedb41c01c7b67b144918e",
        "raw": "{\"id\":\"leon-plain-café-🦀\",\"name\":\"Owned isolated plugin\",\"configSchema\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}}"
      },
      {
        "path": "<PROOF_ROOT>/ordinary/state/extensions/leon-plain-café-🦀/openclaw.plugin.json",
        "sha256": "b61563a6a060e99823b211194764b35167b208de5daedb41c01c7b67b144918e",
        "raw": "{\"id\":\"leon-plain-café-🦀\",\"name\":\"Owned isolated plugin\",\"configSchema\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}}"
      },
      {
        "path": "<PROOF_ROOT>/ordinary/source-plugin/index.js",
        "sha256": "9366b6bfe474d65c9a045fcd09c722c38a4beb5b6fd07b96a243cb689291911c",
        "raw": "import fs from \"node:fs\";\nexport default { id: \"leon-plain-café-🦀\", name: \"Owned isolated plugin\", register() { fs.writeFileSync(\"<PROOF_ROOT>/ordinary/register-was-called\", \"invoked\"); } };\n"
      },
      {
        "path": "<PROOF_ROOT>/ordinary/state/extensions/leon-plain-café-🦀/index.js",
        "sha256": "9366b6bfe474d65c9a045fcd09c722c38a4beb5b6fd07b96a243cb689291911c",
        "raw": "import fs from \"node:fs\";\nexport default { id: \"leon-plain-café-🦀\", name: \"Owned isolated plugin\", register() { fs.writeFileSync(\"<PROOF_ROOT>/ordinary/register-was-called\", \"invoked\"); } };\n"
      },
      {
        "path": "<PROOF_ROOT>/ordinary/openclaw.json",
        "sha256": "f9ff13b24e749d7af867218f2f63abc907d6dce2fcc4916cc54d753e8d4f23dc",
        "raw": "{\n  \"gateway\": {\n    \"mode\": \"local\",\n    \"port\": 43335\n  },\n  \"plugins\": {\n    \"enabled\": false\n  },\n  \"agents\": {\n    \"entries\": {\n      \"main\": {\n        \"workspace\": \"<PROOF_ROOT>/ordinary/workspace\"\n      }\n    }\n  },\n  \"logging\": {\n    \"consoleLevel\": \"error\",\n    \"file\": \"<PROOF_ROOT>/ordinary/runtime.log\"\n  },\n  \"meta\": {\n    \"migrations\": {\n      \"modelPolicyAllowlist\": true,\n      \"utilityModelSeparation\": true\n    },\n    \"lastTouchedVersion\": \"2026.10.7\"\n  }\n}\n",
        "pluginExecutionAbsent": true
      },
      {
        "path": "<PROOF_ROOT>/controls/source-plugin/package.json",
        "sha256": "48d75f3f1ae8c6b7d9342b951808a1456147d109846d8b89b53c750eaf7c8f37",
        "raw": "{\"name\":\"leon-owned-update-proof\",\"version\":\"1.0.0\",\"type\":\"module\",\"openclaw\":{\"extensions\":[\"./index.js\"]}}"
      },
      {
        "path": "<PROOF_ROOT>/controls/state/extensions/leon-café\nFORGED[U+0007][U+0085]🦀/package.json",
        "sha256": "48d75f3f1ae8c6b7d9342b951808a1456147d109846d8b89b53c750eaf7c8f37",
        "raw": "{\"name\":\"leon-owned-update-proof\",\"version\":\"1.0.0\",\"type\":\"module\",\"openclaw\":{\"extensions\":[\"./index.js\"]}}"
      },
      {
        "path": "<PROOF_ROOT>/controls/source-plugin/openclaw.plugin.json",
        "sha256": "fc94169564994a40f1b83f1b1723c75372c162c1cf6b617b93fe9a05eedbe2ee",
        "raw": "{\"id\":\"leon-café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\",\"name\":\"Owned isolated plugin\",\"configSchema\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}}"
      },
      {
        "path": "<PROOF_ROOT>/controls/state/extensions/leon-café\nFORGED[U+0007][U+0085]🦀/openclaw.plugin.json",
        "sha256": "fc94169564994a40f1b83f1b1723c75372c162c1cf6b617b93fe9a05eedbe2ee",
        "raw": "{\"id\":\"leon-café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\",\"name\":\"Owned isolated plugin\",\"configSchema\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}}"
      },
      {
        "path": "<PROOF_ROOT>/controls/source-plugin/index.js",
        "sha256": "be3afa5d2c000ff86b1d751cb187f469121a5380ef0326f638e2466f65e909fc",
        "raw": "import fs from \"node:fs\";\nexport default { id: \"leon-café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\", name: \"Owned isolated plugin\", register() { fs.writeFileSync(\"<PROOF_ROOT>/controls/register-was-called\", \"invoked\"); } };\n"
      },
      {
        "path": "<PROOF_ROOT>/controls/state/extensions/leon-café\nFORGED[U+0007][U+0085]🦀/index.js",
        "sha256": "be3afa5d2c000ff86b1d751cb187f469121a5380ef0326f638e2466f65e909fc",
        "raw": "import fs from \"node:fs\";\nexport default { id: \"leon-café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\", name: \"Owned isolated plugin\", register() { fs.writeFileSync(\"<PROOF_ROOT>/controls/register-was-called\", \"invoked\"); } };\n"
      },
      {
        "path": "<PROOF_ROOT>/controls/openclaw.json",
        "sha256": "2a807a0adea0f1633b6ef63fef79417ceee7ed42e2e2d10054a10c75124b4269",
        "raw": "{\n  \"gateway\": {\n    \"mode\": \"local\",\n    \"port\": 43335\n  },\n  \"plugins\": {\n    \"enabled\": false\n  },\n  \"agents\": {\n    \"entries\": {\n      \"main\": {\n        \"workspace\": \"<PROOF_ROOT>/controls/workspace\"\n      }\n    }\n  },\n  \"logging\": {\n    \"consoleLevel\": \"error\",\n    \"file\": \"<PROOF_ROOT>/controls/runtime.log\"\n  },\n  \"meta\": {\n    \"migrations\": {\n      \"modelPolicyAllowlist\": true,\n      \"utilityModelSeparation\": true\n    },\n    \"lastTouchedVersion\": \"2026.10.7\"\n  }\n}\n",
        "pluginExecutionAbsent": true
      }
    ],
    "sqliteRows": [
      {
        "path": "<PROOF_ROOT>/ordinary/state/state/openclaw.sqlite",
        "stateKey": "plugins.installedIndex",
        "sha256": "dec616e2d008427979122b3b23d2e6f8b21b2059e3ce85ffa86c518b5c2a8d09",
        "valueBytes": 335019,
        "revision": 1793070373775,
        "selectedJsonPath": [
          "index",
          "installRecords",
          "leon-plain-café-🦀"
        ],
        "selectedRecord": {
          "source": "path",
          "sourcePath": "<PROOF_ROOT>/ordinary/source-plugin",
          "installPath": "<PROOF_ROOT>/ordinary/state/extensions/leon-plain-café-🦀",
          "version": "1.0.0",
          "installedAt": "2026-10-27T03:06:10.337Z",
          "acceptedSurface": {
            "channels": [],
            "providers": [],
            "tools": [],
            "contracts": [],
            "hooks": [],
            "mcpServers": [],
            "cliCommands": [],
            "cliBackends": [],
            "skills": [],
            "dangerousConfigFlags": []
          },
          "acceptedSurfaceHash": "e9ee055fdf3a7d0f5c8f4db342886ceca40fecac78cbd94febb73acd562e45fd",
          "acceptedSurfaceAt": "2026-10-27T03:06:10.330Z"
        },
        "wholeRowMatchesPreUpdate": true,
        "omitted": "Unrelated bundled catalog metadata; full original row retained with the SHA256 above."
      },
      {
        "path": "<PROOF_ROOT>/controls/state/state/openclaw.sqlite",
        "stateKey": "plugins.installedIndex",
        "sha256": "73284c2bcde543a3876758c73c925b2cb8004300b294a9321d8e807bf85386df",
        "valueBytes": 335082,
        "revision": 1793070398766,
        "selectedJsonPath": [
          "index",
          "installRecords",
          "leon-café\nFORGED[U+0007][U+0085]🦀"
        ],
        "selectedRecord": {
          "source": "path",
          "sourcePath": "<PROOF_ROOT>/controls/source-plugin",
          "installPath": "<PROOF_ROOT>/controls/state/extensions/leon-café\nFORGED[U+0007][U+0085]🦀",
          "version": "1.0.0",
          "installedAt": "2026-10-27T03:06:34.678Z",
          "acceptedSurface": {
            "channels": [],
            "providers": [],
            "tools": [],
            "contracts": [],
            "hooks": [],
            "mcpServers": [],
            "cliCommands": [],
            "cliBackends": [],
            "skills": [],
            "dangerousConfigFlags": []
          },
          "acceptedSurfaceHash": "e9ee055fdf3a7d0f5c8f4db342886ceca40fecac78cbd94febb73acd562e45fd",
          "acceptedSurfaceAt": "2026-10-27T03:06:34.671Z"
        },
        "wholeRowMatchesPreUpdate": true,
        "omitted": "Unrelated bundled catalog metadata; full original row retained with the SHA256 above."
      }
    ],
    "productInvocations": 0
  }
}
Complete native RED commands and stdout/stderr (6 calls)
[
  {
    "case": "ordinary",
    "step": "install",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "install",
      "<PROOF_ROOT>/ordinary/source-plugin",
      "--force",
      "--no-enable",
      "--accept-capabilities"
    ],
    "exit": 0,
    "elapsedMs": 11450,
    "stdoutBytes": 608,
    "stderrBytes": 0,
    "stdoutSha256": "9e508cbc936b7a08ef8077cd9f691d75f7ff10a0eb8b1f0000c944ff9f129a07",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "WARNING - Installing plugin from local path: <PROOF_ROOT>/ordinary/source-plugin\nThis source is outside ClawHub review and trust metadata. Only continue if you trust the publisher, package contents, and install source.\nPlugin manifest id \"leon-plain-café-🦀\" differs from npm package name \"leon-owned-update-proof\"; using manifest id as the config key.\nInstalling to <PROOF_ROOT>/ordinary/state/extensions/leon-plain-café-🦀…\nInstalled plugin: leon-plain-café-🦀\nSaved for the next Gateway start.\n",
    "stderr": ""
  },
  {
    "case": "ordinary",
    "step": "one-dry-run",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "update",
      "leon-plain-café-🦀",
      "--dry-run"
    ],
    "exit": 0,
    "elapsedMs": 6383,
    "stdoutBytes": 49,
    "stderrBytes": 0,
    "stdoutSha256": "274188ef55ec19fe5dab048147df4f58b0cccc1ee69e0c26228388d5674c86e6",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "Skipping \"leon-plain-café-🦀\" (source: path).\n",
    "stderr": ""
  },
  {
    "case": "ordinary",
    "step": "all-dry-run",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "update",
      "--all",
      "--dry-run"
    ],
    "exit": 0,
    "elapsedMs": 6336,
    "stdoutBytes": 49,
    "stderrBytes": 0,
    "stdoutSha256": "274188ef55ec19fe5dab048147df4f58b0cccc1ee69e0c26228388d5674c86e6",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "Skipping \"leon-plain-café-🦀\" (source: path).\n",
    "stderr": ""
  },
  {
    "case": "controls",
    "step": "install",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "install",
      "<PROOF_ROOT>/controls/source-plugin",
      "--force",
      "--no-enable",
      "--accept-capabilities"
    ],
    "exit": 0,
    "elapsedMs": 11024,
    "stdoutBytes": 617,
    "stderrBytes": 0,
    "stdoutSha256": "c494324846bda00b24018cfcce28f423dc969d04f2550caea5a1a5c8db314d13",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "WARNING - Installing plugin from local path: <PROOF_ROOT>/controls/source-plugin\nThis source is outside ClawHub review and trust metadata. Only continue if you trust the publisher, package contents, and install source.\nPlugin manifest id \"leon-café\nFORGED[U+0007][U+0085]🦀\" differs from npm package name \"leon-owned-update-proof\"; using manifest id as the config key.\nInstalling to <PROOF_ROOT>/controls/state/extensions/leon-café\nFORGED[U+0007][U+0085]🦀…\nInstalled plugin: leon-café\nFORGED[U+0007][U+0085]🦀\nSaved for the next Gateway start.\n",
    "stderr": ""
  },
  {
    "case": "controls",
    "step": "one-dry-run",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "update",
      "leon-café\nFORGED[U+0007][U+0085]🦀",
      "--dry-run"
    ],
    "exit": 0,
    "elapsedMs": 6375,
    "stdoutBytes": 52,
    "stderrBytes": 0,
    "stdoutSha256": "9d13878bb9a0863caf1f705fe053e5d3838a1c75fe4f127534e0f66c6cf87594",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "Skipping \"leon-café\nFORGED[U+0007][U+0085]🦀\" (source: path).\n",
    "stderr": ""
  },
  {
    "case": "controls",
    "step": "all-dry-run",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "update",
      "--all",
      "--dry-run"
    ],
    "exit": 0,
    "elapsedMs": 6350,
    "stdoutBytes": 52,
    "stderrBytes": 0,
    "stdoutSha256": "9d13878bb9a0863caf1f705fe053e5d3838a1c75fe4f127534e0f66c6cf87594",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "Skipping \"leon-café\nFORGED[U+0007][U+0085]🦀\" (source: path).\n",
    "stderr": ""
  }
]
Complete exact-head GREEN commands and stdout/stderr (6 calls)
[
  {
    "case": "ordinary",
    "step": "install",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "install",
      "<PROOF_ROOT>/ordinary/source-plugin",
      "--force",
      "--no-enable",
      "--accept-capabilities"
    ],
    "exit": 0,
    "elapsedMs": 11399,
    "stdoutBytes": 608,
    "stderrBytes": 0,
    "stdoutSha256": "2a44bd29568287245239241d2b6cb2f77babb00c8821493e5ceeffa2391780d7",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "WARNING - Installing plugin from local path: <PROOF_ROOT>/ordinary/source-plugin\nThis source is outside ClawHub review and trust metadata. Only continue if you trust the publisher, package contents, and install source.\nPlugin manifest id \"leon-plain-café-🦀\" differs from npm package name \"leon-owned-update-proof\"; using manifest id as the config key.\nInstalling to <PROOF_ROOT>/ordinary/state/extensions/leon-plain-café-🦀…\nInstalled plugin: leon-plain-café-🦀\nSaved for the next Gateway start.\n",
    "stderr": ""
  },
  {
    "case": "ordinary",
    "step": "one-dry-run",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "update",
      "leon-plain-café-🦀",
      "--dry-run"
    ],
    "exit": 0,
    "elapsedMs": 6515,
    "stdoutBytes": 49,
    "stderrBytes": 0,
    "stdoutSha256": "274188ef55ec19fe5dab048147df4f58b0cccc1ee69e0c26228388d5674c86e6",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "Skipping \"leon-plain-café-🦀\" (source: path).\n",
    "stderr": ""
  },
  {
    "case": "ordinary",
    "step": "all-dry-run",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "update",
      "--all",
      "--dry-run"
    ],
    "exit": 0,
    "elapsedMs": 6511,
    "stdoutBytes": 49,
    "stderrBytes": 0,
    "stdoutSha256": "274188ef55ec19fe5dab048147df4f58b0cccc1ee69e0c26228388d5674c86e6",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "Skipping \"leon-plain-café-🦀\" (source: path).\n",
    "stderr": ""
  },
  {
    "case": "controls",
    "step": "install",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "install",
      "<PROOF_ROOT>/controls/source-plugin",
      "--force",
      "--no-enable",
      "--accept-capabilities"
    ],
    "exit": 0,
    "elapsedMs": 11850,
    "stdoutBytes": 617,
    "stderrBytes": 0,
    "stdoutSha256": "1314ac5f5cccc301e7c36a4043efef9ab3bd177ac7ca8adde4d7e1591589e5a6",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "WARNING - Installing plugin from local path: <PROOF_ROOT>/controls/source-plugin\nThis source is outside ClawHub review and trust metadata. Only continue if you trust the publisher, package contents, and install source.\nPlugin manifest id \"leon-café\nFORGED[U+0007][U+0085]🦀\" differs from npm package name \"leon-owned-update-proof\"; using manifest id as the config key.\nInstalling to <PROOF_ROOT>/controls/state/extensions/leon-café\nFORGED[U+0007][U+0085]🦀…\nInstalled plugin: leon-café\nFORGED[U+0007][U+0085]🦀\nSaved for the next Gateway start.\n",
    "stderr": ""
  },
  {
    "case": "controls",
    "step": "one-dry-run",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "update",
      "leon-café\nFORGED[U+0007][U+0085]🦀",
      "--dry-run"
    ],
    "exit": 0,
    "elapsedMs": 6763,
    "stdoutBytes": 50,
    "stderrBytes": 0,
    "stdoutSha256": "41d195f43e482eeccd9fd16d9c2fa853514b1cf17d959dfece4a41df27f32857",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "Skipping \"leon-café\\nFORGED🦀\" (source: path).\n",
    "stderr": ""
  },
  {
    "case": "controls",
    "step": "all-dry-run",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "update",
      "--all",
      "--dry-run"
    ],
    "exit": 0,
    "elapsedMs": 6644,
    "stdoutBytes": 50,
    "stderrBytes": 0,
    "stdoutSha256": "41d195f43e482eeccd9fd16d9c2fa853514b1cf17d959dfece4a41df27f32857",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "Skipping \"leon-café\\nFORGED🦀\" (source: path).\n",
    "stderr": ""
  }
]

Not tested: Actual npm/Git/ClawHub/hook package replacement, live integrity-drift prompting, interactive terminal-emulator effects, cross-OS execution, all Unicode format characters, broad suites and hosted CI were not tested. The real behavior proof covers disabled local path installs and their selected/bulk dry-run reports; it does not claim registry-update success or that every setup log line is sanitized.

AI-assisted implementation, tests and proof collection. All executions above actually ran. The following excerpt is from the actual local agent transcript; unrelated turns, tool internals, paths and credentials are omitted.

Agent Transcript

Redacted codex session transcript
source: [LOCAL_SESSION]
redaction: local paths, emails, phone-shaped strings, token-shaped strings, auth headers, auth query params
omitted: raw tool outputs, system/developer prompts, local paths, secrets, browser/session/auth details
stats: {"agent":"codex","entries":1,"user":0,"assistant":1,"toolCalls":0,"toolOutputsDropped":0,"web":0,"redactions":0,"omittedUnsafe":0,"rawEntries":3}

[assistant]
两个候选都已在未修改的 main 上通过真实 CLI 复现:插件更新提示会原样输出插件 ID 中的控制字符,空 marketplace 报告会原样输出路径中的控制字符。普通 Unicode、JSON 原值和实际安装文件的对照检查均通过;现在补回归测试并修复输出边界。

回归测试确认了两个缺口:空 marketplace 的新增场景失败,原有 14 项通过;插件更新的四类结果及目标错误提示共 5 个新增场景失败,原有 27 项通过。第三条转向检查本地 policy 报告:它能用真实终端和普通文件验证,不依赖模型或外部账号。

第三条也已通过真实终端复现:policy 报告会解释文件名中的控制字符,而 JSON 保留原值。它延续我们已合入的 policy CLI 方向,当前未发现同题竞品。第一条已进入提交、构建流程,第二条正在收尾检查;三条都补齐证据后再发布。

@clawsweeper

clawsweeper Bot commented Oct 28, 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 cli CLI command changes size: S labels Oct 28, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Oct 28, 2026
@clawsweeper

clawsweeper Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Sanitize human plugin and hook update reports and dynamic diagnostics using the existing terminal-text sanitizer.

Example: Run plugins update --all --dry-run after installing a local plugin whose ID contains café, a newline, FORGED, BEL, C1 NEL, and 🦀.

  • Before: The skip report emits the embedded newline and terminal controls.
  • After: The report displays a literal \n, removes BEL/C1 controls, preserves café and 🦀, and retains the original stored ID.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused existing-owner repair with real CLI before/after evidence, relevant regressions, passing exact-head gates, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Complete inline baseline and exact-head captures exercise the built plugins update CLI on Linux with isolated local installations, ordinary Unicode and control-bearing IDs, and selected/bulk dry runs; GREEN safely renders the reports with unchanged exit behavior and independently reread raw state.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Accepted plugin metadata can ring the terminal bell or forge lines in human update reports.
Reason: A narrow rendering repair protects readable diagnostics while preserving the established update and storage contracts.

Merge readiness

✅ Ready for maintainer review

Keep this PR: it fixes a concrete terminal-output defect still present on current main, with convincing CLI proof and no actionable findings.

Priority: P2
Reviewed head: 52d6150dc3e59ed981670e173070661e9bc8d3e0

Before merge

None.

Findings

None.

Agent review details

How this fits together

The plugin update CLI selects installed plugin and hook packages, invokes their update owners, and renders outcomes and integrity prompts to stdout or stderr.

flowchart TD
  A[Plugin update CLI] --> B[Target selection]
  B --> C[Plugin and hook updaters]
  C --> D[Outcomes and integrity diagnostics]
  D --> E[Existing terminal sanitizer]
  E --> F[Severity styling and terminal output]
Loading

Technical review

Best possible solution:

Merge the focused output-boundary fix while preserving raw identities, update policy, persistence, and existing severity routing.

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

Current-main source emits outcome messages directly, and supplied baseline CLI captures demonstrate the failure using accepted local plugin metadata; no target code was executed during this review.

Is this the best way to solve the issue?

The existing command renderer is the appropriate owner: sanitizing at egress fixes both plugin and hook reports without changing valid identifiers or adding a parallel sanitizer.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Shared outcome reporting keeps the original intent (a75c3ad: Centralize plugin and hook outcome logging; later consolidation retained severity and failure handling.)
  • Integrity-drift reporting keeps the original intent (ad08bd7: Share integrity confirmation and update settlement ownership between plugin and hook paths.)
  • Selection, ownership, and config-preflight diagnostics keeps the original intent (fix(cli): harden official plugin recovery #93325: Preserve config ownership and reject unsafe mutations before updater effects; subsequent package-ownership and multi-target changes retained actionable diagnostics.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit fa468f6 adds src/cli/plugins-update-command.ts:84 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: fa468f6a64c4; files: src/cli/plugins-update-command.ts)
  • Vincent Koc: Raw commit 767e828 adds src/cli/plugins-update-command.ts:250 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 767e8280ac7c; files: src/cli/plugins-update-command.ts)

PR surface

Source +11, Tests +51. Total +62 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 27 16 +11
Tests 1 51 0 +51
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 78 16 +62

Labels

Label changes:

  • add P2: Package-derived controls can forge human update report lines, but the demonstrated defect does not change package selection, persisted data, or update execution.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Package-derived controls can forge human update report lines, but the demonstrated defect does not change package selection, persisted data, or update execution.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 27, 2026, 10:44 PM ET / October 28, 2026, 02:44 UTC.

obviyus added a commit that referenced this pull request Oct 28, 2026
…amilies (#186502)

fix(cli): route remaining CLI reports through the terminal-text owner

After #185927 added one owner for escaping untrusted values in CLI output, contributors kept opening one PR per command to escape the next report. This moves the remaining human-readable reports in the plugins, secrets, sessions, memory and memory-wiki, workboard, backup, pairing, oc-path, config and setup commands onto `terminalText` / `displayPath`, and extends the owner to neutralize bidirectional control characters. JSON output, persisted identities, raw exports and the CLI's own colors are unchanged, and the trusted styling of `renderTable` is untouched.

This absorbs the per-site fixes from @Leon-SK668 (#184454, #184379, #185374, #186449, #184396, #184788, #184813, #184394), @huwei-xydt (#185895, #185719), @wangmiao0668000666 (#175600, #175181, #175179), @SunnyShu0925 (#184747), @KrasimirKralev (#184597) and @arpe1618 (#150599), whose original commits are kept. Families no PR touched (update, Doctor, install-trust producers and others) are listed under "Not fixed here".

Evidence: 85 built-CLI invocations per ref with crafted control and bidi characters in the reported values, captured as raw stdout bytes. Main printed the raw sequences; this change printed them neutralized, with identical normal colors and unchanged JSON. Details: #186502 (comment).

Co-authored-by: 胡伟0668000622 <[email protected]>
Co-authored-by: Claude Code <[email protected]>
Co-authored-by: Leon-SK668 <[email protected]>
Co-authored-by: wangmiao0668000666 <[email protected]>
Co-authored-by: SunnyShu <0668000539@local>
Co-authored-by: Krasimir Kralev <[email protected]>
Co-authored-by: arpe1618 <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
@obviyus

obviyus commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Thanks @Leon-SK668. This is now fixed at the root in #186502 (3bcca4f), which routes the remaining CLI reports through the shared terminalText owner from terminal-core. Your commit is kept in that merge and you're credited as co-author, so I'm closing this one as covered. For new output sites, please pass untrusted values through terminalText (or displayPath for paths) rather than opening a PR per command.

@obviyus obviyus closed this Oct 28, 2026
@Leon-SK668

Copy link
Copy Markdown
Contributor Author

Thanks for the reminder and for pulling these fixes together, @obviyus! I'll use the shared helpers and keep related fixes together in future PRs.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 29, 2026
…amilies (openclaw#186502)

fix(cli): route remaining CLI reports through the terminal-text owner

After openclaw#185927 added one owner for escaping untrusted values in CLI output, contributors kept opening one PR per command to escape the next report. This moves the remaining human-readable reports in the plugins, secrets, sessions, memory and memory-wiki, workboard, backup, pairing, oc-path, config and setup commands onto `terminalText` / `displayPath`, and extends the owner to neutralize bidirectional control characters. JSON output, persisted identities, raw exports and the CLI's own colors are unchanged, and the trusted styling of `renderTable` is untouched.

This absorbs the per-site fixes from @Leon-SK668 (openclaw#184454, openclaw#184379, openclaw#185374, openclaw#186449, openclaw#184396, openclaw#184788, openclaw#184813, openclaw#184394), @huwei-xydt (openclaw#185895, openclaw#185719), @wangmiao0668000666 (openclaw#175600, openclaw#175181, openclaw#175179), @SunnyShu0925 (openclaw#184747), @KrasimirKralev (openclaw#184597) and @arpe1618 (openclaw#150599), whose original commits are kept. Families no PR touched (update, Doctor, install-trust producers and others) are listed under "Not fixed here".

Evidence: 85 built-CLI invocations per ref with crafted control and bidi characters in the reported values, captured as raw stdout bytes. Main printed the raw sequences; this change printed them neutralized, with identical normal colors and unchanged JSON. Details: openclaw#186502 (comment).

Co-authored-by: 胡伟0668000622 <[email protected]>
Co-authored-by: Claude Code <[email protected]>
Co-authored-by: Leon-SK668 <[email protected]>
Co-authored-by: wangmiao0668000666 <[email protected]>
Co-authored-by: SunnyShu <0668000539@local>
Co-authored-by: Krasimir Kralev <[email protected]>
Co-authored-by: arpe1618 <[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 P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S 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