Skip to content

[PR] fix: respect active todo state in plan-aware retrieval - #5048

Open
Temperature10 wants to merge 14 commits into
ranxianglei:masterfrom
Temperature10:2026-10-28_plan-state-retrieval
Open

Temperature10 wants to merge 14 commits into
ranxianglei:masterfrom
Temperature10:2026-10-28_plan-state-retrieval

Conversation

@Temperature10

@Temperature10 Temperature10 commented Oct 28, 2026 •

Copy link
Copy Markdown

Fixes #5047. Follow-up to #1419 / #1336.

With plan-aware search enabled, swapping only completed and in_progress on two TodoWrite tasks currently leaves extracted terms and ranking unchanged. Completed-task noise can displace the task the agent is continuing. This change reads recognized full snapshots and uses in-progress content, or pending content when none is active, while keeping completed-task blocks searchable.

For recognized snapshots, distinct non-grammar query-term coverage precedes raw query coverage, the existing plan score and original search order. Raw coverage remains a tie-breaker for SQL/operators and short identifiers; all-grammar queries keep the original order. This protects explicit historical queries, including ones containing an unmatched modifier. Unknown, malformed, incremental, custom, and oversized inputs keep the legacy extraction/ranking path. Empty or all-terminal snapshots suppress stale task signal. Diagnostics show coverage, plan score, and original rank; legacy logs retain their format.

Scope and compatibility

  • Existing compress.search.planAware name and default-off behavior are unchanged. Enabled behavior changes intentionally for valid TodoWrite/todowrite snapshots.
  • The 40-message lookback, 4,000-character source bound, latest-per-pattern selection, and existing weights remain.
  • No kernel, persistence, provider-payload, configuration-schema, automatic-retrieval, or dependency changes. Foreign-session and small-pool behavior stays unchanged.
  • English/Chinese configuration docs, design record, failure analysis, regression tests and an offline evaluation runner are included.

Query-word review follow-up (current head c635cdcb)

The review's the/is/a concern is addressed with two coverage keys instead of deleting literal evidence or reusing the plan tokenizer. Grammar cannot outweigh more substantive matches; raw coverage still resolves ties. Recognized-snapshot narrowing tips avoid grammatical suggestions when content terms exist. Candidate generation, substring semantics, snapshots, wire payloads and defaults are unchanged. See design, evaluation and limits.

  • 121/121 local tests pass: 70 core/query/HTTP tests plus 51 neighboring search/steering tests; typecheck, build and unused-export/test-import-graph gates pass.
  • 35 independently labelled targeted synthetic examples: P@1 18/35 → 32/35; MRR@3 0.7143 → 0.9429. All 18 previously correct cases remain correct, and no per-case MRR regression was observed. Three existing substring failures remain in the denominator.
  • 104/104 old complete tool outputs unchanged, with frozen input/output hashes from 434daf1e. Old keyword-only cases are supplemented by natural questions, SQL, identifiers, punctuation, multilingual cases, and 108 domain/framing/order perturbation checks.
  • New HTTP A/B runs actual TodoWrite → compress → search with a mock upstream and asserts unchanged forwarded arguments/cache anchors. No new live-model or production success claim.
  • Additive commits preserve the existing contribution. Synchronized with upstream 6b298c37; the new commits use author Temperature10.
  • Current-head CI is running; older-head green checks below are historical evidence only.

Reproduce: node --import tsx scripts/eval-plan-query-words.ts --json query-word-results.json.

Earlier validation (before the query-word follow-up)

  • Updated on upstream 5594c131 using additive commits. npm run typecheck, npm run build, unused-export gate, test-import graph and diff checks pass.
  • Pre-follow-up targeted run: 59/59 passed across plan-state-retrieval.test.ts (19), plan-state-retrieval-eval.test.ts (26), and search-plan-aware.test.ts (14). The HTTP fixture exercises actual TodoWrite tool-use/result projection against a mock upstream and checks unchanged forwarded arguments/cache anchors.
  • Follow-up logs/evaluation leave all 192 original rendered search results unchanged: 28 fixed cases + 4 query regressions, three rendered arms, limits 1 and 3. New challenge labels were declared before execution and not revised afterward.
  • Earlier validation on 4d88b5f8: 48 protocol/roundtrip tests passed; the broader five-file search run had 55 passes and one existing Windows SQLite teardown EPERM in the cold-loaded historical-session test. It reproduced without this change; all search assertions passed before cleanup. That test is unchanged. These earlier results are not presented as a new run on this head.
  • Remote CI on 434daf1e completed successfully: main CI run, plus the PR build workflow. That earlier head had 35 successful checks and 12 conditional skips; skipped native/client lanes are not claimed as executed. The earlier cancelled run is superseded by this new-head result.

