Repository navigation
fix(report): fold payback verdict uses the full post-fold window (#2044) - #2184
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.2254-pr.2184.479127aThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2184.tgz
npm install -g packageInstall instructions are refreshed on each push. |
480a4dd to
1a6c566
Compare
- paidBack = requestsAfter >= n* (same window as savedSoFar; the last fold is now evaluable instead of unobserved forever) - the original short-window verdict survives as the new cadenceOk field (interleave-cadence diagnostic, #1280 guard-signal candidate) - summary explainer updated to full-window semantics; n* printed with 2-decimal precision - kernel/package.json 0.0.102 -> 0.0.103 (version discipline, #2092) Tests: kernel/tests/cache-report.test.ts 22/22 (new: back-to-back fold PB + cadenceOk=false regression; last-fold flips; evaluable NPB; instant payback at n*=0; S<=sigma null; #359 parity + k=0 variant). Host side: tests/cache-ledger.test.ts 37/37 (expectations flipped, cadenceOk in the incremental/batch parity loop); cache neighbors 64/64; typecheck clean. savedSoFar / netTokens / GRAND LEDGER figures unchanged; report-only, zero cache/wire/config impact.
1a6c566 to
2a324f5
Compare
Not part of the approved port (acp-kernel#507 touched only src/cache-report.ts and its test). Nothing consumes it: CI installs deps at the repo root and the kernel's devDeps resolve through the root node_modules. Keeps the PR diff to the fix itself.
[bot] 🏷 Review 完成 — 代码层面可合,等 CI 全绿后由人合并(kernel 变更恒 human-gated)。 审核过程(审核先于实现):
结构化七问:
收工判定:代码与测试就绪,diff 已收敛,方向与 owner 拍板一致;待新 head 的 CI 全绿(test matrix 还在跑)后由人合并——kernel 变更按 Kernel Boundary 恒 human-gated,我不代合。另:acp-kernel#507(standalone repo)按你的处置决定合并或关闭为 superseded 即可。 |
[bot] 🏷 CI 全绿确认:最终 head |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.51-master.ae44f38 # this exact build
npm install -g billion-context@master # always the newest merged build
|
kernel-change: full-window fold payback verdict + new cadenceOk diagnostic field (#2044; owner-approved on the issue, host side cannot compute the kernel verdict window)
Ports the acp-kernel fix (PR ranxianglei/acp-kernel#507) into the vendored
kernel/tree now that the kernel lives in this repo (#2092 migration).kernel/package.jsonbumped 0.0.102 → 0.0.103 per version discipline.What
paidBack = requestsAfter >= n*— same window assavedSoFar, so the verdict and the token figures on one row agree (billion-context#2044). The LAST fold is now evaluable instead of unobserved forever.cadenceOkfield (interleave-cadence diagnostic; feat: price-aware compression triggering (dynamic threshold/frequency from window + cost weights) #1280 guard-signal candidate) — nothing is lost, semantics get names.n*printed with 2-decimal precision (fixes the 3 rounding display quirks).savedSoFar/grossSaved/netTokens/ GRAND LEDGER figures unchanged. Report-only: zero cache / wire / config impact. Golden pins untouched (no defaultConfig/prompt/tool/wire-marker surface changed).Incident shape covered by regression tests
A fold that paid back long ago got NOT PAID BACK purely because the NEXT fold arrived in the same batch (k small) while
savedSoFaron the same row kept growing. Live data: 383 NPB rows, 279 with k=0 (73%); counterfactual ≈38% flip to PB.Tests
npm --prefix kernel test: 22/22 (new: back-to-back fold PB+cadenceOk=false; last-fold flips to PB; evaluable NPB; instant payback at n*=0; S≤σ null; pi plugin /acp panel via ctx.ui.notify() — transient toast in web hosts (same class as billion-context-pi#255) #359 parity extended with k=0 variant)tests/cache-ledger.test.ts: 37/37 (expectations flipped to the new verdict; cadenceOk added to the incremental/batch parity loop)Closes #2044 (together with ranxianglei/acp-kernel#507 for the standalone repo, which the owner may merge or close as superseded).