Repository navigation
[PR] feat(dsh): source-kind attestation channel — hosts declare message types instead of copied text markers (#7085) - #7104
ranxianglei wants to merge 6 commits into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10759-pr.7104.d167fcbThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7104.tgz
npm install -g packageInstall instructions are refreshed on each push. |
… raw-pair cap, docs dedup, test lockstep (#7104) - tool-jobs now form-filtered to 'notice': dsh stamps only that form today (single emission site, packages/jobs/tool-jobs/src/index.ts:391) but its source type is ContextFormed — a future form would have no text-marker twin, violating the kind/markers family agreement invariant. - msgTextUnitsOf: bare string ARRAY PARTS now attest (kernel/src/wire/openai.ts turns them into their own text cores). - collector skips role:'assistant' defensively (server role gate unchanged). - incomingMsgKindsHeader caps RAW pair count (duplicates included), matching the documented '≤512 pairs' — previously only the deduped index was capped. - docs/plugin-protocol.md: drop the duplicated x-bili-msg-kinds bullet. - stale comments: ~13KiB→~30KiB worst case; durable-message-guards.ts file header no longer claims source.kind never reaches the wire for the dsh lane. - tests 23→28: factory registry keys === [dsh] (non-dsh lanes can never obtain the dsh factory), host attestable kind set ↔ server permitlist lockstep, interior-comma tolerance + space-voids-whole-header, raw-pair 513-cap with duplicate pairs, bare-string-part attestation, assistant skip.
ranxianglei
left a comment
There was a problem hiding this comment.
评审模型自声明:本评审由 AI agent 独立完成,模型 qwen3.8-27b(provider sglang-gpu0,本地 sglang 推理)。人工合并前请过目。
结论:无 blocker,可合并(合并留给人)。 独立干净上下文评审跑完:1 major + 5 minor + 2 nit,全部已在分支上就地修掉(fix commit c1818a9c)并回归验证。
Major(已修)
tool-jobs原未加 form 过滤:文案孪生dshToolJobNoticePath只匹配 notice 形态,若 dsh 未来发其他 form 会违反「kind 路径与 marker 家族必须一致」的不变量。已对 dsh 源码核实(packages/jobs/tool-jobs/src/index.ts:391是唯一发射点,今天只发 notice;类型是 ContextFormed 可扩展)——补了ATTESTABLE_KIND_FORMS["tool-jobs"]="notice",与 agent-instructions/agent-message 的过滤同纪律。
Minor/Nit(已修)
- docs/plugin-protocol.md 重复条目:feat 与 docs 两笔提交各写了一条 x-bili-msg-kinds bullet,删重复、保留更完整一条(补上 bare-string-array-part 说明)。
- 采集器漏采裸字符串数组项:
kernel/src/wire/openai.ts会把数组里的裸字符串拆成独立 text core,msgTextUnitsOf现在同样采集——否则这种消息静默降级回文案匹配。 - 解码上限语义:
incomingMsgKindsHeader原先只限制去重后 index.size,文档却写「≤512 pairs」;改为按原始对数计数(513 对即 void),与文档一致。 - 采集器防御性跳过 role:assistant(服务端角色门保持不变,双层)。
- 测试 23→28:工厂 registry 恰为
["dsh"](非 dsh lane 拿不到 dsh 工厂)、host 可声明 kind 集 ↔ server 许可表 keys lockstep(单边加 kind 会挂 CI)、内逗号容忍、对间空格/前导空格整头作废、重复对计入 512 上限、裸字符串数组项、assistant 跳过。 - 过期注释:~13KiB → ~30KiB worst case;durable-message-guards.ts 文件头「source.kind 永远到不了 wire」改为注明 dsh 车道已过时、文案标记降为 fallback。
验证:typecheck 干净;tests/msgkind-channel.test.ts 28/28;msgid 家族(msgid-pin / msgid-rule-parity / msgid-header-channel / egress-header-isolation)+ durable 家族(issue2481 / issue5142 / issue2447 / durable-tool-identity)回归全绿;tools/check-architecture-docs.mjs 全绿。
设计确认项(评审逐条核过,无问题):
- 字节相等链:kernel 两个 wire codec 对用户文本逐字解码(无 trim/surrogate 处理/图片规范化),dsh 侧任何变换只会让指纹 miss 降级回 marker,不可能错映射。
- ALS 作用域:llm/stream 全部 dispatch 走 runLlmDispatch,作用域外请求(capability probe、plugin/tool)不盖章 → 与通道前逐字节一致。
- 信任边界:伪造头最多只能给自己的请求消息贴标(指纹要求知道确切文本;x-bili-plugin 冒充本就是既有行为);egress 剥离保证上游永不可见。
- KDD 纪律:非 identity 载体(永不作 attribution rung、永不 pin);host bundle 镜像常量不 import server 模块,lockstep 由测试钉死。
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 open PR 中只有本 PR 一个命中 source-kind / attestation / #7085 主题;止血 PR #7087(抄新文案)已 closed,与本 PR 是「下一版 vs 根因」的关系,不是并行修复。无重复调度风险。 标签: enhancement, p1, dsh, scope/wiring —— 本 PR 是新增协议信道(feat,非 bug 修复);根因是 #7085 的整类消息静默丢保护(数据完整性类,与 #7085 的 p1 同级);宿主车道 dsh;领域取 scope/wiring(新请求头信道 + 请求管道消费缝,分类器工厂只是消费端)。 当前状态(实时核对):head 我将按 PR 审核规范做完整审核:① 原 issue 方向关 → ② 回归审查(既有行为清点) → ③ 代码审查 → ④ 测试有效性 → ⑤ diff 整洁度/代码整洁硬标准,结论用结构化八问回复。审核中。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) PR #7104 审核结论审核范围: 完整 diff(9 文件)通读 + 回归审查 + 定向测试 + 代码整洁度。 核心发现(已当场修复): PR 把保护分类器(durable message path)做成了 kind-aware,但fold-drift 记账分类器( 修复(commit v1 未覆盖面(已立项跟踪 #7120): kind 通道未覆盖以下 marker 分类面(下次宿主改文案会静默失明,但触发面窄/严重度低/需不同机制,v1 有意延后):① Channel 2 stored-row 回填(需持久化 kind,存储 schema 变更);② side-request 降级(窄触发);③ 标题派生(最低严重度)。详见 #7120 清单。 PR 正文勘误: 「23 用例」已过时——PR head 实际 28 用例(reviewer-findings commit 加了 5 个),加 channel-1 修复后 34 个。建议更新 v1 边界节,把 #7120 的 3 个未覆盖面列进去(当前只列了增量 lane/未映射 kind/form 过滤)。 CI: 新 head 八问
合并判定: 可合并(CI 绿后)。channel-1 残留已当场修复,v1 未覆盖面已立项跟踪(#7120,不阻塞)。合并权在 owner。 |
|
CI 红项归因(补充评审):模型 当前 CI 唯一红项
本 PR 相关车道全部绿:12/13 workflow success(含全部 e2e 真二进制车道、gate 静态检查),主 CI 其余 11/12 分片 success。master 侧修复后本 PR rebase 即可全绿(PR 当前 BEHIND master,rebase 是合并前的既定动作,base 差异只涉及 #7101 的 google/tunnel/ca/进程 handler 文件,与本 PR 零重叠)。 |
acee2d3 to
02344b6
Compare
… raw-pair cap, docs dedup, test lockstep (#7104) - tool-jobs now form-filtered to 'notice': dsh stamps only that form today (single emission site, packages/jobs/tool-jobs/src/index.ts:391) but its source type is ContextFormed — a future form would have no text-marker twin, violating the kind/markers family agreement invariant. - msgTextUnitsOf: bare string ARRAY PARTS now attest (kernel/src/wire/openai.ts turns them into their own text cores). - collector skips role:'assistant' defensively (server role gate unchanged). - incomingMsgKindsHeader caps RAW pair count (duplicates included), matching the documented '≤512 pairs' — previously only the deduped index was capped. - docs/plugin-protocol.md: drop the duplicated x-bili-msg-kinds bullet. - stale comments: ~13KiB→~30KiB worst case; durable-message-guards.ts file header no longer claims source.kind never reaches the wire for the dsh lane. - tests 23→28: factory registry keys === [dsh] (non-dsh lanes can never obtain the dsh factory), host attestable kind set ↔ server permitlist lockstep, interior-comma tolerance + space-voids-whole-header, raw-pair 513-cap with duplicate pairs, bare-string-part attestation, assistant skip.
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 归因核实成立,补充当前状态与一处文件级细节。 归因独立复核(不照抄结论,重新查证):
当前状态(实时核实):
一处文件级细节(结论不变):「与本 PR 零重叠」在文件级不完全准确——3 个文件有重叠(
无冲突,rebase 干净(已实测:4 提交零冲突重放)。可干净 rebase 的结论不变。 下一步:等 PR CI 跑完。master 已从 结论:归因成立;PR 已在最新 master 上、CI 进行中——可合并(CI 绿后)。 |
|
CI 归因更新(rebase 后 head rebase 到最新 master 后 CI 重跑:37 SUCCESS / 14 SKIPPED(e2e 真二进制车道,基线就跳过)/ 1 FAILURE。唯一红项 补充一个佐证:rebase 后分片号从 (22,1) 漂到 (22,4)——master 新文件进来导致测试切片重新分配,同一个必挂的测试落在不同分片。master 侧该文件的确定性失败在哪个分片跑就会红哪个分片,与 PR 内容无关。本 PR 自身车道(含 CI 追加的 fold-reconcile 记账提交 |
…rivation (#7121) The v1 kind channel (#7085, PR #7104) covered the durable protection classifier and fold-drift accounting (channel 1), but two marker- classification surfaces stayed marker-only and go blind when a host rewords its injections: 1. isDshSingleShotSidecar (src/server/side-request.ts) — a reworded carrier in a tool-less single-user body with a <=8192 single-shot budget is misrouted to the verbatim side lane, skipping the kernel, so the carrier's BLOCKED ref is never stamped (#2419/#2446/#2447/ #2817/#5403). 2. deriveTitle / isAutoInjectedNotification (src/server.ts) — a reworded notification titles the session forever (set-once, #2286). Both now resolve through the same kind-first expression as the message classifiers (dshCarrierPathByKind / dshTextUnitIsCarrier, src/durable-message-guards.ts): fingerprint of the EXACT unit bytes -> attested kind -> permitlist path. An absent or voided header keeps every surface byte-identical to pre-channel behavior; unmapped kinds never rescue. The x-bili-msg-kinds decode in handle.ts moves before sideRequestLike so the demotion gate can consume it; the prepare adapters hoist their existing inline decode and feed the title derivation. Gate discipline (#3617): both directions pinned in tests/msgkind-channel.test.ts — attested reworded carrier rescued; no header = pre-channel verdict; wrong fp / unmapped kind never rescue; marker/prefix fallback unchanged; a genuine sidecar keeps the side lane; byte-equality over untrimmed unit bytes. Also fixes a pre-existing indentation defect in prepare-responses.ts (foldMode/reconcileFoldCoverage lines at column 0).
…pes instead of copied text markers (#7085) The durable/oneshot classifiers recognize host-injected carriers by COPIED text markers; when a host rewords its injection the classifier silently stops matching and the message loses its protection/accounting with no signal (#7085: dsh 0.2.2-rc.3 reworded the runtime-context snapshot and the whole class went unprotected for three days). The channel: the dsh plugin observes the in-process llm/stream options where every MessageBase carries its structured source.kind, and attests kind=sha256(exact-text) first-16-hex pairs per injected message on the x-bili-msg-kinds request header. The server decodes the header strictly (all-or-nothing: one malformed pair or an ambiguous fingerprint voids the whole header, which then behaves exactly as if absent; <=512 pairs / 64KiB), resolves each fingerprint against the request's own messages, and for kinds on the evidence-permitlist (9 kinds, each with a source-verified emitter and a text-classifier twin) classifies by declared kind BEFORE the text markers. Unknown kinds pass validation but are unmapped; a fingerprint miss (any transform that broke host↔wire byte-equality) falls through to the markers. The header is egress-stripped like x-bili-msg-ids and never reaches the model. Absent header / old host / old proxy all degrade to byte-identical pre-channel classification, so there is no rollout gate and no migration. v1 scope: full-resend lane only (the incremental lane forwards the header unread and keeps marker classification). Unmapped on purpose: mcp-catalog (third-party plugin), image-handle / image-offload-placeholder (out-of-repo @dsh-compaction package), tmux-context (no classifier family). Regression: tests/msgkind-channel.test.ts (23 cases, #3617 both-direction gates: malformed headers void whole, ambiguous-fp void, assistant role never a carrier, factory(undefined) === text-only classifier, host<->server fingerprint lockstep corpus, e2e collector->header->decoder->classifier roundtrip).
- docs/plugin-protocol.md §2: the new optional request header — format (kind=sha256-first-16-hex pairs, comma-joined ASCII), all-or-nothing decode, 512-pair/64KiB caps, unknown-kind pass-through, egress strip, and the absence-degrades-to-today guarantee (old proxies ignore it, old hosts keep working); 中文要点 inline. - reference/architecture.md: durable-message-guards.ts + msgid-pin.ts map lines carry the new responsibility. - CHANGELOG.md [Unreleased] → Changed.
… raw-pair cap, docs dedup, test lockstep (#7104) - tool-jobs now form-filtered to 'notice': dsh stamps only that form today (single emission site, packages/jobs/tool-jobs/src/index.ts:391) but its source type is ContextFormed — a future form would have no text-marker twin, violating the kind/markers family agreement invariant. - msgTextUnitsOf: bare string ARRAY PARTS now attest (kernel/src/wire/openai.ts turns them into their own text cores). - collector skips role:'assistant' defensively (server role gate unchanged). - incomingMsgKindsHeader caps RAW pair count (duplicates included), matching the documented '≤512 pairs' — previously only the deduped index was capped. - docs/plugin-protocol.md: drop the duplicated x-bili-msg-kinds bullet. - stale comments: ~13KiB→~30KiB worst case; durable-message-guards.ts file header no longer claims source.kind never reaches the wire for the dsh lane. - tests 23→28: factory registry keys === [dsh] (non-dsh lanes can never obtain the dsh factory), host attestable kind set ↔ server permitlist lockstep, interior-comma tolerance + space-voids-whole-header, raw-pair 513-cap with duplicate pairs, bare-string-part attestation, assistant skip.
…nnel 1 (#7085) The source-kind attestation channel made the PROTECTION classifier (durable message path) kind-aware, but the FOLD-DRIFT ACCOUNTING classifier (oneShotCarrierPaths, fold-reconcile channel 1) was still marker-only. A host rewording its carrier would therefore keep protection yet re-break the expected-rebase record: the reworded carrier misses every text marker, is never recorded as an expected rebase, and later lands in `missing` — the #5139 O(full-history) reconcile tax plus a false drift warning, for the whole carrier family, with no signal. This closes that residual by mirroring the protection classifier's pattern exactly: - durable-message-guards.ts: oneShotCarrierPathsWithKinds(index) (kind-first under the same role/content gates, then the twelve text markers as fallback; `undefined` index returns the text-only classifier unchanged) + the oneShotCarrierPathFactories registry ({ dsh } only, KDD #9). - fold-reconcile.ts: ReconcileOptions.inboundMsgKinds carries the decoded attestation index; channel 1 consults the lane's factory before the prebuilt text-only entry. - the four wire sites (prepare-anthropic/google/openai/responses) thread the decoded header into reconcileFoldCoverage. Absent header / rejected header / unmapped kind / fingerprint miss all degrade to byte-identical pre-channel behavior; the incremental lane still forwards the header without reading it (v1 boundary unchanged). Tests: 6 new cases in tests/msgkind-channel.test.ts (factory registry is exactly { dsh }; factory(undefined) IS the text-only classifier; attested reworded carrier reaches its oneshot path; unattested reworded carrier stays unclassified; unattested text keeps marker classification; assistant role is never a carrier). Full targeted suites green: msgkind 34, fold-reconcile+5142+5173 91, durable+msgid-pin 45, msgid family 58, fold-reconcile perf/large/positional 30.
…rivation (#7121) The v1 kind channel (#7085, PR #7104) covered the durable protection classifier and fold-drift accounting (channel 1), but two marker- classification surfaces stayed marker-only and go blind when a host rewords its injections: 1. isDshSingleShotSidecar (src/server/side-request.ts) — a reworded carrier in a tool-less single-user body with a <=8192 single-shot budget is misrouted to the verbatim side lane, skipping the kernel, so the carrier's BLOCKED ref is never stamped (#2419/#2446/#2447/ #2817/#5403). 2. deriveTitle / isAutoInjectedNotification (src/server.ts) — a reworded notification titles the session forever (set-once, #2286). Both now resolve through the same kind-first expression as the message classifiers (dshCarrierPathByKind / dshTextUnitIsCarrier, src/durable-message-guards.ts): fingerprint of the EXACT unit bytes -> attested kind -> permitlist path. An absent or voided header keeps every surface byte-identical to pre-channel behavior; unmapped kinds never rescue. The x-bili-msg-kinds decode in handle.ts moves before sideRequestLike so the demotion gate can consume it; the prepare adapters hoist their existing inline decode and feed the title derivation. Gate discipline (#3617): both directions pinned in tests/msgkind-channel.test.ts — attested reworded carrier rescued; no header = pre-channel verdict; wrong fp / unmapped kind never rescue; marker/prefix fallback unchanged; a genuine sidecar keeps the side lane; byte-equality over untrimmed unit bytes. Also fixes a pre-existing indentation defect in prepare-responses.ts (foldMode/reconcileFoldCoverage lines at column 0).
d6abb33 to
a8582ee
Compare
…(lane-guard, #7120) The #7120 side-request demotion edit (isDshSingleShotSidecar + kinds) changed lane logic, so the lane-guard (#2170) requires a dedicated side-lane suite update. Pin the three cells: attested reworded carrier rescued to the main pipeline, absent index byte-identical to pre-channel, wrong-fp / unmapped-kind never rescue.
CI 归因与处理结论(当前 head 1. windows 测试(你 floor-11 关注的红项)— 已解决 master 已带 已确认 2. 分支状态 — 干净,无冲突 分支 ci-fixes 完全落后于 master(0 commits ahead),且未触碰 3. 新发现 — lane-guard 失败(#7121 commit 引入,在你 floor-11 之后加入) 当前 head 原因:
但只更新了 Log 判决(原文):「side-lane logic changed: src/server/side-request.ts, src/server/handle.ts (lane symbols)」→「##[error]Side-lane logic changed without updating any dedicated side-lane suite」。 4. 关键连锁 — fail-fast 分层导致 test matrix 被跳过 当前 head 的 CI run(id=44250660049)有 17 个 job:13 success(guards)+ lane-guard FAILURE + 3 SKIPPED(test matrix、static-gates matrix、red-signal)。 test matrix 被跳过的原因 = fail-fast 分层(#2637), test:
needs: [plan, version-guard, kernel-guard, pi-subagents-guard, lane-guard, docs-sync, docs-coverage, unused-exports, lock-sync, test-import-graph]
if: ${{ !contains(github.event.head_commit.message, '[ework:ci-held]') && (!failure() && !cancelled() && needs.plan.outputs.scope != 'skip' ) }}lane-guard 是 后果:windows 测试在当前 head 没跑(被跳过,不是失败)。当前 head 的唯一根因红项就是 lane-guard 失败。lane-guard 修好后,test matrix 会跑,windows 测试应该过(master 的 fix 已在分支上)。 5. 建议
8问
结论:windows 测试(你关注的红项)已解决。当前 head 的唯一根因红项是 lane-guard 失败(#7121 commit 的内容问题:side-lane 逻辑变了但没更新专门的 side-lane suite)。等你拍板:让 #7121 的 lane 补 side-lane suite 覆盖,还是我代做。 |
|
模型 用户决定:本 PR 先 hold(关闭)。kind 声明通道方向保留讨论,指纹指针的实现方式因性能疑虑待重新评估后另起方案。分支 |
这是啥问题
dsh 宿主注入的消息(运行时上下文快照、技能目录、AGENTS.md 基线等)在 bili 里靠抄宿主的文案标记识别。宿主一改文案,分类器就静默失明——消息丢掉保护/记账,没有任何信号。#7085 就是这么发生的:dsh 0.2.2-rc.3 改了运行时上下文快照的开头,整个类别丢保护三天无人知晓(#7087 修的是抄新文案的下一版)。
本 PR 修的是根因:让宿主直接声明自己注入消息的类型。
方案
src/agent/dsh-native.ts):dsh 每条消息内部都带结构化source.kind(wire 上看不到)。插件在 llm/stream 钩子里对证据许可表内的 9 类消息,盖kind=sha256(原文)前16hex对到请求头x-bili-msg-kinds。指纹把类型绑定到确切文本——不匹配文本的指纹命中不了任何消息。src/msgid-pin.ts解码器 +src/durable-message-guards.ts分类器工厂):严格解码(全有或全无:一个坏对或同一指纹两个类型 = 整个头作废 = 行为等同未发;≤512 对/64KiB),按指纹命中请求自己的消息,先于文案标记归类;查不到/未知类型/指纹不中 → 回落到今天的文案匹配。x-bili-msg-ids同剥除清单,模型/上游永不可见。v1 边界(有意为之)
#7121 扩展面:side-request 降级门 + 标题派生(v1 有意延后的两个分类面)
审核期间按 #7121 跟踪 issue 发现:v1 还有两个 marker 分类面未接 kind 通道,宿主改文案后同样会静默失明(与 #7085 同一机制类,触发面窄、非缺陷)。按「连贯修复不拆片」并入本 PR(commit a8582ee):
isDshSingleShotSidecar,src/server/side-request.ts):无 tools 的单 user body + ≤8192 single-shot budget 时,改文案的 carrier 不再被误路由到 verbatim side lane——那样会跳过 kernel,carrier 的 BLOCKED ref 永不盖章(开启 bili 后「规矩与 skill 好像没被使用」? #2419/compress 增加按内容标记的硬排除(protectedContentMarkers),保护会话的基础设施注入免于折叠 #2446/dsh 车道:AGENTS.md(workspace instructions,user 消息形态)被折叠后从 wire 消失 —— 与 #2419 同类,但 #2428 白名单只覆盖 <available_skills> #2447/[Bug] dsh 车道切模型 fork 出的_sub:会话不继承父会话 fold 块:上游上下文从 ~83K 瞬间膨胀到 794K、命中归 0、节省转负(0.1.187/0.1.188) #2817/[Bug][dsh] 20k-message / 81 MiB-inbound session: host aborted 6× in 2 h — the #3050 resident-AST OOM is not bounded bysessions.hardMaxBytes(Windows, 0.1.210) #5403 契约)。deriveTitle/isAutoInjectedNotification,src/server.ts):改文案的注入通知不再把会话标题锁死(标题 set-once,会话标题被自动注入的系统通知占用,无法反映真实会话内容 #2286)。行为变更披露(旧值→新值 + 原因):
x-bili-msg-kinds头时,认证过的改文案 unit 按 kind 归类——与消息分类器共用同一个 kind-first 表达式(dshCarrierPathByKind,src/durable-message-guards.ts),kind 只救活漂移文案、不改变保护级别(家族一致性不变)。验证:
tests/msgkind-channel.test.ts新增 13 用例(#3617 双向门:认证改文案 carrier 被救活 / 无头 = 旧判决 / 错指纹与未映射 kind 不救活 / 标记与前缀回落不变 / 真 sidecar 保持 side lane / 指纹对未 trim 的确切字节);title-derive、issue5656、side-lane-invariants、durable 家族定向回归全绿(160 用例);tsc --noEmit干净。文件(本扩展新增):
src/server/side-request.ts、src/server.ts、src/server/handle.ts(解码提前到 sideRequestLike 之前 + 两个调用点)、4×src/server/prepare-*.ts(解码提升 + 标题接线)、tests/msgkind-channel.test.ts。顺手修:prepare-responses.ts两行既有缩进缺陷(列 0 → 8 空格)。验证
tests/msgkind-channel.test.ts47 用例(含 [Drive-by] Marker classification surface not covered by kind channel v1 (channel-2 backfill / side-request degradation / | [Drive-by] kind 通道 v1 未覆盖的 marker 分类面(channel-2 回填 / side-request 降级 / 标题派生) #7121 扩展面 13 例)(Test Blind Spot Retrospective: Reinforcing Negative Assertion Discipline, Tightening Fake Upstream Strictness, Thin Inst | 测试盲区复盘:补反向断言纪律、假上游严格化、薄安装冒烟、形态矩阵与生命周期覆盖 #3617 双向门):坏头整头作废、同指纹两类型判歧义、assistant 角色永不做载体、factory(undefined) ≡ 纯文案分类器(12 类语料逐条比对)、宿主↔服务端指纹 lockstep 语料、e2e 采集→头→解码→分类回环、[Bug][dsh] 0.2.2-rc.3 changes the runtime-context snapshot copy, dshRuntimeContextPath silently stops classifying #7085 本体场景(改文案的快照未认证=无保护、认证=durable/runtime-context)tsc --noEmit干净;tools/check-architecture-docs.mjs全绿文件
代码:
src/agent/dsh-native.ts(采集+盖章)、src/msgid-pin.ts(解码器)、src/durable-message-guards.ts(许可表+工厂)、src/server/handle.ts(消费缝)、src/server/headers.ts(剥离);测试:tests/msgkind-channel.test.ts;文档:docs/plugin-protocol.md§2、reference/architecture.md、CHANGELOG.md