Skip to content

chore: bump acp-kernel to 0.0.67 - #418

Closed
ranxianglei wants to merge 4 commits into
masterfrom
2026-09-13_kernel-0.0.67
Closed

ranxianglei wants to merge 4 commits into
masterfrom
2026-09-13_kernel-0.0.67

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Sep 13, 2026 •

Copy link
Copy Markdown
Owner

Bumps the pinned acp-kernel from 0.0.66 to 0.0.67 and fixes the pi side that the new kernel surfaced.

Kernel side (acp-kernel #264, Fixes acp-kernel #263)

Lean pack carries a condensed how-to-compress style contract in the pi slot (~2.0K vs the 4.5K default) with integrity rules against the 01a09989 unstyled-summary hallucination class: no simulated Q&A transcripts, owed answers are PENDING, questions recorded as asked (with ref) — never as answered.

Pi side (this PR)

sanitizePromptSections hard-nulled the rule slots (philosophy/howToCompress/tier2/tier3) even when a pack supplied a string, so the kernel contract was bundled but never rendered — caught by the updated prompt-pack test. Rule slots now accept string overrides (SectionOverride), the condensed contract flows into the lean system prompt, and the junk-sanitize test is updated to the new semantics.

E2E smoke: lean system prompt = 3572 bytes; condensed contract rendered; full default and philosophy absent.

Verification

803 tests (0 fail, 3 pre-existing skips), typecheck clean, build green. The currently installed ~/.pi build carries the kernel data but NOT this render fix — this PR completes it locally once rebuilt.

Fixes #419.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Reviewing PR #418 (bump acp-kernel 0.0.66 → 0.0.67) now: checking diff cleanliness, pin exactness, lockfile sync, prompt-pack test markers, npm availability of 0.0.67, and running typecheck/test/build locally. Will report back with the verdict shortly.

@github-actions

github-actions Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Extension Artifact

Branch: 2026-09-13_kernel-0.0.67 (c7dca95)

Option A — Install from npm PR tag (recommended)

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

Each push to this PR publishes a new version under the pr-418 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-pr418.tgz
pi install ./package

This comment is automatically updated on each push.

… contract flows through

sanitizePromptSections hard-nulled RULE_SLOT_KEYS (philosophy/howToCompress/
tier2/tier3) even when a pack supplies a string, so the kernel 0.0.67
condensed how-to-compress contract (acp-kernel #264, Fixes #263) was
bundled but never rendered. Widen PiPromptSections rule slots to
SectionOverride and pass the value through; junk test updated to the
new semantics (only genuinely bad types dropped).
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Review: branch was red as pushed — root cause found, fix on the branch, verified green

Diff cleanliness ✓ — exactly 3 files, all on-topic: package.json (exact pin acp-kernel 0.0.66 → 0.0.67, no caret per AGENTS.md), package-lock.json (integrity matches the published 0.0.67 tarball; registry check: latest = 0.0.67), and the prompt-pack test update. No stray changes.

The pushed head was failing its own new test. Ran the CI checks on d02f9ef: typecheck clean, but npm test → 803 tests, 1 fail — the PR's own assertion at tests/prompt-pack.test.ts:61 (typeof howToCompass === "string", actual undefined). So the "803 tests (0 fail)" in the description doesn't hold for the pushed tree — local verification must have run against an uncommitted variant of src/system-prompt.ts.

Root cause (verified by probing the installed kernel directly): the kernel side is correct — leanPack.surface.adapters.pi.promptSections.howToCompress is the 1989-char condensed contract, all other sections null. The break is pi-side: sanitizePromptSections() (src/system-prompt.ts) passed rule-slot values through only when they were null, silently dropping string overrides. Runtime consequence (src/index.ts:626-640): lean-pack sessions fall back to the default ~5.2K howToCompressRules instead of the condensed contract — acp-kernel#264's integrity rules would never have reached any pi user's prompt. This defeats the point of the bump, so "no pi-side code change" was the incorrect part of the description.

Fix now on the branch:

  • de97f06 (author awork@bot, landed mid-review while I was reproducing): widens the four rule slots (philosophy/howToCompress/tier2/tier3) to SectionOverride (string | null) and passes strings through — symmetric with the other overridable sections. One behavioral note: user config (acp.json) can now override these four slots with strings too (previously silently ignored). Judged that intended semantics; flag it if you'd rather restrict to howToCompress only.
  • c7dca95 (mine, test-only): regression guard asserting the contract actually reaches the built prompt — header + TASK AS OF THIS BLOCK marker present, full default rules not injected. Nothing covered that path before.

I recorded the sanitizer defect as issue #419 (source-marked); c7dca95 carries closes #419 so it auto-closes on merge.

Verified on final head c7dca95: typecheck clean · 804 tests, 0 fail, 3 skipped (the static integration skips) · build green (dist 796.67 KB, self-contained).

Verdict: code ready — needs CI green + human merge (mergeable_state is blocked pending approval).

中文摘要:PR 分支推送时是红的(新增断言自身失败)——根因是 pi 侧 sanitizePromptSections 对四个 rule slot 只放行 null、静默丢弃字符串覆盖,导致 lean 的精简压缩契约(kernel #264)根本到不了用户 prompt;已在分支上修复 sanitizer(rule slot 接受 string|null,缺陷记录为 issue #419)并补了运行时回归测试,typecheck / 804 项测试 / build 全绿,可以合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

Closing as obsolete: acp-kernel 0.0.68 is live on npm (v0.0.67 was superseded within hours). The next billion-context-pi release bumps the pin straight to 0.0.68 — must ship together with #427 (rule-slot string sanitize), otherwise kernel 0.0.67+'s leanPack howToCompress string gets silently dropped by sanitize and this repo's prompt-pack tests fail against the new pin.

@ranxianglei ranxianglei mentioned this pull request Sep 13, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant