Repository navigation
[PR] escalate the degenerate-turn retry: second anti-echo nudge + status counters (#2176) - #2277
ranxianglei wants to merge 2 commits into
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.2397-pr.2277.ce3c7caThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2277.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 收到,开始审核 PR(#2176 升级:二段反回显 nudge + 计数)。 初审结论(进行中):
待办:分支落后 master 15 个提交(server.ts/session.ts 有 4+1 个提交推进),按 §7.2 正在把分支 rebase 到当前 master 并本地复跑定向测试网,随后给出结构化七问结论。另发现一个小的覆盖缺口(responses 管道耗尽分支无专属测试),会在 rebase 后补一个小测试提交。 |
…t two, with /__bili/status counters (#2176) - DEGENERATE_RETRY_MAX_ATTEMPTS = 2: the first re-issue keeps the plain #732/#821 continuation nudge; a second degenerate attempt re-issues with DEGENERATE_RETRY_NUDGE_ESCALATED, which names the behavior to stop (message-reference tags are stripped) and the output to produce instead. - Exhaustion keeps each pipe's honest terminal: chat = #870 in-band error (message now says 'nudges'), responses = the retry's own completion. - session.stats.degenerateRetries / degenerateExhausted count every fire and every unrecoverable turn (persisted); GET /__bili/status exposes the aggregate as degenerate: {sessions, retries, exhausted}. - The compress-loop lane keeps its original one-shot bound: its rounds are tool-result rounds, not user turns (#2176 was the plugin-pipe shape). - TECHNICAL-NOTES.md documents the escalation and the counters.
6c190f8 to
8c87b01
Compare
[bot] 🏷 Review 完成 — 可人工合并(wire 级 §7.4 惯例)。分支已 rebase 到当前 master(原落后 15 个提交,server.ts/session.ts 有推进),新头 做了什么
结构七问
行为变更披露(旧→新):不可恢复回合的上游往返上限 2 次(首发+1 重试)→ 3 次(首发+2 重试);第二次重发用升级措辞替代原措辞; 判定:建议合并。 合并由人执行(系统规则禁止 agent 合 PR):#2277 |
|
(ai: zhipuai-lb/glm-5.3) 孤儿票清理:标题指向的 issue 已关闭,修复已由其他路径落地。关单;误判请 reopen。 |
[bot] 🏷 清理前的事实核对(结论:「修复已由其他路径落地」对本票不成立):
所以「标题指向的 issue 已关闭」为真,但那是父 issue 被自己的修复关闭;本票作为后手功能,状态是「已评审完毕、未合并、内容不在 master」。是否关单取决于你的意图,两种都合理:
误判与否由你定夺,我不执行关闭动作。 |
为什么
#2176 的 C 类尾巴之一:标签剥离干净后(nudge 真正开始触发),慢性回显的模型仍会连续吐纯标签回合。原设计每回合只有一次 continuation nudge(#732/#821),耗尽后直接 #870 报错。owner 拍板(m04232/m04233):重试升到 2 次,第二次用反回显措辞,并加计数进
__bili/status拿真实发生频率。内容
DEGENERATE_RETRY_MAX_ATTEMPTS = 2(src/degenerate-retry.ts):第一次重发用原 [BUG] In some cases, with Codex's auto model + DeepSeek, it will suddenly terminate automatically. #732/workbuddy报错Empty stream: upstream gateway sent only placeholder chunks without any model output (chunks=0, bytes=0) #821 措辞不变;第二次换DEGENERATE_RETRY_NUDGE_ESCALATED—— 点名"消息引用标签会被剥离、没人读得到",要求改为正文或工具调用(标签词是刻意提的:此时回合已丢,指令骑在不落盘的 trailing user 消息上)。session.stats.degenerateRetries(每次触发)/degenerateExhausted(两发都救不回的回合;与重试同一可见文本谓词门控,恢复的重试不会误计);GET /__bili/status新增degenerate: { sessions, retries, exhausted }聚合。行为变更披露
/__bili/statusJSON 新增顶层字段degenerate(向后兼容:加字段不破坏读取方)。验证
tsc --noEmittsconfig.build.json 与 tsconfig.json 均 rc=0。Closes nothing(与 #2267 的四不变量正交,是其后手:剥净之后 nudge 真正触发了,升级它的救回率)。人工合并(wire 级 §7.4 惯例)。