Repository navigation
fix: promptPack=lean actually reaches the proxy system prompt (kernel/packs) (#2335) - #2337
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.2554-pr.2337.9b463a4This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2337.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 PR #2337 review 完成(基于 rebase 到 1. 是什么问题 2. 什么原因导致的(两层,分层清楚)
3. 怎么修复的 4. 是否有回归问题
5. 是否破坏缓存 6. 是否改了设计方向 7. 是否引入了新的配置 流程合规:PR body 首行有 本地定向验证(全量留给 CI):root + kernel typecheck 干净;packs 家族 16/16(含新增回归测试);kernel packs 26/26。 判定:代码方向正确、机制层修复到位、发现的回归已修并有测试钉住;等 |
…#2335) Before: leanPack.surface only swapped tool descriptions; every lane assembled the full default 10.9KB system prompt (A/B capture: pack=lean vs default were byte-identical) and the condensed contract + recall discipline lived only in adapters.pi, unreachable by the proxy. - CompressPromptSections gains tri-state philosophy/howToCompress; the three builders take them as per-call lead entries instead of hardcoding [prompts.compressPhilosophy, prompts.howToCompressRules]. No-override output stays byte-identical (pinned by test). - leanPack: hoist the pi promptSections object to the TOP-LEVEL surface (shared const LEAN_PROMPT_SECTIONS, single source for both slots); pi adapter keeps the same reference — zero behavior change for billion-context-pi. - file-pack sanitize whitelist (COMPRESS_SECTION_KEYS) widened to the two new keys so project packs can trim them too. Live A/B after fix: lean system 6,856 chars (contract + recall discipline + file-pointer rule delivered, default philosophy gone); default lane re-captured byte-identical to pre-fix (10,876 chars).
…ompress (#2335) #2335 made philosophy/howToCompress tri-state sections in the kernel builders. buildAcpTagsOnlyPrompt still computed its slice prefix from the hardcoded prompts.* values, so for any pack that replaces or drops those lead blocks (lean nulls philosophy and swaps rules) the startsWith guard failed and the whole ACP-TAGS NEVER-echo prompt silently vanished from the injectTool=false lanes (#1881 protection lost). Compute the prefix from the effective sections, mirroring applySectionOverrides semantics exactly.
… onto master post-#2302)
fdbfb0e to
f3c6178
Compare
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.136-master.3fae4cf # this exact build
npm install -g billion-context@master # always the newest merged build
|
kernel-change: lean pack promptSections hoist — CompressPromptSections gains tri-state philosophy/howToCompress, builders stop hardcoding the two lead blocks (no-override output byte-identical, pinned by test). Fixes #2335 (proxy lanes assembling the full default system prompt under pack=lean). No wire-format change; acp-kernel npm pin untouched (vendored kernel/ tree in-repo).
Fixes #2335
Before (captured live, issue #2335)
compress.promptPack: "lean"only swapped tool descriptions; the assembled system prompt stayed the full default (10,876 chars), byte-identical to pack=defaultadapters.pi.promptSections— reachable only by billion-context-pi, never by the proxy lanesbuildCompressSystemPrompt/Text/Hybrid) hardcode[prompts.compressPhilosophy, prompts.howToCompressRules]and only honor 6 overridable sections; lean's content sat in a slot the builders never readChange (kernel/ vendored tree, no proxy code changes needed)
CompressPromptSectionsgains tri-statephilosophy/howToCompress— the two lead blocks become per-call section entries inside the builders. No-override output stays byte-identical (pinned by test).leanPack.surface.promptSectionshoisted to top level — the pi adapter keeps the exact same object via a shared const (LEAN_PROMPT_SECTIONS), so billion-context-pi behavior is unchanged; the proxy now gets the condensed contract + recall discipline in every lane.COMPRESS_SECTION_KEYS+philosophy+howToCompress) so project/user packs can trim them too.After (same live A/B harness as the issue)
==verified)Tests
resolveCompressSurface({promptPack:"lean"})→ builder output carries contract+discipline; default unchanged) — pack family 14/14cc #2200 (recall discipline now delivered on the lean lane; the default-lane wording decision stays with that issue)