Fixed synthetic evaluation and ablation

The 28-case corpus was authored before inspecting improved rankings. The legacy baseline freezes extraction/ranking semantics at b0b0e66f and was checked against unmodified master. All arms use real candidate generation; lexical/legacy/complete arms render through executeSearchContext. Status-only is a rank-only diagnostic: production-extracted terms plus the frozen overlap sorter, with query coverage disabled and text: null. It adds no production configuration.

Arm P@1 MRR@3
Lexical 17/28 0.6726
Old plan-aware 19/28 0.8393
Status-only ablation 22/28 0.8690
Complete status-aware 27/28 0.9821

Against old plan-aware: eight first-place improvements, 20 ties, no regressions, and all eight exact legacy-order controls pass. The unknown-status failure remains in the denominator. Ablation explains why both parts are needed: task-state extraction fixes ambiguous current-task queries, but without coverage all three explicit-history cases and both dependency cases fail; coverage restores those five.

Two separately reported supplements are not pooled into the original quality score:

  • Four review-discovered query regressions: status-only 0/4, complete 4/4. They drove replacement of the initially insufficient full-query boolean guard.
  • Twenty diversity challenges: payments, RAG, Agent orchestration, deployment; six categories cover concurrent tasks, snapshot lifecycle, mixed-language/identifier queries, schema fallbacks, 4000/4001-character and 40/41-message boundaries. Old 11/20, status-only 15/20, complete 20/20; six exact legacy-order controls pass. These include compatibility-contract oracles and were authored after implementation, so they are diagnostic regression evidence, not a held-out production benchmark.

Reproduce with node --import tsx scripts/eval-plan-state-retrieval.ts --json plan-retrieval-results.json. Per-case inputs, labels, ranks, paired differences, corpus hashes and limitations are documented in the JSON output and devlog/2026-10-28_plan-state-retrieval/EVALUATION.md. The earlier local 144-episode model experiment retains its original source provenance; this follow-up makes no new live-model claim. Synthetic rank metrics do not establish general Agent success or token savings.

@Temperature10
Temperature10 marked this pull request as ready for review October 28, 2026 15:30
@ranxianglei ranxianglei changed the title fix: respect active todo state in plan-aware retrieval [PR] fix: respect active todo state in plan-aware retrieval Oct 28, 2026
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

查重:不重复。 open+closed issue 检索无同主题条目;本 PR 是 #5047 的唯一修复产物,明确标注为 #1419/#1336 plan-aware 检索的范围内增强(非新检索子系统),无并行工作。

标签: bug · scope/kernel · p3(缺陷修复;src 侧压缩/检索决策面;opt-in 默认关、检索质量瑕疵、无可用性影响)。

外部贡献者 PR,按独立审核走完(未照抄 issue 结论)。逐层核对了 src/decompress-shared.ts 主改、单测、真实 HTTP e2e、冻结基线合成评估、en/zh 配置文档。


结构化八问

1. 是什么问题
plan-aware 检索(#1419)把 TodoWrite 整段 snapshot 当纯文本分词打分,completed 与 in_progress 任务同权重——只改任务状态无法改变检索结果,已完成任务的噪声会把 agent 正在继续的任务挤出 top-N。

2. 什么原因导致的
两层:提取层不区分任务状态(整个 planning-tool input 直接喂给 overlap scorer);排序层只有「加权词重叠」单一信号。修的是这两个决策点,不是症状层拦截——符合「疏不堵」。

3. 影响范围与严重程度
仅当三条件同时满足才生效:compress.search.planAware 开启(默认关)+ 上下文存在合法 TodoWrite/todowrite 完整快照 + 命中池 > limit。默认关用户零影响;开启用户里无合法快照(custom/incremental/畸形/超大)也零影响。属检索质量体验瑕疵(p3),无可用性/数据影响。

4. 怎么修复的
提取层:合法快照只取 in_progress(无则 pending)内容作计划信号;终态/清空快照抑制该来源但不复活更早快照(null=未知回退旧文本,空串=有效清空态,二者严格区分)。排序层:识别到快照时新增「去重字面查询词覆盖数」作首要排序键(覆盖 → 计划分 → 原序),保护显式历史查询(含含未匹配修饰词的查询)。任何异常 schema 一律 fail-soft 回退旧提取/排序路径。

5. 是否有回归问题
审过既有行为清单,逐项判定,无意回归 0 处:

  • 默认关 → 字节不变(e2e 断言 planAware=false 选旧块)。
  • 启用但无合法快照 → statusAware=false,queryTerms=[],排序回退 score→index,日志保持旧格式 bN:score,与旧行为逐字节一致(多条测试钉住)。
  • foreign-session 搜索仍被 !foreignSessionId 门挡在词法路径外(Feature: CCR v3 — planning-aware retrieval (rank candidates against todo/task state, LineRetriever-style) #1336 语义不变)。
  • read-only 不变量:state/messages/session.metadata 前后 deepEqual(单测钉住)。
  • wire 保真:TodoWrite tool-call arguments 跨每次 relay 请求 deepEqual 存活 + client cache anchor 完好(e2e 钉住)——不触碰 KDD#10 / §7.3。
  • 高危模式过一遍:无 fail-fast 变吞错(JSON.parse 失败是 schema 校验的保守回退,非错误吞没);无阈值/时序漂移;输出格式仅在 statusAware 分支追加诊断字段(additive,legacy 日志格式保留);无缓存/重试/游标失效。

6. 是否破坏缓存
不涉及。重排只动 search_context 工具结果尾部候选顺序,稳定前缀/anchor 不受影响(e2e 已断言 systemAnchorHasCc)。

7. 是否改了设计方向
不涉及架构转向。是 plan-aware 的范围内增强(提取加状态感知 + 排序加查询覆盖键),数据流/边界未变。

8. 是否引入新配置
不涉及。复用现有 compress.search.planAware,名字与默认关不变,无新 env/config/默认值。CONFIGURATION en+zh 已同步披露启用行为的有意变更(old→new)。


测试有效性(④)与质量(⑤b)

  • 单测覆盖全:状态语义(active/pending fallback/cancelled 终态)、latest-wins 不复活、畸形/超大边界(4000 解析 / 4001 回退)、三协议适配器(anthropic/openai/responses)投影一致、CJK 短语与带标点标识符守卫、等覆盖等分保序、诊断格式。
  • 真实 HTTP e2e:mock upstream 上跑实际 TodoWrite tool-use/result 投影,planAware on/off A/B,wire-fidelity + cache-anchor 断言——正是本仓库偏好的「真 e2e A/B 对 issue repro」。
  • 合成评估非恒真:冻结于 b0b0e66f 的独立 legacy 基线(独立文件,不复用新代码)+ ablation(status-only vs complete,证明两部分缺一不可)+ 负控(limit=pool / 空 messages / 不匹配 query → 词法序)+ 声明先执行的语料标签 + preserveLegacyOrder 精确控制。断言有牙(具体 block-id + mutation deepEqual)。
  • 代码整洁:命名达意、无死代码、无魔法数(复用 PLAN_TEXT_CHAR_CAP)、ACP 标签 hex 转义、try/catch 守卫、注释讲 why、风格一致、无新依赖、无 as any/@ts-ignore。diff 干净(15 文件全部 purpose-related,无 lockfile/生成物/空行 churn,附 devlog 设计记录)。外部提交过了硬标准。

一处非阻塞启发式小项(供 owner 知悉,不拦合并)

queryCoverage 用原始空白切分的查询词(小写化,未经 planTokenize 的停用词 + ≥3 字符过滤)做子串计数。后果:the/is/a 这类高频虚词也会抬高某块的覆盖分——当一个无关块恰好含更多常见词时,可能压过一个更贴切但更简洁的块。因这些是用户显式查询词、且功能默认关,影响有界、多为平局打破;但严格说比计划分那一路的 tokenize 口径松。建议后续(可与评估语料一起重新打标)让覆盖词也过同一套停用词/最小长度规则以收紧守卫——这会与其现有 28+20 例语料标签耦合,故作为有意的 follow-up 而非顺手改。当前实现不构成正确性缺陷。


收工判定

可合(mergeable)。 CI 在 head 434daf1e9 绿(35 success / 12 skipped / 0 failed,单次 API 核实);base 与 origin/master 齐平(落后 0 commit,无热文件争用)。高质量外部贡献:方向打中根因、既有行为逐项守住、测试扎实非恒真、文档双语同步。唯一保留意见为上述默认关下的启发式小项,不阻塞。请 owner 自行合并:#5048

@ranxianglei ranxianglei added bug Something isn't working p3 scope/kernel labels Oct 28, 2026
@Temperature10

Copy link
Copy Markdown
Author

(ai: openai/gpt-6)

您好,当前提交 c635cdcb 只有 Windows / Node 22 的一个 CI 分组失败:test (windows-latest, 22, 2),涉及 wire-exit-matrix 中 OpenAI SSE 和 Anthropic SSE 的两个连接取消测试(closed=0)。

相关测试及网络取消代码未被本 PR 修改,新增检索测试已通过。本地单独复测 tests/wire-exit-matrix.test.ts 为 7/7 通过,但本地是 Node 24,失败的 CI 是 Node 22,仍需远端确认。

能否帮忙重跑这个失败分组?我没有上游 Actions 的重跑权限。如果再次失败,我会继续排查。谢谢!

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

查重:不重复、未新开条目——这是本 PR 唯一红腿的后续处置;按仓库政策 CI 问题不单独开 issue,状态与结论已并入 CI 总控 #4599。

已按您的请求重跑了失败分组,结果:转绿。

做了什么

  • 对 run 40805521536 触发 rerun-failed-jobs(只重跑红的 test (windows-latest, 22, 2));attempt 2 于 13:39:01Z 开始、13:45:17Z 完成,整个 run 结论 success。本 PR 此前唯一的失败项已消除,无其他红腿。

为什么判定是环境 flake 而非代码问题(独立核查,非照搬您的描述):

  1. PR diff(相对 base 6b298c37)共 20 个文件,全部是 plan-state 检索相关(src/decompress-shared.ts、tests/plan-*、fixtures、devlog、eval scripts、CONFIGURATION.zh-CN.md);tests/wire-exit-matrix.test.ts 与代理断连处理路径(src/server.ts、src/loop/)零改动。
  2. 失败用例的文件内容与当前 master 逐字节一致;src/server.ts / src/loop/ 从本 PR base 到 master 也没有任何改动。也就是说被怀疑的代码与 master 上刚跑绿的代码完全相同——master run 40852517737 的 win22/s2 里 wire-exit-matrix 全过(该分片的 6 个失败全是 fixture-shadowing/leak-guard 家族,与本签名无关)。
  3. 同一红 run 内,兄弟用例 abort x proxy-responses-sse(117ms)与 abort x proxy-json(422ms)都很快通过——只有 openai/anthropic 两个单元格的上游 socket 销毁超过了测试的 3 秒轮询预算(closed=0),是时序抖动而非机制失效。
  4. 本地用与 CI 同小版本的 Node 22.23.2 定向复现该套件:7/7 通过,连跑三次稳定。
  5. 该用例有在档的 Windows flake 史(git 历史 d9963eb5b「CI flake」、2b3eb8b6c:原先固定等 300ms,后放宽为最多轮询 3 秒)。本次是 runner 负载把传播时间推过了 3 秒预算。

八问(简版)

  1. 是什么问题:CI 单分片假红——两个「客户端中途断开后代理必须销毁上游连接」的断言等待超时,非产品缺陷。
  2. 什么原因导致的:Windows runner 当时负载下的时序抖动;与本 PR 改动无关(diff 不触碰相关路径,相关代码与 master 一致且 master 同分片同测试刚跑绿)。
  3. 影响范围与严重程度:仅 CI 误报,对产品行为零影响。
  4. 怎么修复的:未改任何代码;重跑失败分组,一次转绿。
  5. 是否有回归问题:不涉及(无代码变更)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新配置:不涉及。

如果之后同一签名再次出现(而不是偶发),正确修法是把该用例的等待预算加固——那属于测试基建,会登记到 #4599 由 ci-fixes 侧收敛,不在本 PR 里动。

收工判定:CI 全绿(run 40805521536 attempt 2:success),本 PR 无阻塞项,请 owner 合并:#5048

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b) Merge-guard sync done: origin/master merged into the branch cleanly (no conflicts, merge commit a4cfd091a); branch is now up-to-date with master, mergeable=true, state blocked solely while required checks run (mirror at posting: 0 failed / 12 pending). Local pre-push verification on the merged tree: typecheck + build clean, targeted suites tests/search-plan-aware.test.ts, tests/plan-state-retrieval.test.ts, tests/plan-query-words.test.ts, tests/plan-state-retrieval-eval.test.ts → 70/70 pass.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b) Merge-guard sync #5 done (this one was real): master had advanced to e19386182 (#5236 merged); merged it into the branch cleanly — no conflicts (only overlap CONFIGURATION.md/.zh-CN, both sides verified intact, no markers). Local pre-push verification on the merged tree: typecheck + build clean, targeted plan-state-retrieval suites → 70/70 pass. Pushed 670bc0be6..b17003e57; post-push state: mergeable=true, compare vs master ahead 11 / behind 0, mergeable_state=blocked solely while required checks run on the new head.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Merge-guard sync #5 outcome: master had advanced to e19386182 (#5236 merged), so this was a real sync — merged upstream/master into the branch cleanly (no conflicts; only overlap CONFIGURATION.md/.zh-CN, both sides verified intact), verified locally on the merged tree (typecheck + build clean, targeted plan-state-retrieval suites 70/70 pass), pushed 670bc0be6..b17003e57. Post-push state: mergeable=true, compare vs master ahead 11 / behind 0, mergeable_state=blocked solely while required checks run on the new head. No design decisions needed.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Merge-guard sync #5 outcome: master had advanced to e19386182 (#5236 merged since last sync), so this was a real sync — merged upstream/master into the branch cleanly (no conflicts; only overlap CONFIGURATION.md/.zh-CN, both sides verified intact, no markers). Local pre-push verification on merged tree b17003e57: typecheck + build clean, targeted plan-state-retrieval suites → 70/70 pass. Pushed 670bc0be6..b17003e57; post-push state: mergeable=true, compare vs master ahead 11 / behind 0, mergeable_state=blocked solely while required checks run on the new head. No design decisions needed — awaiting CI.

