Skip to content

fix(plugins): show package provenance in CLI and chat inspection - #133140

Merged
steipete merged 3 commits into
mainfrom
codex/qa-20260830-plugins-inspect
Aug 30, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/qa-20260830-plugins-inspect

Conversation

@steipete

@steipete steipete commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Both the CLI and chat plugin inspectors looked up installation records by runtime child ID, although multi-entry packages persist one record under their package owner. Inspecting a child therefore lost its package provenance and could attribute an unrelated same-ID record when ownership was missing or conflicting.

Why This Change Was Made

Both entry points now use the existing authoritative package-ownership resolver against the same metadata snapshot that builds the inspection report. The CLI removes its separate ledger read. The chat handler removes a single-caller state wrapper so runtime inspection owns its prepared snapshot while listing and toggles retain the existing cold report path.

Production LOC: +45/-78, net −33. Tests and test support: +370/-123, net +247; docs: +4. No configuration, persistence, schema, protocol, dependency, SDK, authorization, or plugin-write policy changes.

User Impact

plugins inspect <child> and all-plugin JSON show the shared package source, version, path, and artifact metadata. Chat /plugins inspect, show, and get do the same for individual children and all.

Existing behavior stays intact: CLI inspection is static unless --runtime is requested; chat inspection still loads runtime diagnostics; chat single replies remain flat and all replies remain wrapped. Missing or ambiguous ownership produces no attributed provenance (install: null in chat). Both command references are updated.

Evidence

  • Regression-before: both CLI default/runtime cases failed on frozen main. Four chat cases then failed before the sibling repair: missing child provenance and unrelated same-ID attribution for missing, ambiguous, and conflicting ownership.
  • Final focused proof: 69 tests pass across CLI inspection, chat inspection/toggles, chat install, and ClawHub selectors. This covers both children, aliases, single/all/text/JSON output, runtime behavior, ownership failures, invalid config, bare inspection, and existing authorization/write controls. Another 28 ownership/persistence sibling tests passed for the unchanged canonical resolver.
  • Whole Gateway before/after: a real temporary Gateway and authenticated WebSocket client execute chat.send through command dispatch to final chat events. Enabled-child inspect, disabled-child show, singular /plugin get, and inspect all all return install: null before and the shared package record afterward. Single/all wire shapes and the runtime import/registration sequence match. Both Gateways and their process groups shut down cleanly.
  • Independent no-mock CLI and chat probes use production metadata persistence. They reproduce and verify the repair, preserve disabled-child state and runtime boundaries, reject unauthorized readers and read-only plugin writes, and leave configuration unchanged. Independent source review found no actionable defect.
  • Packaged CLI proof built the canonical tarball, installed it in a fresh prefix, installed a two-child npm-pack plugin, and passed default/runtime/all JSON/text inspection. This proof applies to the unchanged CLI production source; the widened chat path is covered by the whole-Gateway proof above. The Testbox was stopped. Tarball SHA-256: 56c21b8f862e7d03603adfa2daee03b391cced6d0817bdb03c4066668c484a13.

Closes #133138.

Separate follow-up: provider recovery installation also needs package-owner provenance for its source, version, and integrity. That installer-facing repair has its own investigation and proof lane; this PR keeps the CLI/chat inspection boundary coherent.

Exact widened head: 820e7819760558c5eca1fdc42820ab689680703f. Fresh complete-diff Codex autoreview is scoped-clean at its default P0 threshold, and independent source/behavior review found no actionable defect. The separate read-only review found no actionable issue at ea16dde; the only later change deletes an unused type import caught by the broad typecheck, with its own clean autoreview. The complete original changed-gate plan now passes: the initial passing checks were retained, then both typechecks, lint, and all remaining guards completed successfully. The independent verifier has also bound its clean verdict to the final commit. Hosted CI and native landing must cover the final head; earlier green CI at 4d2c17f is not the widened head's gate.

@clawsweeper

clawsweeper Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes size: M maintainer Maintainer-authored PR labels Aug 30, 2026
@steipete
steipete marked this pull request as ready for review August 30, 2026 06:58
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 30, 2026
@clawsweeper

clawsweeper Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 3:53 AM ET / 07:53 UTC.

ClawSweeper review

What this changes

The PR makes CLI and chat plugin inspection show package-level installation provenance for child entries in multi-entry plugin packages.

Regression provenance

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

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open. The patch is a focused repair using the existing authoritative package-ownership resolver in both inspection surfaces; current main does not yet contain these changes, and this maintainer-owned PR should proceed through ordinary landing review.

Priority: P3
Reviewed head: 820e7819760558c5eca1fdc42820ab689680703f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is focused, follows the existing ownership contract, and covers the CLI and chat inspection boundaries.
Proof confidence 🌊 off-meta tidepool Not applicable: The repository state identifies this as a maintainer-authored PR, so the external-contributor proof gate does not apply; the submitted body additionally describes packaged CLI and authenticated Gateway evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The repository state identifies this as a maintainer-authored PR, so the external-contributor proof gate does not apply; the submitted body additionally describes packaged CLI and authenticated Gateway evidence.
Evidence reviewed 6 items Ownership contract: The existing resolver returns an install record only for authoritative, unambiguous package ownership and rejects missing, conflicting, duplicate, and unsafe ownership states.
CLI repair: CLI inspection prepares one metadata snapshot, resolves each displayed child through the ownership resolver, and reuses that snapshot for static and runtime reports.
Chat repair: Chat inspection loads the same prepared metadata snapshot as its diagnostics report and emits null rather than an unrelated record when ownership resolution fails.
Findings None None.
Security None None.

