Skip to content

[PR] feat: configurable escalation nudge line (compress.nudgeEscalationPct) - #5270

Open
ranxianglei wants to merge 4 commits into
masterfrom
2026-10-31_nudge-escalation-pct
Open

ranxianglei wants to merge 4 commits into
masterfrom
2026-10-31_nudge-escalation-pct

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

What & why

The host-side escalation nudge line was hardcoded at EMERGENCY_NUDGE_ESCALATION_PCT (0.7) with no config surface (#5230). Once context usage crossed 70% of the effective window, a compression nudge fired even while the kernel's own cadence stayed silent — and the only way to move that line was to sed the built bundle. This makes it configurable.

Config surface

New field: compress.nudgeEscalationPct

  • Type: number | "N%" — ratio (0.85) or percent string ("85%").
  • Default: 0.7 — unchanged. Absent or non-positive values keep the previous hardcoded behavior byte-for-byte.
  • Levels: global → provider → model, deepest-wins per field (same merge as every other compress field).
  • Scope: host-only. It rides the ResolvedKernelConfig rail and is never sent to the kernel (no kernel field, no wire/message-shape change).
  • Why existing fields can't express it: maxContextLimit is the forced band (kernel field nudge.maxContextLimitPct). This is the separate host-side escalation line below it, which fires while the kernel cadence is still silent. No existing knob mapped to that specific line.
  • Interaction: if set at/above maxContextLimit, the kernel pressure band fires first at its lower line, so this one never arms.
  • Sign-off: owner named this exact field name in Effective window silently halved: 25% default output headroom + hardcoded 70% escalation nudge, both non-configurable #5230 suggestion 1.

Behavior change

None by default. With the default 0.7, every request resolves the identical line as before; only an explicit compress.nudgeEscalationPct moves the fire line. No kernel change, no wire change, no persistence-format change.

Tests

Closes #5230

@ranxianglei ranxianglei changed the title feat: configurable escalation nudge line (compress.nudgeEscalationPct) [PR] feat: configurable escalation nudge line (compress.nudgeEscalationPct) Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-31_nudge-escalation-pct (3555245)

Latest build — install this exact version

npm install -g billion-context@0.0.10903-pr.5270.5dd841d

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
3555245 billion-context@0.0.10903-pr.5270.5dd841d build
24fceb8 billion-context@0.0.10897-pr.5270.2eedbcd build
fcb969b billion-context@0.0.9141-pr.5270.cedf4d6 build
895c571 billion-context@0.0.9115-pr.5270.aff2090 build
92ed15d billion-context@0.0.7319-pr.5270.d639c16 build
6557f9b billion-context@0.0.7215-pr.5270.c98d113 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr5270.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Conflict-rebase done. The PR branch 2026-10-31_nudge-escalation-pct was ~2000 commits behind master and conflicted with its base. I rebased it onto current master and resolved every conflict; the mirror now reports the new head with no merge conflict.

What happened this run:

Verification on the pushed head:

  • npm run typecheck — clean
  • Targeted suites: issue5232-nudge-escalation-pct + issue453-backstop + issue3461-overlimit-exits + compress-settings — 75/75 pass
  • Doc gates reproduced locally: docs-sync PASS, config-surface-guard PASS, docs-coverage PASS
  • git merge-tree vs current master — clean (no conflicts)

Live status (verified this run, not from memory): mirror cache shows sha 895c5711d3, mergeable_state = blocked (branch-protection gating — required checks/reviews — not a merge conflict anymore), CI running on the new head with no failures at check time (5 success / 5 in progress / 7 queued / 13 skipped).

八问

  1. 是什么问题:PR 分支落后 master 约 2000 个提交,与基线分支冲突(merge state: dirty),无法合并。
  2. 什么原因导致的:PR 停在 10-30 的旧基线上;期间 master 发生了文档迁移(CONFIGURATION*.md → docs/configuration*.md,[PR] docs: batch-migrate 14 root-level documents into docs/ (consolidation + master index + redirect placeholders) | docs: 14 个根级文档一次性迁入 docs/(集中 + 总目录 + 重定向占位) #5920)、COMPRESS_SETTING_FIELDS 字段集扩充、以及 openai 车道 import 面变化(Request two capabilities: compressed block "retirement" and summary "external rewrite". | 请求两个能力:压缩块「退役」与摘要「外部重写」 #5765 blockOps gate),与 PR 触碰的同一片行域相撞。
  3. 影响范围与严重程度:仅阻塞该 PR 合并;不影响任何运行时行为。纯 rebase + 冲突解法(全部为「双方新增项并集」),零语义变更。
  4. 怎么修复的:rebase 到当前 master;三处冲突按「保留双方意图」的并集解法处理;文档行改由 YAML seed + 生成器落到新位置(恢复单一数据源纪律);push 前逐次核对远端 head 防并发。
  5. 是否有回归问题:无。逐项核过:resolveNudgeEscalationPct 四条车道 8 个调用点完整、默认 0.7 行为逐字节不变、master 侧新字段(blockOps 等)未被丢弃、生成产物重跑幂等无漂移。typecheck + 75/75 定向测试 + 三个文档门禁本地全过。
  6. 是否破坏缓存:不涉及(无 wire/存储/缓存改动)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:本次 rebase 未引入任何新配置;PR 本身的 compress.nudgeEscalationPct(默认 0.7,host-only)维持原样。

判定:冲突已全部解除(mirror 实测 blocked ≠ dirty),CI 在新 head 上运行中。合并仍属人工范畴(配置面新增字段不走自动合并),待 owner 验收。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

No action needed this run — the blocker notification was based on a stale snapshot. I re-verified everything against live sources before touching anything:

  • Remote branch head: 895c5711d3 (unchanged since my last force-push — no concurrent work on the branch).
  • Master: dc041dd1 (unchanged since my rebase base — nothing new to integrate).
  • Mirror cache (fetched moments ago): sha 895c5711d3, mergeable_state = blocked — i.e. no merge conflict anymore; blocked is GitHub branch-protection gating (required checks/reviews), which is the normal state for this PR since it adds a config field and merges human-only.
  • CI on the new head: fully green — all 30 checks completed: 16 success / 14 skipped / 0 failures. This includes the previously-red config-surface-guard and docs-sync gates.

So the conflict-resolution work from my previous run stands complete and verified end-to-end. I deliberately did NOT re-rebase or force-push again — the branch is clean against current master and pushing again would be pure churn.

八问

  1. 是什么问题:系统再次转发「PR 与基线冲突(dirty)」告警;本次核查确认是旧快照触发的重复通知,冲突实际已解除。
  2. 什么原因导致的:告警快照取自上次 force-push 之前(当时 merge state 还是 dirty);GitHub 重算 mergeable 需要时间,mirror 缓存随后已更新为 blocked(非 dirty)。
  3. 影响范围与严重程度:无实际影响——PR 当前无冲突、CI 全绿,仅差 owner 人工合并(配置面新增字段不走自动合并,属预期门禁)。
  4. 怎么修复的:本轮未做任何代码/推送动作;按「状态新鲜度」纪律先对远端 head、master、mirror 缓存、CI 逐项实测,确认无需操作。
  5. 是否有回归问题:不涉及——零改动。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及(PR 自身的 compress.nudgeEscalationPct 维持原样,默认 0.7)。

判定:冲突已解除 + CI 全绿(实测),无待办;待 owner 验收合并。若后续 master 再前进引发新冲突,下一轮触发时我会重新 rebase。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (ubuntu-latest, 22, 3), test (ubuntu-latest, 24, 1), test (windows-latest, 22, 4), test (windows-latest, 22, 2), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 24, 2), test (windows-latest, 22, 1), test (ubuntu-latest, 22, 2), test (ubuntu-latest, 22, 1) — stopping for human review

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Same stale blocker notification, third time — still verified clean, no action taken. Live checks this run: branch head 895c5711d3 (unchanged), master dc041dd1 (unchanged since my rebase base), mirror mergeable_state = blocked (not dirty — protection gating only), CI all completed: 16 success / 14 skipped / 0 failures. Nothing to rebase or fix; the full resolution report is my previous comment above. The PR is ready for owner merge whenever you get to it.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (ubuntu-latest, 22, 3), test (ubuntu-latest, 24, 1), test (windows-latest, 22, 4), test (windows-latest, 22, 2), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 24, 2), test (windows-latest, 22, 1), test (ubuntu-latest, 22, 2), test (ubuntu-latest, 22, 1) — stopping for human review

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(ai: vllm-qwen/qwen3.8-27b)

Review verdict: APPROVE (posted as a comment — the API refuses a formal approve event on a self-authored PR; feat-class merges are human-only per §7.4 regardless) — clean, well-scoped, default behavior byte-identical.

What I verified:

  1. Full path wiring. compress.nudgeEscalationPct -> parseCompressSettings (numberOrPercent validation, src/config.ts) -> mergeCompress deepest-wins pick (src/compress-settings.ts:74) -> applyCompressSettings maps parsePercent(v) onto the host-only ResolvedKernelConfig rail (src/compress-settings.ts:407) -> resolveRequestConfig carries it (hasCompressSettings uses the generic Object.values check, so a single-field config still resolves — no early-return trap) -> ccrLoopConfig shallow-spread keeps it -> resolveNudgeEscalationPct (src/server/budget.ts:65-74) returns the value iff finite and > 0, else the exact 0.7 constant. ALL FIVE evaluation points pass it in: the four lanes' emergencyPressureHeld call sites plus emergencyNudgeArmed's inner call via the new optional param; grep-verified no hardcoded 0.7 remains anywhere.
  2. Default path byte-identical. Unset -> resolver returns exactly the EMERGENCY_NUDGE_ESCALATION_PCT constant, the same value the old default parameter produced. KDD #8 cadence untouched; the field never reaches the kernel (host-only rail, same pattern as preserveRecentTools/externalSummary); both compression modes share this lane code, so both are covered.
  3. Tests are real, not tautological. Two-direction fire-line assertions (usage 0.75 fires under the default 0.7 line, silent under raised 0.85, fires at 0.9), full fallback matrix (absent/null/{}/0/-0.5/NaN/string -> 0.7), percent-string parse, three-level merge, rail carry-through. Re-hardcoding 0.7 or drifting the default would break them.
  4. House conventions. en+zh configuration.md parity, website seed + regenerated artifacts (I re-ran gen-config-docs: idempotent clean diff), config-surface-guard green, Config-surface section present in the PR body with sign-off basis. No version bump, no kernel/, no wire or persistence-format change.
  5. CI (mirror cache @ 895c571): 30 checks — 16 success + 14 skipped, 0 failed.

