Skip to content

fix(status): recommend ranges view in acp_status prompt snippet - #233

Open
ranxianglei wants to merge 1 commit into
masterfrom
2026-08-26_status-prompt-ranges
Open

ranxianglei wants to merge 1 commit into
masterfrom
2026-08-26_status-prompt-ranges

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Problem

acp_status promptSnippet suggested scope:"uncompressed" + view:"messages", steering models to the per-message firehose. Combined with the kernel's ranges view collapsing dense refs into one giant range, the tool's output was not actionable by range - see #193.

Fix

promptSnippet now recommends acp_status({ scope: "uncompressed" }) (the ranges view), which acp-kernel PR ranxianglei/acp-kernel#165 makes actionable: ranges grouped by conversation turn, sorted by size.

One-line change in src/status-tool.ts. typecheck + 428 tests + build all pass.

@github-actions

github-actions Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Extension Artifact

Branch: 2026-08-26_status-prompt-ranges (c2418f8)

Option A — Install from npm PR tag (recommended)

pi install npm:billion-context-pi@pr-233

Each push to this PR publishes a new version under the pr-233 npm tag.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pi-pr233.tgz
pi install ./package

This comment is automatically updated on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

[bot] Reviewed and verified PR branch 2026-08-26_status-prompt-ranges (commit 18b276b):

  • Diff is exactly the claimed one-line change in src/status-tool.ts:27: promptSnippet now reads acp_status({}) or acp_status({ scope: "uncompressed" }) — steering models to the ranges view instead of the per-message firehose.
  • description still documents view:'messages' as an available option (not a recommendation), which is consistent.
  • No tests assert the snippet text, so nothing stale to update.
  • Local CI run on the branch: npm run typecheck clean, npm test 428/428 pass, npm run build succeeds and the new snippet is present in dist/index.js.
  • No acp-kernel bump needed — this is prompt-only; the actionable ranges view comes from acp-kernel PR 跟踪 acp-kernel#86:pending nudge 半阈值接线 — 升级-only 影响 / 适配方案 / 后果评估 #165 shipping separately.

Ready for merge (human-only per repo rules).

@ranxianglei
ranxianglei force-pushed the 2026-08-26_status-prompt-ranges branch from 18b276b to 4c32f9f Compare September 16, 2026 05:06
@ranxianglei

Copy link
Copy Markdown
Owner Author

分诊(队列清理 #484): 需产品决策,非 rebase 问题。

src/status-tool.ts:32 仍是 PR 要改的那一行(promptSnippet 教模型 scope:"uncompressed", view:"messages")。但 8/26 之后 messages view 有了正当用途(stale-ref 恢复,status-tool.ts:31 描述里也提了 per-message listing)。

一行改动两个方向都说得通:若意图是"别默认教模型最贵的列举视图"→ 保留本 PR;若接受现状 → 关闭为 WAI(新理由)。留给维护者拍板。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

Re-verified after queue cleanup — recommendation: merge.

Facts checked:

  • Branch 2026-08-26_status-prompt-ranges was rebased on 2026-09-16 onto release v0.1.71 (base 21c99ca), tip 4c32f9f. All workflows green on that exact commit: CI ✅, E2E ✅, PR Build Artifact ✅ (runs 35058226519 / …522 / …542).
  • Diff vs today's master is still exactly one line — src/status-tool.ts:32: promptSnippet becomes acp_status({}) or acp_status({ scope: "uncompressed" }). Verified byte-for-byte against the working tree; applies cleanly, no conflict.

On the product question — the two directions don't actually collide:

  1. The WAI rationale predates the PR, not postdates it. The stale-ref-recovery guidance (src/system-prompt.ts:31, added in 9b78834 for 批量压缩因 refs 过期失败时,报错误报为“内容不足”,无法自愈 #178) landed 2026-08-21 — five days before this PR opened, and floor 3's review already accounted for it. It tells the model to "run acp_status" (no args → overview + compressible ranges, which carry live refs); nothing in src/ routes the model to view:"messages" specifically for recovery.
  2. Merging loses nothing for that use case. The messages view stays documented in the param schema (src/status-tool.ts:18), the tool description (src/status-tool.ts:31), and the system-prompt tool list (src/system-prompt.ts:39) — the PR only removes the default priming in the snippet.
  3. Current master is internally inconsistent right now: src/system-prompt.ts:39 already recommends the ranges view — "No args = overview + totals. scope:\"uncompressed\" for range view; add view:\"messages\" for per-message listing" — while the promptSnippet still primes the firehose view as the canonical example. The PR aligns the last straggler; afterwards snippet, description, and system prompt all agree.
  4. Original motivation (acp_status UNCOMPRESSED not by range #193: per-message firehose not actionable → acp-kernel#165 made ranges actionable) stands.

No code changes needed from me — diff is minimal, CI green. Leaving the merge to you (human-only per repo rules).

中文摘要:核实了已 rebase 的分支(tip 4c32f9f,CI/E2E 全绿,diff 仍为 src/status-tool.ts:32 一行),并确认分诊里"8/26 之后 messages view 才有正当用途"的前提不成立——stale-ref 恢复指引(9b78834,#178)早于本 PR 五天(8/21)就已存在,且从不特指 messages 视图;该视图在参数 schema、工具描述、系统提示中均有保留,而现有 src/system-prompt.ts:39 本就以 ranges 为推荐视图,promptSnippet 是唯一不一致处。修复的是提示词内部不一致(消除对最贵列举视图的默认引导),建议合并。

ranxianglei added a commit that referenced this pull request Sep 25, 2026
… acp-kernel 0.0.90 (#540, #535 go-live)

- #540: compress receipts and the tier3-only rewrite selected 'new' blocks
  with slice(-blocksCreated); an in-place refold keeps its original array
  position, so refolding b1 of [b1,b2,b3] presented b3's stale summary as
  the new one. Selection now diffs before/after runIds (every applyCompression
  assigns a fresh runId to created AND refolded blocks) — exact for both
  shapes. Regression test: two blocks, inline-restore the non-tail b1,
  re-compress its span, assert span clause + fingerprint line reference b1's
  NEW summary, b2 untouched, still exactly two persisted blocks.
- pin acp-kernel 0.0.86 -> 0.0.90 (real install, overlay retired): ships
  refold-in-place (kernel #403) + full-log resolving (#400), making #535 P2
  live end-to-end.
- viable-ranges test now feeds well-formed CoreMessages: 0.0.90's syncBlocks
  (subid coverage, kernel #233) dereferences message.id via baseIdOf and
  throws on id-less host-shaped entries where 0.0.86 silently tolerated them
  (kernel-side guard filed separately).

Gates: typecheck ✓ · 944 tests / 941 pass / 0 fail / 3 skipped · build ✓

Fixes #540
The promptSnippet suggested scope:'uncompressed' + view:'messages',
steering models to the per-message firehose. The ranges view is the
right default (now grouped by conversation turn and sorted by size in
acp-kernel PR #165), so recommend that instead.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant