fix(secrets): register secret targets for installed-origin plugins#104347
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 11, 2026, 6:11 AM ET / 10:11 UTC. Summary PR surface: Source +5, Tests +25. Total +30 across 2 files. Reproducibility: yes. A real npm-installed Exa plugin reproduces current main's exact unknown-target gateway response, and the same setup on this head passes gateway validation and reaches provider handling. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Land this focused manifest-scoped fix, preserve the real installed-plugin proof in the PR record, and close #104383 as the overlapping candidate unless maintainers narrowly extract a demonstrably necessary gateway regression test from it. Do we have a high-confidence way to reproduce the issue? Yes. A real npm-installed Exa plugin reproduces current main's exact unknown-target gateway response, and the same setup on this head passes gateway validation and reaches provider handling. Is this the best way to solve the issue? Yes. Using the canonical manifest metadata across plugin origins is the narrowest ownership-correct fix, matches the existing channel target pattern, avoids provider-specific IDs, and preserves separate activation and resolution constraints. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c702719eda74. Label changesLabel justifications:
Evidence reviewedPR surface: Source +5, Tests +25. Total +30 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
Review history (1 earlier review cycle)
|
Live before/after with an actually installed Exa plugin (real gateway + real CLI)Real setup, matching the issue's topology: fresh BEFORE — pristine (byte-identical to the issue's report) AFTER — this PR's dist, identical setup and command: and the CLI path proceeds past the gate into provider selection and provider-side credential handling: The remaining @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
The secret target registry filtered plugin-derived entries to bundled-origin records only, so when the Exa web providers moved into an installed plugin package their config targets vanished: the gateway's isKnownSecretTargetId rejected the CLI-discovered target and infer web search failed with an unresolved SecretRef before provider I/O (regression of openclaw#82621/openclaw#82798). Web-provider and config-contract entries now come from every active plugin manifest record, matching what channel entries already did; entries stay manifest-scoped (web-provider contract + sensitive hint, or declared secretInput paths), so non-bundled origins cannot widen target paths beyond their own declared contracts. Fixes openclaw#104320
2e9ca5b to
9a700e8
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(secrets): register secret targets for installed-origin plugins This is item 1/1 in the current shard. Shard 0/1. 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. |
|
Merged via squash.
|
* origin/main: (24 commits) fix(agents): keep compaction on live session model (#95713) fix(plugin-sdk): guard provider catalog live URL parsing against malformed responses (#109986) chore(cli): drop dead classifiers and single-use wrappers left by fallback removal (#112191) feat(ui): expand the lobster pet's random universe (#112073) chore(ci): audit dependency fingerprint exports (#112190) fix(ui): preserve graphemes in provider icons (#109509) fix(ui): align settings search with navigation rows (#112172) fix(agents): allow configless gateway rebind to activate standalone owner (#111841) fix(secrets): register secret targets for installed-origin plugins (#104347) improve(ui): show real machine identity in the place picker (#112162) fix: webChat scrollback history is too limited — older assistant replies and tool outputs disappear when scrolling… (#104250) test(ui): run DOM-free suites in Node (#112031) feat(nodes): make computer.act eligibility capability-based for desktop nodes (#112107) fix(apps): harden mobile gateway and watch state fix(ci): restore Z.AI API Platform validation (#112171) fix(ui): prevent Logs controls from overlapping (#112170) fix #95291: message tool fails to deliver files/images on Feishu (400 volc-dcdn / write ECONNRESET) while same Lark SDK upload succeeds standalone (#95514) refactor(cli)!: remove automatic gateway→embedded fallback from openclaw agent (#112074) refactor: move provider transports into packages/ai behind a typed host port (#111669) fix(anthropic): complete transcript reverse-scan windows across short reads (#109431) ...
…penclaw#104347) The secret target registry filtered plugin-derived entries to bundled-origin records only, so when the Exa web providers moved into an installed plugin package their config targets vanished: the gateway's isKnownSecretTargetId rejected the CLI-discovered target and infer web search failed with an unresolved SecretRef before provider I/O (regression of openclaw#82621/openclaw#82798). Web-provider and config-contract entries now come from every active plugin manifest record, matching what channel entries already did; entries stay manifest-scoped (web-provider contract + sensitive hint, or declared secretInput paths), so non-bundled origins cannot widen target paths beyond their own declared contracts. Fixes openclaw#104320
What Problem This Solves
#104320 (P1, regression of #82621/#82798): the secret target registry built its plugin-derived entries from bundled-origin records only (
target-registry-data.tsfilteredrecord.origin === "bundled"). When the Exa web providers moved out of bundled origin into an installed plugin package, their config targets (plugins.entries.exa.config.webSearch.apiKey) vanished from the gateway's known-target registry —secrets.resolverejects the CLI-discovered target withunknown target id, andinfer web searchfails on an unresolved SecretRef before provider I/O, even though the plugin is loaded, enabled, andsecrets auditreports full resolvability.Why This Change Was Made
Per the triage's best-solution shape ("build the known-target registry from active installed-plugin manifest metadata, while preserving plugin enablement, manifest-first laziness, strict allowed-path scoping, and provider-specific ownership"):
configContracts.secretInputs. A non-bundled origin cannot widen target paths beyond its own declared contracts, and no plugin runtime is loaded (metadata snapshot only — laziness preserved).isKnownSecretTargetIdremains a closed registry; the registry just covers what's actually installed.User Impact
Users of installed (non-bundled) provider plugins with SecretRef-backed credentials — the Exa split being the shipped example — get working
infer web search/web fetchcredential resolution again instead of a hardINVALID_REQUESTfrom the gateway.Evidence
Executed real-handler before/after (the issue's exact
secrets.resolveparams driven through the realcreateSecretsHandlershandler, with an installed-origin Exa manifest record in the metadata snapshot):mainok: false—INVALID_REQUEST: invalid secrets.resolve params: unknown target id "plugins.entries.exa.config.webSearch.apiKey"(byte-identical to the issue's report)ok: true— validation passes, resolution proceedsRegression test (
target-registry-data.current-snapshot.test.ts): an installed-origin (origin: "global") record with the web-search contract + sensitive hint + declared secretInput produces the registry entry andisKnownSecretTargetIdaccepts it. Fails on prior head withexpected [ 'auth-profiles.api_key.key', …(37) ] to include 'plugins.entries.exa.config.webSearch.apiKey'.Validation: full
src/secretssuite 553/553;tsgo:core0; oxlint/oxfmt clean.Fixes #104320
🤖 Generated with Claude Code
https://claude.ai/code/session_01AJogTw4aGDiacwqju1uod6