Skip to content

fix(compile): 修复增量编译漏处理和重复执行 - #7813

Merged
fujiajie666 merged 12 commits into
volcengine:mainfrom
cocolord:feat/fix-context-recall-budget-7705
Nov 24, 2026
Merged

fujiajie666 merged 12 commits into
volcengine:mainfrom
cocolord:feat/fix-context-recall-budget-7705

Conversation

@cocolord

@cocolord cocolord commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

一次 Compile 更新了 Alpha,但没能读到 Beta。以前,这一轮仍可能推进源基线。即使后来恢复了 Beta 的读取权限,只要 Beta 的内容没再变,下一轮增量就会跳过它。

这个 PR 保留已经写好的页面,把本轮标为 partial,下次仍从旧基线算差异。Simple 如果读某页 diff 失败,也要等同一个 offset 和 limit 重试成功,才会清除这次失败。

恢复时,如果所有新增或修改的来源都已处理,读到的内容也和本轮快照一致,即使目标页面一字未改,也会推进基线。还有来源无法核验,或本轮涉及删除、全量扫描时,零变更的结果会保留旧基线。

验证

用同一组 Alpha/Beta 材料和真实 Doubao 模型复测。恢复 Beta 的读取权限后,Simple 和 Complex 都读齐了两份来源,目标文件逐字未变。再跑三轮,结果如下。

模式 #7813 上一版 本版
Simple 13 次模型调用,31,177 tokens 0 次,0 tokens
Complex 30 次模型调用,69,621 tokens 0 次,0 tokens

表中只统计恢复后的三轮,token 含缓存输入。实验跑在隔离 Git/磁盘环境,Complex 固定 Map → Finalize,统计 worker 用量。本地 217 项测试通过,覆盖漏读、只读片段、快照不一致和重启恢复。

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

用户确定修复范围和验收条件,AI 实现并执行验证。

相关 #8109、#8207。

@cocolord
cocolord marked this pull request as draft November 17, 2026 08:06
@cocolord cocolord closed this Nov 17, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenViking project Nov 17, 2026
cocolord added a commit to cocolord/OpenViking that referenced this pull request Nov 18, 2026
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
@cocolord cocolord changed the title fix(retrieve): preserve oversized recall as marked excerpts fix(search): preserve VikingDB HTTP 400 errors Nov 18, 2026
@cocolord cocolord reopened this Nov 18, 2026
@cocolord cocolord changed the title fix(search): preserve VikingDB HTTP 400 errors fix(search): retain details when VikingDB rejects an OV request Nov 18, 2026
@cocolord cocolord closed this Nov 18, 2026
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
@cocolord cocolord changed the title fix(search): retain details when VikingDB rejects an OV request fix(compile): retain partial delivery across incremental runs Nov 20, 2026
@cocolord cocolord reopened this Nov 20, 2026
@cocolord
cocolord force-pushed the feat/fix-context-recall-budget-7705 branch from f01f2e6 to f1cd86c Compare November 20, 2026 15:33
@cocolord
cocolord marked this pull request as ready for review November 20, 2026 15:33
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
@cocolord cocolord changed the title fix(compile): retain partial delivery across incremental runs fix(compile): 保留部分交付状态与源基线 Nov 20, 2026
@cocolord cocolord changed the title fix(compile): 保留部分交付状态与源基线 fix(compile): 修复增量编译漏处理和重复执行 Nov 23, 2026
cocolord and others added 2 commits November 23, 2026 15:27
Apply the rejected-page coverage fix from volcengine#8207 (0a6e2fb). Exercise the Complex service path where a valid page and a rejected page share one source.

Co-authored-by: wrfgup <31720555+wrfgup@users.noreply.github.com>
Comment thread bot/vikingbot/compile/pipeline.py Resolved
cocolord and others added 6 commits November 24, 2026 13:01
…erms

- Rename download_snapshot_bytes to git_show_bytes: the wrapper only
  calls the SDK git_show snapshot endpoint, so "download" misrepresented
  the operation and diverged from download_bytes, which really hits
  /content/download.
- Drop the AI-introduced "delivered" wording in the compile chain:
  coverage state and output flag become "published", matching the
  batch_write result vocabulary and the service-level published set;
  EvidenceReader.delivered becomes complete_reads, describing the
  fully-read evidence ranges that feed recovery_evidence.

Pure rename with no behavior change; git_show_bytes moves into the
shared pipeline test fixture alongside download_bytes.

Co-authored-by: TRAE CLI <traecli@bytedance.com>
…anch

write_coverage now returns the inputs manifest and the service derives
counts from it, removing the write-only coverage shard whose detailed
inputs and per-entry published flags had no readers. The published
state itself stays: it still gates partial runs and recovery proofs.

Also remove the original_evidence branch in EvidenceReader: no payload
producer has ever set that key, so complete_reads starts empty and is
populated only by assigned full-text inputs and complete reads.

Co-authored-by: TRAE CLI <traecli@bytedance.com>
…ce consumer

complete_reads was another newly-minted term for a set with one
consumer: the Pipeline recovery_evidence union that gates partial
recovery. Give the per-worker EvidenceReader set the same name so the
merge in agent_runner carries one concept end to end instead of two
vocabularies for the same IDs.

Co-authored-by: TRAE CLI <traecli@bytedance.com>
…unner

Matches the EvidenceReader instance convention used in tests and
removes the evidence.recovery_evidence stutter; the merge now reads
runtime.recovery_evidence.update(reader.recovery_evidence).

Co-authored-by: TRAE CLI <traecli@bytedance.com>
Record complete evidence reads directly in the existing task recovery set. Remove the separate reader set, its unused initialization, and the worker-end union. Coverage stores output URIs and checks them against acknowledged write results. Retain the reviewed coverage shard and status flow, with snapshot reads named git_show_bytes.

Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Keep confirmed source outputs in the existing prepared state. Sources with no retained outputs become unreferenced; sources with rejected or unacknowledged outputs become failed. Use these existing states for partial and recovery decisions. Omitted write results preserve pre-write diagnostics, while an explicit empty result still checks for unfinished outputs.

Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
@fujiajie666
fujiajie666 merged commit dfad651 into volcengine:main Nov 24, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants