Commit 0db6c28
fix(plugins): include selected context-engine slot plugin in gateway startup (#76576)
External context-engine plugins (e.g. lossless-claw) register via
api.registerContextEngine at load time but ship without
activation.onStartup in their manifest. The gateway startup planner
only considered memory plugins and explicit sidecar plugins, so a
selected non-legacy context engine was omitted from the startup load
plan and never loaded before agent turns resolved the active engine,
producing the "Context engine X is not registered; falling back to
default engine legacy" warning.
Fix: add resolveContextEngineSlotStartupPluginId mirroring the memory
slot pattern; pass contextEngineSlotStartupPluginId into
shouldConsiderForGatewayStartup so the selected context-engine plugin
is included in pluginIds regardless of its manifest activation shape.
Tests: added four regression cases covering include, exclude, legacy
bypass, and id normalization. 82 tests pass.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 4458c27 commit 0db6c28
3 files changed
Lines changed: 98 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
304 | 316 | | |
305 | 317 | | |
306 | 318 | | |
| |||
436 | 448 | | |
437 | 449 | | |
438 | 450 | | |
| 451 | + | |
439 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
440 | 458 | | |
441 | 459 | | |
442 | 460 | | |
| |||
453 | 471 | | |
454 | 472 | | |
455 | 473 | | |
456 | | - | |
| 474 | + | |
457 | 475 | | |
458 | 476 | | |
459 | 477 | | |
| |||
465 | 483 | | |
466 | 484 | | |
467 | 485 | | |
468 | | - | |
| 486 | + | |
469 | 487 | | |
470 | 488 | | |
471 | | - | |
472 | | - | |
473 | | - | |
| 489 | + | |
474 | 490 | | |
475 | 491 | | |
476 | 492 | | |
| |||
1033 | 1049 | | |
1034 | 1050 | | |
1035 | 1051 | | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
1036 | 1090 | | |
1037 | 1091 | | |
1038 | 1092 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
102 | 126 | | |
103 | 127 | | |
104 | 128 | | |
105 | 129 | | |
106 | 130 | | |
| 131 | + | |
107 | 132 | | |
108 | 133 | | |
109 | 134 | | |
110 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
111 | 139 | | |
112 | 140 | | |
113 | 141 | | |
| |||
404 | 432 | | |
405 | 433 | | |
406 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
407 | 438 | | |
408 | 439 | | |
409 | 440 | | |
410 | | - | |
411 | | - | |
412 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
413 | 447 | | |
414 | 448 | | |
415 | 449 | | |
| |||
471 | 505 | | |
472 | 506 | | |
473 | 507 | | |
| 508 | + | |
474 | 509 | | |
475 | 510 | | |
476 | 511 | | |
| |||
0 commit comments