Commit 5e4bf38
committed
fix(server): record recovery kind and de-duplicate Responses param shaping
CodeRabbit follow-up on the Copilot Responses-wire work.
The new passthrough recovery loop called noteAttemptSend without the third
`recovery` argument, so a request that silently self-healed via OAuth refresh
or key rotation showed an inflated sendCount with no recorded reason — exactly
the case this path exists to make debuggable. Thread the existing
AttemptRecoveryKind values ("oauth-401" / "key-429") through, matching what
rebuildAndRefetch does in the normal adapter loop.
Both translate-and-replay inbound handlers also carried identical copies of the
Responses sampling-param block, and this PR had to patch the two in lockstep —
the drift risk in concrete form. Extract
`stripUnsupportedResponsesSamplingParams`. `store` stays inline: only the Chat
Completions handler has a non-Responses default for it.
Full suite: 6069 pass, 6 fail — the same six that fail on the unmodified base.1 parent 27a2b4e commit 5e4bf38
4 files changed
Lines changed: 42 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 92 | + | |
104 | 93 | | |
105 | 94 | | |
106 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
599 | 600 | | |
600 | 601 | | |
601 | 602 | | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
| 603 | + | |
616 | 604 | | |
617 | 605 | | |
618 | 606 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1524 | 1524 | | |
1525 | 1525 | | |
1526 | 1526 | | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
1527 | 1530 | | |
1528 | 1531 | | |
| 1532 | + | |
1529 | 1533 | | |
1530 | 1534 | | |
1531 | 1535 | | |
| |||
1544 | 1548 | | |
1545 | 1549 | | |
1546 | 1550 | | |
| 1551 | + | |
1547 | 1552 | | |
1548 | 1553 | | |
1549 | 1554 | | |
| |||
1563 | 1568 | | |
1564 | 1569 | | |
1565 | 1570 | | |
1566 | | - | |
| 1571 | + | |
1567 | 1572 | | |
1568 | 1573 | | |
1569 | 1574 | | |
| |||
0 commit comments