Skip to content

[PR] docs: clarify that frequent nudges are independent of window occupancy (#5893) - #5896

Open
ranxianglei wants to merge 1 commit into
masterfrom
2026-11-07_nudge-window-independence-docs
Open

ranxianglei wants to merge 1 commit into
masterfrom
2026-11-07_nudge-window-independence-docs

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #5893

Documentation addendum from user feedback: frequent nudge appearances are easily misread as "context nearly full", so models trim normal output early or misexplain the state. Nudges actually fire on the growth of compressible content (default one step per 50,000 tokens via compress.nudgeGrowthTokens), independent of window occupancy.

Changes (docs only, 4 files, +22 lines):

  • README.zh-CN.md + README.md — new FAQ paragraph after "When does compression happen?": frequent nudges are normal growth-based rhythm, not a water-level alarm; the only real danger signals are usage reaching the forced-compaction line at maxContextLimit (default 75%, on the effective window after the output reservation) and preflight when the input alone exceeds the window; check actual headroom on the /acp panel's Nudge: line (max compressible X < threshold 50000 = not yet a full growth step).
  • CONFIGURATION.zh-CN.md + CONFIGURATION.md — end of the "first compaction waits until 200k" section: don't treat the nudge as a water level; judge real headroom with the absolute numbers on /acp or the web panel usage percentage.

Precision adjustments vs the original proposal (mechanics verified against code):

  • maxContextLimit is stated as applying to the effective window (output reservation subtracted first), matching the existing CONFIGURATION wording; kernel default is 75% (kernel/src/config.ts).
  • The reading is anchored to the /acp panel's Nudge: line (reason string produced by the kernel's compress pass, rendered in src/acp-status.ts) rather than a vague "end of the panel".

English mirrors added per the repo zh/en docs-sync convention. The website panel FAQ (separate condensed i18n surface) is deliberately untouched.

@ranxianglei ranxianglei added documentation Improvements or additions to documentation p3 labels Nov 7, 2026
@ranxianglei ranxianglei changed the title docs: clarify that frequent nudges are independent of window occupancy (#5893) [PR] docs: clarify that frequent nudges are independent of window occupancy (#5893) Nov 7, 2026
@ranxianglei
ranxianglei force-pushed the 2026-11-07_nudge-window-independence-docs branch from a5dc8aa to c241aa3 Compare November 7, 2026 15:51
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-07_nudge-window-independence-docs (2d9411c)

Latest build — install this exact version

npm install -g billion-context@0.0.8949-pr.5896.20d3cf6

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
2d9411c billion-context@0.0.8949-pr.5896.20d3cf6 build
c241aa3 billion-context@0.0.8547-pr.5896.cb44faa build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr5896.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)

独立复审 PR #5896(现 head c241aa37fa,base master cda6e73501)。先说明:合并冲突已由先前的 ci-engineer 运行(Floor 5)rebase + force-push 解决完毕,本次没有重做该操作——重新 fetch 复核确认远端 head 即 c241aa37fa、master 为其祖先、git merge-tree 干净。本次的增量是 floor 5 未覆盖的部分:逐条对照源码核验文档内容的技术准确性。结论:内容正确、可合。

