Repository navigation
fix(web-search): honor sandbox provider trust during search - #191748
Conversation
Pass sandbox context to both web-search provider resolvers so their existing shared manifest filter rejects untrusted providers before tool creation. Keep bundled, verified official, and nonsandboxed provider behavior intact. Supersedes #144520, thanks @Finn763. Related: #144164. Co-authored-by: finn763 <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs real behavior proof before merge. What this changesThis PR forwards sandbox status through both web-search resolver routes into the existing provider trust filter. Example: A sandboxed agent searches using the configured workspace provider fixture-search.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 4 items remain Keep this PR open: it repairs a current sandbox trust-policy omission, but the new rejection path needs actionable recovery guidance. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe web-search runtime receives agent sandbox status and search arguments, resolves eligible plugin providers, and executes the selected provider to return search results. flowchart TD
A[Agent web search tool] --> B[Search request context]
B --> C[Runtime or plugin resolver]
C --> D[Shared manifest trust filter]
D --> E[Eligible provider registry]
E --> F[Provider tool execution]
F --> G[Search results]
Technical reviewBest possible solution: Keep the shared-filter repair and explain trust rejection using manifest metadata, with a visible route to select an eligible provider. Do we have a high-confidence way to reproduce the issue? Current-main source shows agent sandbox status reaching runWebSearch and being dropped before the shared trust predicate; this read-only review ran no target code. Is this the best way to solve the issue? Forwarding the existing flag is the smallest complete enforcement repair, but the newly reachable rejection needs recovery guidance without loading rejected plugin code. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3e3911e1d6d3. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: The patch restores the intended trust filter, but real-loader rejection before plugin side effects remains unverified. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -2, Tests +88, Other +1. Total +87 across 5 files. Added test files: 1. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 3, 2026, 2:46 AM ET / 07:46 UTC. |
Exercise an on-disk provider through manifest discovery and the real loader, checking import, registration, tool creation, and execution side effects. Replace the manually assembled registration fixture that failed typecheck. Give sandboxed callers an actionable provider requirement without loading rejected code or attributing every availability failure to trust policy. Co-authored-by: finn763 <[email protected]>
|
@clawsweeper re-review The reviewed head is replaced by a real-loader regression: an on-disk workspace provider is selected from unchanged existing config and records module import, registration, tool creation, and execution. Both sandboxed routes execute on main (red); with this head they reject with no trace file, while all six nonsandboxed/bundled controls execute. All 115 focused tests and touched-file formatting/lint pass on Blacksmith Testbox. The sandbox-only error now gives the eligible-provider recovery step without loading rejected code or claiming that every unavailable provider failed trust. PR body and proof are current. |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…#191748) Sandboxed web search dropped its session sandbox flag before resolving a provider, allowing configured untrusted workspace or external providers to execute. Carry that flag through both resolver routes into the existing shared manifest trust filter used by web fetch. Bundled, verified official, and nonsandboxed behavior stay intact. Give sandboxed callers an actionable availability hint without loading rejected provider code for diagnostics. Remove obsolete type exclusions, redundant request forwarding, and a duplicate inherited authStore field; production LOC is net +1. The 100-line regression allocation protects the real plugin-loader boundary. On main, two sandboxed rejection cases execute the workspace plugin unexpectedly; the fix passes both and all six controls, with no import, registration, tool creation, or execution trace for rejected code. All 115 focused tests and touched-file format/lint pass on Blacksmith Testbox. The final working tree received P0-P2 autoreview; its only index-only fixture finding was resolved by staging the reviewed replacement. Final CI passes tests, types, lint, builds and security. Its only failure is the existing shared test-line ceiling, six lines over budget, independently reproduced on clean main f77ae72. Own 100-line regression growth is exactly funded. Landing uses the native inherited-failure evidence route without relabeling failed CI. Supersedes openclaw#144520, thanks @Finn763. Related: openclaw#144164. Co-authored-by: finn763 <[email protected]>
Sandboxed web search dropped its session sandbox flag before resolving a provider, allowing configured untrusted workspace or external providers to execute. Carry that flag through both resolver routes into the existing shared manifest trust filter used by web fetch. Bundled, verified official, and nonsandboxed behavior stay intact. Give sandboxed callers an actionable availability hint without loading rejected provider code for diagnostics. Remove obsolete type exclusions, redundant request forwarding, and a duplicate inherited authStore field; production LOC is net +1. The 100-line regression allocation protects the real plugin-loader boundary. On main, two sandboxed rejection cases execute the workspace plugin unexpectedly; the fix passes both and all six controls, with no import, registration, tool creation, or execution trace for rejected code. All 115 focused tests and touched-file format/lint pass on Blacksmith Testbox. The final working tree received P0-P2 autoreview; its only index-only fixture finding was resolved by staging the reviewed replacement. Final CI passes tests, types, lint, builds and security. Its only failure is the existing shared test-line ceiling, six lines over budget, independently reproduced on clean main 31ad71a. Own 100-line regression growth is exactly funded. Landing uses the native inherited-failure evidence route without relabeling failed CI. Supersedes #144520, thanks @Finn763. Related: #144164. Co-authored-by: finn763 <[email protected]> Backport-source: 3e3935a Backport-scope: Propagate sandboxed through request context and provider resolution plus C1 preparation and synchronous availability entrypoints. Preserve C1 authStore parameter and existing official-provider trust predicate; no blanket plugin trust change. Adapted production backport for release/2026.11.2. Upstream validation descriptions refer to source history; candidate regression coverage and remote qualification are tracked separately. Co-authored-by: RomneyDa <[email protected]>
Sandboxed web search dropped its session sandbox flag before resolving a provider, allowing configured untrusted workspace or external providers to execute. Carry that flag through both resolver routes into the existing shared manifest trust filter used by web fetch. Bundled, verified official, and nonsandboxed behavior stay intact. Give sandboxed callers an actionable availability hint without loading rejected provider code for diagnostics. Remove obsolete type exclusions, redundant request forwarding, and a duplicate inherited authStore field; production LOC is net +1. The 100-line regression allocation protects the real plugin-loader boundary. On main, two sandboxed rejection cases execute the workspace plugin unexpectedly; the fix passes both and all six controls, with no import, registration, tool creation, or execution trace for rejected code. All 115 focused tests and touched-file format/lint pass on Blacksmith Testbox. The final working tree received P0-P2 autoreview; its only index-only fixture finding was resolved by staging the reviewed replacement. Final CI passes tests, types, lint, builds and security. Its only failure is the existing shared test-line ceiling, six lines over budget, independently reproduced on clean main 31ad71a. Own 100-line regression growth is exactly funded. Landing uses the native inherited-failure evidence route without relabeling failed CI. Supersedes #144520, thanks @Finn763. Related: #144164. Co-authored-by: finn763 <[email protected]> (cherry picked from commit 3e3935a) Release adaptation (OpenClaw 2026.11.6): - Cherry-picked onto parent candidate 82f1197 after the scoped #189423 backport. No production or regression-test adaptation required; preserved release's existing tool-result-error import. - Existing manifest trust filtering and explicit empty scopes remain the sole selection authority; sandboxed is now carried through context and both existing selection routes. No new trust owner, configuration, or permissions. - Companion audit pinned at bd692e9: e333f7e (#197657) removes the allocation after main's ratchet reset, not applicable here; retain source's 100-line allocation. a30ec5d (#177228) changes native-research/account-pinning execution, not a prerequisite for sandbox selection and excluded. No later PR mentions. Existing shared trust filter/empty-scope refusal is present-equivalent. Other heuristic runtime-name references do not consume the changed contract. Release validation (local isolated worktree): - Before this pick, source's real-plugin-loader regression: 2 failed / 6 passed. Both sandboxed workspace cases executed rejected code through runtime preference true and false. - After this pick: 95 passed across 7 runtime/owner suites, including all 8 regression cases and shared empty-scope cases. Additional tool, provider-error, fetch-provider and setup consumers pass (counts recorded in lane report). - Changed-TypeScript type-aware lint: 4 files clean using supported core config. Changed-file formatting and git diff --check clean. Manual self-review/pr-simplify: direct propagation into existing owner, no duplicate policy; 3 production files, net +1 line. - No real model/Gateway end-to-end run or broad gates in this lane; parent owns final release qualification. Upstream claims above describe source validation, not release qualification. One attempted suite was absent on this release and was corrected before running; not a product failure. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 3be9be1ddaa4a19d3672994f03bf580fcf20b6c3)
Supersedes #144520, thanks @Finn763.
Related: #144164.
What Problem This Solves
Fixes sandboxed agents executing a configured third-party web-search provider that the existing sandbox trust policy excludes.
User Impact
Sandboxed search permits only bundled or verified official providers, matching web fetch. Existing sandboxed configurations selecting third-party providers must enable or select an eligible provider to restore search; the execution error states that recovery step. Nonsandboxed search keeps its existing behavior.
Why This Change Was Made
Carry the session sandbox flag through both search resolver routes into the existing shared manifest trust filter. The sandbox-only availability hint does not load rejected provider code or mislabel unavailable eligible providers as trust failures.
Production LOC is net +1: the recovery hint is offset by removing obsolete type exclusions, redundant request-field forwarding, and a duplicate inherited authStore field. No second trust policy is added.
Evidence
5918b1d7bf4bca308322e0c0a7f5b5acb1311d48: both sandboxed cases executed the configured workspace plugin instead of rejecting; six controls passed. With the fix, all eight cases pass. The rejected plugin leaves no module-import, registration, tool-creation, or execution trace. Nonsandboxed and bundled sandboxed controls record all four phases. Existing provider settings remain selected; no config migration or rewrite is involved.5918b1d7bf4bca308322e0c0a7f5b5acb1311d48. Its only finding was the historical manually assembled registry still in the index; staging the reviewed real-loader replacement resolved it. No other P0–P2 findings were established. The earlier CI test-type failure was that removed fixture's missing source field.31ad71a8addc1d42fbc5478f7e114860f5cbf6c7replay on the same Testbox independently fails the same checker:Test lines: 6422178; ceiling: 6422172; over by: 6; net delta: +283, comparing that main commit with its parent using the CI-supported immutable-base flags. This existing six-line debt is not funded or hidden by this change.Final CI on
51271bf38f9eea1b114609c1613a6fe88c33fdc6(run 41599649898) completed: all tests, types, lint, build and security checks pass. Only the existing test-line ceiling fails (6422278 / 6422272, six over, +100 fully funded lines), with its downstream CI gate. Landing uses the native inherited-failure evidence route; failed CI remains recorded.