Skip to content

fix(plugins): trust official diagnostics installs - #77516

Merged
vincentkoc merged 1 commit into
mainfrom
fix/diagnostics-prometheus-trusted-install
May 4, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/diagnostics-prometheus-trusted-install

Conversation

@steipete

@steipete steipete commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary:

  • Mark install-record-backed official external plugin packages as trusted catalog installs in the manifest registry.
  • Carry that trust bit through plugin loader/registry service registration and grant internalDiagnostics only to diagnostics exporter services from bundled or trusted official external installs.
  • Add regressions for npm-installed @openclaw/diagnostics-prometheus, explicit plugins.load.paths config selection of the same install, unrecorded spoofed globals, and service-level spoofing.

Fixes #76628.

Verification:

  • pnpm test src/plugins/manifest-registry.test.ts src/plugins/services.test.ts
  • git diff --check HEAD~1..HEAD
  • pnpm check:changelog-attributions
  • Testbox pnpm check:changed (tbx_01kqtah5h9d98atf43hvrg1s10)

@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels May 4, 2026
@clawsweeper

clawsweeper Bot commented May 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Summary
The PR marks install-record-backed official external plugin records as trusted, propagates that bit through plugin loading and service registration, grants internalDiagnostics to bundled or trusted official diagnostics exporters, and adds regression tests plus a changelog entry.

Reproducibility: yes. Source inspection on current main shows npm-installed official diagnostics plugins are discovered outside the bundled origin, while the service context only grants internalDiagnostics to bundled diagnostics exporters and the Prometheus service returns early without it.

Next step before merge
No repair lane is needed because I found no discrete actionable defect in the proposed patch; remaining action is ordinary maintainer review and merge handling.

Security
Cleared: The diff touches a privileged diagnostics capability but keeps it limited to bundled or install-record-backed official catalog packages and adds spoofing regressions; no workflow, dependency, or package-source change was introduced.

Review details

Best possible solution:

Land this PR after normal maintainer approval and check gating, then let the closing reference resolve #76628.

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

Yes. Source inspection on current main shows npm-installed official diagnostics plugins are discovered outside the bundled origin, while the service context only grants internalDiagnostics to bundled diagnostics exporters and the Prometheus service returns early without it.

Is this the best way to solve the issue?

Yes. The PR is the narrowest maintainable fix I found: it reuses install-record and official-catalog provenance instead of broadening the grant to arbitrary global plugins, then carries one trust bit to the existing service-context gate with spoofing regressions.

What I checked:

Likely related people:

  • Vincent Koc: Prior diagnostics trust triage on [Bug]: @openclaw/diagnostics-prometheus loads via npm but internalDiagnostics capability is bundled-only — empty metrics + ERROR spam (v2026.5.2) #76628 identified Vincent’s recent work on the diagnostics exporter, Prometheus docs, package metadata, and official install/catalog paths; local commit metadata confirms adjacent recent install/catalog commits. (role: recent maintainer; confidence: high; commits: c7bbb3f9af36, 26f2241a87fc, 4545a0ed61ee; files: src/plugins/services.ts, extensions/diagnostics-prometheus/src/service.ts, scripts/lib/official-external-plugin-catalog.json)
  • Eva: Local blame on current main attributes the current services gate, manifest registry installed-record matching, Prometheus exporter service, and official catalog lines to the project-session extension slots commit. (role: current-line maintainer; confidence: medium; commits: cb3853587576; files: src/plugins/services.ts, src/plugins/manifest-registry.ts, extensions/diagnostics-prometheus/src/service.ts)
  • Gustavo Madeira Santana: Local metadata confirms prior diagnostics-otel plugin-sdk migration work in the same diagnostics exporter family, relevant if maintainers compare OTel and Prometheus trust behavior. (role: adjacent diagnostics exporter maintainer; confidence: low; commits: 54d78bb423d9; files: extensions/diagnostics-otel)

Remaining risk / open question:

  • I did not run a live gateway/npm/ClawHub install in this read-only review; the source path and PR/CI evidence are strong, but live package proof remains useful before final release confidence.
  • The approach intentionally treats OpenClaw install records plus official catalog metadata as privileged provenance for internalDiagnostics, so maintainers should be comfortable with that trust boundary.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 4fab34a63b17.

@vincentkoc
vincentkoc merged commit 0605692 into main May 4, 2026
112 of 113 checks passed
@vincentkoc
vincentkoc deleted the fix/diagnostics-prometheus-trusted-install branch May 4, 2026 20:39
@clawsweeper clawsweeper Bot mentioned this pull request May 4, 2026
5 of 25 tasks
lxe pushed a commit to lxe/openclaw that referenced this pull request May 6, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: @openclaw/diagnostics-prometheus loads via npm but internalDiagnostics capability is bundled-only — empty metrics + ERROR spam (v2026.5.2)

2 participants