Repository navigation
fix: hide web search when no provider is configured - #166199
Conversation
Omit unconfigured managed search from initial and deferred tool catalogs and provide truthful setup guidance without changing native search or configured-provider diagnostics. Co-authored-by: jacobtomlinson <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 6, 2026, 6:54 PM ET / 22:54 UTC (Revision 8). ClawSweeper reviewWhat this changesThe branch hides unconfigured managed web search from agent tool catalogs, provides setup guidance, and updates regression fixtures and test routing. Merge readiness✅ Ready for maintainer review This PR remains useful: current main still advertises unconfigured managed search. The prior SDK blocker is resolved, and the latest fixture correction introduces no actionable finding. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw assembles agent tools from provider configuration, credentials, model capabilities, and tool policy. The resulting catalog feeds initial tools, deferred discovery, Code Mode, and system-prompt guidance. flowchart TD
A[Search configuration and credentials] --> B[Configuration presence check]
C[Model capabilities and tool policy] --> D[Agent tool assembly]
B --> D
D --> E[Initial and deferred tool catalogs]
D --> F[Setup guidance in agent prompt]
E --> G[Search execution with current credentials]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +184, Tests +456, Docs +9. Total +649 across 22 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Use the search owner's configuration facts consistently across catalogs and prompts while preserving configured-provider diagnostics and current credential binding. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the mechanism: current main constructs enabled managed search without checking provider setup. Repeated model attempts were not executed during this read-only review. Is this the best way to solve the issue? Yes, the branch places configuration detection in the search owner and carries one prepared fact into assembly and prompt guidance without changing execution health checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f215c401e69a. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
Complete the retry-dispatch auth-source mock and explicitly select key-free search in the happy-path prompt catalog. Addresses both review findings without changing production behavior or generated snapshots. Co-authored-by: jacobtomlinson <[email protected]>
|
Addressed both P2 findings in ed21e84: completed the synchronous auth-source mock and made the happy-path search provider explicit. No production behavior or snapshot baselines changed in this follow-up. Validation: 81 focused tests passed (including 18 retry-dispatch and 17 snapshot tests), targeted lint/format passed, and the canonical clean-environment @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
The web-search configuration probe reaches the host-owned shared-state broker when no provider key is present. Route the existing real HTTP fixture through the established fork-backed database-worker lane, preserving all assertions and production admission guards. Co-authored-by: jacobtomlinson <[email protected]>
|
Landing checks found three actual HTTP500 failures inside cancelled job 112401215225. They were caused by this PR’s new configuration probe reaching the shared-state host broker from the fixture’s thread-backed pool; they are not attributed to the MCP advisory or merely to fail-fast cancellation. Fixed in d2a7c66 by assigning the fixture to the existing database-worker pool. Credential-free ordinary-wrapper proof now passes all 12 cases without a pool override, in 66.58s. Lint/format/diff and independent P2 review pass. Product behavior and all assertions are unchanged. The body contains the exact reproduction, repair and remaining security prerequisite (#166217). @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Integrate main c39d9b0 to pick up the landed MCP security prerequisite. The PR remains the same 16-file web-search change relative to main. Refreshed focused tests, canonical prompt snapshots, production dependency audit, and independent P2 review pass. Co-authored-by: jacobtomlinson <[email protected]>
Carry the existing auth-source fact through async search configuration preparation instead of rediscovering it. Route genuine database-consuming integration fixtures through the existing infra fork lane and isolate provider credentials for deterministic coverage. Co-authored-by: jacobtomlinson <[email protected]>
|
Repaired the remaining exact-head CI failures in b49b3b8. The browser-delivery and skill-dispatch fixtures now use the existing database-worker lane with canonical credential isolation. Async search preparation also preserves callers’ existing auth-source facts instead of rediscovering them; undefined-source discovery and execution-time late binding remain unchanged. The failures reproduced first. Broader repair verification passed 70 tests; final ordinary-wrapper verification passed 34/34 (parent repeated in 23.05s), including the four prepared-source cases. Consumer typechecks, lint/format/ratchets and final staged P2 AutoReview pass. The PR body records exact scope and remaining CI gates. The old auto-merge request was retired natively before the repair. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: jacobtomlinson <[email protected]>
|
Resolved the SDK contract finding in 83d009c: 20/20 SDK, assembly and actual callback tests pass (76.50s). The complete changed-check plan for the two changed files passes, including production types, 27 consumer test graphs, SDK boundaries, deadcode and guards (577.8s). Fresh scoped P2 AutoReview is clean. Prior b49 CI passed; final-head CI is running separately. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: jacobtomlinson <[email protected]>
|
ClawSweeper revision 7 cleared the SDK blocker. Wider CI selected the model-provider collision fixture and exposed four expectations relying on unconfigured managed search. Fixed in 4a58efe using canonical credential isolation and a synthetic managed-search key, without forcing provider selection, changing production behavior or weakening assertions. Red proof: 4 failed/3 passed; green: 7/7 in 13.08s and the full three-file CI group 75/75 in 20.69s. Typecheck, lint/format and incremental P2 AutoReview pass. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* fix: hide web search when no provider is configured Omit unconfigured managed search from initial and deferred tool catalogs and provide truthful setup guidance without changing native search or configured-provider diagnostics. Co-authored-by: jacobtomlinson <[email protected]> * test: configure web search fixtures for availability gating Complete the retry-dispatch auth-source mock and explicitly select key-free search in the happy-path prompt catalog. Addresses both review findings without changing production behavior or generated snapshots. Co-authored-by: jacobtomlinson <[email protected]> * test: run MCP question authority with database workers The web-search configuration probe reaches the host-owned shared-state broker when no provider key is present. Route the existing real HTTP fixture through the established fork-backed database-worker lane, preserving all assertions and production admission guards. Co-authored-by: jacobtomlinson <[email protected]> * fix: preserve prepared web search authentication sources Carry the existing auth-source fact through async search configuration preparation instead of rediscovering it. Route genuine database-consuming integration fixtures through the existing infra fork lane and isolate provider credentials for deterministic coverage. Co-authored-by: jacobtomlinson <[email protected]> * fix(plugin-sdk): keep search prompt callback internal Co-authored-by: jacobtomlinson <[email protected]> * test(agents): configure managed search in route fixture Co-authored-by: jacobtomlinson <[email protected]> --------- Co-authored-by: jacobtomlinson <[email protected]>
…66365) ## What Problem This Solves `chat.send` could wait behind unrelated transcript-history reads while authorizing a request, admitting its run, or preparing durable input. An ordered metadata read could hold the database writer FIFO while waiting on the single history worker. ## User Impact Hot-session input can be persisted and acknowledged while history dispatch is blocked. Exact session rows, target discovery, transcript identity selection, and bounded cold-archive metadata use the existing projection worker. Writer FIFO ordering, current permissions, source replacement checks, and durable input custody remain intact. There are no schema, configuration, retention, or update changes. ## Why This Change Was Made Metadata discovery and payload reads selected different workers. Use the metadata worker consistently, remove the unused inventory lane parameter, and remove the discovery-only lane fallback. Transcript corpus/archive payloads and maintenance retain their existing owners. Production LOC delta: **+14**. The generic reader also serves transcript payloads, so the metadata operations must select the existing projection lane explicitly; transcript target selection also retains its lazy worker/incognito boundary. Most added lines are argument/import formatting. No new pool, cache, wrapper, or configuration option is introduced. ## Evidence Benchmarks and runtime tests ran with provider `blacksmith-testbox`, profile `openclaw-check`, on Linux x86_64 / Node 24.19.0. Paired measurements and the first full staged gate used lease **`tbx_01m499e9p8c3pwdkxrq7kqyt11`** on base `cc7e664dfe34`. The full staged gate also passed after rebase to `8f5c33c30d71` on the Linux rig fallback (`node scripts/check-changed.mjs --staged`, exit 0, approximately 50 minutes). Fresh-lease integration proof passed on **`tbx_01m49cshscnkd5rn7tva92rwrp`**: core production types and 63 tests covering exact reads, worktree-owner projection, managed owner policy, and durable ACK; total command 2m23s. On **`tbx_01m49wfjav8vbwxmsdrw22nrad`**, base `0288eb1f3692`, core production types and 218 tests across 16 focused files passed in 6m51s. The three corrected race fixtures passed all 58 tests in 2m24s. Their staged gate and a full 227-case registry lifecycle replay passed in 6m14s. The final branch is rebased onto `98567acd6060`; SHA-256 verification confirms all 17 reviewed files are byte-for-byte unchanged. The earlier results are prior-base evidence; hosted CI checks the final integration. All four leases are stopped/expired. The RPC router/handler and SQLite rig ran 64 sends at concurrency eight, alongside four continuous synthetic history readers and post-ACK preparation. Provider execution was mocked after ACK. Same baseline revision, synthetic data, and lease: | Request latency | Before | After | Reduction | |---|---:|---:|---:| | p50 | 6,451 ms | 979 ms | 84.8% | | p95 | 17,257 ms | 3,339 ms | 80.7% | | p99 / max | 18,234 ms | 3,470 ms | 81.0% | | mean | 7,548 ms | 1,273 ms | 83.1% | Afterward, all 1,500 history-worker requests were background page reads; foreground metadata used the projection worker. Harness RSS after the run was 2.995 GB before and 3.193 GB after; these are whole test-process measurements, including worker heaps and retained synthetic turns. A second paired run waited for warm startup, then measured 32 requests with one send outstanding and the same four background history readers: | Warm request latency | Before | After | |---|---:|---:| | p50 | 2,250 ms | 188 ms | | p95 | 3,036 ms | 323 ms | | p99 / max | 16,280 ms | 2,246 ms | | mean | 2,710 ms | 264 ms | **Both workloads still exceed the 150 ms p50 / 500 ms p99 targets.** The warm median is below 300 ms. The remaining 2,245 ms warm tail records 2,094 ms in authority, 9 ms in admission, 77 ms in persistence, and 65 ms in run admission. Repeated authority preparation and production latency still need finer attribution; this change removes the proven history-queue dependency without relaxing authority or durability. - The full router → durable transcript → ACK regression passes with history dispatch held. The original revision times out waiting for ACK under the same gate (the existing 120-second Vitest deadline), confirming the regression catches the old dependency. - Broader owner/sibling coverage: 167 tests passed across 12 files. After the transcript-target and cold-metadata cutover, 71 relevant tests passed, including cold restore authority, physical replacement, first registration, run admission, and ACK-before-skill-preparation behavior. - `pnpm test src/gateway/server-methods/chat-send-preparation-ack.test.ts --maxWorkers=1`: 5 passed; 38.85 s runner wall time including worker compilation; 10.93 s test time. The new case took 3.67 s. Real router authorization and SQLite custody are required to prove a durable ACK; helper-only tests would miss the persistence dependencies. Added Linux test execution cost: approximately 3.7 seconds per run, measured on Testbox; hosted per-case timing was not collected. - `node scripts/check-changed.mjs --staged`: passed on the paired measurement base in 27m53s, including all 27 core test type graphs, lint, dead-export, cycle, and storage guards. Every reviewed file matched its recorded SHA-256. - Independent Codex reviews of the production scope and final three test corrections: scoped-clean, no actionable P0/P1 findings. - Three additional test fixtures now inject metadata races/errors through the projection worker: native model ownership, diff-baseline generation, and SDK transcript-target locking. All 58 tests in those files passed on the fresh lease in 2m24s; their assertions are unchanged. The scoped staged gate selected and passed the `agents-other`, `other`, and `plugin-sdk` type graphs, lint, and dead-export checks. <details> <summary>24-hour slow-send attribution</summary> The journal query covered 2026-10-05 19:00:50Z through 2026-10-06 19:00:50Z and yielded 77 request and 99 startup records. These are **conditional slow-stage distributions**: the logger excludes stages below 1,000 ms. Timers include awaited/scheduling time and can overlap; they are not exclusive CPU measurements. Missing fields are absent samples. Nearest-rank p99 equals max for these sample counts. | Stage / phase | Samples | p50 ms | p95 ms | p99 / max ms | |---|---:|---:|---:|---:| | Request total | 77 | 3,418 | 5,611 | 6,951 | | Authority | 77 | 1,429 | 2,267 | 2,748 | | Admission | 77 | 273 | 469 | 685 | | Attachments | 77 | 0 | 11 | 285 | | Persistence | 77 | 566 | 1,234 | 2,815 | | Preparation | 77 | 0 | 1 | 8 | | Reply context | 77 | 0 | 83 | 116 | | Run admission | 77 | 1,135 | 2,314 | 2,402 | | Effects | 77 | 0 | 0 | 0 | | Response | 77 | 1 | 1 | 2 | | Startup total | 99 | 5,674 | 102,321 | 3,288,574 | | Startup ACK (repeated request duration) | 99 | 3,158 | 4,851 | 6,951 | | Startup authoring | 95 | 1 | 6 | 9 | | Startup preparation | 95 | 3,532 | 5,951 | 3,046,035 | | Startup reply initialization | 95 | 1,612 | 80,753 | 356,488 | | Startup reply context | 99 | 0 | 0 | 129 | | Startup worktree | 13 | 3,575 | 5,131 | 5,131 | | Startup dispatch | 99 | 15 | 544 | 8,757 | The 54.8-minute startup record had already ACKed in 250 ms and began after that process started. It does not establish pre-ACK blocking or unfinished work from the earlier restart. Source tracing and the blocked-history regression establish the metadata-worker dependency fixed here; they do not attribute every production tail. </details> Related: #165608. <details> <summary>Hosted CI investigation and remaining upstream failures</summary> Final-head [CI run 37556779529](https://github.com/openclaw/openclaw/actions/runs/37556779529), head `3292922b0e82`, completed with 79 successful jobs, 24 skipped jobs, two failed test jobs, and the failed aggregate gate. The stale metadata-race fixtures are corrected. No CI rerun was requested. - **MCP fixture routing:** all ten `mcp-http.session-controls.test.ts` cases fail during tool/auth preparation before the session action. On unchanged base `0288eb1f3692`, `pnpm exec vitest run --config test/vitest/vitest.gateway-core.config.ts src/gateway/mcp-http.session-controls.test.ts --maxWorkers=1 -t 'MCP dispatch preserves archive final-effect authority: allowed'` fails with the identical `Shared-state admission requires the host broker`; adding `--pool=forks` passes. Upstream #166199 moved the sibling question-authority fixture into the fork-backed database-worker lane but omitted this fixture. This branch does not change its routing. - **History expectation after the new base:** `chat.history advances past a replay boundary that cannot fit all projected siblings` still expects only sequence 2 on page one. Upstream #166263 now compresses an oversized source group into a fetchable placeholder before capping, allowing the older sequence-1 message to fit on the same page. The fixture and paging owner are byte-identical between base `98567acd6060` and this branch. The exact filtered case also fails on unchanged base `98567acd6060` on `blacksmith-testbox` lease `tbx_01m49zrpad1bfnzpwb9wp7t3tz`: a diagnostic print before the unchanged assertion captured `sequences: [1, 2]` and `hasMore: false`. The test exited 1 as expected; the probe command completed in 1m35s, restored the test, removed its temporary worktree, and the lease is stopped. No history behavior is changed here. The initial CI run also reported one remaining fake timer in `subagent-registry-lifecycle.test.ts`, case `preserves cleanup exhaustion when another run settles (related=true)`. The complete 227-case file passed separately on unchanged base and candidate, and the corrected head's CI no longer reports it. The original failure remains unexplained; passing replays are not claimed as a fix, and no assertion was weakened. </details>
…enclaw#166365) ## What Problem This Solves `chat.send` could wait behind unrelated transcript-history reads while authorizing a request, admitting its run, or preparing durable input. An ordered metadata read could hold the database writer FIFO while waiting on the single history worker. ## User Impact Hot-session input can be persisted and acknowledged while history dispatch is blocked. Exact session rows, target discovery, transcript identity selection, and bounded cold-archive metadata use the existing projection worker. Writer FIFO ordering, current permissions, source replacement checks, and durable input custody remain intact. There are no schema, configuration, retention, or update changes. ## Why This Change Was Made Metadata discovery and payload reads selected different workers. Use the metadata worker consistently, remove the unused inventory lane parameter, and remove the discovery-only lane fallback. Transcript corpus/archive payloads and maintenance retain their existing owners. Production LOC delta: **+14**. The generic reader also serves transcript payloads, so the metadata operations must select the existing projection lane explicitly; transcript target selection also retains its lazy worker/incognito boundary. Most added lines are argument/import formatting. No new pool, cache, wrapper, or configuration option is introduced. ## Evidence Benchmarks and runtime tests ran with provider `blacksmith-testbox`, profile `openclaw-check`, on Linux x86_64 / Node 24.19.0. Paired measurements and the first full staged gate used lease **`tbx_01m499e9p8c3pwdkxrq7kqyt11`** on base `4a96fff224ff`. The full staged gate also passed after rebase to `66cf8a4c0732` on the Linux rig fallback (`node scripts/check-changed.mjs --staged`, exit 0, approximately 50 minutes). Fresh-lease integration proof passed on **`tbx_01m49cshscnkd5rn7tva92rwrp`**: core production types and 63 tests covering exact reads, worktree-owner projection, managed owner policy, and durable ACK; total command 2m23s. On **`tbx_01m49wfjav8vbwxmsdrw22nrad`**, base `fd7d42fa5176`, core production types and 218 tests across 16 focused files passed in 6m51s. The three corrected race fixtures passed all 58 tests in 2m24s. Their staged gate and a full 227-case registry lifecycle replay passed in 6m14s. The final branch is rebased onto `772d281b298f`; SHA-256 verification confirms all 17 reviewed files are byte-for-byte unchanged. The earlier results are prior-base evidence; hosted CI checks the final integration. All four leases are stopped/expired. The RPC router/handler and SQLite rig ran 64 sends at concurrency eight, alongside four continuous synthetic history readers and post-ACK preparation. Provider execution was mocked after ACK. Same baseline revision, synthetic data, and lease: | Request latency | Before | After | Reduction | |---|---:|---:|---:| | p50 | 6,451 ms | 979 ms | 84.8% | | p95 | 17,257 ms | 3,339 ms | 80.7% | | p99 / max | 18,234 ms | 3,470 ms | 81.0% | | mean | 7,548 ms | 1,273 ms | 83.1% | Afterward, all 1,500 history-worker requests were background page reads; foreground metadata used the projection worker. Harness RSS after the run was 2.995 GB before and 3.193 GB after; these are whole test-process measurements, including worker heaps and retained synthetic turns. A second paired run waited for warm startup, then measured 32 requests with one send outstanding and the same four background history readers: | Warm request latency | Before | After | |---|---:|---:| | p50 | 2,250 ms | 188 ms | | p95 | 3,036 ms | 323 ms | | p99 / max | 16,280 ms | 2,246 ms | | mean | 2,710 ms | 264 ms | **Both workloads still exceed the 150 ms p50 / 500 ms p99 targets.** The warm median is below 300 ms. The remaining 2,245 ms warm tail records 2,094 ms in authority, 9 ms in admission, 77 ms in persistence, and 65 ms in run admission. Repeated authority preparation and production latency still need finer attribution; this change removes the proven history-queue dependency without relaxing authority or durability. - The full router → durable transcript → ACK regression passes with history dispatch held. The original revision times out waiting for ACK under the same gate (the existing 120-second Vitest deadline), confirming the regression catches the old dependency. - Broader owner/sibling coverage: 167 tests passed across 12 files. After the transcript-target and cold-metadata cutover, 71 relevant tests passed, including cold restore authority, physical replacement, first registration, run admission, and ACK-before-skill-preparation behavior. - `pnpm test src/gateway/server-methods/chat-send-preparation-ack.test.ts --maxWorkers=1`: 5 passed; 38.85 s runner wall time including worker compilation; 10.93 s test time. The new case took 3.67 s. Real router authorization and SQLite custody are required to prove a durable ACK; helper-only tests would miss the persistence dependencies. Added Linux test execution cost: approximately 3.7 seconds per run, measured on Testbox; hosted per-case timing was not collected. - `node scripts/check-changed.mjs --staged`: passed on the paired measurement base in 27m53s, including all 27 core test type graphs, lint, dead-export, cycle, and storage guards. Every reviewed file matched its recorded SHA-256. - Independent Codex reviews of the production scope and final three test corrections: scoped-clean, no actionable P0/P1 findings. - Three additional test fixtures now inject metadata races/errors through the projection worker: native model ownership, diff-baseline generation, and SDK transcript-target locking. All 58 tests in those files passed on the fresh lease in 2m24s; their assertions are unchanged. The scoped staged gate selected and passed the `agents-other`, `other`, and `plugin-sdk` type graphs, lint, and dead-export checks. <details> <summary>24-hour slow-send attribution</summary> The journal query covered 2026-10-05 19:00:50Z through 2026-10-06 19:00:50Z and yielded 77 request and 99 startup records. These are **conditional slow-stage distributions**: the logger excludes stages below 1,000 ms. Timers include awaited/scheduling time and can overlap; they are not exclusive CPU measurements. Missing fields are absent samples. Nearest-rank p99 equals max for these sample counts. | Stage / phase | Samples | p50 ms | p95 ms | p99 / max ms | |---|---:|---:|---:|---:| | Request total | 77 | 3,418 | 5,611 | 6,951 | | Authority | 77 | 1,429 | 2,267 | 2,748 | | Admission | 77 | 273 | 469 | 685 | | Attachments | 77 | 0 | 11 | 285 | | Persistence | 77 | 566 | 1,234 | 2,815 | | Preparation | 77 | 0 | 1 | 8 | | Reply context | 77 | 0 | 83 | 116 | | Run admission | 77 | 1,135 | 2,314 | 2,402 | | Effects | 77 | 0 | 0 | 0 | | Response | 77 | 1 | 1 | 2 | | Startup total | 99 | 5,674 | 102,321 | 3,288,574 | | Startup ACK (repeated request duration) | 99 | 3,158 | 4,851 | 6,951 | | Startup authoring | 95 | 1 | 6 | 9 | | Startup preparation | 95 | 3,532 | 5,951 | 3,046,035 | | Startup reply initialization | 95 | 1,612 | 80,753 | 356,488 | | Startup reply context | 99 | 0 | 0 | 129 | | Startup worktree | 13 | 3,575 | 5,131 | 5,131 | | Startup dispatch | 99 | 15 | 544 | 8,757 | The 54.8-minute startup record had already ACKed in 250 ms and began after that process started. It does not establish pre-ACK blocking or unfinished work from the earlier restart. Source tracing and the blocked-history regression establish the metadata-worker dependency fixed here; they do not attribute every production tail. </details> Related: openclaw#165608. <details> <summary>Hosted CI investigation and remaining upstream failures</summary> Final-head [CI run 37556779529](https://github.com/openclaw/openclaw/actions/runs/37556779529), head `3292922b0e82`, completed with 79 successful jobs, 24 skipped jobs, two failed test jobs, and the failed aggregate gate. The stale metadata-race fixtures are corrected. No CI rerun was requested. - **MCP fixture routing:** all ten `mcp-http.session-controls.test.ts` cases fail during tool/auth preparation before the session action. On unchanged base `fd7d42fa5176`, `pnpm exec vitest run --config test/vitest/vitest.gateway-core.config.ts src/gateway/mcp-http.session-controls.test.ts --maxWorkers=1 -t 'MCP dispatch preserves archive final-effect authority: allowed'` fails with the identical `Shared-state admission requires the host broker`; adding `--pool=forks` passes. Upstream openclaw#166199 moved the sibling question-authority fixture into the fork-backed database-worker lane but omitted this fixture. This branch does not change its routing. - **History expectation after the new base:** `chat.history advances past a replay boundary that cannot fit all projected siblings` still expects only sequence 2 on page one. Upstream openclaw#166263 now compresses an oversized source group into a fetchable placeholder before capping, allowing the older sequence-1 message to fit on the same page. The fixture and paging owner are byte-identical between base `772d281b298f` and this branch. The exact filtered case also fails on unchanged base `772d281b298f` on `blacksmith-testbox` lease `tbx_01m49zrpad1bfnzpwb9wp7t3tz`: a diagnostic print before the unchanged assertion captured `sequences: [1, 2]` and `hasMore: false`. The test exited 1 as expected; the probe command completed in 1m35s, restored the test, removed its temporary worktree, and the lease is stopped. No history behavior is changed here. The initial CI run also reported one remaining fake timer in `subagent-registry-lifecycle.test.ts`, case `preserves cleanup exhaustion when another run settles (related=true)`. The complete 227-case file passed separately on unchanged base and candidate, and the corrected head's CI no longer reports it. The original failure remains unexplained; passing replays are not claimed as a fix, and no assertion was weakened. </details>
What Problem This Solves
Fixes agents repeatedly attempting web searches that cannot work because no search provider is configured.
User Impact
Unconfigured
web_searchis omitted from initial tools, Tool Search, and Code Mode. The agent instead receives a concise setup hint pointing toopenclaw configure --section webor Settings → Ask OpenClaw.Explicitly disabled or policy-denied search does not produce a misleading setup hint. Native hosted search and explicitly selected key-free providers retain their existing behavior. Configured-but-unavailable providers keep their actionable execution diagnostics; this is a configuration-presence check, not a network or credential health probe.
Why This Change Was Made
The shared tool assembly previously exposed search based on its enabled flag without checking provider setup. It now uses the search owner’s provider credential contracts and runtime metadata before catalog construction, and carries the resulting fact into initial and refreshed prompts. Existing execution-time credential/configuration late binding is unchanged.
Reported and requested by @jacobtomlinson.
Work sessions
Evidence
Landed candidate
Current head:
4a58efe88823aa3099e245f6a008548ae4a157b1, treee27e87116d58350f236e14dc707939b41ef83836.ClawSweeper revision 7 accepted the SDK correction below with no remaining actionable findings. The broader CI selection then exposed four model-provider collision assertions whose fixture did not configure managed search. These reproduced without ambient credentials. The fixture now supplies a synthetic managed-search credential with canonical scoped environment isolation, without forcing a provider or changing production behavior or assertions. All seven route cases pass (13.08s); the complete three-file CI selection passes 75/75 (20.69s). Consumer typecheck, lint/format and incremental P2 AutoReview pass. Final-head CI passed: 88 jobs terminal, zero failures. Required CI, dependency-review and security-sensitive-review statuses pass. ClawSweeper revision 8 reviewed this exact head with no actionable findings.
SDK correction
Prior head:
83d009c58140e4c29334a221bbb10393f2c0ad81, treec75cbaa14813cf40979c8ad9e9eabdacc122783a.The latest review found that the internal prompt callback leaked into both public SDK factory option types. Both public signatures now omit
onWebSearchConfiguration; internal assembly retains it. The existing private-options regression covers both signatures. Canonical SDK typechecking failed at both assertions before the fix and passes afterward. SDK, search-assembly, and real prompt-callback suites pass 20/20 in 76.50s. The full changed-check plan for these two files passed in 577.8s, including production types, all 27 consumer test graphs, SDK boundaries, deadcode, lint and guards. Incremental staged AutoReview is scoped-clean through P2.The prior head
b49b3b88b1completed CI successfully, with all 86 jobs terminal and no failures. This remains prior-head evidence; final-head CI and review are recorded above.Prior runtime and CI repairs
Prior head:
b49b3b88b1da68dc3181aad109e0c2bab77c6b2f, tree5de768bf7ba9fbe3a97fbb899b03ad1aa9d206d3. The branch includes security-fixed mainc39d9b0692after the MCP prerequisite landed. Hosted ancestry and human credit are preserved.The final CI repair does two distinct things:
Verification
agents-rootandservicesconsumer typechecks, focused lint/format, mock-export and SQLite-worker ratchets, andgit diff --checkpassed.c39d9b0692: scoped-clean through P2, no findings.Earlier scoped proof remains identified separately: security-baseline head
658e7ed4817cpassed 93 tests across seven files in 149.78s, all seven canonical prompt snapshots, and the production npm bulk audit with no matching high-or-higher advisories. Dependencies and generated snapshot baselines were not changed by the final repair. Npm bulk results are not comprehensive vulnerability clearance.Review history and limitations
The original retry-dispatch auth mock and happy-path search fixture findings are resolved. The MCP question-authority fixture also uses its existing database-worker pool; credential-free proof passed 12/12 without a pool override. Subsequent wider CI exposed the two additional real database consumers repaired above, rather than only cancellation collateral.
The previous auto-merge request was retired through native recovery before edits. Final-head CI and review are complete as recorded above. The native guarded workflow merged this head as
eea001248e7fad3698293b36fa9f761904de59c1; landed tree5277f0c8076d90d7de79445fd30b38bf5e08702dmatches the verified composition with main. Live-provider execution was not exercised.