Repository navigation
Commit 9db4fb0
committed
fix(web): key the batch refusals by what broke, and pin each one
Second round on #3533. The refusals all shared one message prefix, which meant no test could tell
them apart and an operator could not branch on them: each now carries a `reason` identifier
(`batch-result-not-a-list`, `entry-count`, `entry-shape`, `entry-command`) beside the sentence, and
the whole-batch fault is no longer reported as an `entry count` on an answer that was never a list -
naming nothing counted. `requestedRefs` is the capture's ref count rather than the current group's,
with `groupRefs` beside it, because the answer reads as a statement about the capture and one
capture is measured in several groups.
The empty-capture decision was encoded twice - an early return in the projection and `refs.length >
0` in the provider - with nothing pinning either. The provider keeps it (the loop over groups
already does nothing) and a test states the consequence the projection depends on: a capture of only
ref-less text sends no batch, and so cannot trip the all-unmeasurable refusal.
Tests, which is where most of this lives:
- The shape guard had no test that exercised it. Its fixture's bad member was `{}`, which is an
object and therefore fell through to the echo check - deleting the guard kept all tests green. The
member is now a non-object and the test names `entry-shape`. Mutation-checked: removing the shape
guard or the list guard fails exactly one test each.
- Every refusal test now asserts its own `reason` instead of the shared prefix.
- The batch is the call that carries up to 200 commands and it had no cancellation assertion - a
dropped signal there costs a full 30 s after the caller gave up. Pinned against the recorded
`options.signal`; mutation-checked against the signal threading in `snapshot`.
- `MAX_REFS_PER_RECT_BATCH`'s comment justified 200 by the stdin payload, which is not the constraint
(23 bytes per ref). It is now bounded by the measurement that does decide it: a group has to finish
inside `AGENT_BROWSER_TIMEOUT_MS`, and 200 refs measured in 0.28 s against 30 s. The spawn count in
the same comment said 3 where the capture is 4.1 parent ef9652a commit 9db4fb0
3 files changed
Lines changed: 113 additions & 39 deletions
File tree
- packages/platform-web/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| |||
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
| 227 | + | |
230 | 228 | | |
231 | 229 | | |
232 | 230 | | |
| |||
244 | 242 | | |
245 | 243 | | |
246 | 244 | | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 245 | + | |
251 | 246 | | |
252 | 247 | | |
253 | 248 | | |
254 | 249 | | |
255 | 250 | | |
256 | | - | |
257 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
258 | 254 | | |
259 | 255 | | |
260 | 256 | | |
| |||
265 | 261 | | |
266 | 262 | | |
267 | 263 | | |
268 | | - | |
| 264 | + | |
269 | 265 | | |
270 | 266 | | |
271 | 267 | | |
272 | 268 | | |
273 | 269 | | |
274 | 270 | | |
275 | 271 | | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
| 272 | + | |
280 | 273 | | |
281 | 274 | | |
282 | 275 | | |
| |||
305 | 298 | | |
306 | 299 | | |
307 | 300 | | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
| 301 | + | |
312 | 302 | | |
313 | 303 | | |
314 | 304 | | |
| |||
356 | 346 | | |
357 | 347 | | |
358 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
359 | 407 | | |
360 | 408 | | |
361 | 409 | | |
| |||
410 | 458 | | |
411 | 459 | | |
412 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
413 | 472 | | |
414 | 473 | | |
415 | 474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
267 | 268 | | |
268 | 269 | | |
269 | 270 | | |
270 | 271 | | |
271 | 272 | | |
272 | | - | |
273 | | - | |
| 273 | + | |
| 274 | + | |
274 | 275 | | |
275 | 276 | | |
276 | 277 | | |
| |||
282 | 283 | | |
283 | 284 | | |
284 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
285 | 289 | | |
286 | 290 | | |
287 | 291 | | |
288 | 292 | | |
289 | 293 | | |
290 | 294 | | |
| 295 | + | |
291 | 296 | | |
292 | 297 | | |
293 | 298 | | |
| |||
326 | 331 | | |
327 | 332 | | |
328 | 333 | | |
329 | | - | |
330 | | - | |
331 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
332 | 343 | | |
333 | 344 | | |
334 | 345 | | |
335 | 346 | | |
| 347 | + | |
336 | 348 | | |
337 | 349 | | |
338 | 350 | | |
| |||
341 | 353 | | |
342 | 354 | | |
343 | 355 | | |
344 | | - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
345 | 359 | | |
346 | 360 | | |
347 | 361 | | |
348 | | - | |
349 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
350 | 365 | | |
351 | 366 | | |
352 | | - | |
| 367 | + | |
353 | 368 | | |
354 | 369 | | |
355 | 370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
0 commit comments