Repository navigation
Conversation
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.
改动说明
EvaluationStore的运行、结果、设置、反馈和 trace 等九个写入口共用evaluation/store.json,原先各自执行读取 → 修改 → 保存。并发addFeedback和recordTraceLink可以都成功返回,但后一次保存会覆盖前一次记录。底层 JSON 原子替换只能保护一次写入,不能保护整个读改写周期。本次复用现有
withWriteLock,通过私有mutate方法串行化全部九个写入口。同一文件跨实例共享队列,并统一绝对/相对路径及 Windows 大小写路径。API、文件结构与记录保留上限不变。新增可控并发回归和真实
JsonFileStore集成测试:同实例反馈并发、跨实例设置/trace/反馈混合写入、Windows 路径别名、写失败后的队列恢复,以及并发保存 12 组 run/trace/feedback 后由新实例完整重载。关联 Issue
未关联现有 Issue。已核对当前 main 与已有 PR;此前其他仓库的读改写保护没有覆盖 EvaluationStore。
测试报告
环境
helsome/folio的main,e42e9279bf6aac810dd1361ba458fec0b94be9dcbun install --frozen-lockfile --ignore-scripts实际执行命令与结果
Scope / 后续
保护同一进程中指向同一文件的并发读改写;不引入跨操作系统进程锁,也不处理符号链接别名。