Repository navigation
perf(host-core): allow concurrent writes to independent files within a session - #2093
Merged
Merged
Conversation
…a session Admit a second ticketed mutation when the Host identifies disjoint file resources. Drain active writes for older ready conservative requests and retain leases through blocking file operations.
vastsa
approved these changes
Nov 4, 2026
vastsa
left a comment
Owner
There was a problem hiding this comment.
独立验证确认瓶颈存在:只恢复 main 的 tool_budget.rs 后,independent_coordinated_writes_share_session_capacity 因第二个独立写被会话容量阻塞而失败;候选定向预算测试 33/33 通过。macOS 原生全量 Rust 测试 1121 通过、1 忽略;两个真实 blocking 文件租约测试通过,证明独立写同时进入、取消外层请求后冲突读取仍等待实际写完成。cargo fmt 和 diff check 通过。复核了保守写公平性、批次源序、硬链接冲突、全局上限和稳定释放计数,生产改动集中在预算准入。六项远端 CI 全绿,最新 main 14b928f 为祖先,GitHub merge ref 文件树与测试 head 一致。本轮未重新执行完整 Runtime/Host RPC E2E 或 Electron UI;不把作者报告计作本轮独立验证。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1908
#1982 让 Host 能识别批内文件冲突,但每个会话只有一个写名额。即使同一条模型回复中的两个 Edit 修改不同文件,第二个也要等待第一个释放名额。这个 PR 允许同一会话同时修改两个已确认独立的本地文件,沿用现有的 Host 全局写上限 2。
行为与实现
当前提交验证
候选为
3faa015329a26130bf4d6cc453f680f7253aac7d,基线为14b928f3171e9e00b6d2851d67c832812ff61fc7,已确认是候选的父提交。固定批次对照
以下数据采自变基前的 Windows debug Host。基线为
e7a09fc85,候选为该基线上的同一补丁。通过 RPC 修改 4 个各 512 KiB 的独立已有文件,从登记批次计时到关闭,包含封存、执行与 review。每版预热 5 次,再交替采样,每版 30 次。该批次中位耗时缩短约 34%。新基线未重新计时,完整 coding 任务耗时和多个会话争用全局名额时的尾延迟尚未测量。
中英文工具规格、Host 文件批次 ADR 和 E2E 计划已同步。请重点复核保守写等待时的队列顺序,以及取消已开始的 blocking 写操作时,名额是否一直保留到实际操作结束。