Repository navigation
[PR] fix: plan-aware search respects TodoWrite task status (#5047) - #5083
ranxianglei wants to merge 5 commits into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.7183-pr.5083.3930bc8This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5083.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复——#5047 是本 PR 对应的唯一 issue;按失败签名(plan-aware search 整快照 tokenize / status-blind 排序)检索 open+closed issue 与 PR,无其他同机制条目。 标签: 审核进行中,先报进度:
|
A recognized complete TodoWrite/todowrite snapshot now contributes only its active tier (in_progress, else pending) to the plan signal instead of a whole-snapshot lexical split, so completed/cancelled tasks stop contributing while their historical blocks remain lexically searchable. Unrecognized shapes (custom tools, incremental updates, malformed/truncated JSON, foreign or missing status) keep the legacy whole-text path. Ranking: a query term that discriminates within the candidate pool (matches some but not all blocks) marks its blocks as explicit-query matches that outrank plan-only affinity; a shared query term (hits every block) degrades to the pure #1336 plan ranking, preserving ambiguous queries. compress.search.planAware stays opt-in/default-off; no kernel, persistence, provider-payload, wire-shape, or new-config changes.
13f35c3 to
3ed90ae
Compare
(ai: vllm-qwen/qwen3.8-27b) 进度汇报(进程曾因长轮询被重启,现恢复): 审核工作已全部完成,只差新 head 的 CI 转绿:
|
(ai: vllm-qwen/qwen3.8-27b) 审核结论(独立审读 diff + 本地定向验证 + 负向对照 + CI)做了什么:PR 原 head 落后 master 18 个提交(两文件零重叠),已 rebase 到当前 master tip(6b298c3)并推送,新 head 3ed90ae;rebase 后本地 八问
测试有效性(独立核查)
diff 整洁度与代码质量2 文件 +185/−4,每一行都与本 PR 目的相关;无 version/kernel/lockfile 触碰;命名达意( 判定:可合(mergeable)。GitHub 显示 mergeable_state=blocked 是分支保护等人工合并,非 CI 问题;按规则合并由你执行:#5083 |
(ai: vllm-qwen/qwen3.8-27b) merge-guard 同步完成:分支已合入 master tip |
Summary
Fixes #5047. The opt-in
compress.search.planAwarepath (#1419/#1336) tokenized the ENTIRE latest planning-tool snapshot, so a task's status never changed the extracted terms and repeated completed-task descriptions could dominate the single active task — swapping only two TodoWrite statuses changed retrieval at all.What changed (
src/decompress-shared.ts)Extraction — a recognized complete
TodoWrite/todowritesnapshot now contributes only its active tier to the plan signal:in_progressdescriptions, orpendingdescriptions when none are in progress;completed/cancelleddescriptions stop contributing plan signal (their historical blocks stay lexically searchable);status) keep the legacy whole-text path unchanged.Ranking — an explicit historical query retains priority over a less-relevant active task:
Behavior change (flagged per policy)
compress.search.planAwarestays opt-in and default-off; with it off, search output is byte-identical (covered by the existingplanAware off leaves the search output untouchede2e test).Scope
Single module (
src/decompress-shared.ts). No kernel, persistence-format, provider-payload, wire-shape, or new-config changes. Noversionbump (content branch).Tests
tests/search-plan-aware.test.ts— 7 new deterministic cases: active-tier extraction, pending fallback, fully-terminal → null, legacy fallback (invalid JSON / foreign status / missing status), oversized char-cap, the reported status-swap repro, and explicit-historical-query protection. Local targeted run: 20/20 pass (incl. both Anthropic e2e roundtrips); full-suite verdict deferred to CI.Closes #5047