Repository navigation
fix: keep keyless web search on secrets fast path - #107155
galiniliev wants to merge 4 commits into
Conversation
047acab to
adbd1b0
Compare
|
Codex review: found issues before merge. Reviewed July 31, 2026, 8:58 AM ET / 12:58 UTC. ClawSweeper reviewWhat this changesThis PR adds a secrets-startup fast-path predicate for a selected web-search plugin whose entry sets Merge readiness⛔ Blocked by patch quality or review findings - 8 items remain Keep this PR open for a maintainer decision. Its real gateway-startup proof is strong, but the unchanged P1 blocker remains: core derives secrets fast-path safety from the plugin-owned, opaque Priority: P1 Review scores
Verification
How this fits togetherDuring gateway startup, the secrets subsystem decides whether it can safely skip full SecretRef and web-tool preparation. Plugin configuration feeds that decision today, while plugin manifests are the product boundary intended to describe plugin capabilities to core. flowchart LR
Config[Gateway configuration] --> FastPath[Secrets fast-path decision]
Policy[Plugin enable and allow policy] --> FastPath
PluginConfig[Plugin-owned web-search config] --> FastPath
FastPath -->|Safe and credential-free| Startup[Gateway ready without full resolver]
FastPath -->|Credential or unknown contract| Resolver[Full secret and web-tool preparation]
Resolver --> Startup
Decision needed
Why: This determines the permanent plugin-to-core security contract; a branch-local interpretation of an opaque configuration key cannot safely choose that contract. Before merge
Findings
Agent review detailsSecurityNeeds attention: The diff introduces a concrete secret-resolution boundary risk by treating an opaque plugin configuration field as evidence that no secret materialization is needed. PR surfaceSource +77, Tests +290. Total +367 across 2 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Define an explicit, fail-closed manifest-owned declaration for conditional keyless web-search credential behavior, rebuild the narrow fast-path logic on current main, and prove both the declared keyless path and every unknown or credential-bearing fallback path. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible with high confidence: current main’s Is this the best way to solve the issue? No: the branch proves the optimization but is not the best durable fix because it promotes a plugin-private configuration field into a core secret-resolution contract. A manifest-owned, fail-closed declaration is the narrower maintainable boundary if maintainers approve the optimization. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2f80f87c32b5. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Current-main contract audit for the remaining P1: Gateway already has the validated plugin manifest registry before secrets WebIQ is conditional, so an unconditional Could plugin/secrets owners choose between these two directions?
This lets us delete core's direct interpretation of the opaque |
|
Owner decision refresh for exact head Current live rollup has no failing or pending checks, and the earlier Gateway startup proof remains sufficient. The remaining blocker is still the contract shape: core should not infer a secrets fast-path from the plugin-private Could the secrets/provider owners choose the intended direction?
Once that decision is made, the existing PR can be rebuilt on the approved contract rather than mechanically rebasing the stale private-config predicate. |
Closes #107154
What Problem This Solves
Deployments using host-proxied, keyless web search fell off the secrets runtime fast path during startup even though OpenClaw does not hold the search credential in-container.
Why This Change Was Made
The fast-path guard now recognizes a generic keyless host-proxy shape:
tools.web.search.providermust name a provider, and the matchingplugins.entries.<provider>.config.webSearch.omitAuthvalue must be exactlytrue. The selected provider must remain enabled by plugin policy. Unrelated allowed plugins and load paths are supported, matching the host's real plugin loadout.Credential-bearing search values, a denied or omitted selected provider, mismatched provider entries, legacy
x_search, active web-fetch provider configuration, and additional plugin web-provider surfaces still select the full resolver path.User Impact
Operators using a keyless web-search plugin through a host proxy can keep the startup secrets fast path without moving the provider credential into the OpenClaw container. Existing credentialed and mismatched configurations continue through full secret resolution.
Real behavior proof
Behavior or issue addressed:
Keyless host-proxied web search must keep gateway startup on the secrets fast path with the host's unrelated plugin allow/load entries, while a credential-bearing control must still load the full resolver.
Real environment tested:
Ubuntu 24.04 under WSL2, Node source checkout at exact PR commit
ff85c33c553de8c87e9f5d3098764672cc76cd45,pnpm install --frozen-lockfile, and the realopenclaw gateway runstartup path. The proof used minimal locally loaded WorkIQ, tools-code-mode, and WebIQ plugin fixtures plus the bundled diagnostics plugin to reproduce the Lobster-shaped plugin policy without contacting a private host service.Exact steps or command run after this patch:
CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/secrets/runtime.fast-path.test.ts --reporter=verboseomitAuth: true), the four-plugin allow list, and non-empty plugin load paths. A narrow Node loader hook recorded only imports whose resolved URL containedruntime-prepare.plugins.entries.webiq.config.webSearch.apiKeyset to a resolved environmentSecretRefas the credential-bearing control.SIGTERMthrough GNUtimeoutand verified clean shutdown.Evidence after fix:
Observed result after fix:
The actual gateway startup path reached ready state with the Lobster-shaped keyless plugin loadout without loading the heavy secret resolver. Adding a credential-bearing SecretRef to the same provider caused the full resolver modules to load, and startup still completed successfully. The credential value was redacted from the captured output.
What was not tested:
The private Lobster container and its external host-proxy service were not available, so this did not execute a real outbound WebIQ request. Crabbox proof was attempted but its broker rejected history and lease access with HTTP 401, so no remote provider or run ID is claimed.