@@ -200,6 +200,43 @@ describe("secrets runtime fast path", () => {
200200 expect ( snapshot . webTools . search . providerSource ) . toBe ( "none" ) ;
201201 } ) ;
202202
203+ it ( "uses the fast path with the host's unrelated plugin loadout" , async ( ) => {
204+ const { prepareSecretsRuntimeSnapshot } = await import ( "./runtime.js" ) ;
205+
206+ const snapshot = await prepareSecretsRuntimeSnapshot ( {
207+ config : asConfig ( {
208+ tools : { web : { search : { provider : "webiq" } } } ,
209+ plugins : {
210+ enabled : true ,
211+ allow : [ "workiq-code-mode" , "tools-code-mode" , "webiq" , "diagnostics-otel" ] ,
212+ load : {
213+ paths : [
214+ "/app/plugins/workiq-code-mode" ,
215+ "/app/plugins/tools-code-mode" ,
216+ "/app/plugins/webiq" ,
217+ "/usr/lib/node_modules/@openclaw/diagnostics-otel" ,
218+ ] ,
219+ } ,
220+ entries : {
221+ "workiq-code-mode" : { config : { enabledNamespaces : [ "m365" , "search" ] } } ,
222+ "tools-code-mode" : { enabled : true } ,
223+ webiq : {
224+ enabled : true ,
225+ config : { webSearch : { omitAuth : true , region : "US" } } ,
226+ } ,
227+ "diagnostics-otel" : { enabled : true } ,
228+ } ,
229+ } ,
230+ } ) ,
231+ env : { } ,
232+ agentDirs : [ "/tmp/openclaw-agent-main" ] ,
233+ loadAuthStore : emptyAuthStore ,
234+ } ) ;
235+
236+ expect ( runtimePrepareImportMock ) . not . toHaveBeenCalled ( ) ;
237+ expect ( snapshot . webTools . search . providerSource ) . toBe ( "none" ) ;
238+ } ) ;
239+
203240 it . each ( [
204241 {
205242 name : "credential-bearing keyless provider config" ,
@@ -357,7 +394,7 @@ describe("secrets runtime fast path", () => {
357394 } ,
358395 } ,
359396 {
360- name : "custom plugin load path " ,
397+ name : "allowlist that omits the selected provider " ,
361398 config : {
362399 tools : {
363400 web : {
@@ -367,9 +404,31 @@ describe("secrets runtime fast path", () => {
367404 } ,
368405 } ,
369406 plugins : {
370- load : {
371- paths : [ "/tmp/custom-search-plugin" ] ,
407+ allow : [ "different-plugin" ] ,
408+ entries : {
409+ "host-proxy-search" : {
410+ config : {
411+ webSearch : {
412+ omitAuth : true ,
413+ } ,
414+ } ,
415+ } ,
416+ } ,
417+ } ,
418+ } ,
419+ } ,
420+ {
421+ name : "denylist containing the selected provider" ,
422+ config : {
423+ tools : {
424+ web : {
425+ search : {
426+ provider : "host-proxy-search" ,
427+ } ,
372428 } ,
429+ } ,
430+ plugins : {
431+ deny : [ "host-proxy-search" ] ,
373432 entries : {
374433 "host-proxy-search" : {
375434 config : {
0 commit comments