Commit 9bcc418
fix: don't misroute telemetry/events to the browser VM
The direct-to-VM routing allowlist matched on the subresource SEGMENT
("telemetry"), so the new historical GET /browsers/{id}/telemetry/events
endpoint (served by the control plane from S2) was routed to the session VM —
which only serves the live telemetry/stream SSE — once a session was route-cached,
yielding failures / wrong data.
Fix the granularity:
- Allowlist entries are now full path-prefixes ("curl", "telemetry/stream").
- Matching is segment-boundary aware: "telemetry/stream" matches
"telemetry/stream[/...]" but NOT "telemetry/events" or "telemetry/streamfoo".
- Safe by default: any path not in the allowlist (including future browser
sub-endpoints) goes to the control plane — slower, never misrouted.
All in src/kernel/lib/ (Stainless-preserved), so durable across regens. Adds a
regression vector and updates the default-config assertion.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 4506e68 commit 9bcc418
2 files changed
Lines changed: 37 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| |||
188 | 191 | | |
189 | 192 | | |
190 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
191 | 209 | | |
192 | 210 | | |
193 | 211 | | |
| |||
199 | 217 | | |
200 | 218 | | |
201 | 219 | | |
202 | | - | |
| 220 | + | |
203 | 221 | | |
204 | 222 | | |
205 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
341 | 357 | | |
342 | 358 | | |
343 | 359 | | |
| |||
0 commit comments