Switch the R4 failure trigger to a sliding window #133

Merged
weichen merged 1 commits from feature/agent-e4-escalation-ledger into main 2026-10-10 18:44:10 +00:00
Owner

R4 二次修复:连续计数在生产路径零触发(20 个失败与成功交错,每次成功重置计数)。改为滑动窗口——近 6 次结果中 ≥3 次失败即触发(每 run 一次);检索空命中独立阈值 2。附散布失败形态的回归锚点;下一轮 eval 须在转录中见到提醒实体。

R4 二次修复:连续计数在生产路径零触发(20 个失败与成功交错,每次成功重置计数)。改为滑动窗口——近 6 次结果中 ≥3 次失败即触发(每 run 一次);检索空命中独立阈值 2。附散布失败形态的回归锚点;下一轮 eval 须在转录中见到提醒实体。
weichen added 1 commit 2026-10-10 18:43:14 +00:00
Switch the R4 failure trigger to a sliding window
ci / vet-and-test (pull_request) Successful in 40s
6709325c38
Why: The consecutive-failure counter never fired in the live suite (0
reminders despite 20 failures) because real failures interleave with
successes - each success reset the streak. The pattern to catch is
"spinning overall", not "N in a row".

Evidence: go test ./... green; the anchor test now covers scattered
failures (3 in the last 6 outcomes escalates, 2 does not, once per run);
the next live run must show the reminder actually appearing in the
transcript.

Impact: recentOutcomes ring (last 6) replaces consecToolFailures; the
zero-hit search trigger keeps its own threshold (2); message wording
matches the window semantics.

Refs: Dev task feature/agent-e4-escalation-ledger (second fix-up).
weichen merged commit 6647d4879c into main 2026-10-10 18:44:10 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Backend#133