Repository navigation
[PR] fix: acp_status (uncompressed) now tells the model the truth about what it can fold - #7536
Conversation
…gn the ranges view with the nudge table - collectVisible carves out rendered block-summary nodes (acp_summary_bN, role system) into their own ledger and splits at them — the exact gap rule buildCompressibleRanges applies, so the uncompressed ranges view now segments identically to the injected nudge table instead of bridging over the nodes and offering already-compressed mass as fresh fold targets. - renderUncompressedRanges shows them in a labeled ALREADY-COMPRESSED SUMMARY NODES section (bN + tier + tokens) with the byte-identical tierActionHint once distillation is armed, plus a static compress() call-shape line next to the raw ranges. - overview: tip now points at the ranges view instead of steering models into view:"messages"; summary-node mass is no longer double-counted (it was in both the summaries ledger and the text bucket). - compress-tools: view param declares "ranges" as the default. - marker/status-body: register the new section head in the legacy strip grammar (#2789 lineage — otherwise the section tail leaks back into model-visible text on persisted reports). - kernel 0.0.202 -> 0.0.203. Tests: kernel/tests/status-summary-nodes.test.ts (8 tests incl. the nudge-alignment assertion); kernel suite 1656 pass / 0 fail; typecheck + unused-exports clean; host sweep of status/marker/nudge/prune/range/ compress suites green apart from 8 failures that reproduce identically on pristine HEAD (environmental, unrelated).
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.11523-pr.7536.e724e01This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7536.tgz
npm install -g packageInstall instructions are refreshed on each push. |
🔶 需要决策 (ai: vllm-qwen/qwen3.8-27b) CI engineer lane (attempt 1/6). Re-verified the live check state first: on PR #7536 (head What is blocking: This is a kernel authorization checkpoint (human-gated, AGENTS.md "Kernel Boundary"). It is not a mechanical kernel bug I fixed in this run — it is a substantial, owner-authored kernel rework (the Version context (for the decision): the PR is 10 commits behind master. merge-base kernel = Options:
Recommendation: A. I have applied the 七问(本次运行):
判定: 本轮止于授权卡点,已升级给 owner,等 A/B/C 拍板。 |
…us-uncompressed-nudge-align
…landed 0.0.203)
Real long sessions are full of successful compress exchanges: their receipt halves carry the BLOCKED ref sentinel (ALWAYS_PROTECTED_TOOLS) and never get numeric refs, while the nudge table skips them silently. The uncompressed status view bridged over them and rendered rows like `m00007–BLOCKED ⚠ not foldable: refs unresolvable` — the whole turn died on one pinned pair — and the detail view flooded with identical `BLOCKED (x) compress` rows that read as uncompressible junk. Now all three surfaces agree: - range rows are built from the resolvable entries only; every offered range has resolvable endpoints (same splits as the nudge table, which bridges over BLOCKED without a gap); - the pinned mass gets a labeled section carrying the #4348 truth: aged compress receipts (all but the newest 3) ARE consumed by any fold that spans their position; the newest 3 are protected working memory; - the detail view labels each BLOCKED compress row aged vs newest instead of printing bare BLOCKED rows. kernel/src/report.ts: BLOCKED rows split out of range rows into a "BLOCKED MESSAGES" section (counts + tokens + #4348 aged/newest split, config-gated); detail rows get suffixes; header separates raw from blocked counts. src/marker/status-body.ts: SECTION_HEADS += new head. kernel 0.0.203 -> 0.0.204. Tests: kernel/tests/status-blocked-compress.test.ts (new, 5 tests incl. row-for-row alignment with buildCompressibleRanges); status-summary-nodes header assertion updated.
(ai: vllm-qwen/qwen3.8-27b) Fixed the What was wrong: after the kernel was rebumped The fix: regenerated the kernel lockfile — Live state (verified this run, single GET on the new head): 七问(本次运行):
判定: 事件报的 |
[bot] 🏷 查重: 不重复。 本 PR(#7536)是该主题下唯一在途 PR;其余 open 的 acp_status 相关 PR 均为不同主题(已逐一核对)。 Review verdict (English): I reviewed PR #7536 in detail. It is a well-designed observation-surface rework that aligns the What I reviewed (original change
The host-authored lookalike divergence (a synthetic node with no Mechanical fixes I made in place (own commits):
Coordination note (two lanes worked this PR): Kernel authorization (the only red gate):
Verification (combined head
Merge verdict: ready to merge pending (a) your kernel authorization (issue #7538, option A recommended) and (b) CI green. No code changes outstanding from my review. 8问(中文):
判定: 可合(待 owner kernel 授权 #7538 选项 A + CI 绿)。 我的 review 无遗留代码改动。 |
… description change The PR reworded the compress tool's view param description (kernel/src/ compress-tools.ts). The wire-contract goldens pin that tool schema, so they drifted. Regenerated via scripts/update-wire-contract-goldens.ts; the diff is exactly the view description across kernel.json, bili.json, manifest-default.json, manifest-optin.json (no other schema change). Closes the 4 wire-contract-golden test failures in the CI test shards.
Follow-up: wire-contract goldens regenerated + kernel-guard false positive corrected 1. Wire-contract goldens were stale (a real PR gap — now fixed). The CI test shards were failing on 4 wire-contract golden tests ( Regenerated via 2. Storage-render golden + storage-engine failures (likely pre-existing, not this PR). The remaining shard failures are:
Neither the nudge state nor the storage engine is touched by this PR (it changes the acp_status report view, not the nudge cadence or storage rendering). The PR body claims these 8 "reproduce identically on a pristine-HEAD baseline worktree — environmental, unrelated to this change." I have not independently verified on a pristine master worktree (a full-suite run is CI's job), but the divergence sits in a state key the PR does not touch, so they are most likely pre-existing. If they reproduce on master they belong in their own triage, not this PR. 3. Kernel-guard false positive (corrected). My earlier reply said "kernel-guard stays red by design" — that was inaccurate. The kernel-guard was actually green (a false positive): the check ( I've reworded the note to drop the trigger string (now "kernel-change declaration", no colon). Future runs will correctly show kernel-guard red (pending owner approval via the kernel authorization request, GitHub issue #7538). The current run still shows green because it already executed against the old note. Verification: kernel 1661/0 · typecheck clean · targeted host (status/marker) 70/0 · wire-contract goldens regenerated ( Merge verdict: ready pending (a) owner kernel authorization (GitHub issue #7538, option A) + (b) CI green — the goldens fix should clear the 4 wire-contract failures; the storage-render / storage-engine failures are likely pre-existing and belong in their own triage if they reproduce on master. |
…tput #6936's regression pin: with pinned (unrefed) rows present, no model-facing surface may print the internal sentinel, and clean sessions must render byte-identical to before. - range-view header keeps the historical 'N visible messages' format and appends '+ N unrefed' only when pinned rows exist - 'BLOCKED MESSAGES' section renamed to 'UNREFED MESSAGES' (src/marker/ status-body.ts section head registered in step) - detail rows render pinned halves as '(unrefed)' instead of the raw sentinel; aged/newest labels unchanged - tests pin both: no literal sentinel in any uncompressed surface
…m description The new description changes the acp_status tool schema, which is injected into every outbound model request: all 15 per-turn wire bodies shift +34 bytes and the metered nudge reference moves +9 tokens (34/4). Fold position, block contents and everything else are unchanged — the diff is exactly the schema delta on every turn. Justification for the regen (per the suite header): intentional model-facing tool-description change in this PR.
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1283-master.6e3d482 # this exact build
npm install -g billion-context@master # always the newest merged build
|
…lict, round 7) Master moved 0b68ade -> 15f06c6 (kernel 0.0.205, +preflight emergency-digest default-off #7549, +preflight 413 passthrough #7548, +sessions reattach #7512, +opencode user-fork detection #5511, +acp-status uncompressed nudge-align #7536, +preflight gate epoch exception #7558, +413 egress fuse pins #7488, +Korean README #7551, +many host/test changes). Conflicts: 3 version-only files (kernel/package.json, kernel/package-lock.json, root package-lock.json). Resolved to kernel 0.0.206 (merged kernel = superset of master's 0.0.205 + PR #6720/#6762 changes; kernel/src changed vs master => must bump above master's 0.0.205). Auto-merged clean: kernel/src/compress.ts (PR markers 13x + master changes), src/stream.ts (PR markers 3x), src/server.ts, master's new test files, docs. Local verification: typecheck ✓, build ✓, kernel 1671 pass / 0 fail, host nudge/receipt 7 pass / 0 fail, kernel-guard ✓ (SRC_CHANGED=2 BUMPED=1 0.0.205->0.0.206), version-guard ✓ (root 0.1.216 untouched), lock-sync ✓.
…BLOCKED) projection failure now prints the real error reason (truncated to 100 chars) instead of the flat "refs unresolvable" misdiagnosis (#5667 family). The flat string no longer appears; e.g. endRef="mNNNNN" not found in visible context. kernel: surface the real projection error reason in acp_status ranges view (#6168) Rebased onto master, whose #7536/#6936 work already implements the #6168 core fix (range rows built from resolvable entries only; pinned mass in its own UNREFED section). This preserves the one piece unique to the original PR — cleanProjectionError — and drops the original report.ts rewrite, which is subsumed by master's authoritative implementation. - report.ts: add cleanProjectionError helper; flagFor catch uses it. - tests/blocked-status-ranges.test.ts: 4 focused tests (no-BLOCKED-endpoint contract in master's form + the cleanProjectionError improvement). - kernel 0.0.207 -> 0.0.208 (CI-enforced version discipline).
…BLOCKED) projection failure now prints the real error reason (truncated to 100 chars) instead of the flat "refs unresolvable" misdiagnosis (#5667 family). The flat string no longer appears; e.g. endRef="mNNNNN" not found in visible context. kernel: surface the real projection error reason in acp_status ranges view (#6168) Rebased onto master, whose #7536/#6936 work already implements the #6168 core fix (range rows built from resolvable entries only; pinned mass in its own UNREFED section). This preserves the one piece unique to the original PR — cleanProjectionError — and drops the original report.ts rewrite, which is subsumed by master's authoritative implementation. - report.ts: add cleanProjectionError helper; flagFor catch uses it. - tests/blocked-status-ranges.test.ts: 4 focused tests (no-BLOCKED-endpoint contract in master's form + the cleanProjectionError improvement). - kernel 0.0.207 -> 0.0.208 (CI-enforced version discipline).
…BLOCKED) projection failure now prints the real error reason (truncated to 100 chars) instead of the flat "refs unresolvable" misdiagnosis (#5667 family). The flat string no longer appears; e.g. endRef="mNNNNN" not found in visible context. kernel: surface the real projection error reason in acp_status ranges view (#6168) Rebased onto master, whose #7536/#6936 work already implements the #6168 core fix (range rows built from resolvable entries only; pinned mass in its own UNREFED section). This preserves the one piece unique to the original PR — cleanProjectionError — and drops the original report.ts rewrite, which is subsumed by master's authoritative implementation. - report.ts: add cleanProjectionError helper; flagFor catch uses it. - tests/blocked-status-ranges.test.ts: 4 focused tests (no-BLOCKED-endpoint contract in master's form + the cleanProjectionError improvement). - kernel 0.0.207 -> 0.0.208 (CI-enforced version discipline).
…BLOCKED) projection failure now prints the real error reason (truncated to 100 chars) instead of the flat "refs unresolvable" misdiagnosis (#5667 family). The flat string no longer appears; e.g. endRef="mNNNNN" not found in visible context. kernel: surface the real projection error reason in acp_status ranges view (#6168) Rebased onto master, whose #7536/#6936 work already implements the #6168 core fix (range rows built from resolvable entries only; pinned mass in its own UNREFED section). This preserves the one piece unique to the original PR — cleanProjectionError — and drops the original report.ts rewrite, which is subsumed by master's authoritative implementation. - report.ts: add cleanProjectionError helper; flagFor catch uses it. - tests/blocked-status-ranges.test.ts: 4 focused tests (no-BLOCKED-endpoint contract in master's form + the cleanProjectionError improvement). - kernel 0.0.207 -> 0.0.208 (CI-enforced version discipline).
…BLOCKED) projection failure now prints the real error reason (truncated to 100 chars) instead of the flat "refs unresolvable" misdiagnosis (#5667 family). The flat string no longer appears; e.g. endRef="mNNNNN" not found in visible context. kernel: surface the real projection error reason in acp_status ranges view (#6168) Rebased onto master, whose #7536/#6936 work already implements the #6168 core fix (range rows built from resolvable entries only; pinned mass in its own UNREFED section). This preserves the one piece unique to the original PR — cleanProjectionError — and drops the original report.ts rewrite, which is subsumed by master's authoritative implementation. - report.ts: add cleanProjectionError helper; flagFor catch uses it. - tests/blocked-status-ranges.test.ts: 4 focused tests (no-BLOCKED-endpoint contract in master's form + the cleanProjectionError improvement). - kernel 0.0.207 -> 0.0.208 (CI-enforced version discipline).
…BLOCKED) projection failure now prints the real error reason (truncated to 100 chars) instead of the flat "refs unresolvable" misdiagnosis (#5667 family). The flat string no longer appears; e.g. endRef="mNNNNN" not found in visible context. kernel: surface the real projection error reason in acp_status ranges view (#6168) Rebased onto master, whose #7536/#6936 work already implements the #6168 core fix (range rows built from resolvable entries only; pinned mass in its own UNREFED section). This preserves the one piece unique to the original PR — cleanProjectionError — and drops the original report.ts rewrite, which is subsumed by master's authoritative implementation. - report.ts: add cleanProjectionError helper; flagFor catch uses it. - tests/blocked-status-ranges.test.ts: 4 focused tests (no-BLOCKED-endpoint contract in master's form + the cleanProjectionError improvement). - kernel 0.0.207 -> 0.0.208 (CI-enforced version discipline).
acp_statustool'sviewparameter description (old:"messages" for a per-message listing; "ranges" is the default; new:"ranges" (default) for the compressible-ranges listing; "messages" for a per-message drill-down) — this is what shifts every outbound wire body by +34 bytes (storage-render goldens regenerated in this PR, see below); (2) theacp_statusreport strings themselves (overview tip,UNREFED MESSAGES/ALREADY-COMPRESSED SUMMARY NODESsections, detail-row suffixes). Regression inference: the only numbers in the model-visible output are the UNCHANGED staticm00150–m00220call-shape line (deliberately static, never range-aware — #2302) and token counts the system actually computed; no new ref/position/count the model could anchor on; the tip now steers toward the ranges view that is row-for-row identical to the nudge table (pinned by the new alignment test).kernel-change: acp_status report rendering only (kernel/src/report.ts + prune.ts summary-node helpers + compress.ts tierActionHint export) — aligns the uncompressed status surface with the injected nudge logic (summary nodes labeled as distillation-only, unrefed compress residue explained with the #4348 fold rule); no wire/format/protocol change; kernel 0.0.203 -> 0.0.205
acp_status (uncompressed) now tells the model the truth about what it can actually fold
Problem. In a real long session,
acp_statuswithscope:"uncompressed"(the view the overview tip sends the model to) lied in two ways:Already-compressed blocks looked like fresh fold targets. After a fold, the block's summary node lives in the conversation under a plain message ref. The uncompressed view listed it as ordinary uncompressed mass (and the overview double-counted it in the "text" bucket), while the injected nudge table — which is the only thing that actually gets compressed — skips it and only tier-2/3 distillation (block-ID boundaries) can fold it. So the model saw "compressible" ranges that the nudge would never offer.
Pinned compress receipts made whole turns un-foldable. Every successful
compressexchange is protection-pinned: its call + result halves get no numeric ref (only the failed ones do). The range view bridged over them and printed rows likem00007–BLOCKED ⚠ not foldable: refs unresolvable— one pinned pair killed the whole turn's advertised range — and the detail view flooded with identicalBLOCKED (x) compressrows that read as uncompressible junk (repro: a real pi session, 448 messages, ~30 pinned compress rows on top, no usable offered range). Meanwhile the fold gate (Accident re-anchor debris is unrecoverable: the overlay island lands mid-turn, and the turn-split guard means the orphan | 事故重锚碎屑无法回收:覆盖岛落在 turn 中段,turn-split 守卫让孤另一半永远折不了 #4348) quietly consumes the aged pairs (all but the newest 3) whenever a range spans their position — a fact no surface ever told the model.Fix (kernel
report.ts, two commits;src/marker/status-body.tsregisters the new section heads; the internal sentinel never reaches any model-facing string):ALREADY-COMPRESSED SUMMARY NODESsection that names the tier-distillation path (byte-identicaltierActionHintwording once armed), and the overview no longer double-counts them. The tip now points at the ranges view instead of the per-message detail.UNREFED MESSAGESsection with counts + tokens and the Accident re-anchor debris is unrecoverable: the overlay island lands mid-turn, and the turn-split guard means the orphan | 事故重锚碎屑无法回收:覆盖岛落在 turn 中段,turn-split 守卫让孤另一半永远折不了 #4348 truth: the N older exchange(s) are consumed by any fold that spans their position (cite the refs on either side); the 3 newest = working memory. The detail view renders each pinned row as(unrefed)with the same· aged — folds when a range spans it/· newest — working memorylabels the fold gate uses. Clean sessions keep the historical header byte-for-byte (N visible messages,+ N unrefedappended only when pinned rows exist). The view still carries the staticcompress({ content: "m00150–m00220 optional topic\n…" })call shape.Net effect: everything
acp_statuslists as foldable is foldable the way the nudge offers it, and everything it says is pinned is explained with the exact action that consumes it. The model no longer dead-ends onrefs unresolvableranges.Storage-render goldens regenerated (justification, per the suite header). The
view-param description change alters theacp_statustool schema, which is injected into every outbound model request: all 15 per-turn wire bodies shift by exactly +34 bytes and the metered nudge reference moves +9 tokens (34/4). Fold position, block contents, message refs and every other state key are byte-identical to before — the golden diff is exactly the schema delta on every turn. The regenerated digests match, byte-for-byte, what this branch's CI runs already produced (e.g. google stateDigest06f04636a3ebef1a, nudge key125bb67d1ffc2e7b), i.e. the committed goldens were simply pre-dating this PR's schema change.Verification.
kernel/tests/status-blocked-compress.test.ts(5 tests: no unrefed range rows / no "refs unresolvable"; Accident re-anchor debris is unrecoverable: the overlay island lands mid-turn, and the turn-split guard means the orphan | 事故重锚碎屑无法回收:覆盖岛落在 turn 中段,turn-split 守卫让孤另一半永远折不了 #4348 aged-newest split; no-config fallback; detail suffixes 10 aged + 6 newest; row-for-row alignment withbuildCompressibleRanges; no sentinel literal on any model-facing surface — the acp_status prints the internal 'BLOCKED' marker in its range list and says 'refs unresolvable', which makes the model believe its refs are broken #6936 regression pin),kernel/tests/status-summary-nodes.test.ts(8 tests, updated header assertion).acp-status+acp-status-marker-block+marker-render-contractsuites green.tests/golden-storage-render.test.ts5/5 +tests/storage-engine-proofs.test.ts12/12 green after the regen above.applyCompression: an aged pinned pair between two numbered refs folds fine (consumed), a newest-3 pair is carved out of the range, a failed exchange folds normally — matching what the report now claims.CI note (pre-existing flake, not this PR).
tests/issue6069-epoch-pause-over-window.test.tsreds intermittently on master itself — the master scheduled run of 2026-11-22 17:03Z (run 45047243756, head 9ad612e) failed its 4 shard-1 jobs on exactly that one test, and the same minute's other master run passed. It passes locally on this branch (3/3). If a shard reds on it here, a job re-run clears it.kernel 0.0.203 → 0.0.205 (master pulled #7522 at 0.0.203; the branch rebump took 0.0.204). Merge left to a human.
Fixes #6936 (internal ref sentinel + "refs unresolvable" leaking into acp_status; regression pin in
kernel/tests/status-blocked-compress.test.ts). Kernel authorization request: #7538.