Repository navigation
Commit 62f0222
authored
* fix(codex): promote a healthy detour instead of releasing it, and honour Retry-After (#4546)
Refs #4546. PRD R07.
When a transient hold outlived its window, routing deleted the whole affinity entry -- including
the detour account that had actually been serving the thread -- and re-picked cold. The timer
expiring restores the right to re-decide; it is not itself a recovery, and treating it as one
threw away the single piece of evidence the request had. A still-healthy detour is now promoted
to the binding instead, with the move recorded as rebound/transient_hold_expired so the reason is
visible. A detour that has itself gone unhealthy still falls through to the cold path.
Retry-After is a lower bound on the transient path. The local maximum delay bounds our own
exponential backoff and has no business shortening a wait the provider stated: sending early is a
request we already know will be refused, which is the storm the header exists to prevent. It is
opt-in per caller so the change lands on the transient path first rather than silently lengthening
every adapter's backoff, and an honoured wait is ceilinged at one minute so an hour-long
Retry-After cannot park a request.
* docs(devlog): record the R07 detour-promotion outcome (#4546)
1 parent 9f39e75 commit 62f0222
4 files changed
Lines changed: 106 additions & 2 deletions
File tree
- devlog/_plan/260914_cost_guard_stabilization
- src
- codex
- lib
- tests/lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2946 | 2946 | | |
2947 | 2947 | | |
2948 | 2948 | | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
| 2952 | + | |
| 2953 | + | |
| 2954 | + | |
| 2955 | + | |
| 2956 | + | |
| 2957 | + | |
| 2958 | + | |
| 2959 | + | |
| 2960 | + | |
| 2961 | + | |
| 2962 | + | |
| 2963 | + | |
| 2964 | + | |
| 2965 | + | |
| 2966 | + | |
| 2967 | + | |
| 2968 | + | |
| 2969 | + | |
| 2970 | + | |
| 2971 | + | |
| 2972 | + | |
| 2973 | + | |
| 2974 | + | |
2949 | 2975 | | |
2950 | 2976 | | |
2951 | 2977 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
136 | 144 | | |
137 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
138 | 149 | | |
139 | 150 | | |
140 | 151 | | |
| |||
284 | 295 | | |
285 | 296 | | |
286 | 297 | | |
287 | | - | |
288 | 298 | | |
289 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
290 | 312 | | |
291 | 313 | | |
292 | 314 | | |
| |||
504 | 526 | | |
505 | 527 | | |
506 | 528 | | |
| 529 | + | |
507 | 530 | | |
508 | 531 | | |
509 | 532 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
253 | 289 | | |
254 | 290 | | |
255 | 291 | | |
| |||
0 commit comments