Skip to content

[PR] Plug the last gap in silent deployment of dsh native compression + session fork visibility/self-healing (#5686) | 堵住 dsh 原生压缩静默落地的最后漏窗 + 会话分叉可见化/自愈 (#5686) - #5692

Merged
ranxianglei merged 2 commits into
masterfrom
ranxianglei/2026-11-05_dsh-drift-consolidation
Nov 5, 2026

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What this PR does

Part of the #5686 consolidation for the dsh session-drift cluster (#5571 / #5608 / #5614 / #5630 / #5653 / #5656 / #5671). Four changes, all self-contained in billion-context — no dsh-side cooperation required:

P0-1 · Close the last leak window: local refusal at the single direct-send choke point (src/agent/native-intercept.ts)

Every degraded model dispatch (no live proxy at that moment, respawn exhausted, gateless host process, signed-builtin passthrough) funnels through directSendOrRefuse(). That one spot now marker-probes outgoing bodies: when a call is marker-decisive (final user message starts with COMPACTION_INSTRUCTION, judged by the existing isDshCompactionCall protocol check) it is refused LOCALLY with a protocol-shaped 422 (x-bili-gate: dsh-compaction-refused) instead of being forwarded raw upstream. Forwarding would let dsh frame the provider's reply into a checkpoint that durably shadows the session's raw history — irreversible compression-substrate loss (#1729 doctrine), after which the identity resolver deterministically forks the lane (|sub:<hash>) and DSH-side compression tools go stale. This is exactly the "silent drift" reported in the 0.1.211/0.1.212 cluster.

Semantics preserved everywhere else: directive text merely mentioned mid-conversation, google/custom wires, non-JSON bodies, and unreadable/stream bodies all keep today's fail-open direct semantics; routed /bili/... dispatches are excluded (they reach a bili instance whose server-side guards already handle the call with full session evidence). The origin test is synchronous on purpose — awaiting readiness here would hold every degraded send up to the 15 s timeout.

Refusal is deliberate, not a dead end: dsh logs step compaction failed …; continuing the turn and serves the turn uncompressed — the conversation survives, only one compaction attempt fails.

P0-2 · Overlay alarm generalizes to every profile shape (src/agent/dsh-native.ts)

detectCompactionOverlayGap() previously ran only inside the @deepseek-ai/dsh-web-app bundle branch, so every other profile form — notably desktop layouts where no @deepseek-ai/* package sits under the profile and the core ships inside the app — booted silently when the #3354 compaction-disable overlay could not latch (native auto-compaction armed, wire refusal as the only backstop). The structural gap check is cheap and side-effect-free, so it now runs for all forms and a failed latch raises the boot-time alarm regardless of bundle list. Web-profile note wording is unchanged.

P1-1 · Fork visibility: identity decisions stop vanishing (src/session-resolve.ts + src/server/handle.ts)

personaConversationOrder() threw away every outcome but the key, so production forks/migrations left no durable line — the whole drift cluster had to be reconstructed from user screenshots. The adapter now accepts an observer callback; the six production call sites in handle.ts pass one that durably logs state-changing outcomes ([session-resolve] reanchor|derived-*: <rawId> -> <key> (reason), derived lanes at warn level). Claim/continue stay silent (steady state).

P1-2 · Self-heal rung: tagChanged + shorter fragment-verified tail reanchors (src/session-resolve.ts)

New rung 5 in the tagChanged branch: an incoming shorter history whose tail aligns positionally and matches the recorded conversation's content fragments (same 8-cell sha verification as the existing tag-invariant branch) now keeps the original id instead of minting |sub:<hash>. Targeted exactly at the A∩B composite incident: checkpoint landing shortened the history while the newer dsh releases rotate the system prompt every turn — the old code failed all four existing rungs deterministically and forked, making the new persona lane start with the checkpoint sentence. Content-fragment verification bounds false reanchoring to ~random-collision probability (cross-session same-tail is bounded by sha256(tag) fp16 only); longer-incoming and mismatched-tail cases keep their existing behavior.

Tests

  • New tests/issue5686-compaction-direct-refusal.test.ts (4): decisive POST refuses locally (422 + header, zero upstream traffic); /messages shape refuses with anthropic error envelope; mention-only directive text passes through untouched; live-origin case still routes via /bili/….
  • New tests/issue5686-tagchanged-shorter-tail-reanchor.test.ts (4): main leg reanchors and keeps the raw id; guard leg (broken final fragment) still forks |sub:; symmetric tag-invariant regression; P1-1 observer captures claim + derived-persona events.
  • Extended tests/dsh-native.test.ts: degraded non-web profile now alarms too (previously silent).
  • Rewrote the one native-intercept.test.ts case ("marker hit but proxy not ready falls open to a direct send") — the fall-open behavior it asserted is precisely the bug this PR fixes; it now expects the local 422.

Results (local, node 25): tsc --noEmit clean; both new suites 8/8 green; tests/native-intercept.test.ts 78/78 green; dsh-persona-continuity + issue4778-subfork + issue3354-disable suites 23/23 green.

Known pre-existing noise (not introduced by this PR): parts of tests/dsh-native.test.ts fail on this host even without the dsh-native.ts change (verified by stashing it and re-running — same failures, first at #3354/#3662 declares lane ownership then cascading watchdog timeouts from shared-register pollution across the parallel suite). All overlay/alarm cases introduced or touched by this PR pass within those runs; CI is the arbiter.

Residuals documented in #5686 (out of scope here): Go Remote processes never install the client patch (cross-process), stream bodies remain fail-open by design, and the DSH-side refs-stale bug lives in the dsh repo's tools.

Fixes #5686 (P0-1/P0-2/P1-1/P1-2 slices). Related: #5517 #5656 #5613 #5624 #5684 #5614

…ative-compaction leak window, generalize the overlay alarm, fork visibility, tagChanged shorter-tail reanchor

P0-1 (native-intercept.ts): every degraded DIRECT send (no live proxy /
respawn exhausted / gateless host process) now marker-probes the body at
the single choke point directSendOrRefuse(); a MARKER-DECISIVE dsh
native-compaction summarize call (final user message starts with
COMPACTION_INSTRUCTION via isDshCompactionCall) is refused LOCALLY with a
protocol-shaped 422 (x-bili-gate: dsh-compaction-refused) instead of being
forwarded raw upstream where it would land a checkpoint that durably
shadows the session's raw history (#1729 doctrine, #5517/#5656 cluster).
Mention-only directive text, google/custom wires, and unreadable/stream
bodies keep today's fail-open semantics; routed /bili/ dispatches are
excluded (server guards handle them); synchronous origin test avoids
adding the 15s readiness hold to every degraded send.

P0-2 (dsh-native.ts): detectCompactionOverlayGap now runs for EVERY profile
shape, not just @deepseek-ai/dsh-web-app bundles; a failed latch boots an
alarm on any form (desktop app-in-bundle layouts used to arm silently).

P1-1 (session-resolve.ts + handle.ts): personaConversationOrder gains an
optional observer callback; the six production call sites pass a handler
that durably logs state-changing outcomes ([session-resolve]
reanchor/derived-*), silent on claim/continue — forks no longer vanish.

P1-2 (session-resolve.ts): new rung 5 in the tagChanged branch — a SHORTER
incoming that keeps the recorded conversation's fragment-verified tail
reanchors instead of forking (checkpoint landing + per-turn system-prompt
rotation no longer deterministically mints |sub:<hash> lanes).

Tests: issue5686-compaction-direct-refusal (4 cases incl. origin-alive
route regression), issue5686-tagchanged-shorter-tail-reanchor (4 cases
incl. observer capture), dsh-native P0-2 non-web alarm case; native-intercept
falls-open case rewritten to expect the local refusal.
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: ranxianglei/2026-11-05_dsh-drift-consolidation (79d0d21)

Latest build — install this exact version

npm install -g billion-context@0.0.8177-pr.5692.d777ca5

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
79d0d21 billion-context@0.0.8177-pr.5692.d777ca5 build
d6b5f06 billion-context@0.0.8173-pr.5692.411e618 build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title 堵住 dsh 原生压缩静默落地的最后漏窗 + 会话分叉可见化/自愈 (#5686) [PR] Plug the last gap in silent deployment of dsh native compression + session fork visibility/self-healing (#5686) | 堵住 dsh 原生压缩静默落地的最后漏窗 + 会话分叉可见化/自愈 (#5686) Nov 4, 2026
ranxianglei pushed a commit that referenced this pull request Nov 4, 2026
… profile shapes too (#5686 P0-2)

The latch probe now runs for every profile shape at startup, including builds whose bundle list cannot be introspected at all (bundles === undefined): pre-change those booted silently when the #3354 disable middleware could not latch, same blind-spot class as the desktop app-in-bundle shapes. Absorbs the broader P0-2 coverage from parallel PR #5692 so its unique delta no longer needs a second PR. webProfileWarned latches once per process for all shapes (host capability is stable within a process); web/non-web wording byte-identical, new third wording for the unintrospectable shape. New regression pin: unintrospectable + hook-less host emits the ARMED alarm.
@ranxianglei ranxianglei added the duplicate This issue or pull request already exists label Nov 4, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

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

Duplicate of #5691 — opened 42 minutes later against the same base (c9ba485) with the identical four-part scope of #5686. Head-to-head comparison:

CI: #5691's full matrix (ubuntu/windows × node 22/24 × shards) is green; this PR's test lanes were skipped, so it has no full-suite verdict yet.

Recommendation: keep #5691, close this one. Closing is owner-only — no further work planned on this branch.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷
(ai: vllm-qwen/qwen3.8-27b)

结论:可合(待全量 test-matrix 转绿)。 独立审完四个修复的代码路径 + 测试 + CI,无阻断性缺陷。按 §7.4 此 PR 触碰 wire(native-intercept)+ 身份/会话绑定(session-resolve),必须人工合并、不可自动合。

查重: 不重复。本 PR 是 #5686 的实现,而 #5686 本身就是 #5517/#5656 报告簇(checkpoint 落地后身份分叉)的归并项;与在途其它 PR 无重叠改动面。

结构化八问:

  1. 是什么问题:dsh 原生压缩在两种时序下会让一个活会话「静默漂移成新会话」——用户看到会话标题变成一句 checkpoint、压缩状态全丢。不是崩溃,是连续性被悄悄破坏,且原来完全无日志可查。

  2. 什么原因导致(两条独立机制叠加):

  3. 影响范围与严重程度:p1(会话连续性 / 数据丢失类)。触发面 = dsh 宿主(原生压缩 + 逐轮重盖系统提示词),高发于降级/无代理窗口 + overflow 强压重试。后果 = 长会话的折叠状态被孤立、压缩底座丢失、用户感知为「会话漂了、新会话标题是一句 checkpoint」。非整体不可用,但静默到无法自查(原无任何日志)。

  4. 怎么修的(四处协同,均 bili 侧、不动 dsh):

    • P1-2:tagChanged 分支加第 5 个 rung,精确镜像既有「无 tag 更短尾对齐」分支(同一套 tailAligns + fragTailEquals 逐字节校验、同 TAIL_WINDOW),命中即 re-anchor 而非 fork。
    • P1-1:给 personaConversationOrder 加可选 observer 缝,服务端 fork/reanchor 从此留持久日志行(原先完全静默)。
    • P0-1:无代理直发路径上,对「marker-决定性」压缩调用本地返回协议形 422(compress-or-refuse Model request is connecting directly (uncompressed) | 模型请求正在直连(不压缩) #3651);其余一律维持 fail-open 原语义。
    • P0-2:把「overlay 未 latch」告警从仅 web-profile 泛化到所有 profile 形状,非 web / 桌面内嵌宿主不再静默 armed。
  5. 是否有回归问题(逐项核过的既有行为):

  6. 是否破坏缓存:不破坏,反而净正向——阻止 checkpoint 遮蔽历史导致的底座/前缀缓存丢失。未引入任何新的缓存失效策略。

  7. 是否改了设计方向:无转向。严格落在既有教义内(nudge 死锁无检测:同一 session 交替收到两种结构互斥的请求流(巨型单消息 ↔ 多轮)时不告警 #1729 compress-or-refuse、MESSAGE-IDENTITY 顺序中心 reconcile、Model request is connecting directly (uncompressed) | 模型请求正在直连(不压缩) #3651)。纯增量:一个 rung + 一个 observer 缝 + 一处本地拒绝 + 一处告警泛化,全部局部化。

  8. 是否引入新配置:无。没有新 env / config / 默认值(config-surface-guard 绿佐证)。

行为变更披露(Deliverables #4,旧→新 + 原因):

  • P0-1 降级直发语义:旧 = marker-决定性压缩调用在无活代理时原样透传给模型端点(fail-open);新 = 本地 422 拒绝(+x-bili-gate 头 + 协议形错误体)。原因:那条透传正是让 checkpoint 落到 bili 脚下、毁掉压缩底座的漏窗,旧行为就是 bug 本体。非决定性请求完全不变。
  • P0-2 告警可见性:旧 = 非 web/桌面 profile 的 compaction-disable overlay 若未 latch,启动时静默(仅 info trace);新 = 与 web profile 一样弹 ARMED 告警。原因:一个关不掉原生自动压缩的 profile 静默 armed = 双重压缩风险对用户不可见。web profile 文案不变。
    两处均为有意修复,PR 正文已写明,无语义漂移。

测试有效性(④,都看了断言有没有牙):两个新套件都成立。

  • tests/issue5686-compaction-direct-refusal.test.ts(4 例):决定性 POST 断言 422 + 头 + calls.length===0(上游零请求);/messages 协议壳;mid-body 提及不误伤(负向);活代理仍 route /bili/([Bug] #2436 的宿主本地压缩检测只接在 OpenAI 车道,Anthropic 车道缺失——未宣告宿主压缩后 nudge 广播的 compress ref 永久不可解析 #2592 回归)。hermetic、确定性、无端口假设。
  • tests/issue5686-tagchanged-shorter-tail-reanchor.test.ts(4 例):钉住 A∩B 复合形状 re-anchor;关键负向——尾末格改一字仍 fork(证明 fragTailEquals 逐字节门有效,守住「永不模糊相似」);无 tag 对称回归;observer 端到端捕获 claim + derived。
  • 既有测试处置正确:tests/native-intercept.test.ts 里原本编码旧 bug 期望(200 + 上游 fetch)的用例被改写为新语义(422 + sink=[])并注明前后差异;tests/dsh-native.test.ts 补非 web 降级 profile 现弹 ARMED 告警(断言具体文案 + 恰好一行去重)。

CI(镜像缓存 @ head d6b5f06):0 failed / 0 pending;常驻门全绿(gate×6、config-surface-guard、lane-guard、docs-sync、lock-sync、test-import-graph、mysql-contract)。重型 test matrix + real-client e2e 车道在本快照显示 skipped(path/env 门控)——合并前请确认它们在下次完整 dispatch 转绿。作者自述有与本次无关的 pre-existing dsh-native 噪音(host 上不改也红,以 CI 为准),留意该车道别变新红。

收工判定:可合。 代码正确、对称、fail-open 与 wire 保真完整、测试有牙、行为变更已披露。唯一前置:等全量 test-matrix 转绿(当前无红无 pending)。此 PR 属人工合并域(wire + 身份/会话绑定),不走自动合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷
标签:bug dsh scope/wiring p1(保留 pr)—— dsh 车道原生压缩的会话身份分叉/落地漏窗缺陷,主改动面在请求管道与宿主接线(native-intercept / handle / dsh-native),p1 因属会话连续性丢失类。

@ranxianglei ranxianglei added bug Something isn't working dsh p1 scope/wiring labels Nov 4, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

🔶 需要决策
(ai: vllm-qwen/qwen3.8-27b)
查重: 无既有 issue/PR 对应此红——该失败是本 PR 自身的红 CI,本车道禁止另立案,直接在本线程处理。

一句话:本 PR 唯一的红(unused-exports 门禁)已修好并本地验证通过,但 PR 的 head 分支在上游被删除、PR head 冻结在 refs/pull/5692/head(d6b5f06),修复无法推进进 PR——需要你决定如何重新指向。

我做了什么:

  1. 查证红因:门禁报告恰好一项——INTERNAL_ONLY src/session-resolve.ts: SessionResolveObserver(本 PR 新增的类型别名只在自身文件内被引用,按门禁定义应为模块私有)。已核实 master 上不存在该符号 → 红由本 PR 自身引入,不是继承自 master(失败 job:run 41890643884)。
  2. 修复:去掉该类型别名的前导 export(保留声明,改模块私有)。纯类型层改动、零运行时影响;已确认没有任何其他文件引用这个类型名(各 import 方用的是 personaConversationOrder / SessionOrderResolution 等其他导出)。
  3. 本地验证:node scripts/check-unused-exports.mjs 重跑 → ✓ clean(8 条 waived 不变)。提交 610f6f80f。
  4. 推送受阻:按名 fetch 分支 2026-11-05_dsh-drift-consolidation 时 origin 返回 "couldn't find remote ref"——该分支在开 PR 后已被删除,PR head 冻结在 d6b5f06。我把修复提交推回 origin 的同名分支(分支现已存在,tip = 原 diff + 这一行修复),但 GitHub 不会把已脱钩的 PR 重新挂回重建的分支(本仓 reference/git-pr.md 有同样的实测记录),观察数分钟 PR head sha 无变化。unused-exports 仍会对冻结的旧 head 跑,红不会自行消掉。

选项:

默认(不决策时):我不再动这个 PR(本车道禁止关闭/替代他人 PR);修复提交留在同名分支 610f6f80f 待 A 或 C。needs-decision 标签已打。

七问(覆盖本次 run 全部动作):

  1. 是什么问题:本 PR 唯一红项是 unused-exports 门禁——PR 导出的一个类型别名只在自己文件里用,门禁要求私有化。
  2. 什么原因导致的:写可见性接缝时给 SessionResolveObserver 加了 export,而它唯一使用处(personaConversationOrder 的可选回调参数)就在同文件 → 判为 INTERNAL_ONLY。
  3. 影响范围与严重程度:仅 CI 门禁层面,零运行时影响(类型别名编译期擦除);后果是 PR 过不了系统点名的 blocker、无法合并。
  4. 怎么修复的:去掉前导 export(声明保留),本地门禁重跑通过;提交 610f6f80f 已推到 origin 同名分支。
  5. 是否有回归问题:无——纯关键字移除,运行时行为/wire/缓存/阈值/时序零变化;逐一确认没有 import 方依赖该导出。
  6. 是否破坏缓存:不涉及(未触碰任何运行时路径)。
  7. 是否改了设计方向/引入新配置:均未。

ranxianglei pushed a commit that referenced this pull request Nov 4, 2026
…h entry when no live proxy (#5686 P0-1)

The #1884 byte-untouched opt-in short-circuits before the origin machinery,
so the per-caller noLiveProxy flag was never judged there: a marker-decisive
compaction call on a signed gateway with a dead proxy still landed upstream
and durably shadowed the raw history. Mechanism B of #5686 enumerates this
entry among the six directSendOrRefuse sites; parallel PR #5692 covered it
via its internal origin test. Absorb that delta here (regression pin added;
negative control verified).
@ranxianglei

Copy link
Copy Markdown
Owner Author

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

审核结论(无法以作者身份提交正式 review 事件,以此评论为审查交付):REQUEST_CHANGES —— 本 PR 与在途的 #5691 重复(同一 issue #5686、同一 base、四部分范围相同),建议 owner 保留 #5691、关闭本 PR。 本 PR 唯一的独有内容(签名透传入口的覆盖)已移植进 #5691(commit 3109980,带回归钉),关闭不丢任何东西。以下审核为独立重做:两 PR 全量 diff 逐段对读 + master/pr 分支源码核对,未沿用线程里已有的查重结论。

逐项对比(机制级):

回归审查(既有行为清点):PR 正文披露的四处行为变更(死代理决定性压缩直发→本地 422;非 web/不可内省形状静默启动→启动期 ARMED 告警;fork/reanchor 零日志→warn/info 行;tagChanged 短逐字尾确定性 |sub: 分叉→raw id reanchor)逐一与代码核对属实,web 形状告警文案字节不变,非决定性/不可读/stream body 保持 fail-open 原语义(有测试钉住)。未发现披露之外的语义漂移。两种压缩模式都过了一遍:P1-2 在共享 resolver 上(两模式共用),P0-1/P0-2 仅插件车道客户端侧。

测试有效性:断言有牙——零上游 fetch 断言、尾部变异仍分叉的护栏用例、对称性回归、live-origin 路由钉;native-intercept.test.ts 被改写的那个用例原先钉的就是 bug 行为(fall-open 直发),替换正确。

CI:镜像缓存显示本 PR unused-exports 车道红——自伤:INTERNAL_ONLY src/session-resolve.ts: SessionResolveObserver(导出的类型无人引用)。已顺手修:commit 79d0d21 去掉 export,门禁本地验证转绿。 其余 test 车道在缓存快照中多为 skipped(本 PR 无论如何没有全量绿判);#5691 矩阵在最后一次缓存刷新时仍在跑。

八问:

  1. 是什么问题:同一个 dsh Long-Session Drift Comprehensive Remediation: Sealing the Last Leak Window for Native Compression Local Deployment + | dsh 长会话漂移综合治理:堵死原生压缩本地落地的最后漏窗 + 会话身份分叉可见化与自愈 #5686 四部分修复被两个并行 PR 实现,本 PR 需相对 [PR] fix: dsh long-session drift comprehensive remediation (#5686) #5691 裁决去留。
  2. 什么原因导致:同一事故簇(dsh session automatically drifted to a new session. This is an automatically generated checkpoint condensing … | dsh会话自动漂移到 新会话 This is an automatically generated checkpoint condensing … #5517/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)被两条分析线并行推进,约 40 分钟内收敛到相同范围。
  3. 影响范围与严重程度:关闭本 PR 对用户零影响(它未发布任何东西);若它与 [PR] fix: dsh long-session drift comprehensive remediation (#5686) #5691 并存合入,P1-1 的每调用一条 warn、P1-2 的宽门、无 bili_final 的拒绝信封会以 p2 级缺陷叠加在这个 p1 修复之上。
  4. 怎么修复的:本 PR 无需修——保留先到的 [PR] fix: dsh long-session drift comprehensive remediation (#5686) #5691,关闭本 PR;本 PR 唯一独有 delta(签名透传入口覆盖)移植进 [PR] fix: dsh long-session drift comprehensive remediation (#5686) #5691(commit 3109980 + 回归钉)。
  5. 是否有回归问题:审过的既有行为见上「回归审查」;本 PR 自身除披露变更外无意外漂移,三个质量 delta(spam/宽门/信封)是不合入它的理由而非它的回归。
  6. 是否破坏缓存:不涉及缓存/重试/游标/去重键机制;P1-2 改变的是某一类此前必分叉形状的 key 选择(保留基底的有意修复)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新配置:不涉及。

已顺手修:本 PR 的 unused-exports 红门(SessionResolveObserver 导出)+ commit 79d0d21;独有 P0-1 delta 吸收进 #5691 + commit 3109980(该线程已留言)。

判定:REQUEST_CHANGES —— 被 #5691 取代且独有内容已全部保全于 #5691,建议 owner 关闭本 PR(agent 不执行关闭)。此分支不再计划进一步工作。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Review 完成:GitHub #5692 已发审核结论 = REQUEST_CHANGES —— 独立逐行对比确认被 #5691 取代(同一 issue、同一 base、四部分范围相同;按先来后到建议 owner 保留 #5691、关闭 #5692)。对上面查重声明的一处更正:#5692 并非没有任何独有内容——它覆盖了签名内置透传入口(master src/agent/native-intercept.ts:1565,#1884 opt-in),该入口在 origin 解析前短路,#5691 的调用方标志方案到不了(issue 机制 B 明确列了这六个入口);已把该 delta 移植进 #5691 = commit 3109980(条件标志 + 回归钉,负向控制验证过),关闭 #5692 不丢任何东西。已顺手修:本 PR 的 unused-exports 红门(SessionResolveObserver 导出无人引用)+ commit 79d0d21(门禁本地验证转绿)。完整八问结论见 GitHub #5692 审核评论;#5691 线程已留移植说明。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)
CI 车道收尾报告(本车道不再动此 PR):

状态核对:

  • unused-exports 已转绿:镜像缓存显示 head 79d0d2181 上 unused-exports: completed/success,静态门禁全线 success(kernel-guard / test-import-graph / pi-subagents-guard / config-surface-guard / lane-guard / lifecycle-ledger-guard / docs-coverage / version-guard / docs-sync);test 矩阵车道在缓存快照中仍为 skipped(与你审核注记一致——本 PR 无论如何没有全量绿判)。
  • 前一轮混乱的根因(我的失误):本 PR 的真实分支名是 ranxianglei/2026-11-05_dsh-drift-consolidation(分支名本身带 owner 前缀),我把 API 的 head 字段误读成了不带前缀的分支名,于是把同样的修复推成了一个新建的不带前缀分支(610f6f80f)——GitHub 不会把 PR 挂到它上面,所以当时 head 纹丝不动。你随后把 79d0d2181 推到正确命名的分支,PR head 随即自动前进、门禁重跑转绿。
  • 清理已完成:我删掉了自己建的那个多余的不带前缀分支(push origin --delete 2026-11-05_dsh-drift-consolidation),origin 分支集合恢复到我推送之前的样子;正确命名的 PR head 分支未触碰。两份重复修复(我 610f6f80f / 你 79d0d2181)效果相同(都是去掉同一行的前导 export),进 PR head 的是你的;我那份随分支删除不再可达,sha 留档于本线程记录。

八问(本车道最终报告):

  1. 是什么问题:本 PR 唯一红项是 unused-exports 门禁——导出的类型别名只在自己文件内被引用,门禁要求私有化。
  2. 什么原因导致的:SessionResolveObserver 声明时带了 export,唯一使用处(同文件内 personaConversationOrder 的可选回调参数)不构成外部引用 → 判为 INTERNAL_ONLY。
  3. 影响范围与严重程度:仅 CI 门禁层面,零运行时影响(类型别名编译期擦除);现已清除,不再是合并 blocker。
  4. 怎么修复的:去掉前导 export(声明保留);两处重复提交同效,PR head 采用 79d0d2181,本地与 CI 双重验证通过。
  5. 是否有回归问题:无——纯类型层关键字移除,运行时行为/wire/缓存/阈值/时序零变化。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新配置:不涉及。

结论:CI 侧无遗留可修项。按审核判定(被 #5691 取代、独有 delta 已由 3109980 保全),关闭本 PR 是你的专属操作(agent 不执行关闭);needs-decision 标签保留至关闭时随线程归档。本车道收工。

@ranxianglei
ranxianglei merged commit 47df07f into master Nov 5, 2026
90 checks passed
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.1031-master.47df07f (rolling master tag).

npm install -g billion-context@0.0.1031-master.47df07f  # 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dsh duplicate This issue or pull request already exists needs-decision p1 scope/wiring

Projects

None yet

1 participant