Repository navigation
test: session-continuity proof for the two branch scenarios (model switch = one session; fork = copied state) - #2729
Merged
Conversation
) Scenario A pins the model-switch contract: a dsh model switch (system model line + x-bili-plugin-model header) landing in the same window as an unannounced history rewrite is ABSORBED — raw key kept, no |sub: fork, kernel machinery (compress → decompress) still works on the same session; the uncorroborated control still forks. Scenario B pins the fork contract: a fork with context COPIES the parent's state — inherited blocks (ids + summaries + originals, child decompress round-trip), seeded raw→ref map equal to the parent's, the durable-guard lane adoptable (null wire refs, BLOCKED never in byRef), parent untouched. A/B teeth: pre-#2719 master mints the fork (scenario A red); master without #2625 fails scenario B with 409 raw/ref mapping inconsistent — the #2676 silent degrade.
Owner
Author
[bot] 🏷 Review started. Confirmed: open, non-draft, |
ranxianglei
changed the base branch from
2026-10-10_protected-tools-snapshot
to
master
October 11, 2026 04:36
Contributor
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.259-master.82acfc4 # this exact build
npm install -g billion-context@master # always the newest merged build
|
This was referenced Oct 11, 2026
antclt
pushed a commit
to antclt/billion-context
that referenced
this pull request
Oct 11, 2026
…ponses wires (ranxianglei#2601/ranxianglei#2676) The ranxianglei#2729 proof pinned scenario A (model switch = one session) and scenario B (fork copies state) on the chat wire only, but the persona wiring is per-call-site in src/server/handle.ts (anthropic :811 / openai :821 / responses :843,:880) with a different system-text extractor per lane — correct-in-one-lane is not correct-in-all (ranxianglei#377). Parameterize the harness over chat/anthropic/responses: per-wire request builders (system message vs top-level system vs instructions), per-wire mock upstream responses, identical session-state assertions. google is deliberately absent (no persona call site, issue ranxianglei#2730). Teeth (A/B @ 4ecd82f pre-ranxianglei#2719): scenario A mints the |sub: fork on all three wires; scenario B 409s (ranxianglei#2676); controls still fork on all three — the persona path is engaged per wire, not vacuous.
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
A proof-grade suite pinning the TWO-SCENARIO session-continuity contract (follow-up to the discussion in #2601 / #2676; proof-gap review m02797):
{{model}}line +x-bili-plugin-modelheader) in the same window as an unannounced history rewrite (dsh local compaction — the [Bug] dsh 会话反复 model/provider 切换时主对话迁移到 |sub:<fp> persona fork,宿主盖章的 compress/decompress/acp_status 仍解析在陈旧父 id —— ref 跨空间不可解析直至熔断 #2601 residual conjunction). The lane must ABSORB the switch: raw key kept, no|sub:<fp>fork minted, and the SAME session's kernel machinery still works afterwards (compress → decompress round-trip). Control: the same system drift WITHOUT header corroboration still forks — the absorption stays a two-declaration rule.decompressreturns the parent's folded originals), the seeded raw→ref map equals the parent's exact refs, and the durable-guard lane stays adoptable when the parent history carries dsh workspace-instruction messages ([bug]dsh 在191版本上或者说之前版本,分支(带上下文窗口)以及带上下文的子智能体会一直静默没反应 #2676): null wire refs ([Bug][plugin] protectedTools 的 BLOCKED 映射导致纯文本 snapshot 返回 409 #2620 contract), the BLOCKED sentinel never entersbyRef, and the parent is untouched (copy-on-fork).Teeth (A/B verified)
|sub:fork (#2601)409 raw/ref mapping inconsistent(#2676)The two scenarios fail INDEPENDENTLY on the two baselines — the suite pins both fixes separately, not one merged behavior.
Stack
2026-10-10_protected-tools-snapshot): scenario B needs the BLOCKED-sentinel fork validation. If fix: accept the kernel BLOCKED sentinel in plugin snapshot/fork validation (#2620) #2625 merges first, retarget this PR to master (no content change needed).Verification
tests/session-continuity-proof.test.ts3/3 green on this stack.npm run typecheckclean.Config surface
None (test-only).
Kernel
None (host-side test only).