已顺手修:source-issue refs pointed at #5232 — an UNRELATED open PR that the Closes keyword would have auto-closed on merge. Repointed everything to the true source issue #5230 (its suggestion 1 names this field verbatim; its thread names this PR as the knob fix): test file renamed per the name-after-GitHub-issue-number convention, code/doc comments, website seed + regenerated artifacts, and the PR body (incl. the Closes line). Commit fcb969b pushed to the branch; CI re-runs on the new head.

Note for the human merging: #5230's other suggestions (output-headroom default move, panel/acp_status visibility) were deliberately scoped out per that thread. If you want #5230 kept open until those land, drop the closing keyword before merge; the body now says "Closes #5230" per house form because the thread frames the configurability core as resolved by this PR.


八问(中文)

  1. 是什么问题:宿主侧升级提醒线(escalation nudge line)硬编码在 0.7,没有配置面,想调只能改打包产物。
  2. 什么原因导致的:这条线是宿主侧独立于内核节奏的触发线,历史上直接写成常量 EMERGENCY_NUDGE_ESCALATION_PCT,从未接入配置系统。
  3. 影响范围与严重程度:体验瑕疵——功能可用、默认行为正确,但大窗口用户无法把触发线上移;无数据/安全风险。
  4. 怎么修复的:新增可选字段 compress.nudgeEscalationPct(number|"N%"),走既有 compress 三级合并(global→provider→model,逐字段最深优先),经 ResolvedKernelConfig 宿主侧轨道传到全部 5 个求值点;缺省或非正值回落到原 0.7 常量,默认路径逐字节不变。
  5. 是否有回归问题:逐项审过——默认 0.7 路径(resolver 回落值 = 旧默认参数值)、内核 nudge 节奏(KDD #8 未动)、两种压缩模式(共用同一 lane 代码)、wire/persistence(字段仅宿主侧、不下发内核)、单字段配置解析(hasCompressSettings 通用检查,无早退陷阱)。均保持,无意回归。
  6. 是否破坏缓存:不涉及——纯请求内决策参数,不碰缓存/重试/游标/去重键。
  7. 是否改了设计方向:不涉及——沿用既有配置层级与 rail 传递模式(与 preserveRecentTools/externalSummary 同型),无架构变化。
  8. 是否引入了新的配置:是。新 key compress.nudgeEscalationPct,类型 number|"N%",默认 0.7(与旧硬编码一致);可完全缺省,既有配置零迁移;按 #2030 纪律不新增 env 变量。

判定:可合(feat 类 → 按 §7.4 由人工合并)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b) Review done → APPROVE (posted as a review comment on the PR — the API refuses a formal approve event on a self-authored PR; feat-class merges are human-only per §7.4 anyway). Full verification + Chinese 8-question checklist are in that comment.

