Skip to content

test: session-continuity proof for the two branch scenarios (model switch = one session; fork = copied state) - #2729

Merged
ranxianglei merged 1 commit into
masterfrom
2026-10-11_session-continuity-proof
Oct 11, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-10-11_session-continuity-proof

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What

A proof-grade suite pinning the TWO-SCENARIO session-continuity contract (follow-up to the discussion in #2601 / #2676; proof-gap review m02797):

Teeth (A/B verified)

baseline A B
pre-#2719 master (4ecd82f) RED — corroborated switch mints a |sub: fork (#2601) RED — 409 (#2676)
master without #2625 (9e95c32) GREEN RED — 409 raw/ref mapping inconsistent (#2676)
this stack (pr-2625 + proof) GREEN GREEN

The two scenarios fail INDEPENDENTLY on the two baselines — the suite pins both fixes separately, not one merged behavior.

Stack

Verification

  • tests/session-continuity-proof.test.ts 3/3 green on this stack.
  • Adjacent: plugin-fork, fork-adoption, fork-adoption-plan, issue2601-model-drift-absorption, dsh-persona-continuity, dsh-persona-lineage — all green (6 suites).
  • npm run typecheck clean.

Config surface

None (test-only).

Kernel

None (host-side test only).

)

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.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Review started. Confirmed: open, non-draft, mergeable: clean against base 2026-10-10_protected-tools-snapshot (#2625 head 708217538). Diff is exactly 1 file +311/-0 (tests/session-continuity-proof.test.ts) — pure test-only, no source/config/kernel touch. Proceeding: ① direction check vs #2601/#2676, ② regression walk, ③ test-code close read, ④ teeth verification (GREEN on this stack + spot-check the RED baselines), ⑤ diff hygiene. Full structured verdict follows.

@ranxianglei
ranxianglei changed the base branch from 2026-10-10_protected-tools-snapshot to master October 11, 2026 04:36
@ranxianglei
ranxianglei merged commit 82acfc4 into master Oct 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.259-master.82acfc4 (rolling master tag).

npm install -g billion-context@0.0.259-master.82acfc4  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

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.
@ranxianglei
ranxianglei deleted the 2026-10-11_session-continuity-proof branch October 15, 2026 05:33
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