Skip to content

[PR] test(ci): converge master red — realign five dsh pins to the #5656 single-shot sidecar residual (#4599) - #5718

Merged
ranxianglei merged 1 commit into
masterfrom
ci-fixes
Nov 5, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
ci-fixes

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What this converges

master has been red since 01fcc5d68 ("generic dsh single-shot sidecar gate", #5656/#5584, merged via #5687 at 2026-11-05 01:18Z). Every PR head inherits the same broken pins (reported independently by the #5700 / #5703 / #5708 lanes and bisected twice — this lane's and the #5703 lane's — landing on the same first-bad commit). This PR lands the convergence on ci-fixes per the CI coordination policy (#4599).

Root cause

isDshSingleShotSidecar() (src/server/side-request.ts) diverts any dsh-lane request with tools absent + non-empty system carrier + exactly one content-bearing non-system message onto the #388 verbatim passthrough side lane (kernel no-touch): no ref assignment, no stats.requests count, no pf-seq scan/stamp, no effective-config guard stamp. For a tool-less MAIN turn 1 this is a residual documented in the commit's own comment ("turn 2+ replays history and rejoins the full pipeline") — but five pre-existing regression pins were written assuming turn 1 rides the full pipeline, so they went born-red at merge:

pin symptom
tests/issue2419-dsh-skill-catalog.test.ts catalog BLOCKED-ref assertion false (zero refs assigned on turn 1)
tests/issue2446-dsh-mcp-catalog.test.ts same
tests/issue2447-dsh-workspace-instructions.test.ts same
tests/issue2481-dsh-runtime-context.test.ts same
tests/issue2817-crosswire-persona-fold.test.ts stats.requests 9 vs actual 8 (turn 1 uncounted)
tests/issue5403-watermark-fastpath.test.ts rb[0] null instead of 2 (turn 0 unstamped)

Why it went unprobed: ci.yml dropped master from push triggers (owner decision 2026-11-01), so there was no full-matrix master probe after Nov 1; #5687 itself merged with 5 red test shards.

Fix (test-only, no product change)

Codify the documented residual in the pins themselves:

  • four guard-stamp subtests → two turns; the BLOCKED ref is witnessed on the first FULL-PIPELINE turn (turn 2). No fold can happen before turn 2 (nothing compressible, no action surface on a tool-less turn), so protection against every possible fold is unchanged;
  • issue2817: assertions shifted −1 (8/11/12/13); persona-fold teeth intact (the fork still shows as a missing increment);
  • issue5403 A/B golden: rb[0] asserted null — the gate ignores the rollout env, so turn 0 rides the side lane in BOTH phases; byte equality at i=0 holds because both phases forward verbatim. Stamps resume at turn 1; residency band unchanged (verified locally).

Behavior-change disclosure

No runtime behavior changes. Test-contract changes only:

  • stats.requests for a dsh session whose turn 1 is tool-less single-shot counts from turn 2 (was: included turn 1) — this IS the shipped behavior; the pin now matches it;
  • guard-stamp pins witness protection at turn 2 instead of turn 1;
  • fastpath A/B pin expects no stamp on turn 0.

Why not the alternatives

Verification

  • A/B: repro files green at c9ba485 (last green), red at 0aace2f before this PR, green after (local, deterministic, 4–15s each — not flakes);
  • adjacent suites green: side-lane-invariants (15), issue5656-single-shot-sidecar (5), dsh-persona-fingerprint (11);
  • typecheck clean; diff = 6 test files only (no src/, kernel/, config, version).

Coordination: #4599 (CI control center). Decision item B (predicate narrowing) tracked there.

…ual (#4599)

01fcc5d (#5656/#5584, merged via #5687) diverts tool-less dsh single-shot
requests onto the verbatim side lane (kernel no-touch); the residual for main
turn 1 is documented in the commit's own comment. Five pre-existing pins
assumed turn 1 rides the full pipeline and went born-red at merge (master red
since; every PR head inherits it).

Test-only realignment codifying the documented behavior:
- issue2419/2446/2447/2481 guard-stamp subtests: two turns; the BLOCKED ref
  is witnessed on the first FULL-PIPELINE turn (turn 2). No fold can happen
  before turn 2 (nothing compressible, no action surface), so protection
  against every possible fold is unchanged.
- issue2817: stats.requests off by one (turn 1 uncounted); the persona-fold
  teeth are intact, assertions shifted -1.
- issue5403 A/B golden: turn 0 rides the side lane in BOTH phases (the gate
  ignores the rollout env), so rb[0] is unstamped by design; stamps resume at
  turn 1. Byte equality holds at i=0 (both phases forward verbatim).

No src/, kernel/, config, or version changes. Locally green: all six files +
side-lane-invariants + issue5656-single-shot-sidecar + dsh-persona-fingerprint.
@ranxianglei ranxianglei changed the title test(ci): converge master red — realign five dsh pins to the #5656 single-shot sidecar residual (#4599) [PR] test(ci): converge master red — realign five dsh pins to the #5656 single-shot sidecar residual (#4599) Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: ci-fixes (0470bec)

Latest build — install this exact version

npm install -g billion-context@0.0.8212-pr.5718.02d18b3

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
0470bec billion-context@0.0.8212-pr.5718.02d18b3 build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: vllm-qwen/qwen3.8-27b)

结论:可合(APPROVE) — test-only CI 收敛,机制经独立核验成立,teeth 保留,CI 全绿。

八问

  1. 是什么问题:master 自 DSH: If the first request of a session originates from a bypass call, compression for the entire session is permanently | DSH: If the first request of a session originates from a bypass call, compress for the entire session is permanently inv | DSH:会话首个… #5656(commit 01fcc5d68,经 [PR] fix: unknown dsh one-shot sidecars steal the raw-key anchor and kill compression (context-explosion root cause) #5687 于 2026-11-05 合入)起全线红。DSH: If the first request of a session originates from a bypass call, compression for the entire session is permanently | DSH: If the first request of a session originates from a bypass call, compress for the entire session is permanently inv | DSH:会话首个… #5656 放宽 dsh 单发 sidecar 门槛后,无工具的 dsh 主会话 turn 1 被改走 verbatim side 车道(不分配 ref、不计 stats.requests、不打 pf-seq/guard 戳);六个既有回归钉当初按「turn 1 走全管道」写,合入即 born-red。本 PR 把这六个钉对齐到已发布行为以收敛 master。

  2. 什么原因导致:根因是行为变更与测试契约不同步,非新 bug。DSH: If the first request of a session originates from a bypass call, compression for the entire session is permanently | DSH: If the first request of a session originates from a bypass call, compress for the entire session is permanently inv | DSH:会话首个… #5656 为堵「未知 sidecar 抢 raw-key 锚点 → 压缩永久死亡 + 上下文无界增长」(p1 级)的洞,把 isDshSingleShotSidecar()(src/server/side-request.ts:203)判定放宽到「无 tools + 非空 system + 恰好一条带内容的非系统消息」。副作用是合法的无工具主 turn 1 也命中——该 commit 注释里写明接受的 residual(src/server/side-request.ts:199-201)。钉没跟上 → 红。

  3. 影响范围与严重程度:仅测试面,零运行时变化(diff = 6 个 tests/ 文件,无 src/kernel/config/version)。真实用户侧:无工具 dsh 主 turn 1 走 side 车道是 DSH: If the first request of a session originates from a bypass call, compression for the entire session is permanently | DSH: If the first request of a session originates from a bypass call, compress for the entire session is permanently inv | DSH:会话首个… #5656 已发布的既定行为,本 PR 不改它。严重度 = 纯 CI 收敛,无外部影响。产品级取舍(收窄 predicate 让合法主 turn 1 不命中)属 §7.4 人工门禁项,已作为决策项 B 挂 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599,不在本 PR。

  4. 怎么修:把 residual 写进钉本身。四个 guard-stamp 子测试改两轮——BLOCKED ref 在首个全管道轮(turn 2)见证;turn 2 前无可折叠物、无动作面,防折叠保护不变。issue2817 的 stats 断言整体 −1(turn 1 未计数)。issue5403 A/B golden 的 rb[0] 改 null(side 车道两相都不打戳;i=0 字节相等因两相都逐字转发)。

  5. 是否有回归:未照抄 issue,独立核机制——读 isDshSingleShotSidecar(src/server/side-request.ts:203-232)确认判定形状;读两个调用点(src/server/handle.ts:1074 / :2210)确认门槛是 sideAgent/requestAgent !== "main";读 pluginRequestAgentHeader(src/plugin.ts:262)确认这些测试只设 x-bili-plugin: dsh、不设 request-agent header → 取值为 undefined ≠ "main" → 两门槛都过 → turn 1 确实改道。逐文件核对 turn 1/turn 0 消息形状(issue5403 scriptTurns t=0=[system,user];issue2817 renderOpenai t=1=[system,user])命中单发形状;turn 2+ 含 assistant → role!=="user" 提前 return false → 回全管道。既有行为清点(防折叠 BLOCKED / stats 计数 / pf-seq 戳 / A/B 字节相等)均保持或按已披露方式调整,无意回归。teeth 保留:保护/计数/打戳任一回归时,改后断言仍会失败(BLOCKED 缺失、stats 差一、rb[0] 变非 null)。

  6. 是否破坏缓存:不涉及——纯断言调整,不触碰任何缓存/重试/游标/去重键失效策略。

  7. 是否改设计方向:没有。DSH: If the first request of a session originates from a bypass call, compression for the entire session is permanently | DSH: If the first request of a session originates from a bypass call, compress for the entire session is permanently inv | DSH:会话首个… #5656 的产品方向(放宽门槛堵 p1 洞)不动;predicate 收窄单独挂 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 决策项 B,不捆绑。

  8. 是否引入新配置:没有。无新 env/config/默认值。

核验:head 0470bec62 CI 30 checks failed=0 pending=0(test shards × ubuntu/windows × node22/24 全 success,static-gates/kernel-guard/plan/docs-sync success);作者已做本地 A/B(red@base → green@head)。无 kernel-change 声明,kernel-guard 通过。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 已完成对 PR #5718 的端到端审核 —— 可合(APPROVE)。

diff 干净,无小修。等你合并。

zhou1736948757-cpu added a commit to zhou1736948757-cpu/billion-context that referenced this pull request Nov 5, 2026
This reverts commit bb373ae.

Address PR ranxianglei#1790 review 5782867946: remove the branch-specific main-header fixture repair before integrating the canonical ci-fixes change from ranxianglei#5718. Preserve the complete Recall contribution and existing commit history.
zhou1736948757-cpu added a commit to zhou1736948757-cpu/billion-context that referenced this pull request Nov 5, 2026
Merge the canonical 0470bec fix after reverting the duplicate main-header repair, addressing PR ranxianglei#1790 review 5782867946. Keep the Recall subtree byte-identical (8702851), preserve all contribution history, and leave upstream PR merging to maintainers.

Validated the integrated tree: 49 targeted DSH regression tests; 162 Recall tests; 7 OpenCode adapter, 12 guard, 5 native-test-plugin, and 10 structured-checker checks; repository typecheck and build. Full repository verdict remains the remote CI on this new head.
@ranxianglei
ranxianglei merged commit b20b46a into master Nov 5, 2026
49 checks passed
Louie0806 added a commit to Louie0806/billion-context that referenced this pull request Nov 5, 2026
…ual realignment, ranxianglei#5688 output_config dedupe, ranxianglei#5637 acp_delegate stand-down

master advanced 6ddade1 -> 9a2d51d with 14 commits. The one that matters
for this lane is 0470bec (ranxianglei#5718), which realigns five dsh regression pins to
the ranxianglei#5657/ranxianglei#5656 single-shot-sidecar residual: the four durable-carrier suites
now take a second turn and assert on "the first full-pipeline turn", and
issue2817 re-bases stats.requests from 9 to 8.

That is the opposing route to ranxianglei#5709 (which vetoes the misfire in source
instead), but the two do not collide textually: ranxianglei#5718 touches only test files
this lane does not carry, so the merge is clean. Verified on the merged tree
that both routes' assertions now hold simultaneously.
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