Repository navigation
test: responses-wire seam probes for reasoning prefix stability (#1650) - #1663
Merged
Merged
Conversation
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.1608-pr.1663.784f8afThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr1663.tgz
npm install -g packageInstall instructions are refreshed on each push. |
This was referenced Sep 29, 2026
antclt
pushed a commit
to antclt/billion-context
that referenced
this pull request
Oct 1, 2026
…in responses lane (ranxianglei#1638) OMP-style plugin clients append custom_message-derived developer notifications mid-history and re-send them every turn. The kernel's responsesToCore hoists system/developer content from ANY position into projection.systemParts, and prepareResponses re-injects the merged block at input[0] — so every notification append rewrote the outbound FIRST item and the upstream prefix cache missed the whole input (production sawtooth: cached pinned to the instructions-only residual, ranxianglei#1638). In plugin mode, mark the non-head system/developer items with an unknown type just for the duration of responsesToCore: they land in the projection layout as coreId-less slots and patchResponsesInput re-emits them verbatim in their original position — the position-preserved semantics the openai-chat wire already has (head-only hoist). The head run keeps the hoist (stable system prompt), so the front developer block stays byte-identical across turns. Proxy mode (native codex) keeps the hoist-and-anchor behavior (ranxianglei#1085) untouched. Transition cost: one-time cache miss per active plugin session at upgrade (front block no longer carries accumulated notification text). Tests (tests/responses-plugin-dev-position.test.ts): front block byte-stability + in-place notification re-emission + append-only bodies + no sentinel leak; fold interaction (in-place carrier counts keep the ranxianglei#1567 pins); leading additional_tools head-neutrality; proxy-mode negative pin (hoist semantics unchanged). Fills the developer-item gap neptune62 flagged in ranxianglei#1650/ranxianglei#1663.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
New file
tests/responses-seam-probes.test.ts— a Responses-wire cache-seam probe suite modeled ontests/cache-seam-probes.test.ts. Pure test addition; zero production-code changes.Why
The chat-wire seam net (
cache-seam-fuzz/-probes/-detector) pins byte-prefix stability for the OpenAI-chat shape only — zero coverage of the Responses wire'sreasoningitems (verified by grep: 0 mentions in all three files). #1638's production fingerprint (cached pinned at 39×128 tokens) points exactly at host-side churn where a large opaque block sits early in the input: on the provider side the first changed element IS the prefix-cache breakpoint. Kernel pin bumps,src/loop/adapter-responses.tsrefactors, or ingress normalize/sanitize adjustments that break Responses-wire prefix stability would currently pass the entire regression net silently.Probes
Real proxy + scripted fake Responses upstream; each turn appends omp's faithful quad: type-less user message (
normalizeResponsesMessageItemsstampstypeat ingress, #242) + reasoning item (~1KB opaqueencrypted_content, stablers_*id) + function_call + function_call_output, over 12 burst turns (no folds — those are covered byresponses-fold-cache-seam#1548 /abort-rewind-cache-seam).toolsarray deep-equal across every consecutive request pair (element-0 prefix break guard).inputcannot hide behind the element walk.rs_*reasoning item byte-identical across ALL bodies carrying it (tracked by id, since growth shifts positions) and persistent from introduction onward; every role-bearing item left typed by the ingress stamp ([Bug] Responses ACP round 2 生成 66 字符 message id,导致 Codex 后续请求持续 400 #242); final body carries ≥ TURNS distinct<acp>refs proving the untyped user prompts entered the kernel (a silently-dropped item would never get one).Fake upstream reports no usage field (estimate-grade regime, same rationale as the chat probes).
RESPONSES_SEAM_DUMP=<dir>dumps captured bodies for inspection.Pre-flight
npm run typecheck— cleannpm test— 3193 tests, 3177 pass, 0 fail, 16 skipped (env-gated e2e/registry suites)npm run build— successNo config-surface changes. No behavior changes (test-only).
Fixes #1650