Skip to content

fix: strip dead ref-close units after an attested tag-echo (#2862) - #2878

Merged
ranxianglei merged 12 commits into
ranxianglei:masterfrom
YunzhouLi-hub:2026-10-12_tag-echo-residue
Oct 13, 2026
Merged

ranxianglei merged 12 commits into
ranxianglei:masterfrom
YunzhouLi-hub:2026-10-12_tag-echo-residue

Conversation

@YunzhouLi-hub

@YunzhouLi-hub YunzhouLi-hub commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

问题

#2862:同一响应内,tag-echo 已被证实(attested)之后,出现 mNNNNN\x3c/acp + 后续正文的残渣形态(ref 紧贴一个缺终止 \x3e 的截断闭标签),被原样放行给客户端:

[tag-echo] filter released echo-residue-shaped bytes (#2190): m00491\x3c/acp   **已解 C2 URL...

现有规则面全部不命中:

  • LONE_CLOSE / ORPHAN_REF_CLOSE(src/loop/tag-echo-filter.ts:130,135)要求 name 后 32 个非尖角字符窗口内出现 \x3e;
  • TRUNC_REF_CLOSE(src/loop/tag-echo-filter.ts:193)是 $ 锚定的,只覆盖字符串末尾;
  • 于是走 tag-echo-filter.ts:1086 的"无法安全判断 → 整段放行 + residue 告警"。

另外交接确认的 EOF 影子缺口:TRUNC_CLOSE 在链上先于 TRUNC_REF_CLOSE 执行,acplike 名的 \x3c/acp$ 尾巴先被吃掉,留下裸 ref(#2348 v4 顺序问题)。

方案(认领评论的方案 1,按 ework 交接的两处拍板)

新增 DEAD_REF_CLOSE 规则:ref run + 未终结闭标签头,满足

门控 = 本响应内已 attested 过 tag-echo:

  • 流式:createTagEchoFilter 的 droppedAny;
  • 整文本:stripAcpTags 中上游 pass 已剥掉过东西,或存在独立的 acplike 单元(lone close / self-close / mangled open)。

close-only 形态(响应内无任何其它 echo 证据)维持现状不动,继续走 #2190 残渣审计观察 —— 这是本轮明确记录的范围决策(#1760 内容保全优先)。

旧行为 → 新行为

  • 旧行为:... m00491\x3c/acp **正文** 原样放行(仅 warn);EOF 处 m01233\x3c/acp 被 TRUNC_CLOSE 吃掉 \x3c/acp 留下裸 m01233。
  • 新行为:attested 之后,ref + 未终结闭头作为整体死亡单元丢弃,头部之后的正文逐字保留;EOF 处整单元消失,不再留裸 ref。未 attested 的字节行为不变。

落点

测试

  • tests/issue2190-degen-close.test.ts 26/26;
  • tag-echo 家族回归 7 个套件 184/184 全绿(tag-echo / issue2023 / issue1881 / issue2248 / absorb-emission / marker-echo / bili-artifact-strip);
  • tsc:8 个错误全部为 master 现存(durable-tool-identity / storage-mode-label 家族),与本 PR 无关。

Review 轮(ework-daemon,两个增量 commit)

初审发现两处覆盖缺口,已在原分支上追加修复(作者提交历史保留):

  1. 整文本 attestation 窗口过早:stripAcpTags 的 gated 剥离原本位于 LONE_OPEN / MANGLED / LONE_CLOSE pass 之前——唯一 echo 证据是 lone/mangled open 或 degen pair 的响应永远 attestation 失败(且 lookbehind 在 open 被剥掉前会挡住紧贴 open 闭合括号的 ref)。gated 块现移到 LONE_CLOSE pass 之后,谓词简化为 out !== text(所有证据类此时均已执行)。
  2. 流式 raw-release 路径绕过 strip:只有 plain-release 走了 helper。现已全部覆盖:over-cap 非 definite 尾释放([bug] #361 residual, form 3: turn whose entire text is a render-tag echo strips to an EMPTY message — agent records a marker-only turn, stalls until manual nudge (v0.1.92, post-#365) #644 形态的实际泄漏路径)、PARTIAL_TAIL hold/definite 前缀、broken-attrs 前缀、race-winner 前缀(强制 attestation:获胜 match 尚未 record)。未 attested 文本仍逐字不动([bug] 单行中文答案被误判为退化轮:marker 行首前缀按设计被扣住,终点释放却被计成 markup(chat-completions 线整轮报错) #1760)。

行为变更扩大披露(旧 → 新)

测试

Closes #2862

…ei#2862)

A refs run glued to a close-tag head whose > never arrives mid-text
matched no rule (LONE_CLOSE/ORPHAN_REF_CLOSE need the terminator,
TRUNC_REF_CLOSE is $-anchored), so the unit was released as prose with
only a residue warn. New DEAD_REF_CLOSE rule drops ref + unterminated
close head together once a tag-echo is attested in the same response
(streaming: droppedAny; whole-text: something stripped or a lone
acplike unit present); close-only shapes stay content-preserved
(ranxianglei#1760). Runs before the truncate passes so TRUNC_CLOSE no longer
shadows the unit down to a bare ref at EOF (ranxianglei#2348 v4 ordering).
@YunzhouLi-hub

Copy link
Copy Markdown
Contributor Author

e2e-pi-codex-ws 失败分析(flake,非本 diff 引入)

结论

e2e-pi-codex-ws run 38212873405 中 subtest B(:552)的断言 :597 "continuation frame carries the fold result" 失败,本 PR 的改动在该测试中是行为惰性的(inert),判断依据如下。已推送空 commit a6ea8e6e 触发重跑(无 admin 权限,无法直接 rerun)。

依据

  1. mock 上游不产生任何可命中文本。 该 e2e 的 mock 只回复字面量 WS_E2E_OK(tests/e2e/e2e-pi-codex-ws.test.ts:172-184),不含任何形如 {LT}name 的标签或 m\d{4,}{LT}/word 残留单元。本 PR 新增的 DEAD_REF_CLOSE 规则需要匹配 m\d{4,}\s*{LT}/[a-zA-Z]{0,32} 形态,且 strip 仅在「同一文本内已检出 tag-echo」(droppedAny 门)时才生效——两条前提在该测试的确定性 mock 下均不可能满足,规则为零命中。

  2. 断言对象在请求方向,本 diff 只影响响应方向。 :597 断言的是上游请求体(cont.full 里的 function_call_output 含 "Compressed")。stripResponsesText / stripAcpTags 的全部调用点(adapter-responses.ts:512-640、plugin.ts:3727/3782/3943/4053、stream-*.ts、compress-loop-responses.ts:153)都在 client 方向的响应/流式路径上,不触碰发往上游的请求体,因此 "Compressed" 不可能被本 diff 从 cont.full 中剥掉。

  3. 断言本身是时序敏感点。 测试文件自己的注释(:590-592)说明 delta 帧只在 tool-loop 的最后一次调用中产生、subtest B 需要 "Mirror A's proven shape" —— 即断言依赖 mock.rows 快照时 continuation 帧是否已携带展开后的 full,属于已知的脆弱窗口。

  4. 外部佐证: 该 workflow 最近 5 次在其他分支上全部通过(38212240445、38211347716、38209636787、38206582511、38205437783);本 PR 其余 30+ 检查全绿,tag-echo 家族 7 个本地套件 184/184 通过。

本地无 pi 二进制(该 e2e 需 ACP_TEST_E2E_PI_WS=1 + pi on PATH + dist/agent/pi-native.js),无法直接复现;若重跑仍稳定失败,请 @维护者 贴出 run log,我再深入。

@YunzhouLi-hub

Copy link
Copy Markdown
Contributor Author

重跑结果:e2e-pi-codex-ws 这次通过(与上文分析一致)。但 test (ubuntu-latest, 24) 出现另一个独立 flake:tests/codex-responses-ws.test.ts:151 读 bili.log 时,断言的 {LT}codex-responses-ws{GT} [conn=1] 行尚未从 bili 日志缓冲刷盘(actual 仅含 4 行启动日志,而同一时刻 stdout 已出现对应连接行)——日志刷盘与测试读文件的竞态,与 #2878 的 diff 无关(本 PR 未触碰任何日志/WS lane 代码;同 commit 首轮该 job 绿)。正在本地压测复现,如确认将单独提 issue + 修复 PR。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

Flake 分析结论:同意,已独立复核(e2e-pi-codex-ws)

你的四点判断我逐条用代码验证过,全部成立:

  1. mock 零命中 — 确认 mock 只回 WS_E2E_OK 字面量(tests/e2e/e2e-pi-codex-ws.test.ts:172、183-184),function_call 参数是 base64(foldEnc/decEnc)或 {},而 base64 字母表不含 <,DEAD_REF_CLOSE 形态不可能出现;且该确定性 mock 下 droppedAny 永远为 false,stripDeadRefCloses 恒走 early-return。diff 在此测试中行为惰性,双重确认。
  2. 方向隔离 — :597 断言的 cont.full 是 mock 侧对上游请求体的重建(request 方向)。我 grep 了 stripAcpTags(/stripResponsesText( 全部 21 个调用点(src/adapter-responses.ts、plugin.ts、stream.ts、stream-openai.ts、stream-google.ts、stream-responses.ts、compress-loop-responses.ts、tag-echo-filter.ts 内部 mapper),全部在 client 方向的响应/流式路径,无一触碰发往上游的请求体。
  3. 时序敏感点 — :590-592 注释确认 delta/continuation 帧只在多调用 tool-loop 的最后一次调用产生(pi 的 websocketSessionCache 是 per-process),subtest B 依赖 mock.rows 快照与 continuation 帧的时序窗口。
  4. 重跑证据 — a6ea8e6 上 e2e-pi-codex-ws 已通过(run 38213368494 success)。flake 坐实。

⚠️ 新发现:重跑暴露第二个独立 flake(test ubuntu-latest, 24)

run 38213368544 中 test (ubuntu-latest, 24) 失败,其余 27 项全绿。失败点是 tests/codex-responses-ws.test.ts:151「codex WS: prewarm probe plus full-replay turns…」的日志断言竞态:所有功能断言(probe 原样转发、turn completed、session stats、ACP 工具注入)全部通过,唯独 readFileSync(bili.log) 时日志里还只有 4 行启动行,看不到 [codex-responses-ws] [conn=1]。机制:logger 走 createWriteStream 异步缓冲(src/logger.ts:158),CI 负载下读文件抢在 flush 之前。该测试零标签形态字节,diff 惰性;master 最近 8 次 CI 全绿 → 低频负载型 flake,与本 PR 无关。

含义:目前还没有一次全绿的 CI run(run1:e2e-pi-codex-ws flake + matrix 被空 commit push 取消;run2:上述 log-race flake)。合并前需要再来一次全绿。

审查发现:gate 枚举缺口 → 已直接修(push 被 fork 权限挡住,patch 附后)

审代码时发现 stripAcpTags 的门控枚举了两处遗漏:gate 列了三种自包含单元(self-close/lone close/mangled open),但漏了同一条链无条件剥离的另外两种完整单元——terminated lone open 和 DEGEN_PAIR(acplike open + 裸 ref body + 漂移闭名)。响应里唯一的 echo 证据是这两种之一时 gate 保持关闭,共存的 mid-text dead unit 在整文本通道原样泄漏。实证复现(PR head 代码):

输入 <acp tokens="1" type="text">m05712</ap> see m00491</acp   **长正文…**
输出  see m00491</acp   **长正文…**   ← degen pair 被剥,dead unit 泄漏

streaming 通道经 droppedAny 已覆盖这两种形态(实证确认),缺口只在整文本通道。修复:补两个 disjunct(DEGEN_PAIR 带 g flag,必须无 flag 重建后 .test(),直接 .test() 有 lastIndex 状态陷阱)+ 2 条回归断言。本地验证:tag-echo 家族 9 套件 218/218,tsc 0 错误(你报告的 8 个 master 现存错误在我环境复现为 0,pi-subagents 构建产物差异所致,均与本 PR 无关)。

行为变更披露(旧→新):lone-open/degen-pair 为唯一证据且存在 mid-text dead unit 时——旧:unit 原样泄漏(EOF 处则被 TRUNC_CLOSE 吃掉闭合半部+≤32 字符尾部正文、留裸 ref);新:unit 整体死亡、其后正文逐字保留。未 attested 字节仍字节不变(#1760 负例测试钉住)。TRUNC_ 截尾形态刻意不进 gate*:EOF 截断闭本身就是决策 1 要保全的 close-only 残渣类,加进去会违反范围决策。

Push 受阻:token 账号 ranxianglei 对 YunzhouLi-hub 的 fork 无 push 权限(PR 未开 Allow edits by maintainers)。commit 46b9b7003 已在本地,@YunzhouLi-hub 请开启 maintainer edits(我立即推)或自行 git am 应用:

diff --git a/src/loop/tag-echo-filter.ts b/src/loop/tag-echo-filter.ts
--- a/src/loop/tag-echo-filter.ts
+++ b/src/loop/tag-echo-filter.ts
@@ -441,13 +441,17 @@ export function stripAcpTags(text: string, dropToolCallEmission = false, request
     // #2862: dead ref-close units (ref + unterminated close head, mid-text or
     // at EOF). Must run BEFORE the truncate passes: TRUNC_CLOSE eats the
     // \x3c/name tail first and would leave the bare ref behind (the #2348 v4
-    // shadow). Gated on an echo attested in this same text — the passes above
-    // stripped something, or a self-contained acplike unit (lone close,
-    // self-close, mangled open) is present that the chain below removes —
-    // because a close-only shape with no other echo evidence stays
-    // content-preserved (#1760); such sightings remain observable via the
-    // residue audits.
-    if (out !== text || SELF_CLOSE.test(out) || LONE_CLOSE.test(out) || MANGLED_OPEN.test(out)) {
+    // shadow). Gated on an attested open / complete unit in this same text —
+    // the passes above stripped something, or a self-contained acplike unit
+    // the chain below removes is present (lone close, self-close, mangled
+    // open, lone open, degenerate pair; a full pair attests through its close
+    // half matching LONE_CLOSE) — because a close-only shape with no other
+    // echo evidence stays content-preserved (#1760); such sightings remain
+    // observable via the residue audits. Truncated tails deliberately do NOT
+    // attest: an EOF-truncated close is itself the close-only residue class.
+    // DEGEN_PAIR carries a g flag, so test it through a fresh flag-free
+    // rebuild (a direct .test() on the g-flagged const is stateful).
+    if (out !== text || SELF_CLOSE.test(out) || LONE_CLOSE.test(out) || MANGLED_OPEN.test(out) || LONE_OPEN.test(out) || new RegExp(DEGEN_PAIR.source).test(out)) {
         out = out.replace(new RegExp(DEAD_REF_CLOSE.source, "g"), "");
     }
     out = out
diff --git a/tests/issue2190-degen-close.test.ts b/tests/issue2190-degen-close.test.ts
--- a/tests/issue2190-degen-close.test.ts
+++ b/tests/issue2190-degen-close.test.ts
@@ -480,6 +480,20 @@ test("#2862 stripAcpTags: dead units die whole-text, unattested stays verbatim",
     assert.equal(stripAcpTags(unattested), unattested, "close-only shape with no attestation stays byte-identical");
 });
 
+test("#2862 stripAcpTags: lone open and degenerate pair also attest the echo (gate completeness)", () => {
+    const longTail = "   **resolved** then much longer prose keeps going well past the end";
+    assert.equal(
+        stripAcpTags(`\x3cacp tokens="1"\x3e see m00491\x3c/acp${longTail}`),
+        ` see ${longTail}`,
+        "lone open alone attests: dead unit dies, prose survives",
+    );
+    assert.equal(
+        stripAcpTags(`\x3cacp tokens="1" type="text"\x3em05712\x3c/ap\x3e see m00491\x3c/acp${longTail}`),
+        ` see ${longTail}`,
+        "degenerate pair alone attests: dead unit dies, prose survives",
+    );
+});
+
 test("#2862 responses pipe: residue frame after an attested pair never reaches the client", async () => {
     const out: string[] = [];
     const res = makeRes(out);

另注:本仓走 merge commit 而非 squash,空 commit a6ea8e6ef 会留在历史里;介意的话合并前可 drop(可选,不阻塞)。

结构化八问

  1. 是什么问题:同一响应内 tag-echo 已被证实后,ref 紧贴未终结闭头的残渣形态(mid-text 原样放行 / EOF 留裸 ref)到达客户端([bug] tag-echo 在 0.1.194 仍放行一条 #2190 形态残渣(mNNNNN</acp 内联在正文行首,#2229 治理后复现) #2862 生产形态)。
  2. 什么原因导致的:规则面覆盖缺口——LONE_CLOSE/ORPHAN_REF_CLOSE 要求 32 字符窗口内出现终结符、TRUNC_REF_CLOSE 只锚定字符串末尾,mid-text 未终结形态全不命中;叠加 TRUNC_CLOSE 在链上先于死单元判定执行,EOF 处先吃掉闭合半部(【bug3】标签退化的检测器双向失效:ACP_TAG_RE 命中率 11%,hasToolCallStructure 把失控枚举判为「结构完整」 #2348 v4 顺序影子)。
  3. 影响范围与严重程度:仅模型表现出 tag-echo 且死单元形态共存的响应;泄漏的是残渣字节进入客户端可见流,属 wire 卫生/体验瑕疵,非数据损坏、无功能破坏;触发面窄但长会话中真实发生([bug] tag-echo 在 0.1.194 仍放行一条 #2190 形态残渣(mNNNNN</acp 内联在正文行首,#2229 治理后复现) #2862 单会话 34 次拦截)。
  4. 怎么修复的:新增 DEAD_REF_CLOSE 规则(ref run + 未终结闭头,双 lookahead 排除活闭标签),门控=「本响应内已有 attested echo」(流式 droppedAny / 整文本前置 pass 剥过东西或存在自包含 acplike 单元),置于 truncate 链之前消除 EOF 影子;close-only 无证明形态按 [bug] 单行中文答案被误判为退化轮:marker 行首前缀按设计被扣住,终点释放却被计成 markup(chat-completions 线整轮报错) #1760 维持保全。
  5. 是否有回归问题:审计过——未 attested 字节字节不变(负例钉住)、活闭标签形态 lookahead 排除归既有规则(负例钉住)、词粘连 xm01233 与 > 后 run lookbehind 排除(负例钉住);tag-echo 家族 9 套件本地 218/218;tsc 我环境 0 错误。审查中发现 gate 枚举缺口一处 → 已按小问题规则直接修(上文,含旧→新披露)。两个 CI flake 均与 diff 无关(证据见上)。
  6. 是否破坏缓存:不涉及——纯响应文本过滤器,不触碰缓存/重试/增量游标/去重键。
  7. 是否改了设计方向:否——在既有 tag-echo-filter 规则族内扩展一条规则 + gate 补全,架构/边界/数据流不变。
  8. 是否引入了新的配置:无。

判定:hold

代码方向正确、实现质量高、diff 干净(2 文件每行 on-topic)、两处拍板(close-only 保全 / 名字集放宽)均已按要求落实。待办两项:① 补充 commit 落地(开 maintainer edits 或自行应用 patch);② 一次全绿 CI(当前唯一失败是 codex-WS log-race flake,与本 PR 无关,需重跑)。两项清掉即可合并。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

跟进两条:

① #2882 / #2883 与我的独立诊断一致 — 同一根因(src/logger.ts:158 异步 WriteStream 刷盘 vs tests/codex-responses-ws.test.ts:150 一次性冷读,慢盘上读赢刷盘)、同一证据 run(38213368544),修复复用同文件 :275-286 的 #1971 轮询范式,方向正确,处理得体。一个时序提示:Actions 在 pull_request 事件上 checkout 的是 base 并入 head 的 merge ref,所以 #2883 合入 master 后,#2878 的下一次 CI run 会自动带上轮询修复——届时再触发一次全量重跑即可拿到全绿,不需要本 PR 侧做任何改动。

② 上一条评论里的 gate 补全补丁仍在等你处置(merge 阻塞项之一)。再贴一次要点:stripAcpTags 门控漏了 lone open 与 DEGEN_PAIR 两种完整 attestation 单元,唯一证据是这两种之一时,mid-text dead unit 在整文本通道原样泄漏(已实证复现);补丁 = 两个 disjunct + 2 条回归断言,本地 218/218 + tsc 0 错误。commit 46b9b7003 在我本地,请开启 PR 的 Allow edits by maintainers(我立即推)或 git am 应用上一条评论里的 diff。不落地则 #2862 的修复在「degen-pair/lone-open 为唯一证据」这一真实形态(#2190 普查里漂移名 degen pair 是高频形态)下仍留泄漏口。

当前合并状态:hold,待办不变——① 补充 commit 落地;② #2883 合入后的一次全绿 CI。两项清掉即可合并。

ework-agent added 2 commits October 12, 2026 15:13
…i#2862 review)

Review round on the ranxianglei#2878 head. Two gaps in the first pass:

1) The whole-text attestation gate ran before LONE_OPEN and DEGEN_PAIR were
stripped, so a response whose only echo evidence was a lone/mangled open or a
degenerate pair never attested (and the lookbehind additionally blocked a ref
glued to the open's closing bracket until that open was gone). The gated block
now runs after the LONE_CLOSE pass with the simplified out !== text predicate:
every evidence class has run by then.

2) The streaming machine released raw buffer prefixes on paths the helper
never saw: the over-cap non-definite tail release (the ranxianglei#644-shape leak), the
PARTIAL_TAIL hold/definite prefixes, the broken-attrs prefix, and the
race-winner prefix (forced attestation: the winning match has not been
recorded yet). All raw-release sites now route settled dead units through
stripDeadRefCloses; unattested text stays byte-verbatim (ranxianglei#1760).
…expectations (ranxianglei#2862 review)

New pins: LONE_OPEN-only and DEGEN_PAIR attestation shapes, streaming
dead-unit-before-first-echo across chunks, settled dead unit inside a hold
prefix, and the live non-acplike close must stay byte-identical (liveness
lookahead teeth). The weak orphan-ref equality test is upgraded from
includes/endsWith to exact equality.

Behavior change (disclosed): for an open-attested malformed close like
<acp attrs>mNNNNN</acp<prose>, the ref+close residue that previously survived
as visible output is now stripped whole as a dead unit; real content still
survives byte-exact (the original ranxianglei#644 guarantee). The ranxianglei#644 expectations are
flipped accordingly.
@YunzhouLi-hub

Copy link
Copy Markdown
Contributor Author

两件事:

① 已开启 Allow edits by maintainers(API PATCH maintainer_can_modify=true 已生效)——请直接推你的 46b9b70 到本分支。

我已独立验证你的审查发现属实:LONE_OPEN(tag-echo-filter.ts:134,无 g flag)与 DEGEN_PAIR(:149,有 g flag,直接 .test 有 lastIndex 状态陷阱,rebuild 判定正确)都在,gate(:450)确实只枚举了 SELF_CLOSE/LONE_CLOSE/MANGLED_OPEN 三种——lone-open/degen-pair 为唯一 attestation 证据时整文本通道 gate 不开,mid-text dead unit 泄漏。补丁方向同意。

推上来后我在本地跑 tag-echo 全家族回归 + tsc 复核,然后清掉空 commit 重跑 CI。

② #2882/#2883:确认收到你的时序提示(#2883 合入后本 PR 下次 run 走 merge ref 自动带轮询修复),谢谢。

@YunzhouLi-hub

Copy link
Copy Markdown
Contributor Author

已收到并复核 9db6c50 + 4b591c0:

待办只剩全绿 run + 你的合并放行。

@YunzhouLi-hub

Copy link
Copy Markdown
Contributor Author

windows-latest/24 腿的这次失败是已知 flake #2799 的残留复发,与本 PR 无关,证据如下:

失败签名(job 114703137033,run 38216617195):

为何还会复发:#2799 的修复 PR #2808 状态是 CLOSED 且未合入(mergedAt 为空);当前 master 上 git grep _releaseLogFileForTest 无命中,tests/golden-storage-drive.ts 自 fcac9e3 后未再改动 —— 即 #2799 的自持句柄修复从未进入 master,任意 PR 的 windows 腿仍会随机撞上。

本 PR 已做:合并了最新 master(9744c09,带入 HostPluginNotice #2865/#2861)以重跑 CI;本地合并头冒烟 issue2190-degen-close / tag-echo / issue2861-host-plugin-notice 三套件全绿。

请求:麻烦有 admin 权限的维护者 rerun 该 job;以及 #2808 的去留(重新落盘或换方案)可能需要一个决定 —— 在它落地之前,这个签名预计还会继续随机假红 windows 腿。

@YunzhouLi-hub

Copy link
Copy Markdown
Contributor Author

更新:head 0ed4cd8f(合并 master 至 60c47ba)的 CI 四条 matrix 全部通过,包括 windows-latest/24 腿 —— 本次未再命中 #2799 / #2889 环境骰子。

合并前置条件核对:

  • ✅ review 提出的 gate 补全已落地(9db6c50 + 4b591c0,本地 14 套件复核通过)
  • ✅ 一次全绿 run(本轮)

从本侧看已具备合并条件,等待放行。

@ranxianglei

Copy link
Copy Markdown
Owner

依然红

…ianglei#2862 review r3)

The PARTIAL_TAIL hold-prefix is computed before the over-cap definite tail
is dropped, so when that drop is the response's FIRST echo event
(droppedAny still false) the released prefix carried a settled dead unit
verbatim - the ranxianglei#2862 shape re-entering through the cap path. Reachable via
the unbounded '<name' + attrs PARTIAL_TAIL alternative past TAG_OPEN_CAP.
The dropped tail IS the attestation: force the gate, mirroring the
race-winner prefix release. Zero behavior delta when already attested.
Pinned by a regression test (first-event over-cap tail).
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

红的根因:不是本 PR 内容,是 master 侧的地雷在合并新 master 后引爆。 已立项 #2902。

证据链(全部可复核)

#2902(checklist,同一机制族:CI 测试门禁不可执行)

PR 内容侧(本轮 review 结论)

结构化八问

  1. 是什么问题:两件事——(i)CI 红是 master 侧门禁缺陷,与本 PR 内容无关;(ii)review 中发现并修复 PR 代码自身一处 attestation 时序缺口。
  2. 什么原因导致的:(i)fix: propagate compress outcome/blocksCreated through host forwarding lanes (#2752) #2782 带入未注册 spawner 测试文件并以 stale check 合入;whole-tree-scan guard 使任何合并新 master 的 PR hard-fail;tiering 又让 push 事件整条 matrix 级联 skip,master 从未把它暴露。(ii)hold-prefix 先于 drop() 记录 attestation 计算。
  3. 影响范围与严重程度:(i)blocker 级——所有 open PR 四腿红 + master 合入无测试验证(空绿);(ii)低概率角落,但泄漏形态即 [bug] tag-echo 在 0.1.194 仍放行一条 #2190 形态残渣(mNNNNN</acp 内联在正文行首,#2229 治理后复现) #2862 本体(自限,单 unit)。
  4. 怎么修复的:(i)立项 CI test gate unenforceable: LIVE_FILES missing registration hard-fails every PR + push events cascade-skip the whole test matrix #2902(一行注册 + push 覆盖语义决策 + guard 自测);(ii)对随刚记录 drop 释放的前缀强制 attested 门。
  5. 是否有回归问题:家族 12 套件 246/246 全绿 + tsc clean;forced flag 仅在该分支 droppedAny==false 时改变行为(即恰好泄漏场景);披露的 dead-unit 剥离面之外无 wire/阈值/时序漂移。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:未改——同一 DEAD_REF_CLOSE 机制、同一 [bug] 单行中文答案被误判为退化轮:marker 行首前缀按设计被扣住,终点释放却被计成 markup(chat-completions 线整轮报错) #1760 边界(close-only/truncated-only 证据维持保全);streaming drop 与 whole-text preserve 的既有刻意不对称未动。
  8. 是否引入新配置:无。

判定:内容侧具备合并条件;唯一合并阻塞是 #2902(a) 一行注册落到 master(可直接做),之后 rerun 本 PR(merge ref 自动带上)。 windows 腿 #2799 EPERM flake 是另一机制,不在 #2902 内:已核实 #2808 确为 closed-unmerged,其签名在落地前会继续随机命中任意 PR 的 windows 腿,建议单独决定 #2808 去留(重新落盘或换方案)。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

更正上一条回复中的一处引用:我立的 #2902 已按重复关闭——查重发现既有 #2899(同一机制:LIVE_FILES tripwire 失同步 hard-fail 所有 test leg,先由 #2893 分析时立出)且已有外部贡献者 PR #2898(同一行注册,CI 四腿全绿)在途,按「外部贡献不被 agent PR 替换」规则以 #2899/#2898 为准。#2902 的增量发现(push 事件级联 skip → master 空绿的证据链、guard 自测建议、#2782 stale-check 时间线、并发审查结论)已作为评论收编进 #2899,未丢弃。

合并前置条件不变:#2898 合入 master 后 rerun 本 PR 即可(merge ref 自动带上注册行 + 我的 r3 修复 15638c7)。PR head 已核实为 15638c7,mergeable=true。windows 腿若再中 #2799 EPERM 属另一机制(#2808 仍 closed-unmerged),届时 rerun 或单独决定其去留。

@ranxianglei
ranxianglei merged commit 6580da5 into ranxianglei:master Oct 13, 2026
32 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.343-master.6580da5 (rolling master tag).

npm install -g billion-context@0.0.343-master.6580da5  # 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] tag-echo 在 0.1.194 仍放行一条 #2190 形态残渣(mNNNNN</acp 内联在正文行首,#2229 治理后复现)

2 participants