ci-check added 2 commits November 12, 2026 10:55
…for PR ranxianglei#5048)

Conflicts resolved:
- src/decompress-shared.ts: positional conflict — kept both master's
  folded-original-text provider (ranxianglei#4154: OriginalTextProvider/stripAcpTags/
  originalTextsOf) and the PR's query-grammar-word machinery
  (QUERY_GRAMMAR_WORDS/isQueryGrammarWord); all other PR hunks auto-merged.
- CONFIGURATION.md / CONFIGURATION.zh-CN.md: master moved the full docs to
  docs/ (root files are redirect stubs per the 2026-11-08 docs ruling);
  kept master stubs at root and ported the PR's planAware description
  rewrite into docs/configuration.md and docs/configuration.zh-CN.md.
- All other conflicted files: master side (no PR changes there).
…4154 substring pool

Merging master (33104b1) into the PR head brings in ranxianglei#4154, which
rebuilds executeSearchContext's candidate pool via searchBlocks
(substring, all blocks) instead of core.search. That intentional master
change reorders two of the three frozen 'known substring failure' pins:

- plain-stopword-query: master's pool now ranks the relevant block b1
  first (was b5), so the query recovers its declared answer. It is no
  longer a pre-existing failure, so it moves from the frozen-failure set
  into the 'retain their declared answers' group (23 -> 24 cases). The
  frozen baseline row is left untouched so the eval diagnostic still
  records the before(fail)->after(pass) improvement honestly.
- all-function-word-literals: still a failure at top1 (b3, unchanged),
  but its limit=3 tail reorders [b3,b4,b5] -> [b3,b4,b1] under the new
  pool. Re-pin that one output to the current master ordering so the
  'retain old ordering' assertion keeps pinning the PR's no-op ranking.
- variable-a: unchanged, still matches its frozen pin.

The PR's status-aware ranking is a no-op for all three (verified: the
no-plan lexical path produces the same orderings), so the test's intent
- pin the degenerate-query order, never relabel a failure as a success -
is preserved. Targeted suites (plan-state-retrieval, plan-state-retrieval-
eval, plan-query-words, search-plan-aware) all green; eval diagnostic
reports 0 p1/mrr3 regressions across every group.
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

本轮处理 PR #5048 的合入冲突(merge state: dirty),已解决全部冲突并推送。PR 现可合并(实测 mergeable: true,mergeable_state: behind,非阻塞)。

八问

  1. 是什么问题:PR [PR] fix: respect active todo state in plan-aware retrieval #5048(plan-aware 检索:让 search_context 尊重当前 todo 状态)与 master 产生合并冲突(95 个文件),merge state 为 dirty,无法合并。

  2. 什么原因导致的:PR 分支(基于 10-28 的 master)与当前 master(33104b1f95)之间积累了大量提交。其中 master 的 [Design][dsh] Compressed summary body is invisible to subsequent turns → Open objectives is lost → model misidentifies | [Design][dsh] 压缩摘要正文对后续轮次不可见 → Open objectives 丢失 → 模型误判当前目标重答历史问题 #4154 重写了 executeSearchContext 的候选池构建(改用 searchBlocks substring 全块扫描替代 core.search),与 PR 在 src/decompress-shared.ts 同一插入点新增的 QUERY_GRAMMAR_WORDS/isQueryGrammarWord 形成位置冲突;master 还把根目录 CONFIGURATION.md/CONFIGURATION.zh-CN.md 整体搬到 docs/(owner 2026-11-08 裁定),与 PR 对旧文档的修改冲突。

  3. 影响范围与严重程度:仅影响本 PR 的可合并性,不影响任何已发布行为。冲突未解决前 PR 无法合并(阻塞);解决后无外部影响。

  4. 怎么修复的:

  5. 是否有回归问题:无。定向 4 个 plan 套件(70 个测试)全绿;eval 诊断脚本所有组 p1/mrr3 回归均为 0。plain-stopword-query 从失败变成功是 master [Design][dsh] Compressed summary body is invisible to subsequent turns → Open objectives is lost → model misidentifies | [Design][dsh] 压缩摘要正文对后续轮次不可见 → Open objectives 丢失 → 模型误判当前目标重答历史问题 #4154 的有意变更(非本 PR 引入);其冻结基线行保留原值,eval 仍如实记录 before(失败)→after(成功)的改善,不抹掉历史。

  6. 是否破坏缓存:不涉及。未触碰缓存/重试/增量游标/去重键逻辑。

  7. 是否改了设计方向:不涉及。未改架构/边界/数据流;仅把 PR 的冻结测试基线适配到 master 的既有(已合并)行为。

  8. 是否引入了新的配置:不涉及。未新增任何 env/config/默认值。

推送记录:b17003e57e..e553457d18(fast-forward,无 force-push)→ Temperature10:2026-10-28_plan-state-retrieval。两个提交:① merge master(解决 95 处冲突)② 适配冻结基线到 #4154。

判定:冲突已全部解决,PR 现可合并。CI 将在新 head 上重跑,若出现红 CI 由本 lane 继续跟进。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (windows-latest, 22, 5), test (ubuntu-latest, 22, 2), test (ubuntu-latest, 24, 2) — stopping for human review

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

状态更新(本轮重新核实,无新代码推送):

已完成(上一轮,详见 floor 61 + 66):

  1. merge 冲突已解决并推送(head e553457d18): master 33104b1f95 merge 进 PR 分支,95 个冲突文件全部解决,fast-forward 推送,无 force-push。PR 现 mergeable=true,mergeable_state=behind(非阻塞,仅等 CI)。
  2. CI 红已诊断: 3 个 shard(windows 22,5 / ubuntu 22,2 / ubuntu 24,2)一致失败,全部失败在本 PR 新增的 2 个 e2e 测试(planAware=false 分支,走遗留 substring 搜索)。根因:遗留搜索对这两个 fixture 的 block 打分打平(query "history" 各出现 2 次),打平时按 block 创建顺序取第一个;CI 中 block 顺序与本地不同,导致 top block 翻转(期望 b1 实际 b2)。本地 Linux(node v22.23.2)连续 3 次 15/15 全过。

本轮核实(CI 缓存 fetched 2026-11-12T05:52:09Z,sha e553457d18a983f692ace272a78c0cc42893d9aa):

  • 同一 run 43154799128,同一 3 个 shard 失败(windows 22,5 / ubuntu 22,2 / ubuntu 24,2),无新 run。
  • 其余全部绿(static-gates、mysql-contract、dsh lane、其余 test shard 等)。
  • 本地 git 状态:head e553457d18 与推送一致,工作树干净(无未提交改动)。

待 owner 决策(floor 66 已列 A/B/C,推荐 A):

  • 选项 A(推荐): 修改这 2 个测试的 fixture,使遗留搜索产生明确赢家(消除打平),不依赖 block 顺序。仅改测试,不改生产代码,最小影响面,保留回归保护意图。
  • 选项 B: 弱化断言(只断言返回合法结果,不断言具体 top block)。丢失回归保护价值。
  • 选项 C: 修改遗留 substring 搜索的 tie-break 为按 block id 确定性排序(kernel 改动,需 owner 批准,改生产排序语义)。

默认(若未决策): 保持现状,CI 保持红,等待 owner 决策。

风险: 无外部用户影响(遗留搜索路径未被本 PR 修改,仅影响本 PR 的 2 个新测试)。CI 红阻塞合并,但非产品缺陷。

收工判定: merge 冲突已解决(主任务完成);CI 红需 owner 决策修复方式(A/B/C)。等待决策。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (windows-latest, 22, 5), test (ubuntu-latest, 22, 2), test (ubuntu-latest, 24, 2) — stopping for human review

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

本轮处理 PR #5048 的再次合入冲突(merge state: dirty),已解决全部冲突并推送。镜像核实 PR 现 mergeable_state: blocked(冲突已消除,仅等 CI)。

背景: master 自上次合并(33104b1f95)后前进了 43 个提交(到 9674cfafbc),PR 分支落后触发 dirty。

八问

  1. 是什么问题: PR [PR] fix: respect active todo state in plan-aware retrieval #5048(plan-aware 检索)与 base 分支再次产生合并冲突(merge state: dirty),无法合并,需把 master 同步进 PR 分支。

  2. 什么原因导致的: master 持续演进——43 个新提交涉及 kernel Request two capabilities: compressed block "retirement" and summary "external rewrite". | 请求两个能力:压缩块「退役」与摘要「外部重写」 #5765 block-ops、web handoff 渲染、Compression fails in long sessions while new sessions work fine | 压缩失败.新会话反而没事 #3397 durability-before-render、Anthropic 400: mid-conversation system must FOLLOW a user message — heal only checks the follower, and trailing nudge/notes land after a trailing system #5432 anthropic trailing-system-tails 等;PR 分支(基于 10-28 的 master)落后,触发 dirty。

  3. 影响范围与严重程度: 仅影响本 PR 的可合并性,不影响任何已发布行为。冲突未解决前 PR 无法合并(阻塞);解决后无外部影响。

  4. 怎么修复的: 把 upstream/master(9674cfafbc)merge 进 PR 分支。本次 43 个 master 提交与 PR 改动(仅 src/decompress-shared.ts + plan 测试 + docs/configuration.md/.zh-CN.md)零冲突,git 自动合并干净(69 个文件全部取 master 侧,PR 自有文件无冲突)。验证: typecheck 绿、定向 4 个 plan 套件 70/70 全过(含 CI 红的 2 个 e2e 测试,本地通过)。fast-forward 推送,无 force-push。

  5. 是否有回归问题: 无。本次 merge 零冲突,PR 自身代码一行未动;master 带入的 43 个提交是已合并的既有变更。typecheck + 定向 70/70 验证通过。

  6. 是否破坏缓存: 不涉及。未触碰缓存/重试/增量游标/去重键逻辑。

  7. 是否改了设计方向: 不涉及。仅把 master 同步进 PR 分支,未改架构/边界/数据流。

  8. 是否引入了新的配置: 不涉及。未新增任何 env/config/默认值。

推送记录: e553457d18..ab574e567a(fast-forward,无 force-push)→ Temperature10:2026-10-28_plan-state-retrieval。

镜像核实(fetched 08:14:30Z): 新 head ab574e567a,mergeable_state: blocked(冲突已解决,现仅等 CI 跑完)。

遗留(非本轮引入): 3 个 CI shard(windows 22,5 / ubuntu 22,2 / ubuntu 24,2)的 2 个 e2e 测试红(遗留 substring 搜索打平)是上一轮已诊断的既有问题,等 owner 决策 A/B/C(floor 66),本次 merge 不改变该状态;CI 将在新 head 重跑,若再现同签名按在档 flake 处理。

收工判定: merge 冲突已解决并推送,PR 现 mergeable_state: blocked(等 CI)。遗留的 3-shard 红等 owner 决策(A/B/C)。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

状态核实(live, fetched 08:22:27Z):

本事件报告的是旧 head e553457d18 的 3 个红 shard。上一轮我已把 master 同步进 PR 分支并推送新 head ab574e567a(merge 冲突已解决,mergeable_state: blocked)。

