Repository navigation
Commit 5ea367d
fix(session): remember a refused encrypted-reasoning replay for the session
After the first commit, a provider that refused a session's encrypted
reasoning cost one extra fast 400 on every later step of that session, since
each step replayed the stored reasoning again. Once a caller is refused for
a session, it is refused on every later step, so the refusal is now
remembered: the processor layer holds a process-local set keyed by session
id + provider id, armed only by an observed refusal (with one log line when
it arms), and later steps of that session send the stripped history from
their first request. Other sessions, and the same session with another
provider, keep their encrypted reasoning. A server restart clears the set;
the next refusal arms it again. The stored history is still not rewritten.
Red first, accuracy-loop.test.ts:
- "after one refusal, the session's next steps go without encrypted
reasoning from the first request": 3 requests over two turns, and the
third carries no encrypted reasoning. Failed before (the third replayed
it).
- "a refusal in one session does not strip another session's encrypted
reasoning": passed before and after, pins the key.
All five replay cases pass; typecheck clean.
Ref anomalyco#44, LDE-35
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GHX6CpBR14wnFxJLDahwTr1 parent bab58a7 commit 5ea367d
2 files changed
Lines changed: 85 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
108 | 111 | | |
109 | 112 | | |
110 | 113 | | |
| |||
695 | 698 | | |
696 | 699 | | |
697 | 700 | | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
698 | 709 | | |
699 | | - | |
| 710 | + | |
700 | 711 | | |
701 | 712 | | |
702 | 713 | | |
703 | 714 | | |
704 | | - | |
| 715 | + | |
705 | 716 | | |
706 | 717 | | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
712 | 728 | | |
713 | 729 | | |
714 | 730 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
0 commit comments