Skip to content

Supports dynamic compress.nudgeGrowthTokens | 支持动态compress.nudgeGrowthTokens #1997

Open

Description

@ranxianglei

背景

nudgeGrowthTokens在不同的项目参数设置可能需要不一样,有的可能一瞬间读大量的文件日志,nudgeGrowthTokens需要设置大,否则无法干活,有时候是和用户交互,nudgeGrowthTokens可以设置非常小,设置大了浪费.

为了兼容最大,有一些设置甚至设置为15w 20w,针对最大场景适配,导致模型注意力下降.

现在需要一个动态的nudgeGrowthTokens.

动态的nudgeGrowthTokens

动态的nudgeGrowthTokens需要一些条件,我观察一段范围内的输入吞吐可能是很好的指标,吞吐大就可以nudgeGrowthTokens动态增大,吞吐小就可以自动调小.顺便设置一个最大和最小范围,类似于tcp动态窗口一样,维持质量平衡.

Activity

  1. ranxianglei commented on Oct 3, 2026

    @ranxianglei
    OwnerAuthor

    🤖 Powered by ework · qwen3.8-27b

    [bot] 🏷

    先说结论:这是功能需求不是缺陷,按规范我不会直接开工——先把机制和配置面摆清楚,等你拍板再实现。以下是我的评估。

    1. 查重

    没有已存在(开/关)的 issue/PR 覆盖“动态 nudgeGrowthTokens”。相关但不同的既有决策:#379/#380 刻意移除了“按窗口百分比缩放步长”,定死 50K 平铺;现在的逃生阀只有静态 compress.nudgeGrowthTokens(把 growthFloor==growthCap 拍平成一个固定值)。本需求是新 territory,不重复。

    2. 问题是否真实 —— 真实,但要确认一个失败模式

    核心矛盾是真的:一个静态值要么大到扛得住“瞬间读大量文件/日志”的项目,要么小到让平稳会话保持精瘦,二者不可兼得;为兼容最坏场景把全局设到 15w/20w,确实会让普通会话注意力下降。这点认同。

    但我要挑战一下前提:nudge 是咨询式的——它只是往上下文尾部追加一段提醒文本,由模型自己决定要不要压缩(willInjectNudge 门控,见 src/server.ts:3651/3888/4146/4448),它不阻断工具调用。所以“设小了无法干活”我想跟你确认真实现象是哪种:

    • (a) 突发读文件时模型反复停下来压缩,打断干活 → 修复方向是突发期把提醒拉开;
    • (b) 上下文因 15w 太懒而持续膨胀 → 修复方向相反(突发后更勤地折叠)。
      两者指向不同实现,值得先确认(有具体日志/会话更好)。

    3. 机制评估 —— 我建议不用“墙钟吞吐”,改用确定性的增长信号

    你提的“输入吞吐(tokens/秒)”我认为是候选里最弱的一个,原因具体:

    1. nudge 本来就按增长量触发(anchor 之后累计增长 N token 才提醒)。墙钟速率相对“增长增量”提供的额外信息有限。
    2. tokens/秒很噪:客户端停顿、网络延迟、长生成都会扭曲分母——同样的活,机器快慢不同就得到不同间隔。
    3. 它让决策变成时间依赖、非确定性,和本仓硬规则冲突(测试必须可复现、不吃环境运气,AGENTS §7.2),也和 fix: merge all system/developer messages into one leading message (SGLang #377) #379/探索是否可以集成进sglang,以做到透明管理 #380 刚定下的“growth-driven、不要 proxy 门控”原则相悖。
    4. 它需要新增每会话状态(滑动窗口的时间戳+大小)→ 新的持久化面、更多耦合、跨重启语义都要定义。

    我更推荐的信号:按轮次的增长增量 / 突发检测,用我们已经在跟踪的数据算(session.stats.lastInputTokens + kernel 的 growthReference)。做法:识别最近几轮是否在灌大块(突发),于是在尖峰后的有限几轮内把有效间隔放大,随后向基线衰减。它只靠历史序列(无墙钟)即可复现,正好命中你说的“一瞬间读大量文件日志”,且落在 growth-driven 哲学内。

    如果你就是想要 TCP 窗口的手感,最忠实的版本是:维护一个自适应步长,持续高增量时增、低增量时减,夹在 [min,max]——正是你说的最大最小边界,只是用确定性的增长信号驱动而非时钟时间。两全。

    min/max 钳制我完全同意,这是对的边界,保证行为有界可预测。

    4. 配置面(owner 把关,映射到现有体系)—— 待你批准,未动工

    需要在 compress 下加字段(走三级级联 global→provider→model,最深者胜)。草案:

    • 复用 nudgeGrowthTokens 作为基线步长(今天语义不变 = 固定值)。
    • 新增可选动态模式:
      • nudgeAdaptive(bool,默认 OFF)——OFF 时与今天逐字节一致,存量用户零回归;
      • nudgeGrowthMin / nudgeGrowthMax:钳制带(默认 min=base?max=base×3?需要你定);
      • 突发参数:nudgeBurstWindow(几轮算突发)+ nudgeBurstFactor(放大倍数);走纯 TCP 风则换成 gain-up/gain-down。
    • 为什么现有面表达不了:nudgeGrowthTokens 只能给一个固定数,没有“区间/速率信号/钳制”的字段;providers 表和三级级联解决的是“按 provider/模型分”,而这里的差异是同一会话内随时间变化,所以必须新增 compress 下的字段。
    • 迁移:全部新字段可选、默认 OFF → 不开启则零行为变化;配 env 镜像 + CONFIGURATION.md 中英条目。

    5. 实现前必须推演的耦合/风险

    • 两种压缩模式都要过(§6):plugin 模式(agent 自持压缩、proxy 抑制 nudge 注入)vs proxy 模式(proxy 注入 nudge carrier)。动态间隔改变两种模式下 nudge 的触发时机,plugin 模式的抑制路径必须保持完好。
    • 前缀缓存稳定性:nudge 文本追加在尾部(proxy 模式 user carrier),改节奏不应触碰头部/system 稳定前缀,但要确认无前缀失效、无 [Bug] ACP: ≥2 compressed blocks render as multiple system messages → SGLang (vLLM-compatible) upstreams return 400 #377(SGLang index-0 单 system)语义漂移。
    • kernel 契约(主要技术风险):kernel 把 growthReference 存进会话状态持久化,而 floor/cap 从每次请求传的 Config 读。我们必须验证 kernel 能正确对待“随请求变动的 band + 持久化 reference”。若 kernel 假设 band 恒定,可能要动 acp-kernel → 跨仓、human-only,现在先标记。
    • 确定性/可测性:无论选哪个信号,必须只靠历史即可复现,测试才稳。
    • auto-merge:不适用(feat 非 fix)→ 走正常 owner review 的 PR。

    6. 我的明确建议(不甩选择题)

    做成 compress 下可选开启的自适应模式,用确定性的按轮次增长/突发信号(而非墙钟吞吐)驱动,夹在 [min,max],默认 OFF 保证存量行为不动。基于上面理由我倾向不走原始 tokens/秒;若你坚持要真·墙钟吞吐,说一声我照那个出方案——但我推荐增长信号版。

    需要你拍板的三件事:

    1. 信号选哪个:确定性增长/突发(我推荐) vs 墙钟吞吐;
    2. 字段命名 + 默认值(尤其 min/max 的缺省倍数);
    3. 第 2 节的真实失败模式是 (a) 还是 (b)。

    你批了配置面我就开工,PR 引用本 issue(#1997)。在此之前不动代码。

  2. Dclef commented on Oct 3, 2026

    @Dclef

    Measured data for this request — 181 proactive folds over one day on a 1M-class window, plus the failure mode you asked me to pin down.

    Failure mode: it's (a), not (b)

    The symptom is the agent stopping to compress mid-task, at ~10% of the window. Verbatim from ~/.local/state/billion-context/bili.log (billion-context 0.1.181, bundled acp-kernel, Windows 11, DSH host, model space-bunny, contextLimit=872000, windowSource=plugin, runtimeInfo.contextWindow=1000000):

    [warn: degenerate-fold] [acp-compress-obs] covers 84% of the live context
      (~52745/62780 tok) leaving 3 active block(s), anchor≈3284 tok — the whole prefix rewrites
    
    [warn: degenerate-fold] [acp-compress-obs] covers 90% of the live context
      (~68292/76225 tok) leaving 2 active block(s), anchor≈3297 tok — the whole prefix rewrites
    

    and the next request pays for it:

    [acp-usage] input=23455 cached=12738 (cache hit 54%) fold=new
    [acp-usage] input=32165 cached=12738 (cache hit 40%) fold=new
    

    The agent gets a fold it did not need (the window was 90% empty), loses most of its cache prefix, and — per the loop already reported in #1198 — re-reads what it just lost, which grows the context again and re-triggers. Not (b): the context does not bloat; it gets destroyed early.

    Where folds actually fire (n=181, 3 sessions, full day)

    tokens % of 872K window
    min 0 —
    p25 76,113 8.7%
    median 88,451 10.1%
    p75 102,429 11.7%
    max 369,011 42.3%
    mean 95,605 11.0%
    • 97% (176/181) fired below 25% of the window
    • 92% fired below 15%
    • 0% fired above 50% — not one fold in a full day used more than half the window

    Cache cost per fold

    Mean over the 8 requests before vs the 4 after each fold, same session stream:

    paired samples = 181
    mean BEFORE = 88.6%
    mean AFTER  = 78.7%
    delta       = -9.9 pp   (median per-fold drop 8.9 pp)
    

    Day baseline: 97.4% overall hit rate, median per-request 99.3%.

    By window occupancy at fold time — note the direction, it gets worse deeper in:

    context at fold n before after drop
    <100K (~11%) 133 88.6% 80.0% -8.6 pp
    100K-200K (~23%) 40 91.3% 79.4% -11.9 pp
    200K-400K (~46%) 8 74.7% 53.9% -20.8 pp

    By how much the fold rewrote:

    shrink n before after drop
    0-19% 31 81.7% 74.4% -7.3 pp
    20-39% 42 88.7% 79.0% -9.7 pp
    40-59% 66 89.9% 80.4% -9.5 pp
    60-79% 29 94.9% 85.6% -9.2 pp
    80-100% 11 87.5% 68.0% -19.4 pp

    On the mechanism

    I agree with rejecting wall-clock throughput (tokens/sec): noisy denominator, time-dependent, needs new per-session state. Your alternative — scale the effective interval by the growth delta over recent turns, then decay back to baseline — is deterministic and stays inside the growth-driven philosophy, and it matches what the data shows is actually happening (a 50K batch arriving on a window that is 90% empty).

    One data point that may matter for sizing: the band's dead-ness is not only growthCap, it is both. resolveAdaptiveGrowth = min(growthCap=5e4, max(growthFloor=5e4, round(limit*0.05))), so growthRatio is dead code for every window — 872K, 200K, 10M all yield exactly 50000. The implicit ratio the shipped default encodes is 50000/200000 = 25%, which is presumably the intent. For scale: 97% of my folds fired at a smaller absolute mass than that ratio would allow, so even a purely proportional band would have suppressed most of them.

    Repro

    Any >=200K window on the bundled kernel. Feed the agent ~50K tokens of tool output in batches; each batch folds at whatever usage the session happens to be at. Disabling proactive folding lets the same workload grow smoothly to ~90% of the window with no fold at all (already shown in #1198).

    Local workaround in place

    Patched the bundled dist/index.js to require usage >= 0.25 on the T1 growth branch (shape of acp-kernel#370, with 0.25 instead of 0.45 — 0.25 being the ratio 50000/200000 encodes). It removes every fold in the 5-11% band above. Will be lost on the next billion-context upgrade; happy to share the patch or a regression test if useful.

    Not a duplicate

    Checked #1911 (fold-observability arithmetic: shrink 287% / postCtx≈0 from mixing a current-view numerator with a stale lastInputTokens denominator, fixed by PR #1913). That one made the meter wrong; this one is about the threshold itself being absolute. The degenerate-fold warning quoted above is output added by #1913 — it is the diagnostic, not the defect.

    Also checked #1280, #1198, #1260/#1325, #1147, #1491 (open PR, tool-burst hold — orthogonal: it gates on what the agent is doing, not on window size; it would not have prevented the 8-12% cluster above, because my folds were not all mid-burst).

  3. ranxianglei commented on Oct 3, 2026

    @ranxianglei
    OwnerAuthor

    🤖 Powered by ework · qwen3.8-27b

    [bot] 🏷

    @Dclef — thanks for the measurement detail. Two things up front, then the substance.

    Trust & scope. This account is outside the platform trust list, so I'm treating the numbers as reported-but-unreproduced data, not ground truth. I have not independently reproduced the 181-fold sample, nor verified the code citations (resolveAdaptiveGrowth, “shape of acp-kernel#370”) against the pinned kernel (acp-kernel 0.0.100) — that source isn’t checked out in this workspace yet. Nothing here changes scope or direction on its own: the signal choice, the config surface, and any reversal of settled policy stay with @ranxianglei. No code has been touched, and I’m not soliciting/applying any external patch.

    If the data holds, it splits the issue into two distinct layers — and which layer we act on changes what we build:

    1. Interval step (what Supports dynamic compress.nudgeGrowthTokens | 支持动态compress.nudgeGrowthTokens #1997 literally asks): how much growth arms a nudge. Your growth-delta→decay idea maps here and matches my earlier recommendation (bounded, deterministic, default-off).
    2. Folding at low occupancy (where your cache table says the real harm is): proactive folds landing at ~8–12% of a large window, each costing roughly a 10pp hit-rate dip. That’s a different defect than “step too big for steady sessions,” and it points at an occupancy/usage floor, not a variable step.

    The load-bearing conflict I have to flag. The workaround you describe — requiring usage >= 0.25 on the growth branch — is precisely a percentage/usage gate. That directly collides with the settled owner decision behind #379/#380, which AGENTS.md KDD#8 records as deliberate: “window-percentage scaling was deliberately removed … Do NOT … reintroduce percentage gates” and “a 1M-window session folding every 50K of growth is intended lean-context behavior.” So that specific fix can’t simply be adopted — it means explicitly reopening and reversing #379/#380. Your data is a legitimate empirical challenge to that “intended” stance, but reversing a settled policy is an owner decision, not something I’ll take on from an external report.

    Where I land, for the owner:

    Ball stays with @ranxianglei on: (1) which layer(s) to act on, (2) whether to reopen #379/#380, (3) the config surface. Holding for that.

  4. ranxianglei commented on Oct 4, 2026

    @ranxianglei
    OwnerAuthor

    @Dclef 的说法基于缓存考虑,虽然看起来有道理但是并不成立,压缩破坏的是后缀缓存而不是前缀,看起来命中率下降是因为本次压缩后上下文水平下降带来,上下文水平很低的时候发生压缩,会看起来有30%甚至50%的一次性缓存miss,看起来很大但是实际上很小,绝对值只有1w到2w token,这是基于最近5条消息保护所产生,如果上下文水平本来很大比如50w,所产生的miss 比率只有1%到2%,所以除了看分子也要看分母.
    如果不对最近n条消息保护这个miss会几乎消失但是会使得工作质量下降.考虑到这个miss实际上很小(两三次工具调用而已)相对于不压缩的情况下上下文膨胀到几十万然后触发全量压缩导致超过几十万token的缓存miss,这个代价小的可怜,但是换来了大幅度工作质量的增长.因此基于缓存角度的动态调节nudge不予考虑. 另外可以专门立一个issue在文档上说明这一点,不知道是否有专门的性能调优或者原理性说明或者问答的地方阐述这一点

    现在主要考虑基于吞吐的压缩,a和b都需要考虑.所谓吞吐不是基于时间单位而是调用次数.平均每次或者每范围input可以作为参考指标,在用户交会时或者处理简单任务时,这个吞吐会非常小,未来nudge保持小,反之扩大.本质上要求nudge不仅仅参考增长大小还要参考调用次数.

  5. ranxianglei commented on Oct 4, 2026

    @ranxianglei
    OwnerAuthor

    🤖 Powered by ework · qwen3.8-27b

    [bot] 🏷

    收到,按你的裁决来。三点分别回。

    1. 缓存驱动的动态调节 —— 采纳你的判断,砍掉

    同意。折损的是后缀缓存不是前缀;低水位时折叠看起来 miss 比率大(30–50%)是分母效应,绝对量只是最近 N 条保护带来的 1w–2w token;高水位(50w)时比率只有 1–2%——看分子也要看分母。这个代价换工作质量提升是划算的。所以不做基于缓存/占用的动态门控。这也正好不碰 #379/#380 那条线(不引入 usage/百分比门控)。@Dclef 的数据本身没测错,是把绝对值当比率读了。

    2. 基于吞吐的自适应步长 —— 具体配置面草案(待你点头后再动代码)

    方向明确:吞吐 = 每次调用的新内容增量(不是墙钟时间,也不是绝对 input 大小)。理由:长会话里即便在做简单交互,单次 input 也可能已累积到几十万,那会把“低吞吐”误判成高吞吐;真正区分“批量灌文件/日志”和“简单交互”的是每次新增多少。所以指标取 Δtokens_i = input_i − input_{i−1}(clamp ≥ 0)在最近 K 次调用上的平滑均值。“每范围”我理解就是这个 K 窗口。这一个信号同时覆盖你说的 a 和 b:增量小(交互/简单任务)→ 步长变小 → 更勤折叠保持精瘦(b);増量大(批量读文件)→ 步长放大 → 突发期少打断(a)。纯历史序列即可复现,无墙钟依赖,测试确定。

    映射到现有三级 compress 级联(global→provider→model,最深者胜),最小面只加三个字段,其余参数(窗口 K、平滑系数、比例系数)先做内部常量,避免配置面膨胀:

    字段 类型 建议默认 语义
    nudgeAdaptive bool false(不设=今天行为逐字节不变) 总开关;OFF=静态 nudgeGrowthTokens,存量零回归
    nudgeGrowthMin number 10000 自适应步长下界
    nudgeGrowthMax number 200000 自适应步长上界(对齐你提到的 15w/20w 上限场景)

    机制:nudgeAdaptive:true 时,有效步长 S 以 nudgeGrowthTokens ?? 50000 为种子,按 S ← clamp( smooth(近 K 次 Δ 均值) × c , Min, Max ) 逐请求更新,写进该请求的 nudge.growthFloor = growthCap = S。默认 OFF,存量用户零变化;env 镜像 + CONFIGURATION.md 中英条目照旧。

    需要你拍板的三件小事:
    ① 三个字段名 + min/max 缺省值(10K/200K 只是起点,你可改);
    ② 确认指标就是“每次新增增量”(而非绝对 input);
    ③ 算法用比例式(推荐,更可预测、更好测)还是你想要更像 TCP 的乘性增/加性减(AIMD)——要后者说一声。

    开工前我会先做一步核对(可能决定是否跨仓): @Dclef 提到 kernel 里有 resolveAdaptiveGrowth 且被 floor==cap==5e4 钉死成常数。我要对 acp-kernel 0.0.100 源码核实——如果 kernel 本就接受 floor≠cap 的真区间或有现成自适应钩子,最干净的改法可能是直接喂一个真区间/启用那条路径,而不必宿主侧每请求重算;反之才走宿主侧计算。这决定改动是 bili-only 还是要动 acp-kernel(后者跨仓、human-only,会升级给你)。这步我会在动手前跑完再回报,不阻塞上面的拍板。

    3. 文档落点 + 单独立项

    目前没有专门的“性能调优/原理/Q&A”单一文档,但有天然落点:

    • CONFIGURATION.md → “Compression Tuning” 段(nudgeGrowthTokens 在 line 441 附近):主落点,把“为什么平铺 50K、为什么不做缓存/占用门控、折损是分母效应”写成 knob 旁的原理注记;
    • README FAQ:已有 “When does compression happen?” 和 “How do I check cache hit rate?”,加一条一句话 Q&A 指上去;
    • paper §6.3 “cache and resource economics (measured)”(中/英两版):最适合放实测口径的分母效应深讲。

    建议单独立一个 doc issue(正文开头带 来源: #1997 … 分析时发现,与功能分开管理),内容就是把这次讨论沉淀成上面三处文档。你确认落点(就这三处?还是只要其中某处)我就立项;功能本身的实现则等第 2 节你点头后开 PR 引用 #1997。在此之前不动代码。

  6. ranxianglei commented on Oct 4, 2026

    @ranxianglei
    OwnerAuthor

    同意开工 包括论文readme都可以修改

  7. ranxianglei commented on Oct 4, 2026

    @ranxianglei
    OwnerAuthor

    🤖 Powered by ework · qwen3.8-27b

    [bot] 🏷

    收到,开工。按上一轮敲定的方案执行,记录如下(如与你理解有出入请打断):

    功能(默认 OFF,存量零变化):

    • 新增 compress.nudgeAdaptive(bool,默认不设/false)、compress.nudgeGrowthMin(默认 10000)、compress.nudgeGrowthMax(默认 200000)。
    • 指标 = 每次调用新增增量 Δtokens_i = input_i − input_{i−1}(clamp≥0)在最近 K 次上的平滑均值;比例式更新 S ← clamp( smooth(近 K 次 Δ 均值) × c , Min, Max ),种子取 nudgeGrowthTokens ?? 50000,写进该请求 nudge.growthFloor = growthCap = S。纯历史序列、无墙钟依赖,测试确定。plugin / proxy 两种模式都要过。

    文档(同一 PR 引用 #1997):CONFIGURATION.md(en/zh)Compression Tuning 段加新字段 + 原理注记;README(en/zh)FAQ 一条;paper §6.3(en/zh)补“分母效应 / 为何不做缓存门控”的实测口径说明。

    开工前第一步(可能决定是否跨仓):装依赖读 acp-kernel 0.0.100 源码,确认 nudge 是否接受 floor≠cap 真区间、growthReference 持久化与逐请求变步长如何交互。若 bili-only 我直接做;若要动 acp-kernel(跨仓、human-only),我先停下升级给你,不擅自跨仓。 这步跑完即回报并继续。

  8. ranxianglei commented on Oct 4, 2026

    @ranxianglei
    OwnerAuthor

    🤖 Powered by ework · qwen3.8-27b

    ✅ 已完成并开 PR:#2035 — #2035 (已 rebase 到最新 master,typecheck / build / 测试全绿,等你人工合并)

    这是需求类(非缺陷),按结构化七问答:

    1. 是什么问题
    nudgeGrowthTokens 是固定步长:批量读文件/日志时要设得很大才不会被折叠打断,安静交互时设大又浪费注意力;为兜住最大场景常被迫设 15w/20w,导致模型注意力下降。需要一个能随负载动态调整的 nudgeGrowthTokens。

    2. 什么原因导致的
    内核的 nudge 步长是静态的——nudgeGrowthTokens 把内核自适应 band 扁平化为一个常数(growthFloor == growthCap),无法随会话实际的每次调用输入吞吐变化。属能力缺失,非 bug。

    3. 怎么修复的
    新增吞吐自适应步长:以会话近期「每次调用新增内容量」(Δinput 的有界窗口均值)驱动步长 S——批量到达→放宽(不打断工作)、安静→收窄(保持精简);夹在 [nudgeGrowthMin, nudgeGrowthMax],样本不足 3 个前回退到 nudgeGrowthTokens 种子值。纯函数、确定性、无墙钟时间。bili-only:已验证内核 0.0.100 resolveAdaptiveGrowth = min(cap, max(floor, round(limit×ratio))),钉死 floor == cap == S 即可精确驱动步长,无需改 acp-kernel。

    4. 是否有回归问题
    无。默认关闭时该逻辑原样返回已解析 config(零分配、零改动);已 rebase 到最新 master(无冲突),typecheck ✓ / build ✓ / 确定性单测+集成(65) ✓ / 改动面定向回归(store、e2e-compress-cascade、issue453-backstop 等,74)✓。高危模式逐项过:语义漂移—无(默认路径逐字节不变);fail-fast 变吞错—不涉及;阈值/时序/输出格式漂移—仅显式开启时改变 nudge band(即功能本身);prefix-cache(#377)—只动 nudge band,head/system 字节不变。

    5. 是否破坏缓存
    不破坏 prefix cache,只改 nudge.growthFloor/Cap。且刻意不用缓存占用率作信号:低水位折叠的「命中率下降」是分母假象(被折掉的 token 缩小了新鲜输入基数),绝对重算量只有数万 token,权衡强烈偏向压缩(paper §6.3 已加注释说明这一点)。

    6. 是否改了设计方向
    否。仍是 growth-driven 的 advisory nudge,未引入百分比/usage gate(守住 #379/#380 边界);只是把「静态步长」扩展为「可选动态步长」,架构/数据流未转向。两种压缩模式都推演过:proxy 模式生效(代理执行压缩),plugin 模式注入本就被抑制、wire 逐字节不变。

    7. 是否引入了新的配置
    是(你已事前批准)。compress 下新增 3 个可选字段,沿用三级级联 global→provider→model、逐字段最深层胜出:

    • nudgeAdaptive?: boolean —— 总开关,默认 unset/false → 与现状逐字节一致
    • nudgeGrowthMin?: number —— 默认 10000(下界)
    • nudgeGrowthMax?: number —— 默认 200000(上界)
      内部常量(窗口=8、最少样本=3、比例=1)未暴露为配置,避免配置面膨胀。迁移:无需迁移;想开启在 compress 里设 "nudgeAdaptive": true 即可。

    文档已同步:CONFIGURATION.md(en/zh)、README(en/zh FAQ)、paper §6.3(en/zh)。

    判定: 默认零行为变更、纯增量可选特性、bili-only、rebase 到最新 master 全绿 → 可合并。feat 类,非 auto-merge,请人工合并:#2035

  9. added a commit that references this issue on Oct 6, 2026
  10. changed the title [-]支持动态compress.nudgeGrowthTokens[/-] [+]Supports dynamic compress.nudgeGrowthTokens | 支持动态compress.nudgeGrowthTokens[/+] on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions