Repository navigation
fix(outcome): 串行化观点与评估结果的并发保存 - #317
Merged
helsome merged 1 commit intoOct 13, 2026
Merged
Conversation
This was referenced Oct 12, 2026
helsome
approved these changes
Oct 13, 2026
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.
改动说明
新研究观点保存与到期收益评估共用
outcomes.json。此前两个方法分别读取旧快照并覆盖写入,重叠执行会静默丢失观点或评估结果。为
OutcomeRepository的两个保存方法增加按目标文件路径共享的进程内队列,保护完整读改写过程。失败继续返回原调用方,后续排队更新可继续执行。新增真实临时文件的并发回归和 OutcomeService 集成测试。关联 Issue
Closes #316
测试报告
环境
a6da0059ecafe4426c9a841ec59215655ebcabd1实际执行命令与结果
已知失败 / Baseline
上述修复后检查无失败。未执行全仓 advisory suite 或 Electron E2E;服务集成测试使用 fixture 行情和真实临时文件,不调用外部金融 API。
UI 截图
Scope / 后续
仅修改
outcome/repository.ts及仓库/服务测试;不改 JSON schema、upsert 语义、收益计算规则或其他仓库。队列只保护同一进程内的写入,不提供多进程事务或历史数据恢复。开放 PR #214 正在处理会话/消息/运行仓库的同类缺陷,本 PR 与其无文件重叠。这里沿用当前 main 中 ConnectionStore 的队列惯用法;后续可在共享存储锁合入后统一内部实现。
改动及测试由 Codex 在用户授权下准备。