已顺手修:source-issue refs pointed at #5232 — an UNRELATED open PR the Closes keyword would have auto-closed on merge; repointed all in-repo refs, the test filename, and the PR body to the true source issue #5230 + commit fcb969b (pushed to the branch, CI re-runs on the new head).

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (ubuntu-latest, 22, 3), test (ubuntu-latest, 24, 1), test (windows-latest, 22, 4), test (windows-latest, 22, 2), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 24, 2), test (windows-latest, 22, 1), test (ubuntu-latest, 22, 2), test (ubuntu-latest, 22, 1) — stopping for human review

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Another stale "dirty" trigger — live state shows NO conflict. Verified this run against live sources:

No action taken: rebasing 13 commits of unrelated master movement would be pure churn and would rewrite the freshly-pushed fix-up commit; the PR merges cleanly as-is. Ready for owner merge whenever you get to it. If master moves again in a way that actually conflicts, the next real trigger will get a full rebase run like before.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (ubuntu-latest, 22, 3), test (ubuntu-latest, 24, 1), test (windows-latest, 22, 4), test (windows-latest, 22, 2), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 24, 2), test (windows-latest, 22, 1), test (ubuntu-latest, 22, 2), test (ubuntu-latest, 22, 1) — stopping for human review

ci-check added 3 commits November 19, 2026 05:30
…scalationPct

