Repository navigation
fix(config): make tier-2/3 distillation reachable by default (closes #628) - #629
ranxianglei wants to merge 1 commit into
Conversation
📦 Built Extension ArtifactBranch: Option A — Install from npm PR tag (recommended)pi install npm:billion-context-pi@pr-629Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pi-pr629.tgz
pi install ./packageThis comment is automatically updated on each push. |
5ad882a to
fad9b79
Compare
[bot] 🏷 PR 核对完成:已 rebase 到当前 master,验证通过,等 CI 绿后可人工合并。 拉取分支逐条核对了 PR 描述(单一插入点、文档、4 个测试均属实),并补做了一件事:分支落后 master 18 个提交(k̂ 校准 #598/#601、host-floor freshness guard、nudge 死区等),已按 §7.2 rebase 到 结构化七问:
测试有效性:新增 4 个测试有牙——默认值断言、per-key 覆盖优先、走真实管线(10 次真 diff 整洁度:4 文件 +118/-0,每行都与本 PR 目的相关(代码+测试+双语文档),无跑题改动。 判定:代码与行为核对通过,rebase 干净,定向验证全绿。按 AGENTS.md §7.4,改默认值属产品决策,不走 auto-merge——CI 绿后请人工合并。 |
Closes #628
What this changes
Behavior change disclosure: the adapter-level effective tier-distillation count-trigger defaults change from the kernel framework defaults:
tiers.tier2Triggertiers.tier3TriggerWhy: under the kernel defaults, tier-1 summaries accumulate without bound. The token-mass path (
tier2Threshold = nudgeGrowthTokens × 1.5= 75K andt2Pen > t1Eff) is unreachable at realistic summary sizes (~400–2K per block), and the growth path's T1-first ordering keeps firing T1 nudges while ≥50K compressible messages exist. Production evidence (#628): session 01a11102, 256K window, 22 active tier-1 blocks over ~200 turns → ~570K per request, window overflow every turn, zero tier-2 nudges ever fired.10/20 restores the pre-acp-kernel#379 2:1 ratio. Re-triggering is bounded by the kernel's per-tier cadence guard (at least one growth floor of new tokens between same-tier re-nudges), so the cache-sawtooth concern that motivated #379 does not recur at this cadence.
What does NOT change:
acp-kernelpin stays0.0.98; kernel framework defaults are unchanged — other hosts are unaffected. This is an adapter-level effective default only.tier2GrowthMultiplierstays1.5: the count path becomes primary, the mass path remains a secondary backstop.coreOverrides.tiers.*always win over the Pi effective defaults (per key). Anyone who wants the kernel's count-off behavior passes{ tiers: { tier2Trigger: 1000, tier3Trigger: 2000 } }.Implementation
Single insertion point in
resolveConfig()(src/config.ts): right afterdefaultConfig(limit, overrides), applytier2Trigger = 10/tier3Trigger = 20unless the caller explicitly set them viacoreOverrides.tiers. All config consumers already funnel throughruntime.configFor()→resolveConfig(), so the rewrite-guard recovery hint intierReadyHint(src/compress-tool.ts) consistently picks up the new thresholds. Docs: dedicated section added to CONFIGURATION.md + CONFIGURATION.zh-CN.md.Evidence
tests/tier-triggers-default.test.ts— 4 tests:tiers.enableduntouched);coreOverrides.tiers.*win per key;applyCompressionpairs → 10 active tier-1 blocks →processTurnfiresnudge.tier === 2with reason "T2 distill ready: 10 tier-1 blocks >= tier2Trigger 10";Related
nudge.lastInjectedTierslot rotation). Complementary to this PR: #2519 makes the scheduler honor count-ready T2/T3 under sustained high t1Eff; this PR makes the count trigger itself reachable (10/20 instead of 1000/2000). acp-kernel#509 / acp-kernel PR#510 remain open per owner decision.