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.
改动说明
当
ProviderRouter开启cache时,research.events的eventType、symbols、start、end、count都未进入TypedProviderCache的键。日历请求因此会碰撞:先请求 AAPL 的财报,再请求 MSFT 的财报,后者可能直接收到 AAPL 的缓存结果;在 live provider 失败时也可能降级到不匹配的 stale 结果。将
GetCalendarEventsOptions的五个字段加入现有白名单,保留稳定序列化和 TTL 策略。新增五个逐字段隔离测试,以及一个createRouterFetchers → ProviderRouter → TypedProviderCache集成测试,验证不同股票返回各自结果、相同查询即使对象字段顺序不同仍命中缓存。影响条件:缓存是 opt-in;当前 Electron
KernelHost尚未开启网关缓存。本 PR 修复已有可选能力,不改变桌面默认配置。关联 Issue
Related to #25(已关闭)及 #72(缓存原实现)。这是后续发现的日历查询隔离缺陷,不重新声明完成原 Issue 的全部范围。
已检查当前 main、开放 Issue/PR、全部 137 个历史 PR,以及 cache/缓存关键词搜索;未发现处理这五个日历字段的现有修复。另核对了开放的 #79,其修改不包含本次两个文件。
测试报告(正式审核前必填)
环境
744846f84),与仓库 CI 一致。Microsoft Windows NT 10.0.22000.0,x64,受限文件系统沙箱。ba5dcdfd31b162f5edb8b908f7f099a560389326,2026-09-27 核对仍为上游 main。实际执行命令与结果
另按
.github/workflows/pr.yml的高信号 secret 正则扫描 tracked files(同样排除 docs、测试文件和 bun.lock):0 个匹配文件。独立代码复核未发现需修改的问题,并独立复跑 focused suite:31 pass / 0 fail。已知失败 / Baseline
唯一失败在修改前后的完整测试中一致:
PiRuntimeAdapter > removes the session conversation file on disposeSession。packages/shared/src/agent/pi-runtime-agent-backend.test.ts:675使用/tmp/pi,在本环境被解析为C:\tmp\pi,创建C:\tmp遭沙箱拒绝(EPERM)。该文件未修改,上游基线独立复跑可复现。8 项跳过也与基线一致:7 项缺少真实 Longbridge 账户 fixture;1 项宿主无法创建 symlink。未运行真实证券 API 或 Electron E2E;本次边界由真实 fetcher/router/cache 加合成 provider 数据的集成测试覆盖。
UI 截图
Scope / 后续
仅修复日历查询的缓存键隔离;不启用桌面缓存,不更改 provider 路由、TTL、金融计算或其他 capability 的契约。实现与测试由 AI 辅助完成,并经过本地验证。