Repository navigation
fix: default-off count-triggered tier distillation, delete #238 usage gate - #380
Conversation
… gate - tiers.tier2Trigger 5->1000, tier3Trigger 10->2000: block COUNT is not a need signal; count-path distillations reclaimed ~nothing while rewriting the wire from the fold anchor onward (prefix-cache loss, the root cause of ranxianglei/billion-context#1249). Explicit config still fires the count path for exotic setups. - decideNudge: delete tierCountUsageFloor (#238 gate) — growth/token-mass are the need signal, percentages never gate compression; tierActionHint and the idle-reason annotation now agree (pure count). - Token-mass paths (>=1.5x growthFloor) and the T1 growth path unchanged. Fixes #379
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)In your adapter project: npm install acp-kernel@pr-380Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf acp-kernel-pr380.tgz
npm install ./packageThis comment is automatically updated on each push. |
…le reason Review fix for #380: the PR collapsed the ternary in the label template, which made the .map() call fit on one line per the repo's prettier config. File was clean before this PR; keep it clean.
Review fix for #380: the headline default-off change was only exercised via explicit config overrides in nudge.test.ts, so a silent revert of the defaultConfig values would keep the whole suite green. Pin the actual defaults where production defaults are already asserted.
Review fix for #380: after deleting the #238 usage gate, the only remaining consumer of nudge.minContextLimitPct in decideNudge is the first-sight mass bypass (#194, compress.ts). The old 'Threshold gate' bullet contradicted the adjacent bullet added by this PR ('no usage gate'); describe the mechanism that actually exists.
[bot] 🏷 PR #380 审查完成 — 可合并(需人工合并)。对照当前 master 审(base == master tip 查重无其他 open/closed issue 或 PR 实现同一修复;来源即 #379 本身,无并行工作。 ① 方向关(原 issue)成立,两条论断都对代码验证过:
② 回归审查(diff 触碰的既有行为清点)
未发现无意回归。 ③ 代码审查干净。 ④ 测试有效性两个重写测试都有牙:
发现缺口并已直接修复:两个测试都没钉住 真实 defaultConfig 值(测试 A 显式传 1000/2000,若有人把默认值悄悄改回 5/10,全套件照样绿)。已在既有生产默认值测试里补 ⑤ diff 整洁度紧凑(4 文件,+27/−30,每行都在主题上)。发现两处并已直接在分支上修掉:
验证
合并门按策略此 PR 必须人工合并:§7.4 将默认值变更排除在 auto-merge 之外,且被删的 usage gate 触及 nudge-invariant 契约清单(§7.3)——属 #379 中你的 maintainer call 有意变更,实现与其完全一致。跨仓说明:adapter 无需改代码,下次 acp-kernel 版本 bump 时自动继承新默认(kernel 先行),billion-context#1249 的 cache-hit 锯齿应随之消失。 中文摘要:审查了 #379 的修复 PR(count 触发默认关闭 5→1000/10→2000、删除 #238 usage gate)——方向正确、无意外回归、测试有牙;我直接在分支上补了 3 个小修(prettier 格式、默认值回归断言、README 过时描述),CI 全绿,可以合并。 |
Fixes #379
What
Two decisions from #379 (maintainer call):
tiers.tier2Trigger5→1000,tier3Trigger10→2000. Block count is not a need signal: five 10:1-condensed summary blocks can carry almost nothing to reclaim, while every distillation rewrites the rendered wire from the fold anchor onward → prefix-cache invalidation far beyond the reclaimed tokens. This is the root cause of [Bug] oh-my-pi 长会话缓存命中率波动:相邻请求 99%→4%,125 folds 估算净收益为负 billion-context#1249 (cache-hit-rate sawtooth; maintainer'sbili ompaudit: distillation "actionable" at 26% usage on summary-only mass). Explicit config still fires the count path for exotic setups ("如果不去掉可以搞成配置参数 配置为1000个").tierCountUsageFloor(usage >= nudge.minContextLimitPcton count paths) is removed. Percentages never gate compression: growth (T1, ≥ growthFloor) and token mass (≥1.5× growthFloor) are the need signal and were already ungated. Count-based tier nudges (tier2Trigger/tier3Trigger) fire below the usage band #237's injection storm was the same disease patched at the wrong layer;tierActionHint(count-only, no gate) escaped that sweep and re-imported the symptom through the receipt channel — both channels now agree on pure count.Diff
src/config.ts: defaults 1000/2000src/compress.ts:t2CountReady/t3CountReadypure count; idle-reasonusage-gatedannotation removed; rationale comment updatedtests/nudge.test.ts: the two Count-based tier nudges (tier2Trigger/tier3Trigger) fire below the usage band #237 usage-band tests rewritten — (a) 5 summary blocks at 40% usage stay silent under default triggers (the #1249 repro shape), (b) explicit triggers fire below the old 45% band (gate deleted)README.md: nudge section updatedVerification
npm run typecheckclean