Commit 01e7f2c
fix(libsy): anchor every pre-reply user message for the escalation judge and log verdicts (#639)
* Log escalation judge verdicts at debug
The escalation judge already returns a reason with every verdict, but the
router discarded it after reading the boolean, so an operator tuning the
judge prompt could not see why sessions were held on the efficient tier.
Keep the reason on the verdict and emit one debug event per verdict under
the util::escalation target; it is silent unless that target is enabled.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 5e6cf24ed4a86b223c2aba4940f43c655049a58e)
Signed-off-by: Lin Jia <linj@nvidia.com>
* Anchor every pre-reply user message as task framing for the escalation judge
The trajectory summary handed to the escalation judge pinned only the
first user message as the task statement. Codex sends an environment
context block as its first user message and the task as the second, so
the judge saw shell and cwd boilerplate as the task while the real task
sat in the rolling window, truncated to the per-message cap, and
scrolled out after about thirty messages. From then on every task-aware
pattern in the rubric (drift, unverified completion, violated
constraints) had nothing to compare against, and only friction patterns
could fire.
Treat every user message that precedes the first assistant reply as
task framing and anchor them all, with a wider per-message budget so a
multi-thousand-character feature specification survives intact.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit fc61f715ed165e73e0664e4a866ec3b99aa38742)
Signed-off-by: Lin Jia <linj@nvidia.com>
---------
Signed-off-by: Lin Jia <linj@nvidia.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>1 parent a9729f6 commit 01e7f2c
1 file changed
Lines changed: 75 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
92 | | - | |
93 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
94 | 99 | | |
95 | 100 | | |
96 | 101 | | |
| 102 | + | |
| 103 | + | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
| |||
126 | 133 | | |
127 | 134 | | |
128 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
129 | 143 | | |
130 | 144 | | |
131 | 145 | | |
| |||
262 | 276 | | |
263 | 277 | | |
264 | 278 | | |
265 | | - | |
| 279 | + | |
266 | 280 | | |
267 | 281 | | |
268 | 282 | | |
| |||
272 | 286 | | |
273 | 287 | | |
274 | 288 | | |
275 | | - | |
276 | | - | |
| 289 | + | |
| 290 | + | |
277 | 291 | | |
278 | 292 | | |
279 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
280 | 304 | | |
281 | 305 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | 306 | | |
288 | 307 | | |
289 | 308 | | |
| |||
508 | 527 | | |
509 | 528 | | |
510 | 529 | | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
511 | 573 | | |
512 | 574 | | |
513 | 575 | | |
| |||
0 commit comments