Skip to content

fix: bump kernel 0.0.59, delegate #603 quote-salvage to kernel - #633

Merged
ranxianglei merged 1 commit into
masterfrom
2026-09-07_kernel-0.0.59-dedup-quote-salvage
Sep 7, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-09-07_kernel-0.0.59-dedup-quote-salvage

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What

Test migration (compat-roles #583 G/H)

Kernel #102 changed a test precondition: bili's rebuilt wire hoists every system/developer into the index-0 prefix on BOTH the responses and openai paths, so a developer→system compat rewrite can no longer land off index 0 — the #583 placement-400 edge was unreachable with developer payloads. G/H migrated to the openai chat path with a mid-list ASSISTANT (the one conversation role that survives mid-list) + a bareWire harness option (injectTool/injectNudge off, so the wire is the bare conversation). Ladder verified role-generic; upstream stub now rejects developer|assistant.

Pre-flight

  • typecheck ✓
  • full suite: 1238/1240 (2 known env fails in plugin-agent.test.ts, unrelated)
  • build ✓, verified dist bundles kernel salvage code and no local copy remains

Fixes #603 (dedup side; original fix shipped earlier — this removes the duplicated implementation)

- pin acp-kernel 0.0.57 -> 0.0.59 (#190 null-image guard, #102 EasyInput
  normalization, #212 single-quote salvage, #209 array-adjacency segmentation)
- src/compress-tool.ts now calls kernel parseCompressArgs; quote-salvage
  warning driven by parsed.diagnostics.quoteSalvage; local
  normalizeQuoteShape/normalizeSingleQuotes (~100 lines) deleted
- tests: #603 matrix keeps exercising the kernel path (basic.test.ts 29/29);
  compat-roles #583 G/H migrated to the openai chat path with a mid-list
  ASSISTANT payload + bareWire (post-#102 both wire paths hoist developer
  into the index-0 prefix, so the placement-400 edge is only reachable via
  a mid-list conversation role)
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-09-07_kernel-0.0.59-dedup-quote-salvage (8ff082d)

Option A — Install from npm PR tag (recommended)

npm install -g billion-context@pr-633

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

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr633.tgz
npm install -g package

This comment is automatically updated on each push.

@ranxianglei
ranxianglei merged commit 5201a59 into master Sep 7, 2026
6 checks passed
@ranxianglei ranxianglei mentioned this pull request Sep 7, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Picking up this PR for review. Note it's already merged (5201a59 on master) and shipped as v0.1.95 (release PR #634), so I'm doing a post-merge audit: verifying each claim against the actual diff (kernel pin exactness + lockfile sync, #603 dedup completeness, #583 G/H test migration), re-running pre-flight (typecheck / full suite / build), and confirming dist bundles the kernel salvage path with no local copy remaining. Will report findings here shortly.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Post-merge audit complete — all claims verified. PR #633 is merged (5201a59) and shipped as v0.1.95 (release PR #634, confirmed live on npm: billion-context@latest = 0.1.95). I re-ran everything at master HEAD 5836f78 on a fresh clone + npm ci:

1. Kernel pin 0.0.57 → 0.0.59 ✓

  • package.json: exact pin "acp-kernel": "0.0.59" (no caret — complies with the exact-version rule)
  • Lockfile integrity sha512-CegmdD…HUg== matches the npm registry byte-for-byte; npm ci installs exactly 0.0.59; 0.0.59 is current-latest on npm (kernel-ships-first rule satisfied)

2. Kernel #212 salvage is real and functional ✓

  • Type surface: diagnostics.quoteSalvage?: boolean in kernel parse-compress-input.d.ts
  • Behavioral probe against installed 0.0.59: single-quoted object form and single-quoted stringified-array form both recover 1 range with quoteSalvage: true; double-quoted input untouched (quoteSalvage: false)

3. #603 dedup is complete ✓

  • src/compress-tool.ts: parseCompressInput now a thin wrapper over kernel parseCompressArgs; warning fired only when parsed.diagnostics.quoteSalvage === true
  • normalizeQuoteShape / normalizeSingleQuotes: zero references tree-wide (src + tests)
  • dist check: built bundle contains the salvage code only via the kernel copy — match count in dist/index.js (3) equals match count in node_modules/acp-kernel/dist/index.js (3); no local state machine remains

4. Test migration (#583 G/H) ✓

  • G/H now drive the openai chat path with a mid-list ASSISTANT payload + new bareWire option (injectTool/injectNudge off); upstream stub rejects developer|assistant. Rationale in comments is sound: post-kernel-fix(proxy): strip redundant in-place acp_summary (let compress tool-call carry it) #102 both wire paths hoist developer into the index-0 prefix, so the placement-400 edge is only reachable via a mid-list conversation role
  • Both pass: ok 172 (G), ok 173 (H)
  • tests/basic.test.ts standalone: 29/29 pass — matches the claim exactly; test log shows the new kernel-driven warning format firing ([acp-compress-input] quote-salvage: recovered N range(s) … (kind=…))

5. Pre-flight reproduced ✓

  • typecheck: clean
  • full suite: 1239/1240 in my run (PR claimed 1238/1240 — the two plugin-agent env fails did not reproduce here; instead one different env-only fail: launcher.test.ts "resolveClientCommand: codex/claude resolve to themselves" because this sandbox happens to have /usr/bin/codex installed so which() resolves absolute. Unrelated to this PR.)
  • build: success (tsup, dist/index.js 2.71 MB self-contained)

Minor observations (no action needed):

  • The commit also syncs the lockfile root version 0.1.93 → 0.1.94 — pre-existing drift from release v0.1.94 that didn't touch the lockfile. Harmless, arguably good hygiene, just noting it wasn't mentioned in the PR body.
  • The salvage warning dropped the (was N) pre-recovery count from the old bili-side retry log. Trivial observability delta.
  • Test H's stub else-branch returns "Invalid role: assistant" even though the final rewritten payload contains no assistant role — harness quirk inherited from the original design (same shape as the old developer variant); assertions only check verbatim passthrough of the last 400, so it's cosmetic.

Verdict: claims and reality line up end-to-end. Nothing to follow up on from this review.

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.

lenient compress-arg parsing: salvage salvageable model output

1 participant