Repository navigation
Conversation
Refs helsome#185 行情只认 Provider/Router 的 provenance.stale;休市或合约延迟但 stale 为 false 的报价仍走正常路径。持仓 sourceFetchedAt 必须落在运行当日的本地日历日,不用固定 24 小时 TTL。 Co-authored-by: wannT-1 <wannT-1@users.noreply.github.com>
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.
改动说明
Issue #185 第 3 点(新鲜度)。维护者已在 2026-10-26 确认按方案 1 做 fail-closed:关键行情或持仓范围证据过期时,整轮为
incomplete,不能得出「无实质变化」。第 1–2 点(NaN、探针失败)和通知失败不再降级整轮的修复已在 #188 / #194 合入,本 PR 不改那些路径。行情。
fetchQuote不再丢掉ProviderResult/ capability 的provenance。只认 Provider/Router 已经算好的provenance.stale === true(实时源全部失败后的 stale-cache 降级),记为评估失败{symbol}: quote stale,整轮incomplete。Runner 不对Quote.timestamp另造墙钟阈值。delayed === true且stale === false的休市或合约延迟报价仍走正常路径,可以是no_material_update。持仓范围
sourceFetchedAt。 这不是固定 24 小时 TTL。快照的fetchedAt必须和本次运行落在同一个本地日历日(与 host 用Date#toDateString认领当日 occurrence、scheduler 按本地日历日扫描是同一套 civil day):portfolio snapshot expired,不能当成无实质变化。provenance.stale可用来表示「休市但仍是当前持仓」,所以每个本地日都要自己的快照。getPortfolio会在拉取时写下fetchedAt(进程内缓存大约一分钟)。当天真正刷新过的账本可以通过;只有把更早的快照再放出来才会 fail-closed。关联 Issue
Refs #185
不使用
Closes #185:本 PR 只补第 3 点。第 1–2 点和通知过严已由 #188 / #194 合入。测试报告(正式审核前必填)
环境
BUN_VERSION一致)实际执行命令与结果
新增回归:
incomplete,失败文案quote stale,不会研究、不会no_material_updateincompleteno_material_updateportfolio snapshot expired/incompleteincompletedelayed: true、stale: false→no_material_updatestale翻成 true(stale-cache 降级)→incomplete已知失败 / Baseline(如有)
无新增失败。
AutomationRuleRepository > shares rule mutations across Windows path casing在 Linux 上 skip,与本次改动无关。UI 截图(仅可见 UI 变化时必填)
Scope / 后续
earnings calendar probe failed、通知/研究失败不降级 outcome 的逻辑保持 fix(automation): 收紧无实质变化判定的三个误判口子,投递失败不再降级整轮运行 #188 的行为。provenance.stale决定。rule.symbols补一条它们本来就没有的sourceFetchedAt。