八问

  1. 是什么问题:用户反馈——模型把「nudge 频繁出现」误读成「上下文快满了」,于是过早裁剪正常输出或对状态做错误解释。本 PR 是纯文档补充,澄清 nudge 的真实触发机制。
  2. 什么原因导致误解:nudge 按「可压缩内容的增长量」触发(compress.nudgeGrowthTokens,默认每 50k token 一步、与窗口大小无关),和窗口占用率无关;长会话里反复出现是正常节奏。原文档未把它和「水位报警」显式区分 → 被混淆。
  3. 影响范围与严重程度:p3,纯文档清晰度。零代码 / 零 wire / 零配置 / 零持久化变更;只影响 README/CONFIGURATION 可读性,无运行时影响。属理解类瑕疵,但针对的是会诱导模型次优行为的真实误解,值得补。
  4. 怎么修的(含我的独立核验):README(en+zh)在「压缩什么时候发生」后加一条 FAQ;CONFIGURATION(en+zh)在「第一次压缩为何等到 ~200k」末尾加一句经验法则;均指向具体信号(maxContextLimit 强制线 + 预检 + /acp Nudge 行读数)。我对每条断言核了源码,全部属实:
    • 默认 50k 步长:kernel/src/config.ts:16-17(growthFloor/Cap=50000);knob compress.nudgeGrowthTokens 真实存在。
    • 与占用率无关:kernel nudge 按增长/mass 门控而非百分比(fix: merge all system/developer messages into one leading message (SGLang #377) #379)。
    • maxContextLimit 默认 75%:kernel/src/config.ts:10(maxContextLimitPct:0.75)。
    • 「作用在扣掉输出预留后的有效窗口」:src/util.ts:593 reserveOutputHeadroom() = window−reserved;src/server/handle.ts:2465-2492 将 kernel 的 modelContextLimit 置为该 reserved 值(日志 "nudge/preflight judge input against ${reserved}")→ 属实,且与既有 CONFIGURATION 措辞一致。
    • /acp Nudge 行 + 读数串:src/acp-status.ts:273 渲染 Nudge: ACTIVE/idle — ${reason};精确串在 kernel/src/compress.ts:2271 max compressible ${maxPending} < threshold ${minTierThreshold}。
    • usage 公式:kernel/src/compress.ts:2016-2022(usage=tokenCount/modelContextLimit,overLimit=usage≥maxContextLimitPct)。
      (注:re-sync 时标题措辞略有打磨——EN “…the context is running out”、ZH「上下文告急」——均为改进,仍准确。)
  5. 是否有回归问题:无。纯新增文档,未触碰任何代码路径;四个文件既有内容 rebase 后逐项核对均原样保留;无阈值/时序/输出格式/缓存语义漂移;zh/en 已同步;无残留冲突标记。
  6. 是否破坏缓存:不涉及(无任何运行时/缓存逻辑改动)。
  7. 是否改了设计方向:不涉及(纯文档)。
  8. 是否引入新配置:无。仅引用既有 knob(compress.nudgeGrowthTokens、maxContextLimit),引用准确。

当前实查状态:GitHub API mergeable=true、mergeable_state=blocked(= 等必需 checks/review,非文本冲突);CI(镜像缓存 @c241aa37fa)30 项 failed=0、pending=10(test 矩阵 + static-gates 仍在跑,已完成项全 success、e2e 按默认 skip),docs-only 这些分片预期通过;最终 diff 相对 master 仍为原样 4 文件纯新增 22 行。

收工判定:内容正确、diff 干净、无回归、冲突已闭环。仅剩常规 CI 收尾 + owner 人工合并(docs PR 我不合并)。建议 CI 绿后由 owner 直接合并 #5896。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

#5893)

Add the user-proposed addendum in two places, with English mirrors per the
zh/en sync convention:

- README FAQ (zh+en), after 'When does compression happen?': frequent nudge
  appearances are normal growth-based rhythm, not a context-pressure alarm;
  the only real danger signals are the maxContextLimit forced-compaction line
  (75% default, on the effective window after the output reserve) and preflight.
- CONFIGURATION (zh+en), end of the 'first compaction waits until 200k'
  section: don't treat the nudge as a water level; read actual headroom from
  the /acp Nudge line or the web panel usage percentage.

Precision adjustments vs the proposal: maxContextLimit is stated as applying
to the effective window (output reservation subtracted), matching the existing
CONFIGURATION text; the /acp reading is anchored to the 'Nudge:' panel line.
@ranxianglei
ranxianglei force-pushed the 2026-11-07_nudge-window-independence-docs branch from c241aa3 to 2d9411c Compare November 10, 2026 14:23
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Second conflict-rebase done and pushed. Note: the mirror cache stayed stale through this whole run (still showing the previous sha), so merge-state below comes from a single live GitHub API read, not polling.

七问

  1. 是什么问题:同一 PR([PR] docs: clarify that frequent nudges are independent of window occupancy (#5893) #5896)冲突车道再次触发。实查发现不是上一轮修复失效——master 在我上次推送后再次前进(cda6e73 → 58a8796,约 30 个合并),产生了新的冲突。
  2. 什么原因导致的:master 合入了文档大迁移(根目录 CONFIGURATION.md / CONFIGURATION.zh-CN.md 变成指向 docs/configuration(.zh-CN).md 的重定向 stub,[PR] docs: batch-migrate 14 root-level documents into docs/ (consolidation + master index + redirect placeholders) | docs: 14 个根级文档一次性迁入 docs/(集中 + 总目录 + 重定向占位) #5920 布局调整),本 PR 的增补段落原目标是旧路径 → 两个根文件整文件冲突;README.zh-CN.md 里 master 把「~200k」条目的链接改成了 docs/ 新路径,与本 PR 在相邻锚点插入的段落撞车。README.md 干净自动合并。
  3. 影响范围与严重程度:纯文档,零代码、零 wire、零配置变更;仅影响 FAQ/配置文档的落位。无用户面影响。
  4. 怎么修复的:rebase 到当前 master(58a8796)。根目录两个 CONFIGURATION 文件取 master 侧 stub(不再回填旧内容);PR 的两段增补逐字迁到新的规范位置——docs/configuration.md「first compaction waits until 200k」节末尾(+7 行,英文)与 docs/configuration.zh-CN.md 同锚点(+2 行,中文);README.zh-CN.md 按意图取并集(nudge 条目在前,master 更新过链接的 ~200k 条目在后)。最终 diff 相对 master 仍为纯新增 22 行、0 删除,无任何夹带改动。
  5. 是否有回归问题:无。全量 diff 逐段核过:master 既有内容全部原样保留,新增段落插入位置与原 PR 意图一致,docs/ 链接在 master 上真实存在;无阈值/时序/输出格式变化。
  6. 是否引入新配置:不涉及。
  7. 结论:force-with-lease 推送成功(c241aa3 → 2d9411c,推送前 fetch 确认远端 head 未动、无并发写入)。实查 GitHub:mergeable=true,mergeable_state=blocked——冲突已清除,剩余拦截是常规 review/checks 门禁。docs-only 变更,以新 head 的 CI 结果为准。本轮闭环。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Status after my process stalled ~35 min and was force-restarted: I re-verified everything against LIVE sources in this run before touching anything — and found nothing left to fix. The blocker notification that woke me was stale (it described the pre-rebase dirty state); the conflict has been resolved since my last push and no new one appeared.

Live evidence (this run):

  • Remote PR head is still my second rebase 2d9411cefb (no concurrent writers moved the branch)
  • origin/master is unchanged at 58a8796224 — exactly the base my rebase sits on, so no new conflict could have formed
  • Mirror cache (fresh fetch this run, sha matches 2d9411cefb): mergeable_state: blocked (NOT dirty), state open, checks 30 total / 0 failed / 0 pending — CI on the rebased head is green

七问

  1. 是什么问题:车道再次被「上游 blocker」通知唤醒;实查后确认是过期触发——PR 冲突在上一轮已解决,当前不存在任何冲突或红 CI。
  2. 什么原因导致的:通知基于我上次推送落地前的旧 dirty 状态发出(镜像轮询滞后);另外本进程上一轮中途卡住约 35 分钟被强制重启(疑似长时网络等待),重启后按状态新鲜度规则重新实查而非凭记忆断言。
  3. 影响范围与严重程度:本轮零改动——docs-only PR,无代码/wire/配置变更;无用户面影响。
  4. 怎么修复的:无需修复。只做了实查:git fetch 核对远端 head 与 master、读镜像缓存核对 mergeable_state 与 check 汇总,确认冲突闭环且 CI 全绿。
  5. 是否有回归问题:不涉及——本轮未做任何代码或文档改动。
  6. 是否引入新配置:不涉及。
  7. 结论:本车道无事可做,可以收工。PR [PR] docs: clarify that frequent nudges are independent of window occupancy (#5893) #5896 状态干净(mergeable=true,blocked 仅为常规 review/checks 门禁),rebased head 上 30 项 check 全部通过、0 失败,等待人工 review/合并即可。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 不重复——本单是 PR #5896 的专职审核任务,不新开 issue/PR。说明:Floor 6 是另一 worker 在旧 head c241aa37fa(rebase 前)的初审;本次是对当前 head 2d9411cefb 的独立复审,全部断言重新对照源码核验过,不是复制旧结论。(前一次运行被 35 分钟无输出强制重启,当时未产出任何已发布内容,本轮从零完成。)

标签: scope/docs、p3(纯文档清晰度变更,零运行时影响)。

实查状态(均刚核实):head 2d9411cefb 直接落在当前 master 58a8796224 上,无冲突;CI 镜像缓存 @2d9411cefb:30 项,failed=0、pending=0(18 success + 12 默认 skip);mergeable_state=blocked = 等人工审批门禁,非文本冲突。diff = 4 文件纯新增 +22/-0,单 commit。

方向关(原 issue):GitHub issue #5893 经单次 API 读取确认就是「nudge 与窗口占用无关」的文档补充请求(镜像编号与上游编号不同,但 PR 里 Closes #5893 引用正确)。修的是真实误解:模型把 nudge 频繁出现读成「上下文快满了」→ 过早裁剪正常产出或错误解释状态。方向成立。

事实核验(逐条对照 PR head 源码,全部属实):

  1. 「默认每 50000 token 一步、与窗口占用率无关」— kernel/src/config.ts:16-18 growthFloor: 50000, growthCap: 50000(flat 设计,KDD feat: release CI (npm auto-publish on release branch) #8);kernel 常规 nudge 判定按 mass 阈值 + growth floor + cadence 门控,usage-based 注入只出现在 OVER-LIMIT/EMERGENCY 压力分支(kernel/src/compress.ts:2440s-2540s)→ 说法准确。
  2. compress.nudgeGrowthTokens 是真实 knob — src/config.ts:254,映射见 src/compress-settings.ts:330-332(flatten 到 growthFloor+growthCap)。
  3. 「maxContextLimit 默认 75%,作用在扣掉输出预留后的有效窗口」— kernel/src/config.ts:10 maxContextLimitPct: 0.75;src/util.ts:610 reserveOutputHeadroom() = window − min(maxOutput, cap×window);src/server/handle.ts:2798+ 把 reserved 值写回 reqConfig.modelContextLimit,日志明言 "nudge/preflight judge input against ${reserved}" → 准确。
  4. 「输入单独超窗触发预检」— 与既有 docs/configuration.md:1427 对 modelContextLimit 的 "hard preflight wall" 表述一致(preflight 同样按 reserved 有效窗口判,README 相邻括号已交代有效窗口规则,FAQ 粒度可接受)。
  5. /acp 面板 Nudge: 行 + 读数示例 — src/acp-status.ts:281 渲染 Nudge: ACTIVE/idle — ${reason};精确串在 kernel/src/compress.ts:2520 max compressible ${maxPending} < threshold ${minTierThreshold},全 tier 未设时 threshold 恰为 nudgeGrowthTokens(默认 50000,见 :2515-2519 注释)→ README 示例字面 "threshold 50000" 在默认配置下准确;configuration.md 用泛化 threshold Y,也对。
  6. 「网页面板使用率」— src/web/client.ts ~2983 有 ctxVal/contextWindow 百分比进度条 → 属实。

回归清点:纯新增,零代码/零 wire/零配置 schema/零持久化/零缓存触碰。逐项核过:四文件周边既有段落(#5796 长会话条目、~200k 条目、#1122 节等)全部原样保留;根目录 CONFIGURATION*.md 已被 master #5920 迁移为 redirect stub,本 PR 正确地把增补落到新规范位置 docs/configuration(.zh-CN).md,未碰 stub;zh/en 逐句平行、锚点对应;无冲突标记残留;措辞与仓库既定术语一致("forced compression nudge threshold",docs/configuration.md:281/1442)。测试有效性:docs-only 无需测试,CI test 车道全绿。diff 整洁度:每一行都与 PR 目的相关,无夹带、无空白噪音。

结构化八问

  1. 是什么问题:模型把「nudge 频繁出现」误读成「上下文快满了」,过早裁剪正常输出或向用户错误解释状态;本 PR 用文档澄清 nudge 的真实触发机制。
  2. 什么原因导致的:nudge 按「可压缩内容增长量」触发(默认每 50k token 一步,flat 设计、与窗口大小无关),与窗口占用率无关;原文档没有把它和「水位报警」显式区分,长会话中被混淆。
  3. 影响范围与严重程度:p3,文档清晰度缺陷。零运行时影响,仅 README/CONFIGURATION 可读性;针对的是会诱导模型次优行为的真实误解,值得补。
  4. 怎么修复的:两份 README 各加一条 FAQ(压缩时机 FAQ 簇内)、两份 configuration 各加一段经验法则(「第一次压缩等到 ~200k」节末),把读者指到可自查的信号:maxContextLimit 强制线、预检、/acp Nudge 行读数、网页面板使用率;所有引用的字段名/默认值/面板读数均已源码核验。
  5. 是否有回归问题:无。纯新增未触任何代码路径;四个文件既有内容逐项核对原样保留;无阈值/时序/输出格式/缓存语义漂移;zh/en 同步;落位随 [PR] docs: batch-migrate 14 root-level documents into docs/ (consolidation + master index + redirect placeholders) | docs: 14 个根级文档一次性迁入 docs/(集中 + 总目录 + 重定向占位) #5920 迁移正确指向新规范路径。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新配置:无。仅引用既有 knob(compress.nudgeGrowthTokens、maxContextLimit),名称与默认值准确,未发明新配置面。

收工判定:内容事实准确(逐条独立核验)、diff 干净(+22/-0)、无回归、CI 绿(failed=0/pending=0 @2d9411cefb)、Closes 引用正确。建议 owner 直接合并 #5896(docs PR,合并权在人)。

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

documentation Improvements or additions to documentation p3 root-cause scope/docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Billion-context documentation addendum: nudge is independent of window occupancy. | billion-context 文档补充:nudge 与窗口占用无关

1 participant