Repository navigation
Commit 12b714d
committed
fix(agents): scope fall-through plugin registry loads to the active runtime registry
First hook/cron isolated-run dispatch in a gateway process cold-loaded every
discovered plugin (~70 bundled providers) because the registry loader's
startup-scope fallback chain came up empty on that path and dropped
onlyPluginIds entirely. In dev checkouts each provider plugin loads from
TypeScript source through jiti's synchronous babel transform: a CPU profile of
a live 13-message gmail hook burst showed one contiguous 42.6s event-loop
block (36.2s extension module loading; amazon-bedrock 16.8s, opencode 13.1s),
the gateway HTTP server unresponsive for ~31s, and the fan-out handler's own
8s response deadline unable to fire - the livelock recorded in #130002.
The fallback chain now consults the process's active plugin registry before
giving up to full discovery: explicit base -> request-scope registry ->
metadata snapshot pluginIds -> active runtime plugin ids -> unrestricted.
resolveAgentRuntimePluginLoadPlan still adds the run's selected provider,
harness, memory, and context-engine owners on top, so any selected provider
outside the startup set keeps joining the immutable run generation. Hosts
with no active registry (pure library use) keep full discovery.
Live re-verification on the same rig: cold burst answered in 8.03s with the
designed 503 partial fan-out response, probe max latency 4.56s (was a 31.5s
outage), longest event-loop block 5.5s (was 42.6s), and only startup-registry
plugins load.
Follow-up of the gmail hook fan-out landing (#130002); same defect family as
the channel-path fix in #125596.1 parent 2ac88b3 commit 12b714d
2 files changed
Lines changed: 59 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
106 | | - | |
| 108 | + | |
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
| |||
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
124 | 169 | | |
125 | 170 | | |
126 | 171 | | |
| |||
302 | 347 | | |
303 | 348 | | |
304 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
305 | 353 | | |
306 | 354 | | |
307 | 355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
| |||
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
77 | 83 | | |
78 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
79 | 87 | | |
80 | 88 | | |
81 | 89 | | |
| |||
0 commit comments