Add domestic futures analysis support - #1228
Conversation
🤖 自动审查报告
📁 修改的文件
... 还有 10 个文件 🧠 AI 代码审查意见审查结论Not Ready 结构化审查结果必要性
关联性
类型
描述完整性
风险级别
必改项 (Blocking Items)
建议项 (Suggestions)
基于上述阻断项,此 PR 无法合入。请在完善必要信息后重新提交审查。
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 29ec2ae4d4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| void submitAnalysis({ | ||
| stockCode: selectedReport.meta.stockCode, | ||
| stockName: selectedReport.meta.stockName, | ||
| assetType: selectedReport.meta.assetType ?? 'stock', |
There was a problem hiding this comment.
Preserve futures asset type when re-running history reports
handleReanalyze falls back to 'stock' when selectedReport.meta.assetType is absent, but history payloads still omit that field (the history schema/mapper only expose stock metadata). As a result, re-running a futures report is submitted through the stock path, which either fails validation for contract-like codes (e.g. JM2609) or can analyze the wrong instrument (e.g. RB as a US ticker). This breaks the new futures workflow for any report reopened from history.
Useful? React with 👍 / 👎.
| if futures_codes is not None: | ||
| run_full_analysis(config, args, futures_codes, asset_type="futures") | ||
| else: | ||
| run_full_analysis(config, args, stock_codes) |
There was a problem hiding this comment.
Route scheduled runs through futures mode when --futures is set
The new --futures argument is only honored in the immediate-run branch, while schedule mode still invokes run_full_analysis without asset_type="futures". In practice, python main.py --schedule --futures ... will continue to run stock analysis semantics and ignore the futures mode path, so the CLI behavior is inconsistent between one-off and scheduled execution.
Useful? React with 👍 / 👎.
PR Type
Background And Problem
请描述当前问题、影响范围与触发场景。
(EN) Describe the problem, its impact, and what triggers it.
Scope Of Change
请列出本 PR 修改的模块和文件范围。
(EN) List the modules and files changed in this PR.
Issue Link
必须填写以下之一 / Fill in one of:
Fixes #<issue_number>Refs #<issue_number>Verification Commands And Results
请填写你实际执行过的命令和关键结果(不要只写"已测试")。
(EN) Paste the commands you actually ran and their key output (don't just write "tested"):
关键输出/结论 / Key output & conclusion:
Compatibility And Risk
请说明兼容性影响、潜在风险(如无请写
None)。(EN) Describe compatibility impact and potential risks (write
Noneif not applicable).(EN) If this PR changes third-party model/API compatibility, request parameters, routing prefixes, or provider fallback behavior, include an official source link or announcement and clarify whether the rule is permanent, runtime-specific, or a temporary compatibility workaround.)
(EN) If this PR depends on a specific runtime or pinned dependency window (for example a LiteLLM version range, OpenAI-compatible routing, or YAML alias behavior), state the compatibility window you verified and which code paths were covered.)
(EN) If this PR touches runtime config save/cleanup/migration/backfill logic, explicitly describe whether existing config is rewritten, cleared, migrated, or left intact, and how users can restore the previous behavior.)
Rollback Plan
请至少写一句可执行的回滚方案(必填)。
(EN) Provide at least one actionable rollback step (required).
revert this PR),并说明是否需要额外回滚配置或数据迁移。(EN) For compatibility fixes, include the minimal rollback path (for example
revert this PR) and whether any additional config or data rollback is required.)EXTRACT_PROMPT Change (if applicable)
若本 PR 修改了
src/services/image_stock_extractor.py中的EXTRACT_PROMPT,请在此处粘贴完整变更后的 prompt。If this PR changes
EXTRACT_PROMPTinsrc/services/image_stock_extractor.py, paste the full updated prompt here:展开 / Expand: Full EXTRACT_PROMPT
Checklist
docs/CHANGELOG.md;README.md仅在首页级信息变化时更新,细节优先写入docs/*.md/ If user-visible changes are included, relevant docs anddocs/CHANGELOG.mdare updated;README.mdis updated only for homepage-level changes, with details kept indocs/*.md