Repository navigation
fix(plugins): show package provenance in CLI and chat inspection - #133140
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 3:53 AM ET / 07:53 UTC. ClawSweeper reviewWhat this changesThe PR makes CLI and chat plugin inspection show package-level installation provenance for child entries in multi-entry plugin packages. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep 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 Review scores
Verification
How this fits togetherPlugin 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
Before merge
Agent review detailsSecurityNone. PR surfaceSource -32, Tests +246, Docs +4. Total +218 across 7 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Reviewed the latest completed ClawSweeper review against unchanged head 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. |
|
@clawsweeper re-review The inspection repair now includes the chat sibling noted in the previous review. Exact head: The widened path has four failing-before regressions, 69 passing CLI/chat/install tests, independent no-mock behavior proof, and actual authenticated Gateway |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Final landing review for Final CI is green. Its completed preflight checked out 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. |
|
Merged via squash.
|
…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
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, andgetdo the same for individual children andall.Existing behavior stays intact: CLI inspection is static unless
--runtimeis 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: nullin chat). Both command references are updated.Evidence
chat.sendthrough command dispatch to final chat events. Enabled-childinspect, disabled-childshow, singular/plugin get, andinspect allall returninstall: nullbefore 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.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 atea16dde; 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 at4d2c17fis not the widened head's gate.