fix: growth scale-flip reset, per-location auto-update, panel denominator - #268
Conversation
📦 Built Extension ArtifactBranch: Option A — Install from npm PR tag (recommended)pi install npm:billion-context-pi@pr-268Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pi-pr268.tgz
pi install ./packageThis comment is automatically updated on each push. |
[bot] 🏷 收到,PR #268 已接手跟踪。当前状态:
Windows CI 跑完后我回来汇报最终结果。 |
[bot] 🏷 ✅ 验证完成,PR #268 可以合并。 CI(head
本地复跑(PR 分支)
代码审查要点
状态:无冲突(mergeable: true),无 review 意见。 另:#267 里「never shrinks; includes compressed originals」文案和「tokens compressed」cumulative 标注在 acp-kernel 的 panel 渲染器里,需要 acp-kernel 改动 + 发版后再 bump,单独跟踪。 |
dff317f to
cb9d955
Compare
Review + rebase 完成方案确认: Review 发现一个实质缺口(已在本次 rebase 中补上):原分支基于 kernel 0.0.50 编写,重置集合只有 已 rebase 到 v0.1.58 master(原 base 落后于 #310/#311/#315):
本地验证: 合并顺序提醒(跨仓依赖):kernel #182(面板文案)先合并发版,本 PR 后合并。 |
[bot] 🏷 Rebase 后的分支(head
本地验证
CI( PR 状态:open、无冲突(mergeable: true)、无 review 意见; 合并顺序已知悉:kernel #182(面板文案)先合并发版,本 PR 随后合并。本分支沿用 master 的 kernel 0.0.55 pin、自身不 bump 版本,所以顺序约束在发版排期层面,理解无误。 |
|
这个对应的issue已经关了?这个还需要合并吗 |
[bot] 🏷 查了状态,两个问题分开答: issue #267 确实已关(2026-09-07 标记 completed),但修复代码并不在 master 里——我核对了 master 当前的 所以:还需要合并。 而且现在时机正好——之前约定的前置条件已满足:kernel #182 已发版(0.0.56,master 上经 #318 完成 0.0.55 → 0.0.56 的 bump)。我这就按之前说好的收尾:把 #268 rebase 到新 master(diff 会自动带上 0.0.56 pin)、本地同步依赖后重跑 typecheck/test/build,推上去等 CI。完成后回来说结果,合并由你操作。 |
cb9d955 to
1c9c0db
Compare
|
冲突了 解决下 |
[bot] 🏷 收尾完成,#268 已就绪可合并。 Rebase:分支已 rebase 到新 master( 本地验证(kernel 0.0.56): CI(head 结论:issue #267 虽已关,但修复代码此前不在 master,现在这条分支就是让三个修复真正落主干的最后一步。可以合并了(merge 由你操作):#268 |
1c9c0db to
3b8f09f
Compare
[bot] 🏷 冲突已解决,分支已 rebase 到最新 master( 冲突点:只有 语义核对:#297 的 验证:typecheck ✅;全量测试 614 pass / 0 fail / 3 skipped ✅(含 #297 新增的 proxy-standdown 20 个用例 + 本 PR 全部用例);build ✅。 CI(head 现在无冲突、CI 全绿,可以合并了:#268 |
…ator Issue #267: three related fixes. 1. Growth baseline mixed two scales (main). tokenCount runs on the estimate scale while the usage anchor is stale and on the provider scale when it is fresh. A growth delta spanning that switch was a false artifact (e.g. 48k provider - 12.5k estimate ~= 35k "growth" right after a compress). The context transform now tracks the per-session anchor scale and re-anchors the growth baseline (lastNudgeShownTokens + lastPerMessageNudgeTokens) on a flip, so growth only accumulates same-source deltas. The 0.75/0.95 usage bands keep the floor-stale behavior untouched. 2. Auto-updater looped on a read-only global install and failed invisibly. The check throttle file was shared across every installed copy, so a healthy copy refreshed it and silently suppressed a failing copy's checks; the failing copy then retried the EACCES install forever with no user-visible notice. The throttle and a new stop-retry marker are now keyed per install location, a permission failure (EACCES/EPERM) marks the location read-only and stops retrying, and a one-time hint tells the user to run `npm i -g`. 3. Panel percentages used the full window as the denominator while the nudge bands run against (window - output headroom). /acp and acp_status now apply the same output-headroom reservation as the live context transform (shared applyOutputHeadroom helper) so every percentage is measured against the same real request limit. Co-Authored-By: ework daemon <daemon@ework.local> Rebased onto v0.1.58 (kernel 0.0.55): - keep master update.ts newer specUpdateTag/isVersionNewer/dist-tag tracking and the #289 view-recount structure; port per-location throttle/read-only logic on top - extend scale-flip reset to lastShownByTier - kernel 0.0.55 per-tier cadence baselines; old-scale lastShown minus new-scale tokenCount re-creates the false +35k growth cadence bypass from #267
3b8f09f to
c8baad0
Compare
|
rebase 到 master(#316/#318/#319 合入后)。冲突仅 组合语义补强:刻度翻转时原 PR 只重置 kernel 侧基线(lastNudgeShownTokens / lastShownByTier);#316 又引入了扩展侧刻度戳 —— 同轮 re-inject 的增长是 全套件 620 pass / 0 fail,growth-scale-flip + nudge-reinject 5/5 共同验证。 |
Fixes #267 (three related issues).
1. Growth baseline mixed two scales (main)
tokenCountruns on the estimate scale (chars/4) while the usage anchor is stale, and on the provider scale when it is fresh. A growth delta spanning that switch was a false artifact — e.g.48k (provider) − 12.5k (estimate) ≈ 35k "growth"right after a compress, even though the context shrank.The context transform now tracks the per-session anchor scale (
runtime.noteTokenScale) and re-anchors the growth baseline (lastNudgeShownTokens+lastPerMessageNudgeTokens) on a flip, so growth only accumulates same-source deltas. The 0.75/0.95 usage bands keep the floor-stale behavior untouched — PR #258's stale-anchor guard is preserved (tests/sent-view-arbitration.test.tsstill green).Note: I did not take the "always use
Math.max(sent, providerReal)" option from the issue, because it would break the stale-anchor guard (the post-compress first nudge would false-trigger emergency from the pre-compress high value). The "growth only accumulates same-source deltas" option is the one that keeps both behaviors correct.2. Auto-updater looped on a read-only global install, failed invisibly
EACCESinstall forever with no user-visible notice.locationKey), so copies don't suppress each other.EACCES/EPERM/…) marks the location read-only and stops retrying, and a one-time hint tells the user to runnpm i -g billion-context-pi(or remove the global copy).3. Panel percentages used the wrong denominator
/acpandacp_statusmeasured every percentage against the full window, while the nudge bands run against(window − output headroom). They now apply the sameapplyOutputHeadroomreservation as the live context transform (extracted into a shared helper), so every percentage is measured against the same real request limit.Tests
tests/growth-scale-flip.test.ts(new): baseline re-anchors on the stale→not-stale flip; no spurious reset when the scale is stable.tests/update.test.ts: EACCES → read-only outcome + marker; non-permission failure → no marker; marker present → check skipped + notify once per process.Note: the panel copy items from #267 ("never shrinks; includes compressed originals" and the cumulative "tokens compressed" label) live in acp-kernel's panel renderer and need an acp-kernel change + release — tracked separately.