From 5ee4f7ff45d2fb907dfa4cf58095133c50793ddf Mon Sep 17 00:00:00 2001 From: ci-check Date: Mon, 16 Nov 2026 20:27:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9A=A0=EF=B8=8F=20MODEL-FACING=20TEXT=20?= =?UTF-8?q?CHANGE:=20adds=20one=20stop-signal=20bullet=20to=20the=20lean?= =?UTF-8?q?=20acpTags?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit kernel: add receipt stop-signal clause to the lean acpTags (#6930) The standing compress bullet orders the model to compress consumed history but never tells it to stop, so after a "No compressible ranges remain" receipt the model keeps issuing small fragment folds (wasted summarize rounds + clamped/guessed end refs). Add one counter-clause bullet directly after the standing bullet: compress receipts are authoritative stop signals โ€” issue no further compress calls until a receipt/nudge names ranges to fold or the user explicitly asks. No numbers in the text (nothing to propagate, ยง7.3). kernel-change: prompt-surface counter-clause for the standing compress bullet; the prompt text is kernel-owned (packs.ts LEAN acpTags), the host cannot add it. Regression test asserts the bullet is present and positioned after the standing bullet (kernel/tests/packs.test.ts). --- kernel/package-lock.json | 4 ++-- kernel/package.json | 2 +- kernel/src/packs.ts | 1 + kernel/tests/packs.test.ts | 25 +++++++++++++++++++++++++ 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/kernel/package-lock.json b/kernel/package-lock.json index 9437e48cf1..3e25df6ca0 100644 --- a/kernel/package-lock.json +++ b/kernel/package-lock.json @@ -1,12 +1,12 @@ { "name": "acp-kernel", - "version": "0.0.198", + "version": "0.0.199", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "acp-kernel", - "version": "0.0.198", + "version": "0.0.199", "license": "MIT", "devDependencies": { "@types/node": "^22.0.0", diff --git a/kernel/package.json b/kernel/package.json index a58d31360b..f65ce78fdd 100644 --- a/kernel/package.json +++ b/kernel/package.json @@ -1,6 +1,6 @@ { "name": "acp-kernel", - "version": "0.0.198", + "version": "0.0.199", "description": "Framework-agnostic context-compression engine (model-driven, 3-tier LSM). Pure core: no host dependency.", "license": "MIT", "author": "ranxianglei", diff --git a/kernel/src/packs.ts b/kernel/src/packs.ts index a66232053d..044214f3b5 100644 --- a/kernel/src/packs.ts +++ b/kernel/src/packs.ts @@ -285,6 +285,7 @@ const LEAN_PROMPT_SECTIONS = { acpTags: [ `User/tool messages carry hidden \x3cacp\x3e refs such as m00123. Never echo the XML tags; use only refs in ACP tool calls.`, `Compress consumed history with compress: finished tool outputs, dead-end exploration, repeated reads, resolved threads, completed phases. Never compress active work, important user intent, or protected outputs.`, + `Compress receipts are authoritative stop signals: after a no-op, an "already compressed" receipt, or "No compressible ranges remain", issue no further compress calls until a receipt or nudge names ranges to fold or the user explicitly asks to compress.`, `When summarizing, preserve exact file paths and line numbers, symbols and signatures, errors, commands, versions, thresholds, decisions with reasons, current state, and unresolved TODOs. Never replace exact technical values with vague wording โ€” a good summary is the primary carrier and makes recall unnecessary.`, `Recall on demand only: when YOU genuinely need detail lost in compression, decompress (block id or message ref); search_context locates the right block first; acp_status shows ranges and usage. Never run recall as a routine post-compress step.`, `Message refs remain stable across compression within the same session state. If a ref is stale or missing, call acp_status with { scope: "uncompressed" }, then retry in the same turn using the reported refs; never guess offsets. Batch target ranges in one call.`, diff --git a/kernel/tests/packs.test.ts b/kernel/tests/packs.test.ts index 9239918d95..9cc76fe081 100644 --- a/kernel/tests/packs.test.ts +++ b/kernel/tests/packs.test.ts @@ -170,6 +170,31 @@ test("lean acpTags carries BOTH the summary-trust guardrail and the post-compres ); }); +test("lean acpTags carries the receipt stop-signal clause after the standing compress bullet (#6930)", () => { + const pi = leanPack.surface.adapters?.pi as { + promptSections: Record; + }; + const tags = pi.promptSections.acpTags ?? ""; + const standing = "Compress consumed history with compress:"; + const stopClause = "Compress receipts are authoritative stop signals:"; + assert.ok(tags.includes(standing), "standing compress bullet must be present"); + assert.ok(tags.includes(stopClause), "stop-signal clause must be present"); + assert.ok( + tags.indexOf(stopClause) > tags.indexOf(standing), + "stop-signal clause must be positioned after the standing compress bullet", + ); + // The clause names the stop triggers and the two resume conditions โ€” not a blanket ban. + for (const marker of [ + 'an "already compressed" receipt', + '"No compressible ranges remain"', + "issue no further compress calls", + "a receipt or nudge names ranges to fold", + "the user explicitly asks to compress", + ]) { + assert.ok(tags.includes(marker), `missing stop/resume detail: ${marker}`); + } +}); + test("lean acpTags states ref stability across compression (no false renumbering claim, #417)", () => { const pi = leanPack.surface.adapters?.pi as { promptSections: Record; From 707a90d5d579df5344e17a38db138f6da23903b3 Mon Sep 17 00:00:00 2001 From: ci-check Date: Mon, 16 Nov 2026 21:31:23 +0800 Subject: [PATCH 2/2] fix(lock): sync root package-lock.json kernel entry to 0.0.199 (lock-sync gate) --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index d12b556eb1..006bda1e14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,7 +51,7 @@ }, "kernel": { "name": "acp-kernel", - "version": "0.0.198", + "version": "0.0.199", "dev": true, "license": "MIT", "devDependencies": {