Skip to content

fix: pin acp-kernel 0.0.89 — plain-top compress input_schema restores Claude requests (#1299) - #1301

Merged
ranxianglei merged 1 commit into
masterfrom
2026-09-25_kernel-0.0.89
Sep 25, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-09-25_kernel-0.0.89

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What & why

Hotfix for #1299 (issue stays open until v0.1.149 ships and is verified).

billion-context 0.1.148 pinned acp-kernel 0.0.88, whose shared COMPRESS_PARAMETERS schema carries a top-level anyOf (the content-vs-flat-range relax from kernel #374). api.anthropic.com hard-rejects oneOf/allOf/anyOf at the top level of a tool input_schema (400 tools.N.custom.input_schema: input_schema does not support oneOf, allOf, or anyOf at the top level), so every Claude Code request through bili died on turn one. Root fix landed in acp-kernel #405 / v0.0.89: top level back to plain {type, properties}; the two call forms stay documented in the description and enforced by the parser.

This PR bumps the exact pin 0.0.88 → 0.0.89 and adds the pin-gate regression test requested in the issue.

Changes

  • package.json: acp-kernel 0.0.88 → 0.0.89 (exact pin, per repo rule)
  • package-lock.json: acp-kernel entry only (version/resolved/integrity)
  • tests/issue1299-anthropic-top-level.test.ts (new): walks every Anthropic tool bili serves — base ACP tools + opt-in absorb/acp_rule/acp_retrieve/image_full — across all three real exit points: the served constants, the plugin manifest (what the MCP bridge consumes verbatim), and the actual forwarded request body of a proxied /v1/messages turn. Asserts no top-level oneOf/allOf/anyOf anywhere, and that compress keeps every advertised form property (topic/content/startId/endId/startRef/endRef/summary).

Gate verified both directions: on kernel 0.0.88 the 3 tests fail (exact repro of the issue); on 0.0.89 they pass. A future pin bump that re-introduces a top-level combinator fails here instead of bricking Claude users again.

Both compression modes considered: wire injection (proxy mode) and manifest/MCP (plugin mode) are both covered by the test.

Behavior change disclosure (old → new)

  • compress tool input_schema as served to Anthropic clients: {type, properties, anyOf:[{required:[content]},{required:[summary],anyOf:[…range forms…]}]} → {type, properties}. The model-visible constraint moves from schema-level combinators to description text + parser validation. No accepted input is lost — parseCompressArgs accepts both forms before and after. Nested items.anyOf (legal for Anthropic) unchanged.
  • OPENAI / RESPONSES wire shapes still carry the top-level anyOf in 0.0.89's per-wire constants (kernel kept them; no rejection evidence — responses-wire e2e passes against sglang, OpenAI non-strict accepts combinators). Left untouched deliberately; watching.

Pre-flight (local, matches CI gate)

  • npm run typecheck ✔
  • npm test ✔ 2546 pass / 0 fail / 10 skipped (gated e2e suites)
  • npm run build ✔
  • codex e2e auto-triggers via the package-lock path filter (a pin bump IS a pipeline change)

No version bump here — user-facing resolution ships as release v0.1.149 (separate release PR after this merges).

@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-09-25_kernel-0.0.89 (14658a4)

Option A — Install from npm PR tag (recommended)

npm install -g billion-context@pr-1301

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

Option B — Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

Keep this PR as the served-surface gate layer (CI 11/11 green on its head; complements the kernel-export gate from #1302 — neither replaces the other). The broader anti-regression mechanism (validation-parity fake upstreams, golden schema snapshots, unified wire-contract ledger, staged 4-protocol x 3-mode client matrix) is tracked in #1304 and deferred to ework per owner decision.

antclt pushed a commit to antclt/billion-context that referenced this pull request Sep 25, 2026
…nified ledger (ranxianglei#1304)

Consolidates the ranxianglei#1301 served-surface gate and the ranxianglei#1302 kernel-export gate
into one wire-contract suite and extends it per owner decision on ranxianglei#1304
(items 1+2+3, plus the 4-protocol scripted-client matrix phase):

- tests/wire-contract-fakes.ts: WIRE_RULES ledger (WC-001..WC-006, each with
  production/doc provenance) + strictest-known validation for all four wires
  (anthropic /v1/messages, openai chat, responses, google v1beta) + four
  validation-parity fake upstreams on listen(0) with canned per-wire replies.
- tests/wire-contract.test.ts: four layers — ledger self-check (every rule id
  has a live enforcement clause), A kernel exports, B bili-built surfaces,
  C plugin manifest (default + opt-in), D live proxy-mode forward of one
  client-shaped turn per protocol through the matching fake (asserts the
  forwarded tool set is exactly bili's intended surface and the fake's
  strictest validation accepts it). The anthropic lane reproduces ranxianglei#1299
  end-to-end. Supersedes tests/kernel-pin-wire-schema.test.ts and
  tests/issue1299-anthropic-top-level.test.ts (all their assertions kept).
- tests/wire-contract-golden.test.ts + tests/golden/wire-contract/*.json:
  byte-equal golden snapshots of every advertised tool schema at both layers
  (kernel exports, bili surfaces, plugin manifest default+opt-in); manifest
  version normalized to <VERSION> so release commits don't churn it.
- scripts/update-wire-contract-goldens.ts: explicit regeneration path.
- AGENTS.md §7.3: institutional rule — every upstream rejection/validation
  constraint becomes a permanent wire-contract rule inside the fixing PR;
  the ledger only grows.
@ranxianglei
ranxianglei deleted the 2026-09-25_kernel-0.0.89 branch October 15, 2026 05:32
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