How this fits together

Plugin inspection reads configured plugin metadata and renders package and runtime details to operators through the CLI or chat commands. Package ownership maps a runtime child entry to the shared installed package record before that provenance is displayed.

flowchart LR
  A[Plugin configuration] --> B[Metadata snapshot]
  B --> C[Package ownership lookup]
  C --> D[CLI inspection]
  C --> E[Chat inspection]
  D --> F[Operator provenance output]
  E --> F
Loading

Before merge

  • Complete next step (P2) - This active maintainer-authored implementation PR has no discrete repair finding; it needs normal landing review.
Agent review details

Security

None.

PR surface

Source -32, Tests +246, Docs +4. Total +218 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 3 48 80 -32
Tests 2 367 121 +246
Docs 2 4 0 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 419 201 +218

Review metrics

Metric Value Why it matters
Production versus test delta production −33, tests/test support +247, docs +4 The repair removes separate record-reading paths while adding coverage for child-package ownership and unsafe attribution cases.

Stored data model

Persistent data-model change detected: vector/embedding metadata: src/auto-reply/reply/commands-plugins.ts, vector/embedding metadata: src/cli/plugins-inspect-command.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #133138
Summary: This PR is the implementation candidate for the linked multi-entry package inspection defect.

Members:

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

Technical review

Best possible solution:

Land the shared ownership-resolution approach so every inspection surface reports a child package’s provenance only when that package ownership is authoritative.

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

Yes. The prior CLI implementation indexed records by runtime child ID, while the authoritative resolver maps a child to its package owner; focused regression coverage exercises both the corrected and unsafe-ownership paths.

Is this the best way to solve the issue?

Yes. Reusing the established ownership resolver and the report’s metadata snapshot removes the wrong join without creating another ownership policy or extra metadata read.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This corrects low-severity operator inspection output without changing plugin installation, activation, or message delivery.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The repository state identifies this as a maintainer-authored PR, so the external-contributor proof gate does not apply; the submitted body additionally describes packaged CLI and authenticated Gateway evidence.

Evidence

What I checked:

Likely related people:

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

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-30T07:07:33.100Z sha 4d2c17f :: needs maintainer review before merge. :: none
  • reviewed 2026-08-30T07:16:55.034Z sha 4d2c17f :: needs maintainer review before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor Author

Reviewed the latest completed ClawSweeper review against unchanged head 4d2c17f045abceaa98b883778259108acbda5467.

Both before-merge items are satisfied: exact-head CI completed successfully, and no repair finding remains. The independent reviewer and separate read-only Codex review also found no actionable issue at this commit. The fresh packaged install and real inspection proof are linked in the PR body.

The generated “vector/embedding metadata” stored-data warning does not apply to this diff: production changes are confined to reading the existing plugin metadata snapshot, resolving ownership through the existing resolver, and rendering the record. No schema, persisted projection, migration, configuration, or write path changes. Production delta remains −3 lines, with test support counted separately.

No additional Rank-up moves are listed in that review. Native prepare/merge gates remain required; the newer queued review does not change the reviewed commit.

@steipete steipete changed the title fix(plugins): show install metadata for package child entries fix(plugins): show package provenance in CLI and chat inspection Aug 30, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The inspection repair now includes the chat sibling noted in the previous review. Exact head: ea16dde556ab25bd6c03b00472e6ddc1203e6266. Both CLI and chat resolve the existing package owner; the chat command also removes its redundant private state wrapper. Production is −32 lines across the complete change.

The widened path has four failing-before regressions, 69 passing CLI/chat/install tests, independent no-mock behavior proof, and actual authenticated Gateway chat.send before/after evidence. Enabled/disabled children and inspect/show/get/all now return shared provenance while runtime behavior, reply shapes, and authorization/write controls remain intact. The PR body records proof boundaries and the separate provider recovery installation follow-up. The new head's hosted CI and final broad local gate are still running.

@clawsweeper

clawsweeper Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete

Copy link
Copy Markdown
Contributor Author

Final landing review for 820e7819760558c5eca1fdc42820ab689680703f is complete. The latest ClawSweeper review has no correctness or security findings and lists no additional Rank-up moves beyond ordinary landing review. Independent source/behavior review and the final exact-head Codex review are clean.

Final CI is green. Its completed preflight checked out 70319290955879be190564e86f16e1517bb1ebdd, whose parents are main c04bee452e705617a5baaf19904f092fbf1ac438 and this exact PR head. The main parent contains the canonical CI repair be5e79ca4713c33a11ccd56b2d728c19f0779f3d.

All planned local gates pass after removing the unused type import. The PR body records 69 focused tests, 28 unchanged ownership sibling tests, packaged CLI proof, and actual authenticated Gateway before/after chat output. Production is −33 lines. The generated stored-data warning does not apply: neither inspection path changes SQLite schema, persisted projections, migrations, configuration, or writes.

Proceeding through the native prepare/merge gates without changing the reviewed source.

@steipete
steipete merged commit a4f6bdf into main Aug 30, 2026
243 of 244 checks passed
@steipete
steipete deleted the codex/qa-20260830-plugins-inspect branch August 30, 2026 08:00
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 31, 2026
…nclaw#133140)

* fix(plugins): show package install metadata when inspecting child entries

* fix(plugins): share package ownership in chat inspection

* chore(plugins): remove unused chat inspection type import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin inspection omits install metadata for multi-entry packages

1 participant