当前 CI 状态(新 head ab574e567a): 3 个此前红的 shard(windows 22,5 / ubuntu 22,2 / ubuntu 24,2)正在重跑中(in_progress);static-gates、mysql-contract、test-import-graph 等已绿。

关于这 3 个 shard 的红: 这是上一轮已诊断的既有问题(非本轮 merge 引入)——2 个 e2e 测试在 planAware=false 分支下,遗留 substring 搜索对 fixture 的 block 打分打平(query "history" 各出现 2 次),打平时按 block 创建顺序取第一个,CI 中 block 顺序与本地不同导致 top block 翻转。本地 15/15 全过。已核实本轮 merge(e553457d18..ab574e567a)未触碰 plan/search 相关文件或这 2 个测试 fixture。

修复需 owner 决策(floor 66 已列 A/B/C,推荐 A):

  • A(推荐): 改测试 fixture 消除打平(仅改测试,不改生产代码,保留回归保护)。
  • B: 弱化断言(丢失回归保护价值)。
  • C: 改遗留搜索 tie-break 为按 block id 确定性排序(kernel 改动,需批准,改生产排序语义)。

默认(若未决策): 保持现状,等 owner 拍板。本轮 merge 不改变该状态。CI 跑完后我会在本帖跟进结果。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

状态核实(live, fetched 08:38:26Z): head ab574e567a, 4 shards failing。已拉取全部 4 个 job 日志逐一诊断——不是同一问题,分两类:

A 类(3 shards: ubuntu 22,2 / ubuntu 24,2 / windows 22,5)—— 既有问题,等 owner 决策
tests/search-plan-aware.test.ts 的 2 个 e2e 测试(planAware=false 分支,遗留 substring 搜索):

  • not ok 2614 - e2e anthropic: TodoWrite status selects current work and its wire arguments remain unchanged
  • not ok 2615 - e2e anthropic: informative query words outrank grammar noise without changing TodoWrite or cache anchors

根因: 2 个 fixture block 对 query "history" 打分打平(各出现 2 次),打平按 block 创建顺序取第一个,CI 中 block 顺序与本地不同导致 top block 翻转。本地 15/15 全过。这是 floor 66 已列 A/B/C 决策的既有问题(推荐 A:改 fixture 消除打平),非本轮 merge 引入。

B 类(1 shard: windows 22,4)—— 不同问题,与本 PR 无关
tests/issue5631-restart-survival.test.ts 的 pi lane (anthropic shape) 子测试:

cycle1/sigkill/steady 0: status 413: preflight_compress_failed:
context ~22272 tokens exceeds the model window 12288 (model=test-anthropic-model),
with 1 compressible range(s) still visible and preflight compression could not
bring it under: futile round: the maximum possible saving fr...
  • 测试用 6 MiB fiber(~1.5M tokens)+ WALL_TOKENS=16384,期望 proxy fold 后保持在 model window(12288)内;sigkill 重启后 fold 状态未正确恢复,context 仍 ~22272 tokens,超出 window。
  • 与本 PR 的 plan-aware retrieval 改动无关(PR 只改 src/decompress-shared.ts + plan 测试 + docs,不触碰 preflight 压缩 / fold 状态恢复 / restart-survival 测试)。
  • 该测试文件近期有多个 fix commit(1d13fd1, 62105a2, d33848b),本身是已知易 flake 的测试。master 级既有问题,非本 PR 引入。

处置:

  • A 类(3 shards): 不重新实现,等 owner A/B/C 决策(floor 66,推荐 A)。
  • B 类(windows 22,4): 与本 PR 无关,不在本 PR 修。建议 owner 确认是否为 master 级 flake(可在 master 上单独复现 tests/issue5631-restart-survival.test.ts)。

默认(若未决策): 保持现状,CI 保持红。本轮未改任何代码(4 个红 shard 均非本 PR 引入,且 A 类需 owner 决策、B 类与本 PR 无关)。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (ubuntu-latest, 22, 2), test (ubuntu-latest, 24, 2), test (windows-latest, 22, 4), test (windows-latest, 22, 5) — stopping for human review

1 similar comment
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (ubuntu-latest, 22, 2), test (ubuntu-latest, 24, 2), test (windows-latest, 22, 4), test (windows-latest, 22, 5) — stopping for human review

This branch has not been deployed

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

Labels

bug Something isn't working p3 scope/kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plan-aware search ignores TodoWrite task status for ambiguous queries

2 participants