Repository navigation
[PR] fix: scope-gate (requireRecommendation) refusals no longer arm the compress breaker (#7197) - #7209
[PR] fix: scope-gate (requireRecommendation) refusals no longer arm the compress breaker (#7197)#7209ranxianglei wants to merge 1 commit into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10866-pr.7209.6b9e843This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7209.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…mpress breaker (#7197)⚠️ MODEL-FACING TEXT CHANGE: scope-gate refusal receipts no longer carry the 'COMPRESS CIRCUIT BREAKER: ARMED — STOP calling compress now: do not try other ranges, do not re-issue any previous range, and do not poll acp_status.' paragraph. The core refusal wording is unchanged. The model now sees the refusal + advice ('Call acp_status ... stay within them') and follows it with an in-recommendation retry — the recovery the removed paragraph forbade. No number/ref/position the model propagates moves. The out-of-recommendation scope gate is a range-correctness gate ('your span was wrong'), not a fold-feasibility signal. Its recovery (acp_status -> an in-recommendation retry) is always available and succeeds if followed, so arming the session-level breaker (which orders 'do not try other ranges ... do not poll acp_status') forbade the only recovery the code still allowed: an obedient model lost compression for the whole session while a disobedient one recovered on the next call. Remove noteCompressLoopFailure from the scope-gate branch; keep recordCompressFailure so the #6728 repeat-collapse still fires on identical re-submission. The nudge gate keeps the breaker charge (its recovery is 'wait for a nudge' - no self-recovery). Update tests/issue6728-policy-gate-ledger.test.ts: the requireRecommendation test now asserts the breaker stays disarmed and the repeat-collapse still fires.
017ad42 to
97c4a1e
Compare
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。与在途 PR #6924(open, "wire external-summary all-fail batches into the compress circuit breaker")同 compress-failure ledger 但方向相反——#6924 把 external-summary 全败加进 breaker,本 PR 把 scope-gate 拒绝移出 breaker;失败类型不同、改动分支不同,非重复。open PR 列表无其他同主题项。 审核结论(已拉取分支
标签: CI / 合并判定: 0 failed,9 success,9 queued(仍在跑),12 skipped(e2e 车道,env 门控,本 diff 不触发);分支落后 master 0 提交。模型面文本变更已在 commit + PR 顶部以 |
Scope-gate (
compress.requireRecommendation) refusal receipts no longer carry the "COMPRESS CIRCUIT BREAKER: ARMED — STOP calling compress now: do not try other ranges, do not re-issue any previous range, and do not poll acp_status." paragraph. The core refusal wording is unchanged. Consumption chain: the model sees the refusal + advice ("Call acp_status for the current compressible ranges and stay within them") and follows it with an in-recommendation retry — the recovery the removed paragraph forbade. No number/ref/position the model propagates moves; the receipt-level test asserts the exact model-visible string.Closes #7197
Problem
With
compress.requireRecommendation: true, three wrong range guesses armed the session-level compress circuit breaker (3-strike, #2146). The armed receipt (loopNoisePauseParagraph) tells the model "STOP calling compress now: do not try other ranges, do not re-issue any previous range, and do not poll acp_status." But the scope gate does NOT consult the breaker: an in-recommendation call still compresses normally, and a success clears the streak. The breaker wording therefore forbade the only recovery the code still allowed — an obedient model lost compression for the whole session while a disobedient one recovered on the next call.Root cause
#6753 (fix for #6728) added
noteCompressLoopFailureto BOTH policy-gate branches (nudge + scope). Correct for the nudge gate (its recovery is "wait for a nudge" — the model cannot self-recover), wrong for the scope gate: the scope gate is a range-correctness gate ("your span was wrong"), not a fold-feasibility signal. Its refusal means "try a different range", and the recovery (acp_status → in-recommendation retry) is always available. #6728's scenario was "a range bili will NEVER fold" (stopping is correct); #7197's is "a wrong range but a correct one exists" (stopping is wrong).Fix (issue suggestion #3)
noteCompressLoopFailurefrom the scope-gate branch (src/stream.ts).recordCompressFailure— the [Bug][pi] Policy-gate REFUSED receipts (compress.requireNudge / requireRecommendation) charge no failure ledger — endless byte-identical refusals, breaker never arms | 策略门 REFUSED 回执不计入失败账本:逐字重复拒绝、熔断永不启动 #6728 repeat-collapse protection is preserved (from the 2nd identical call the receipt collapses to a one-liner).tests/issue6728-policy-gate-ledger.test.ts: the requireRecommendation test now asserts the breaker stays disarmed and the repeat-collapse still fires.Regression review
recordCompressFailurestill fires; from the 2nd identical scope-gate call the receipt collapses to a one-liner (test feat: persistent + namespaced sessions, multi-tenant session isolation, stream robustness #5, unchanged, green).Tests
tests/issue6728-policy-gate-ledger.test.ts: 8/8 pass (scope-gate test rewritten for [Bug][dsh] Circuit breaker armed by compress.requireRecommendation range misses: receipt forbids the only recovery the code still allows | 范围猜错三次即武装熔断,而熔断文案禁止了代码仍允许的自救动作 #7197).issue2146-compress-loop-breaker/issue4812-armed-breaker-short-receipt/issue2432-breaker-awareness/compress-refused-ledger-align/issue5683-forbid-unprompted-compress: 48/48 pass.tests/loop-compress.test.ts: 13 pass / 6 fail — the SAME 6 failures exist on clean HEAD (pre-existing, environment-related, unrelated to this change; verified via stash).npm run typecheck: clean.Config surface
None.