Commit c9d7b0b
fix(rr): Wave-A brutal-review fixes — barge-in poisoning (CRITICAL) + Anthropic 400s
5-lens adversarial review of Wave A (wf_6afb89db) confirmed + empirically
reproduced 3 real defects; fixed:
CRITICAL (d3-masking-races / regression-surface, both lenses + reproduced): the
D3 filler called arm_barge_in_suppression(350) which flips the SESSION-GLOBAL
allow_interruption=false, but the real answer is spoken via speak_if_epoch(
allow_interruption=true) which never RESTORES it — so the flag stayed false, the
egress wrapper kept extending non_interruptible_until_ms per answer chunk, and
can_interrupt() returned false for the WHOLE answer (and leaked across turns).
The STT callback drops barge-in when !can_interrupt(), so a user could not barge
in on the real answer — silently re-introducing the exact §4.4 failure on the
slow turns D3 targets. Fix: REMOVE arm_barge_in_suppression from the masking
timer — the filler is interruptible by design (a real barge-in during it must be
honored); echo cancellation, not a session-wide flag flip, handles the bot's own
tail. New regression test latency_filler_does_not_poison_interruptibility asserts
is_interruption_blocked()==false after a masked turn. (arm_barge_in_suppression
stays as a VoiceManager API + the §4.4 test's window simulator.)
HIGH (d1-vendor-correctness, verified against the claude-api skill): the Anthropic
adapter emitted thinking:{type:"enabled",budget_tokens} for (a) adaptive-only
models (Opus 4.7/4.8, Fable 5) which REJECT that form with a 400, and (b) budgets
clamped below the 1024 minimum (the voice cap 256 makes [1024, max_tokens)
unsatisfiable) — also a guaranteed 400. Fix: adaptive-only models emit NO thinking
block (they think adaptively by default); others emit `enabled` ONLY when a valid
budget (>=1024 and <max_tokens) fits, else nothing — never a guaranteed 400.
is_anthropic_adaptive_only helper + ANTHROPIC_MIN_THINKING_BUDGET; test rewritten
for the 400-safe matrix (voice-cap→none, room→enabled, adaptive-only→none, off→none).
lib floor 6173/0, conversation_loop 20/0 (incl the new regression), clippy clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 1fd5397 commit c9d7b0b
3 files changed
Lines changed: 112 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
549 | 554 | | |
550 | 555 | | |
551 | 556 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
141 | 159 | | |
142 | 160 | | |
143 | 161 | | |
| |||
636 | 654 | | |
637 | 655 | | |
638 | 656 | | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
643 | 665 | | |
644 | | - | |
| 666 | + | |
645 | 667 | | |
646 | 668 | | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
651 | 678 | | |
652 | 679 | | |
653 | 680 | | |
| |||
1317 | 1344 | | |
1318 | 1345 | | |
1319 | 1346 | | |
1320 | | - | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
1321 | 1350 | | |
1322 | | - | |
1323 | | - | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
1324 | 1361 | | |
1325 | 1362 | | |
1326 | 1363 | | |
1327 | | - | |
| 1364 | + | |
1328 | 1365 | | |
1329 | 1366 | | |
1330 | | - | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
1331 | 1378 | | |
1332 | 1379 | | |
1333 | 1380 | | |
1334 | | - | |
1335 | 1381 | | |
1336 | 1382 | | |
1337 | 1383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
553 | 595 | | |
554 | 596 | | |
555 | 597 | | |
| |||
0 commit comments