Repository navigation
Conversation
3 of 5 tasks
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.
改动说明
报告完成和按需查看变化都会保存研究差异。此前
ResearchDiffRepository.save()无锁读取并覆盖整个research-diffs.json,两个重叠保存成功返回后仍可能丢失记录,影响历史及自动化 material 信号读取。复用现有
withWriteLock,按绝对文件路径串行化完整读改写。新增真实临时文件回归,覆盖不同证券的 buildDiff → 并发保存 → 重载、同证券历史及最新查询、失败后队列继续运行。关联 Issue
Closes #361
测试报告
环境
7ddc3c65ec6327275821404dec3dda1485d1ae16实际执行命令与结果
已知失败 / Baseline
最终检查无失败。使用 fixture 研究报告与真实磁盘,不调用模型或外部金融 API;未执行 Electron E2E 或全仓 advisory suite。
UI 截图
Scope / 后续
只改研究差异仓库及其测试。保持稳定 id upsert、时间排序、JSON schema 和读取接口;复用已存在的共享锁。锁仅保护同一进程内的仓库实例,不提供跨进程事务、不恢复已有丢失记录。
已排查开放 PR #352(筛选历史保存)及 #337 / #345 / #354(报告选择):没有修改这两个文件或修复本路径。本分支基于当前上游 main,无其他 PR 依赖。
改动及测试由 Codex 在用户授权下准备。