feat(data): retry missing data from reports / 支持缺失数据重试与报告页 PDF 提示 - #58
feat(data): retry missing data from reports / 支持缺失数据重试与报告页 PDF 提示#58zhanghang02 wants to merge 1 commit into
Conversation
|
感谢 PR!👏 (你这一串 PR 帮了大忙——#64 / #57 / #56 / #55 都已经合进 v0.2.15 了 🙏) 关于这个「缺失数据重试」:
方便的话rebase 一下,我再 review 这层增强。先留着不关。再次感谢你这一波贡献! |
|
还缺2个数据 资产负债率 [数据缺失: 资产负债率] 接口限制未获取 |
抱歉我这个是0214版本还有关键数据确实,0215好像没了 |
|
抱歉才看到,我找时间结合各位反馈改一下 |
3bedc47 to
1ac5114
Compare
|
已根据前面的 review comments 把这条 PR 重新整理并 force-push 到原分支 这次更新的目标不是重复修 这次调整的基线
这次 PR 相对当前
|
|
抱歉隔了这么久才回 🙏 你 7 月初那次 rebase 做得很扎实,说明也写得很清楚:把 #58 的价值收敛成「缺失任务可见 / 可重试 / 重试后可重新分析」,并且正确接到了 #57 之后的 现在的问题是主干这两天又推了一批修复(提示词 A 股规则、920 号段路由、docker Web UI 服务),这条 PR 重新变成冲突状态。麻烦再 rebase 一次。 另外为了让 review 能真正推进,想跟你约一下范围:我这轮重点看 rebase 完 @ 我一下,这次不会再让你等这么久。 |
Record failed or partial analyst tool calls without interrupting graph execution. Persist task metadata so reports can expose incomplete inputs and retry the exact tool invocation later. Cache successful retry outputs for the next fresh analysis, consume them through ToolNode wrappers, and archive them only after that reanalysis completes. Keep task-index updates serialized for parallel analyst nodes. Add report controls for inspecting and retrying missing data while keeping current PDF exports available. A successful retry explicitly starts a fresh analysis so downstream reports and decisions are regenerated. Cover task detection, retries, cache lifecycle, snapshot synchronization, PDF behavior, and fresh reanalysis with focused regression tests.
1ac5114 to
c8061b7
Compare
|
@simonlin1212 已按你 7 月 26 日的意见完成第二次 rebase 和范围压缩,现在 PR 已恢复为可合并状态。 Rebase 基线
本轮范围收敛最终 diff 只保留 5 个文件:
这次 rebase 冲突只发生在 两个核心文件的 review 要点
|
|
hi~我按照你的回复重新rebase了一版,删除了一些重复和已经修复的地方,闲了可以看一下还有啥问题,谢谢!
Simon Lin ***@***.***> 于2026年7月26日周日 14:15写道:
… *simonlin1212* left a comment (simonlin1212/TradingAgents-astock#58)
<#58 (comment)>
抱歉隔了这么久才回 🙏
你 7 月初那次 rebase 做得很扎实,说明也写得很清楚:把 #58
<#58>
的价值收敛成「缺失任务可见 / 可重试 / 重试后可重新分析」,并且正确接到了 #57
<#57> 之后的 prepare_graph_run
/ finalize_graph_run / close_graph_run 生命周期上,也没有去重复解决 #64
<#64> 已修的根因 ——
这些判断都对,方向我是认可的。
现在的问题是主干这两天又推了一批修复(提示词 A 股规则、920 号段路由、docker Web UI 服务),这条 PR 重新变成冲突状态。*麻烦再
rebase 一次。*
另外为了让 review 能真正推进,想跟你约一下范围:我这轮重点看 tradingagents/dataflows/missing_data.py
和 tradingagents/graph/trading_graph.py 两个核心文件,web/ 那几处只做兼容性检查。如果 rebase
后能顺手把改动再压一压更好,压不动也没关系。
rebase 完 @ 我一下,这次不会再让你等这么久。
—
Reply to this email directly, view it on GitHub
<#58?email_source=notifications&email_token=AIH5MBQZCG6W3GTTMETUMWD5GWOZHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMBYGIZTENZZGU3KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-5082327956>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIH5MBTOUJDS2DPHKX4FSSL5GWOZHAVCNFSNUABGKJSXA33TNF2G64TZHMYTEMZXGE3TIOJUGA5US43TOVSTWNBWGA2DINBWGA3DTILWAI>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AIH5MBSWQQT2YVZXADJN2SD5GWOZHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMBYGIZTENZZGU3KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG>
and Android
<https://github.com/notifications/mobile/android/AIH5MBQQG3YRUF2HV64Q3BL5GWOZHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMBYGIZTENZZGU3KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
先说结论:功能方向我认可,但这个 PR 现在的形态没法合,需要你决定要不要继续推进。 认可的部分"报告里有数据缺失但用户看不出来"是这个项目的真实痛点 —— 工具调用失败时报告照样生成,读的人不知道哪块是空的。你这套做法(记录失败的工具调用 → 按标的/日期存任务 → 支持重试 → 报告页展示状态并允许补齐后重新分析 → PDF 带不完整警告)是对的,而且是完整闭环,不是打补丁。 卡住的原因
1377 行跨三层的改动,一次性 review 的风险太高 —— 这个项目最近几轮审计的经验是,大改动里最容易藏"看着修好了、实际没生效"的东西,而缺失数据追踪这类功能一旦有静默失败,比没有这个功能更糟(用户以为"没提示就是数据齐全")。 想问你的你还愿意继续推进吗? 如果愿意,建议这样拆:
拆开后每个都能快速过,也不用一次 rebase 1377 行。 如果你没时间继续了也完全没关系 —— 说一声,我会把这个 PR 关掉,然后按上面的顺序自己实现,并在 CHANGELOG 里注明设计思路来自你这个 PR。你已经把最难的部分(怎么定义"缺失"、怎么串进下一次分析)想清楚了,这个是有价值的。 两周内没回复的话我就按后一种处理,你随时可以再开。 |
Summary / 摘要
Track tool calls that return failed or explicitly missing data, and store per-ticker/date missing-data tasks with stage/tool labels and retry metadata.
记录失败或显式缺失的工具调用,按股票/日期保存缺失数据任务,并附带分析阶段、工具标签和重试信息。
Add retry support for active missing-data tasks, cache successful retry output, and feed recovered output into the next full analysis before marking it consumed.
支持对仍未补齐的缺失数据任务重新取数,缓存成功重试结果,并在下一次完整分析中复用后标记为已消费。
Surface missing-data status in the report page: users can inspect failed tool calls, retry them, start reanalysis after recovery, and still download a current-content PDF with a clear incomplete-data warning.
在报告页展示缺失数据状态:用户可以查看失败工具调用、重新取数、补齐后重新分析;即使仍有缺失项,也可以下载基于当前内容生成的 PDF,并看到明确的不完整数据提示。
Validation / 验证
python3 -m pytest tests/test_missing_data_tasks.py tests/test_report_viewer_pdf_gate.py -q-> 9 passedpython3 -m py_compile tests/test_missing_data_tasks.py tests/test_report_viewer_pdf_gate.py tradingagents/agents/utils/agent_states.py tradingagents/dataflows/missing_data.py tradingagents/graph/trading_graph.py web/components/report_viewer.py-> passedgit diff origin/main..HEAD --check-> cleanNotes / 说明
streamlit,fpdf,langchain_core, and the pandas-heavy dataflow utility import) so this PR can be validated in the lightweight local Python environment without installing the full project dependency set.streamlit、fpdf、langchain_core,以及会拉入 pandas 的 dataflow utility import)做了测试内 stub,因此无需安装完整项目依赖也能验证本 PR 行为。