Repository navigation
[PR] fix: invariant judge issues false mid-history-rewrite verdict for egress-shed archived images (exempt from directional s | fix: invariant judge 对 egress-shed 归档的图片出假 mid-history-rewrite 判定(豁免方向性结构证明) - #5093
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.7162-pr.5093.53442e8This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5093.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Egress shed (#3701/#4124) archives outbound images to a placeholder note in the sent body only; the inbound twin stays the image core. The invariant judge re-parses the post-shed body, so every shed cell read as a false mid-history-rewrite in image-dense sessions. stableEqual now accepts the directional structural proof: exit cell is EXACTLY the single-producer shed-note format AND the inbound twin is an image core (imagePart sidecar). No new verdict shape or exemption counter — the proof cannot be mass-produced by content defects, and a cap would mint a new overflow class in exactly these sessions. Negative controls pin both gate directions: note-shaped text against a non-image twin, non-note rewrites of an image, and malformed notes all stay red. Part of #5049 (item 2)
4e53754 to
1bcca84
Compare
(ai: vllm-qwen/qwen3.8-27b) 收到,开始 review PR #5093(单 commit 1bcca84,2 文件 +67/-2)。 查重: 不重复 —— #5093 本身即 #5049 item 2 的修复 PR;open/closed issue 与 PR 中无其他针对「judge 对 shed 归档图片出假 mid-history-rewrite」的条目(#4862/#4241 是 judge 的其他缺陷面,#3701/#4124 是 shed 本体,机制不同)。 初审已核实的点(先报进度,完整结论稍后按八问给出):
继续:CI 状态(镜像缓存)+ 本地定向测试,随后给八问结论。 |
…#1456) Review follow-up on #5093: the five new gate rows covered directionality, malformed notes and non-note rewrites, but no row locked the claim that the exemption matches the producer format as a WHOLE cell (anchored ^...$), not a substring. Adds the missing NEG control: an image twin whose outbound cell merely contains the note text stays red (mid-history-rewrite).
(ai: vllm-qwen/qwen3.8-27b) Review 结论:PR #5093 可合(新 head f59152a,CI 47/47 全绿,0 失败)审核独立性声明:以下结论是对 diff 与 master 源码独立重读产出,未复用 issue 侧表述。 结构化八问
既有行为清单(回归审查第②条要求)触碰路径 = src/invariant-judge.ts 的 Review 中顺手补的一个小修(独立标注 commit)发现 5 个新例缺一条锚定纪律的 NEG 行:PR 声称「锚定全串相等,非子串扫描」,但没有测试钉住「note 形状文本被嵌进更长 exit 文本时对图片孪生仍红」。已按小问题直接修补进 PR 分支:commit f59152a(test only,+10 行,新增 1 例 NEG)。本地定向验证:invariant-judge 46/46、e2e/4862/4241 共 19/19、typecheck 干净;新 head CI 47/47 完成、0 失败。 合并判定可合。 代码质量达标准确、diff 干净(单文件逻辑 +67/-2 加我的测试小修)、双向门禁齐全、行为变更已披露、CI 绿。当前 |
(ai: vllm-qwen/qwen3.8-27b) 补一行(首条回复漏了):标签: bug + scope/wiring + p2 —— judge 逐格判定的缺陷面,位于请求管道观测层(src/invariant-judge.ts,非 kernel/);确定性日志信号污染、advisory-only 无用户可感破坏,故 p2。 |
Sync origin/master (153 commits) to clear the behind state flagged by merge-guard. No conflicts. PR content (src/invariant-judge.ts + tests/invariant-judge.test.ts) unchanged.
Sync origin/master (81 more commits since last sync) to clear the behind state flagged by merge-guard. No conflicts; PR content (src/invariant-judge.ts + tests/invariant-judge.test.ts) byte-identical.
(ai: vllm-qwen/qwen3.8-27b)
Part of #5049(item 2;该 issue 为 #4982 全量回归 review 的遗留项跟踪母题)
问题
egress shed(#3701 字节预算 / #4124 图片数量收敛,均默认开启)在 sentBody 捕获前把出站图片归档成占位 note(
[image: <mime> <WxH> <mNNNNN> omitted for size limit],唯一生产者 src/egress-shed.ts:78-87),入站孪生仍是图片核。invariant judge(relay.ts:769)拿 shed 之后的实际出站字节重解析并与入站逐格比对:stableEqual无 shed 豁免 → 每个被 shed 的图片格都判成假mid-history-rewrite。当前 log-only(defaultSink),但污染 #3842 信号面——图片密集会话每次发送都在刷假告警。修法
stableEqual(src/invariant-judge.ts)新增方向性结构证明isShedArchivedTwin:exit 格文本必须与单一生产者格式锚定全串相等(非子串扫描,#1456 纪律),且入站孪生必须是图片核(imagePartsidecar,四条 wire codec 一致置位)。刻意不加有界豁免计数器、不改 JudgeVerdict 形状:(a) 证明是结构+方向的,内容缺陷无法批量制造合格配对;(b) shed 每次发送重跑、归档的是同一批最老图片 → note 存量随会话历史增长,设上限会在这类会话里造出新的假阳性溢出类。shed 配对按 matched 计(与 isTruncatedTwin 同待遇)。
行为变更披露(judge 判定面,advisory-only)
旧值:图片密集会话超预算/超限后,每轮发送产出 warn 级
mid-history-rewrite假判定 → 新值:这些格判 clean(matched)。wire 行为零变化;judge 默认 log-only,BILI_INVARIANT_JUDGE=0 可整体关闭。测试