Repository navigation
feat: choose which tools are deferred behind Tool Search - #170071
Conversation
Co-authored-by: Copilot <[email protected]> Copilot-Session: ea584bec-8136-4fa7-86af-96d0d8953157
Resolve upstream test refactors while retaining Tool Search selector and authorization regression coverage. Regenerate merged config documentation metadata. Co-authored-by: Copilot <[email protected]> Copilot-Session: ea584bec-8136-4fa7-86af-96d0d8953157
|
🦞👀 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 real behavior proof before merge. What this changesAdds source-qualified include/exclude selectors for choosing which authorized tools are deferred behind Tool Search. Example: Configure include: [{source: "mcp"}] and exclude: [{source: "mcp", name: "github_read_*"}].
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this PR provides a distinct capability absent from main, with no concrete introduced defect found; the new core settings still need an area-owner decision. Priority: P3 Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe tool-surface planner passes authorized native, MCP, and client tools through catalog compaction, producing direct model schemas and a deferred catalog served by the existing search and dispatcher owners. flowchart LR
A[Authorized tool inventory] --> B[Tool surface planner]
B --> C[Tool Search selectors]
C --> D[Direct model schemas]
C --> E[Deferred catalog]
E --> F[Search and dispatcher]
F --> G[Existing tool executors]
Technical reviewBest possible solution: If sponsored, retain source-qualified selection in the existing Tool Search owner with unchanged authorization, defaults, and independent Code Mode behavior. Do we have a high-confidence way to reproduce the issue? This is a feature request: current-main configuration and compaction lack source-qualified selection, while the supplied installed-runtime receipts demonstrate the proposed behavior. Is this the best way to solve the issue? The implementation uses the existing catalog and policy owners, and source qualification addresses the earlier name-only proposal's ambiguity; whether the added configuration is worthwhile remains an owner decision. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 525a7cd755d3. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +189, Tests +780, Docs +50, Generated 0, Other -1. Total +1018 across 36 files. Added test files: 2. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
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 HistoryReview history (8 earlier review cycles)
Reviewed October 14, 2026, 12:04 AM ET / 04:04 UTC (Revision 9). |
Regenerate config schema metadata for upstream 20d12e8 while retaining the Tool Search selectors and upstream runtime-config test preparation. Co-authored-by: Copilot <[email protected]> Copilot-Session: ea584bec-8136-4fa7-86af-96d0d8953157
Preserve upstream's stable Code Mode prompt lifecycle and removed observer tests. Keep partial-client selector regressions, adopt catalogPrompt in the policy fixture, and regenerate schema metadata. Co-authored-by: Copilot <[email protected]> Copilot-Session: ea584bec-8136-4fa7-86af-96d0d8953157
✅ Maintainer security changes approvedA maintainer approved this revision with an explicit security approval comment.
A later push requires a fresh approval comment for an external contributor's PR. |
Regenerate config metadata and retain upstream dispatcher and provenance changes without changing selector semantics. Co-authored-by: Copilot <[email protected]> Copilot-Session: ea584bec-8136-4fa7-86af-96d0d8953157
Integration receipts — latest head
|
Spread the already-loaded real module before overriding toToolDefinitions, then remove the resolved grandfathered mock exception. Co-authored-by: Copilot <[email protected]> Copilot-Session: ea584bec-8136-4fa7-86af-96d0d8953157
Retain upstream control-hook and model-result projection changes; regenerate the eight additional selector schema paths. Co-authored-by: Copilot <[email protected]> Copilot-Session: ea584bec-8136-4fa7-86af-96d0d8953157
Retain inlined catalog planning, descriptor-based reuse, current tool guards and deleted diagnostic paths. Preserve partial client deferral and source-qualified authorization coverage. Co-authored-by: Copilot <[email protected]> Copilot-Session: ea584bec-8136-4fa7-86af-96d0d8953157
|
Review follow-up for head Full source review of all 32 changed files and relevant callers, plus a separate Codex review, found no confirmed introduced implementation defects. Both were static reviews; this is not new runtime or installed-upgrade proof, nor a maintainer security approval. To make the remaining merge path concrete:
Positive on the implementation based on review. The remaining CI/upgrade items are technical validation gaps, not just process, and do not establish a storage defect or justify speculative migration changes. No merge or gate waiver is requested by this comment. |
|
@giodl73-repo: Patrick-Erichsen requested landing follow-through after discussing the selector design and security boundaries. I am retaining your assignment and source-review findings, and investigating the remaining exact-head CI and installed-upgrade gaps before native merge admission. No security approval or CI waiver is being inferred from the landing request. |
Merge current main without rewriting contributor ancestry and regenerate the two config metadata files. The selector feature remains unchanged; 199 focused tests, prefix stability, lint, formatting, and config metadata checks pass. Co-authored-by: Patrick-Erichsen <[email protected]>
Carry selected-out direct-name collisions on catalog descriptors so directory guidance, fallback lookup, dispatch, and recovery use the same identity decision. Preserve exact-ID dispatch and direct execution while invalidating cached guidance after inventory and prompt-policy changes. The production-owner regression fails before the repair and passes afterward; selector and sibling suites, core/test types, lint, and formatting pass. Co-authored-by: Patrick-Erichsen <[email protected]>
Baseline-Refresh: e803cbe6940e2dc39c757320da01321729e4d193 Co-authored-by: Patrick-Erichsen <[email protected]>
|
/allow-security-sensitive-change |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…0071) Allow operators to choose which authorized tools are deferred behind Tool Search using source-qualified include/exclude selectors, preserving existing defaults and execution permissions. Keep direct/deferred name collisions unambiguous: deferred tools with a direct namesake require their exact catalog ID, and cached guidance follows inventory and prompt-policy changes. Co-authored-by: Brad Cleaver <[email protected]> Co-authored-by: Patrick-Erichsen <[email protected]>
Related: #170058
What Problem This Solves
Operators cannot defer only MCP tools behind Tool Search while keeping core, non-MCP plugin, client, and frequently used MCP tools directly available.
User Impact
User impact: operators can choose which authorized tools need discovery without removing execution permission or exposing every MCP schema.
{ "tools": { "toolSearch": { "mode": "tools", "include": [{ "source": "mcp" }], "exclude": [{ "source": "mcp", "name": "github_read_*" }] } } }Existing defaults are unchanged; no threshold or migration is introduced. These are presentation controls, not authorization. Direct-only and runtime-required trusted tools retain their existing guarantees. Directory mode still keeps client tools direct; the Copilot harness retains its existing directory-to-tools mapping. Independent Code Mode and Codex-native search are unchanged.
Maintainer direction: Patrick-Erichsen requested landing after configuration/security discussion. Canonical review is complete; an additional direct/deferred-name ambiguity was repaired and independently re-reviewed. Hosted CI, security and enforced review requirements still apply.
Why This Change Was Made
The existing policy-filtered compactor and dispatcher now accept include/exclude selectors. Each selector has a source, registered name, or both; names reuse policy normalization and
*matching without regex support or implicit tool-group expansion. Fields are ANDed, lists are ORed, and exclusion wins. Omitted inclusion retains existing eligibility; empty inclusion defers nothing.Source qualification prevents unintended name-only matches across origins. Client registration, prompt allowlists, registry ownership, and worker presentation follow the selected surface without granting tools through a same-named tool from another owner. Public documentation and schema/help/labels are included. No MCP activation, connection, deployment, or dependency changes are part of the PR diff.
Prior art: #118335 proposed a name-only
alwaysVisibleToolsoption and was closed unmerged. Its closure reason is unverified; this implementation does not infer Code Mode from Tool Search mode or promote tools through a name-only trusted-tool rule.Evidence
October 23 reviewed correction
Final candidate edab183, tree d6bda2053a82d6c35051abdcd11573dec9a192b4, preserves contributor ancestry and incorporates main1532cce3. Config metadata was regenerated; the merged fixture retains selector and upstream deny-all cases.
Independent composed review found a direct/deferred-name ambiguity. The production regression failed before repair; deferred namesakes now consistently require exact catalog IDs across directory guidance, dispatch, recovery and cache/inventory changes. Normal initial MCP registration ordinarily deconflicts names; this is not claimed as an initial-registration exploit.
Passed on edab183: 47 selector/run-plan tests, single-worker wall95.76s including46.14s cold compilation; affected test types47.70s wrapper wall and core types8.91s; config metadata, lint, format and whitespace. Complete final-feature canonical review is scoped-clean. Prior91b repair scope passed166 tests. Whole-run CI span: 793s; 11880 summed job-seconds (not added-test-only cost).
Installed upgrade (prior reviewed91b): npm-latest stable2026.10.6 upgraded itself to exact signed91b1485/tree13b6 in one invocation, exit0, without recovery. This is not an edab package-build claim; the refresh preserves selector/config code, adds generated metadata and merges fixture coverage with main. Actual installed CLI/agent turns preserved Tool Search settings, workspace and prior conversation input; selectors persisted and loaded in a new process. Private runtime-only package SHA-256: 0301ac307cdf91e3357faeaebdc679dec15f059b21adae828de70f44b706246c. This is not a release or full-declaration-build claim. The installed isolated Gateway became ready and stopped cleanly.
Limits: deterministic survival checks used a test-owned provider. An extra commercial-model file-read smoke failed in protected-egress upstream transport (HTTP 502); no successful live read is claimed. That transport is unchanged by this PR. Current-head hosted CI/security remain required. On old run 39646002382, the UI failure was inherited and repaired in incorporated main; Android exhausted its 20-minute job budget with the underlying slowness/stall unknown. Historical receipts below do not establish current-head green CI.
Current CI qualification: Run 39908731999, attempt 1 completed all 90 jobs. Its sole root failure is a stale sessions_send options assertion (job 120266922474), reproduced on exact main baseline e40d9f7: 1 failed, 63 skipped, 53.38s. Ten relevant test/runtime/config inputs are unchanged in the PR merge. Security cleared; other planned jobs passed or were skipped. The native inherited-failure exception is selected; CI remains failed, not green.
Historical merge refreshes
October 21 integration: merged upstream
b5aa29b1ed0fcef44ec2367dd03eb2239e55511fas6db38b3d866782652ee4aee99d1761a47b4c9570. All merge conflicts are resolved. Partial-client projections now live in upstream's inlined catalog owner; descriptor-based catalog reuse retains direct-tool metadata, and removed diagnostic/planner modules remain removed. Source-qualified registry and catalog authorization are preserved. Affected tests and explicit production/test type graphs pass, along with lint, formatting, mock-export ratchet and config metadata. Independent source review found no significant issues.Verification gaps: the changed-graph boundary checker reports oversized all-tree test partitions (722/729/749 roots versus 720); the explicit affected compiler graphs pass, but that boundary check is not claimed green. Canonical review was attempted and could not launch because
codexis missing; the independent review does not substitute for canonical success. No new-head full build or installed upgrade is claimed. Exact commands and merge receipts. Product acceptance and the installed-upgrade request remain open.Prior green CI head: Broad CI passed on
4a7845762024d075c88bf3e623171c496d05c2ca, including both Android Access lanes; this is not new-head CI evidence. Maintainer security approval remains required for the current revision.Earlier refresh:
4a7845762024d075c88bf3e623171c496d05c2ca, incorporating upstream82b8f59a3ec944adafb05fe802928e353761f4c1.The evening
/checkresolved newly conflicting generated schema metadata and retained upstream control-hook/result-projection changes. On the merged tree, 130 focused tests, core production types, both affected test type graphs, mock-export ratchet, lint/format and config metadata checks passed. Selector policy owners are unchanged. The previous head's hosted ratchet job now passes; its CI aggregator failed solely on a cancelled 4-KiB Android native job, not a recorded test assertion. Maintainer security approval, product acceptance and the v2026.10.3 installed-upgrade request remain open. Current per-finding receipts and exact commands. No new-head full build or installed-package proof is claimed.Previous check on
505ca678b46:The latest
/checkfixed CI's new mock-export ratchet failure: the workspace test mock now spreads the real adapter exports before retaining its existing override. The obsolete grandfathered exception was removed, tightening the baseline by one entry. The failing checker now passes, as do the 25-test context-engine consumer suite, both affected test type graphs, lint, formatting and whitespace checks. Runtime code is unchanged. Failure reproduction, exact commands and per-finding receipts. No fresh broad-CI success is claimed.The October 13
/checkregenerated the two conflicting metadata files and aligned three selector tests with upstream'sdispatch_actionname, retaining its dispatcher and provenance changes. Passed: 155 focused tests across seven files, core production types, three affected test type graphs, targeted lint/format, generated config metadata, and whitespace checks. Per-finding receipts and exact commands.GitHub reports this head mergeable, but
openclaw/ci-gateandopenclaw/security-sensitive-reviewfail because a maintainer must approve the current revision. Product acceptance and an installed upgrade exercise from stable2026.10.3remain unresolved. No new full build or installed-package proof is claimed for this head, and no formal change-request reviews existed to dismiss.Earlier refresh:
59be7f106ac57a09cec36079fff6c3f7a329dfe8, incorporating upstreamc07481adc5abd354e89e17e21c36b924f95b3268.Upstream advanced during the first refresh's 73-minute build. The follow-up merge regenerates the two config metadata files, preserves upstream's deletion of obsolete description-observer tests, retains both selector client regressions, and updates the selector test to upstream's
catalogPromptargument name. Upstream's Code Mode prompt/lifecycle changes are retained. The final feature diff is 35 files, +1088/-59.Follow-up merge passed: 162 tests across six affected files (four shards, 459.29s); the corrected selector test then passed separately (22 tests, 63.58s). Core production types and the
agents-other,agents-tools, andconfig-clitest graphs passed, as did targeted lint/format, regenerated config metadata and whitespace checks. The first test-type run caught the staletoolSearchPromptargument; it was corrected and the affected type graphs were rerun successfully.Build provenance: the complete build passed on the immediately preceding merge
c0740aa9e9a, not on59be7f106ac. No second full build or installed-package run is claimed for the follow-up merge; its overlapping code and test contracts were checked with the targeted commands below.Latest follow-up merge checks — commands and results
Passed:
The initial graph selection below passed
agents-otherbefore reporting the stale test argument inagents-tools. The correctedagents-toolsandconfig-cligraphs passed in the rerun above:node scripts/run-tsgo-core-test-shards.mjs --changed-paths-json '["src/agents/tool-search-selection.test.ts","src/agents/embedded-agent-runner/run/attempt-client-tools.test.ts","src/agents/embedded-agent-runner/run/attempt-prompt-tool-policy.integration.test.ts","src/config/schema.test.ts"]'The first refresh was
c0740aa9e9a128d116fe5516573fb69c1477a9c2, incorporating upstream20d12e8a4dce7af751315e08494467d38d14d35f.Only the generated config baseline counts and hashes conflicted. They were regenerated with the merged schema, preserving the eight selector paths and all upstream fields. Upstream runtime-config setup/cleanup in the shared harness test and unrelated help/label changes were retained. The feature diff remains 35 files, +1087/-59; selector production code is unchanged from the earlier evidence candidate.
Passed on the merged tree: 214 focused tests across 10 files (six Vitest shards, 691.10 seconds), core production types, all five affected test type graphs, targeted lint/format, config metadata consistency, and feature-diff whitespace checks.
Exact-head build passed:
corepack pnpm buildcompleted successfully onc0740aa9e9ain 4419.59 seconds wall time (73m 39.6s). Most time was native package declaration generation; advisory UI/bundler warnings did not fail the build.Current merge verification commands and results
All commands below passed with Node 24.21.0 and pnpm 12.9.0:
Evidence provenance: the installed-Gateway, MCP/client final-effect, and recovered-upgrade receipts below remain pinned to
f142599; they were not rerun on either merge refresh. The later checks above do not relabel those historical receipts. Maintainer direction and the documented canonical-review availability gap remain unresolved.Historical evidence candidate:
f1425991727896e20378f690fddd044a64fee77a, incorporating upstreama640fff46b1. Validation used Linux, Nodev24.21.0, and pnpm12.9.0through Corepack. The earlier post-merge checks exercised the resolved tree committed unchanged as that candidate.Installed-package execution and upgrade proof — October 12
Passed on
f142599: a fresh candidate installation and 15 real Gateway HTTP turns / nine scenario groups. Configuration/history survival and selector persistence also pass after the published updater installs the candidate and supported recovery completes. The fixture drives the installed CLI/Gateway and actual MCP stdio server; it does not import or mock the compactor, prompt policy, session registry, or dispatcher.Upgrade limitation: the first published-updater invocation exceeded the harness's 900-second overall deadline and exited 143. It had published
f142599; its recovery status reportedpublication-complete. The follow-upopenclaw update repair --yes --no-restart --json --timeout 600succeeded, followed by the state-survival checks below. This is not a clean one-shot upgrade pass and is not attributed to this feature without baseline evidence. The original failure is retained here rather than hidden by the recovery result.before_prompt_buildhook returning anacme-qualified cap removes the client winner, emits no client dispatch, and produces zero denied effects.fixture__blocked-2; the test uses that actual identity rather than forging metadata.tools/list_changed. In the same Gateway session, the old name produces no effect and the new tool is searchable/callable.update --tag file:/proof/openclaw-candidate.tgz --yes --no-restart --json --timeout 600publishesf142599but hits the harness deadline. Supported repair succeeds; existing Tool Search settings, workspace content, and prior conversation in the next model request survive without reseeding.Final-effect recorders observed 4 plugin, 6 MCP, and 5 client effects, with zero forbidden effects. The core
readresult is independently checked in the provider request. Successful calls to each recorder precede the corresponding denial tests.Scope: deterministic local model responses, actual installed OpenClaw runtime, and a test-owned MCP server/client. This is not live commercial-provider or production MCP-service evidence. Runtime demonstrations use structured
toolsmode; directory, independent Code Mode, and other selector semantics retain the focused test evidence below. Refresh proof covers real MCP notifications and subsequent turns in the same session, not a simulated mid-instruction revocation. The compatibility check is a focused published-driver/state-survival run, not a full Package Acceptance release matrix.Package SHA-256:
e169735bedbcbe71f39f639e3ff8d07053bb7d92dc65ed3a1b2fc9e973d67c9b. Baseline:OpenClaw 2026.10.2 (b8952d4); candidate:OpenClaw 2026.10.2 (f142599). Docker image:node@sha256:d6aa754f16b3197301076f047b5def2f02ea1dbbc2ca920407d46d7ec7f87b20(Node 24.21.0). No operator state, real credentials, or production services were mounted; the product checkout stayed unchanged.Exact installed-package commands, results, and receipts
PROOF_DIRis the external fixture/artifact directory containing the scripts below./harnessis a read-only mount off1425991727896e20378f690fddd044a64fee77afor this historical run;/proofis its separate writable fixture/artifact mount. The previously successful build was reused.The upgrade harness invokes the published updater, not an out-of-band replacement install. It checks the changed build commit even though baseline and candidate both report package version
2026.10.2. The resume path neither rewrites the baseline config nor recreates the workspace sentinel.{ "candidate": "f1425991727896e20378f690fddd044a64fee77a", "packageSha256": "e169735bedbcbe71f39f639e3ff8d07053bb7d92dc65ed3a1b2fc9e973d67c9b", "runtimeScenarioGroups": 9, "gatewayTurns": 15, "finalEffectsBySource": { "plugin": 4, "mcp": 6, "client": 5 }, "forbiddenEffects": 0, "searchAndDescribePayloadsVerified": [ "mcp", "client" ], "sameNameClientCases": [ "direct", "deferred" ], "refreshCases": [ "client inventory and prompt cap", "MCP tools/list_changed with removed and added tools" ], "externalModelProvider": false }{ "status": "passed-after-recovery", "baseline": "OpenClaw 2026.10.2 (b8952d4)", "candidate": "OpenClaw 2026.10.2 (f142599)", "initialUpdateExitCode": 143, "harnessDeadlineSeconds": 900, "cleanOneShotUpgrade": false, "recoveryPassed": true, "publishedUpdater": true, "preserved": [ "toolSearch settings", "workspace", "session history" ], "selectorsPersistedAndLoadedInNewProcess": true }Original interrupted-update diagnostics (exit 143; stdout was empty)
Reproducible installed-runtime harness (runtime-proof.mjs)
Independent captured-result assertions (verify-receipts.mjs)
Published-driver upgrade harness (upgrade-proof.mjs)
corepack pnpm buildcompleted in 12m 29.8s. It emitted bundler/advisory warnings in untouched UI and third-party code, but no build errors.agents-other,agents-tools,config-cli,packages, andservices-cron.tool_search/tool_describe/tool_callcontrols; unselected tools retain direct schemas and execution. The real client/session registry exercises partial deferral, ownership, hook caps, restoration, and refresh.Evidence gaps: no live commercial-provider/production-MCP-service E2E, full local
pnpm check, or full localpnpm testwas run. Installed-runtime and focused upgrade proof is supplied above. Earlier draft checks included a passing PR context and evidence check; broad CI was skipped while draft, and no broad-CI success or CI timing evidence is claimed. There is no visual UI change requiring screenshots. Maintainer edits are enabled. The October 13 conflict repair is published; current-revision maintainer security approval, broad CI, product acceptance, and the current-stable upgrade evidence request remain outstanding.Canonical autoreview blocker: the shared
openclaw/agent-skillshelper was invoked againstupstream/mainat P0–P2 scope with committed caller context. Codex could not launch because its executable was missing. The permitted Claude fallback initially required a newer CLI; after installing supported Claude Code2.1.170in a task-local directory, review startup failed with400 Not a valid API key for this workspacebefore any assessment. This is an unavailable review, not a clean result. Independently requested Fable 5.1 and Sol 6.1 source reviews of the feature before the upstream merge reported no actionable findings after both authorization repairs; they do not substitute for a successful canonical review of this merged head. This review gap and maintainer direction remain unresolved after publication.Exact post-merge validation commands and results
Passed — 207 tests:
corepack pnpm test src/agents/tool-search-selection.test.ts src/agents/tool-search-config.test.ts src/agents/tool-search.test.ts src/agents/embedded-agent-runner/run/attempt-client-tools.test.ts src/agents/embedded-agent-runner/run/attempt-prompt-tool-policy.integration.test.ts src/agents/embedded-agent-runner/run/attempt.spawn-workspace.context-engine.test.ts src/agents/harness/tool-surface-bridge.test.ts src/config/schema.test.ts packages/gateway-protocol/src/schema/worker-gateway-tool.test.ts --maxWorkers=2 --reporter=dotPassed — production types:
Passed — all five selected test graphs:
node scripts/run-tsgo-core-test-shards.mjs --changed-paths-json '["src/agents/tool-search-selection.test.ts","src/agents/embedded-agent-runner/run/attempt-client-tools.test.ts","src/agents/embedded-agent-runner/run/attempt-prompt-tool-policy.integration.test.ts","src/agents/embedded-agent-runner/run/attempt-prompt-admission.test-support.ts","src/agents/embedded-agent-runner/run/attempt-spawn-workspace.test-support.ts","src/config/schema.test.ts","packages/gateway-protocol/src/schema/worker-gateway-tool.test.ts"]'Passed — targeted lint and formatting:
Passed — generated config metadata and feature-diff whitespace:
The generated core count increases by eight paths; unrelated upstream schema changes are retained. Upstream test deletions/refactors were preserved when resolving the merge, and our session-fixture method was moved to the new shared type owner.
Single-worker cost evidence for new or materially changed test files
Each row was separately executed on the candidate as:
All rows passed. Wall time includes repository orchestration, import/transformation, and cleanup; it is not a claim about test-body duration or CI runtime.
src/agents/tool-search-selection.test.tssrc/agents/embedded-agent-runner/run/attempt-prompt-tool-policy.integration.test.tssrc/agents/embedded-agent-runner/run/attempt-client-tools.test.tssrc/agents/harness/tool-surface-bridge.test.tssrc/agents/embedded-agent-runner/run/attempt.tool-search-run-plan.test.tssrc/agents/tool-search-config.test.tssrc/config/schema.test.tspackages/gateway-protocol/src/schema/worker-gateway-tool.test.tsThe source-selection unit cases cover independent selector semantics. The integration proof intentionally uses the real session registry and adapter to detect last-write-wins ownership errors that a name-only mock missed. MCP calls use real controls with synthetic executors; no live service, Gateway process, or real provider request is required by these new regressions. CI seconds are not yet available.