The host-side escalation-nudge line was hardcoded at EMERGENCY_NUDGE_ESCALATION_PCT (0.7) with no config surface (#5232). Add compress.nudgeEscalationPct (ratio or N%), deepest-wins across global/provider/model, riding the host-only ResolvedKernelConfig rail to all four prepare call sites; absent or non-positive values keep the 0.7 default byte-for-byte.

Documented in CONFIGURATION.md (en+zh); adds tests/issue5232-nudge-escalation-pct.test.ts. Closes #5232
…te web docs

The nudge-escalation commit hand-inserted its CONFIGURATION*.md table row without touching the YAML single source, so config-surface-guard flagged compress.nudgeEscalationPct as undocumented and docs-sync drifted on website/main.js + website/docs/index.html (never regenerated). Add the seed entry to website/config-reference/compress.yaml and regenerate the generator-owned artifacts. Docs-only; no code or behavior change. #5232
Review fix: the source issue for this knob is #5230 (its suggestion 1 names
compress.nudgeEscalationPct verbatim; its thread names this PR as the fix).
name-after-GitHub-issue-number convention, repoints code/doc comments and the
website seed text, regenerates the website artifacts. No logic change.
@ranxianglei
ranxianglei force-pushed the 2026-10-31_nudge-escalation-pct branch from fcb969b to 24fceb8 Compare November 18, 2026 21:39
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Conflict-rebase done — this time the conflict was real. Master had moved 630 commits since my last rebase and genuinely conflicted with the PR. Rebased onto current master a446a3c1, resolved everything, verified locally, and pushed the final head 24fceb819e (unmarked → this branch's one full CI pass, per the CI-hold policy).

What happened this run:

Verification on the pushed head:

  • npm run typecheck — clean
  • Targeted suites: issue5230-nudge-escalation-pct (renamed by the fix-up commit) + issue453-backstop + issue3461-overlimit-exits + compress-settings — 75/75 pass
  • Doc gates reproduced locally with the exact CI paths (incl. docs/configuration.ja.md): docs-sync PASS, config-surface-guard PASS, docs-coverage PASS
  • git merge-tree vs current master — clean

Live status (verified this run): mirror shows sha 24fceb819e, mergeable_state = blocked (protection gating, not dirty), CI running on the new head (5 success / 12 in progress / 13 skipped, no failures at check time).

八问

  1. 是什么问题:master 又前进了 630 个提交,与 PR 分支产生真实冲突(merge-tree 实测 CONFLICTS),PR 无法合并。
  2. 什么原因导致的:两层——①openai 车道 budget.js import 面被 master 扩充(output-budget 三函数),与 PR 的 resolveNudgeEscalationPct import 撞行;②master 新增了日语文档支持,生成器现在对缺 desc_ja 的 seed 条目直接报错退出,而本 PR 的 seed 条目写于该要求之前。
  3. 影响范围与严重程度:仅阻塞该 PR 合并;不影响运行时行为。冲突解法全部为「双方新增项并集」,零语义变更;补 desc_ja 是文档面补齐,不改任何字段含义/默认值。
  4. 怎么修复的:rebase 到当前 master;import 冲突取并集;为 seed 条目补 desc_ja(ework-translate 翻译、风格对齐相邻条目)并折进 docs 提交;按提交顺序分步解 yaml 冲突,保证 docs 提交与 Effective window silently halved: 25% default output headroom + hardcoded 70% escalation nudge, both non-configurable #5230 ref 修正提交各自意图完整;最后用当前生成器全量重跑产物(含新增的 ja 文档)。
  5. 是否有回归问题:无。四条车道 8 个 resolveNudgeEscalationPct 调用点完整、默认 0.7 行为逐字节不变、master 侧新 import(output-budget)未被丢弃、en/zh/ja 三语文档 i18n 一致性由生成器校验通过、typecheck + 75/75 定向测试 + 三个文档门禁(按 CI 同款路径)本地全过。
  6. 是否破坏缓存:不涉及(无 wire/存储/缓存改动)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:本次 rebase 未引入新配置;PR 自身的 compress.nudgeEscalationPct(默认 0.7,host-only)维持原样,仅补齐了它的日语文档描述。

判定:冲突已全部解除(mirror 实测 blocked ≠ dirty),CI 在新 head 上运行中、暂无失败。合并仍属人工范畴(配置面新增字段不走自动合并),待 owner 验收。

The declaration was 4-space indented while its surrounding block is
8-space (prepare-anthropic/google/openai/responses). Whitespace-only,
no semantic change.

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(ai: vllm-qwen/qwen3.8-27b)

Round-2 review — rebased head: APPROVE (posted as a comment: the platform blocks approving one's own PR; same as round 1).

Re-verified end-to-end after the 2026-11-18 conflict-rebase onto master a446a3c1 (head 24fceb819e):

  • Content unchanged from round 1. Sorted +/− line-set diff of the PR diff against the old base (dc041dd1) vs the new base (a446a3c1): only 4 rebase-artifact lines — the desc_ja line in website/config-reference/compress.yaml (faithful ja translation of the en/zh text), the docs/configuration.ja.md row, and the prepare-*.ts import lines that now also carry master's outputBudgetField/readOutputBudget/writeOutputBudget. All 14 files, +138/−16. No semantic drift.
  • Round-1 fix intact. Zero #5232 refs on the new head; all #5230 refs intact (src/compress-settings.ts:1, src/config.ts:1, src/server/budget.ts:2, tests/issue5230-nudge-escalation-pct.test.ts:7, website/config-reference/compress.yaml:2). PR body still Closes #5230 (3 refs, 0 stray).
  • CI green on 24fceb819e. 52 check runs, all completed: 38 success + 14 skipped, 0 failed (mirror cache was 8h stale mid-run; verified via a single one-shot check-runs fetch for the head sha, no polling).
  • Merge state. mergeable: True, based exactly on current master (merge-base = origin/master).
  • Scope unchanged. No kernel/, no version bump, no config surface beyond the one field declared in round 1. Default behavior byte-identical (unset → exact 0.7 constant = old default param).

One small finding, fixed on the spot: the const nudgeEscalationPct = resolveNudgeEscalationPct(loopConfig); declaration was 4-space indented while its surrounding block is 8-space, in all four lanes (src/server/prepare-anthropic.ts:317, src/server/prepare-google.ts:167, src/server/prepare-openai.ts:250, src/server/prepare-responses.ts:294). Pre-existing from the original PR, not a rebase artifact. Whitespace-only fix pushed as 3555245e14 (new head); CI re-running on it.

8问(中文,供人工复核)

  1. 是什么问题:升级 nudge 线(usage 越过多少比例后,即使 kernel 周期沉默也注入压缩 nudge)此前硬编码 0.7、不可配置;本 PR 增加 compress.nudgeEscalationPct 配置项。
  2. 什么原因导致的:emergencyNudge 的触发比例是写死的常量 EMERGENCY_NUDGE_ESCALATION_PCT = 0.7,配置层没有对应字段。
  3. 影响范围与严重程度:仅影响想在这条线上偏离 0.7 的用户;默认行为逐字节不变(未设置 → 精确 0.7 常量 = 旧默认参数),无回归面。
  4. 怎么修复的:配置字段(number 或 "N%")经 parseCompressSettings → mergeCompress(global→provider→model 最深胜出)→ applyCompressSettings 映射到 ResolvedKernelConfig 的 rail(host-only,从不发给 kernel);消费端 resolveNudgeEscalationPct 对非法值(非 number / 非有限 / ≤0)回退 0.7 常量;5 个求值点(4 条 lane 的 emergencyPressureHeld + emergencyNudge 内层经 emergencyNudgeArmed)全部接线。
  5. 是否有回归问题:审过既有行为——默认路径逐字节不变;KDD #8 的 50K 周期不变;旧 kernel 忽略多余 rail key(与 preserveRecentTools/externalSummary 先例一致);plugin/proxy 两种压缩模式共用 lane 代码,两侧一致。无回归。
  6. 是否破坏缓存:不涉及——不触碰缓存/重试/游标/去重键。
  7. 是否改了设计方向:不涉及——纯配置面扩展,复用既有 compress 配置层级。
  8. 是否引入了新的配置:是——compress.nudgeEscalationPct,number 或 "N%" 字符串,默认 0.7(等效未设置),host-only;已按规范在 docs/configuration.md(en/zh/ja)+ website config-reference(en/zh/ja)声明。

判定:可合(feat 类按 §7.4 走人工合并;merge 会经 Closes #5230 自动关闭源 issue)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

已顺手修:四个 lane 里 nudgeEscalationPct 声明的缩进(4 空格 → 8 空格,纯空白,原 PR 自带非 rebase 引入)+ commit 3555245

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

Round-2 review complete — APPROVE (posted to GitHub PR #5270 as review comment 5966155776; the platform blocks a formal self-approve, same as round 1).

What changed since round 1: the branch was rebased onto current master a446a3c1 (conflicts resolved by the rebase lane 2026-11-18). New head 24fceb819e.

Re-verification:

  • Content: PR semantic hunks are byte-identical to what was reviewed and approved in round 1 (verified via sorted +/− line-set diff of the old-base vs new-base PR diff). The only differences are 4 rebase-artifact lines, all correct: the desc_ja line in website/config-reference/compress.yaml (faithful ja translation), the docs/configuration.ja.md row, and the prepare-*.ts import lines that now also carry master's outputBudgetField/readOutputBudget/writeOutputBudget.
  • Issue refs: zero #5232 refs on the new head; all #5230 refs intact; PR body still Closes #5230 (3 refs, 0 stray).
  • CI: green on 24fceb819e — 52 check runs, all completed: 38 success + 14 skipped, 0 failed. (Mirror cache was 8h stale mid-run; verified via a single one-shot check-runs fetch for the head sha, no polling.)
  • Merge state: mergeable: True, based exactly on current master.
  • Scope: no kernel/, no version bump, no config surface beyond the one field declared in round 1.

Small finding, fixed on the spot: the nudgeEscalationPct declaration was 4-space indented while its surrounding block is 8-space, in all four lanes (src/server/prepare-anthropic.ts:317, src/server/prepare-google.ts:167, src/server/prepare-openai.ts:250, src/server/prepare-responses.ts:294) — pre-existing from the original PR, not a rebase artifact. Whitespace-only fix pushed as 3555245e14 (new head); CI re-running on it.

Verdict: APPROVE — mergeable once CI is green on 3555245e14 (a whitespace-only delta over the green head). feat class → human merge per §7.4; the merge auto-closes source issue #5230 via Closes.

8问(中文)

  1. 是什么问题:升级 nudge 线(usage 越过多少比例后,即使 kernel 周期沉默也注入压缩 nudge)此前硬编码 0.7、不可配置;本 PR 增加 compress.nudgeEscalationPct 配置项。
  2. 什么原因导致的:emergencyNudge 的触发比例是写死的常量 EMERGENCY_NUDGE_ESCALATION_PCT = 0.7,配置层没有对应字段。
  3. 影响范围与严重程度:仅影响想在这条线上偏离 0.7 的用户;默认行为逐字节不变(未设置 → 精确 0.7 常量 = 旧默认参数),无回归面。
  4. 怎么修复的:配置字段(number 或 "N%")经 parseCompressSettings → mergeCompress(global→provider→model 最深胜出)→ applyCompressSettings 映射到 ResolvedKernelConfig 的 rail(host-only,从不发给 kernel);消费端 resolveNudgeEscalationPct 对非法值(非 number / 非有限 / ≤0)回退 0.7 常量;5 个求值点(4 条 lane 的 emergencyPressureHeld + emergencyNudge 内层经 emergencyNudgeArmed)全部接线。
  5. 是否有回归问题:审过既有行为——默认路径逐字节不变;KDD feat: release CI (npm auto-publish on release branch) #8 的 50K 周期不变;旧 kernel 忽略多余 rail key(与 preserveRecentTools/externalSummary 先例一致);plugin/proxy 两种压缩模式共用 lane 代码,两侧一致。无回归。
  6. 是否破坏缓存:不涉及——不触碰缓存/重试/游标/去重键。
  7. 是否改了设计方向:不涉及——纯配置面扩展,复用既有 compress 配置层级。
  8. 是否引入了新的配置:是——compress.nudgeEscalationPct,number 或 "N%" 字符串,默认 0.7(等效未设置),host-only;已按规范在 docs/configuration.md(en/zh/ja)+ website config-reference(en/zh/ja)声明。

判定:可合(CI 在 3555245e14 上转绿后)。

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(ai: vllm-qwen/qwen3.8-27b)

Round-3 confirmation — head 3555245e14: APPROVE stands.

This head is the round-2-reviewed 24fceb819e plus the whitespace-only indent fix I pushed in round 2. Verified the delta is exactly 4 lines (one per lane: src/server/prepare-anthropic.ts, prepare-google.ts, prepare-openai.ts, prepare-responses.ts — const nudgeEscalationPct = resolveNudgeEscalationPct(loopConfig); re-indented 4→8 spaces to match its block); git diff -w 24fceb819e..3555245e14 is empty, i.e. zero non-whitespace change. No new findings; nothing to fix.

CI on 3555245e14 (mirror cache): 0 failed so far — 5 success + 13 skipped completed, 10 in progress + 2 queued (test shards). The base head 24fceb819e was fully green (52/52: 38 success + 14 skipped), so this run is the formality over a whitespace-only delta.

8问(中文)

  1. 是什么问题:同 round-2——升级 nudge 线硬编码 0.7 不可配置,本 PR 增加 compress.nudgeEscalationPct。
  2. 什么原因导致的:触发比例是写死常量 EMERGENCY_NUDGE_ESCALATION_PCT = 0.7,配置层无对应字段。
  3. 影响范围与严重程度:仅影响想偏离 0.7 的用户;默认行为逐字节不变,无回归面。
  4. 怎么修复的:配置字段经 parseCompressSettings → mergeCompress(最深胜出)→ applyCompressSettings 映射到 ResolvedKernelConfig rail(host-only);消费端非法值回退 0.7 常量;5 个求值点全部接线。
  5. 是否有回归问题:无——本 head 相对已审 head 仅 4 行空白(git diff -w 为空),语义零变化;round-2 的既有行为清点(默认路径逐字节不变、KDD #8 周期不变、旧 kernel 忽略多余 rail key、双压缩模式一致)继续成立。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:是——compress.nudgeEscalationPct(number 或 "N%",默认 0.7,host-only),已在 docs(en/zh/ja)+ website config-reference(en/zh/ja)声明。

判定:可合(CI 在 3555245e14 上转绿后;feat 类走人工合并,merge 经 Closes #5230 自动关闭源 issue)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

Round-3 review complete — APPROVE stands (posted to GitHub PR #5270 as review comment 5966361150).

The new head 3555245e14 is the round-2-reviewed 24fceb819e plus the whitespace-only indent fix I pushed in round 2. Verified: the delta is exactly 4 lines (one per lane, const nudgeEscalationPct = resolveNudgeEscalationPct(loopConfig); re-indented 4→8 spaces), and git diff -w 24fceb819e..3555245e14 is empty — zero non-whitespace change. No new findings, nothing to fix.

CI on 3555245e14 (mirror cache): 0 failed so far — 5 success + 13 skipped completed, 10 in progress + 2 queued (test shards). The base head 24fceb819e was fully green (52/52), so this run is the formality over a whitespace-only delta.

Verdict: APPROVE — mergeable once CI is green on 3555245e14. feat class → human merge per §7.4; the merge auto-closes source issue #5230 via Closes.

8问(中文)

  1. 是什么问题:升级 nudge 线(usage 越过多少比例后,即使 kernel 周期沉默也注入压缩 nudge)此前硬编码 0.7、不可配置;本 PR 增加 compress.nudgeEscalationPct 配置项。
  2. 什么原因导致的:触发比例是写死的常量 EMERGENCY_NUDGE_ESCALATION_PCT = 0.7,配置层没有对应字段。
  3. 影响范围与严重程度:仅影响想在这条线上偏离 0.7 的用户;默认行为逐字节不变(未设置 → 精确 0.7 常量 = 旧默认参数),无回归面。
  4. 怎么修复的:配置字段(number 或 "N%")经 parseCompressSettings → mergeCompress(global→provider→model 最深胜出)→ applyCompressSettings 映射到 ResolvedKernelConfig 的 rail(host-only,从不发给 kernel);消费端 resolveNudgeEscalationPct 对非法值回退 0.7 常量;5 个求值点全部接线。
  5. 是否有回归问题:无——本 head 相对已审 head 仅 4 行空白(git diff -w 为空),语义零变化;既有行为清点(默认路径逐字节不变、KDD feat: release CI (npm auto-publish on release branch) #8 的 50K 周期不变、旧 kernel 忽略多余 rail key、plugin/proxy 双模式一致)继续成立。
  6. 是否破坏缓存:不涉及——不触碰缓存/重试/游标/去重键。
  7. 是否改了设计方向:不涉及——纯配置面扩展,复用既有 compress 配置层级。
  8. 是否引入了新的配置:是——compress.nudgeEscalationPct,number 或 "N%" 字符串,默认 0.7(等效未设置),host-only;已按规范在 docs/configuration.md(en/zh/ja)+ website config-reference(en/zh/ja)声明。

判定:可合(CI 在 3555245e14 上转绿后)。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Effective window silently halved: 25% default output headroom + hardcoded 70% escalation nudge, both non-configurable

1 participant