Skip to content

feat(data): 统一多市场财经新闻与披露 - #152

Merged
mirror29 merged 25 commits into
mainfrom
feat/global-market-news
Aug 4, 2026
Merged

feat(data): 统一多市场财经新闻与披露#152
mirror29 merged 25 commits into
mainfrom
feat/global-market-news

Conversation

@mirror29

@mirror29 mirror29 commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • 统一多市场新闻:新增 /news 契约与 provider router,覆盖东财、Yahoo 单标的及市场代理、SEC、HKEX、Crypto RSS/Atom;按 market / venue / symbol / kind / language 声明真实能力。
  • 覆盖与错误语义:返回逐 provider 状态、部分失败、snapshot_only 历史覆盖;无来源覆盖时显式返回 NEWS_SCOPE_NOT_SUPPORTED,请求级 4xx 不再伪装为空结果。
  • PIT 与来源边界:按 as_of / since 过滤;实时查询以抓取时点排除未来新闻;HKEX 按香港自然日查询并保留双语部分成功;SEC 正确解析 BRK.B 等份额类别。
  • Research 信任边界:新闻与 Web 内容以 <untrusted_evidence> JSON 引用,清理控制字符并转义标签;原始 provider 错误不进入 prompt;覆盖不足或来源失败时以代码限制置信度。历史 sentiment 过滤未来 FNG,并禁用无可靠发布时间的 Web 证据。
  • Orchestration 与 Dashboard:新增 data.get_news,统一各市场 data.get_market_news/news;Dashboard 区分空结果、部分失败、完整失败和快照覆盖,并本地化 provider 状态。
  • 模拟盘体验:决策时间线按 created_at DESC, id DESC 展示最新记录;组合总览最近订单稳定倒序、显示完整日期时间,并支持鼠标/键盘跳转对应模拟盘详情。
  • 数据库:新增 strategy_run_decisions(order_id) 部分索引,使用 CREATE INDEX CONCURRENTLY / DROP INDEX CONCURRENTLY 避免阻塞持续写入。
  • 文档:同步 README、README.zh-CN 与当前状态页中的新闻能力、来源和覆盖边界。

Behavior and contracts

  • 支持市场:A 股、美股、港股、日韩澳印、英德法加巴、全球市场与 Crypto。
  • provider 状态:okno_resultstimeoutrate_limitedupstream_errorunsupported
  • 快照来源不代表完整历史库;coverage_complete=false 时,标题缺失不能解释为历史上没有事件。
  • 外部标题、摘要、Web snippet 和第三方字段始终视为不可信证据,不作为指令执行。
  • 新闻完整请求失败回落通用错误视图,不再误显示“暂无新闻”。

Test plan

  • Orchestration typecheck
  • Orchestration Vitest:32 files / 477 tests passed(单 worker)
  • Data:237 passed
  • Research:153 passed
  • Paper:911 passed
  • Dashboard typecheck
  • Dashboard Vitest:3 files / 9 tests passed
  • Ruff:Data / Research / Paper / migration 范围通过
  • scripts/check-consistency.sh:10 passed / 218 warnings / 0 failures
  • git diff --check

Review notes

发布前审查额外修复了:

  • kinds 的 TS / FastAPI 逗号分隔契约。
  • legacy venue 规范化与 market / venue 冲突校验。
  • Crypto 市场级 feed 冒充单标的覆盖。
  • Yahoo 限流分类和 CN / 全球市场统一错误语义。
  • canonical URL 跨 provider 去重和缓存对象不可变性。
  • HKEX 语言、时区及双语部分失败。
  • SEC 份额类别 ticker。
  • 实时未来时间戳、历史 FNG / Web PIT 污染。
  • Dashboard 新闻错误状态与最近订单导航。
  • 订单反查索引的在线迁移方式、失败后可重试恢复。
  • 每个 provider 的独立截止时间,避免单一同步来源长尾阻塞整次聚合。

Codex 未安装,未运行跨模型 Codex review。

🤖 Generated with Claude Code

mirror29 and others added 4 commits July 30, 2026 11:11
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review base: 787a855

🤖 GLM-5.2 PR Review

⚠️ review 未完成:GLM API HTTP 401:{"error":{"code":"","message":"Invalid token (request id: 202608040248023459288668268d9d6WJZAl83B)","type":"new_api_error"}}

mirror29 and others added 20 commits July 31, 2026 13:23
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 4, 2026

Copy link
Copy Markdown

Deploying inalpha-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5186af8
Status: ✅  Deploy successful!
Preview URL: https://1be582d6.inalpha-web.pages.dev
Branch Preview URL: https://feat-global-market-news.inalpha-web.pages.dev

View logs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mirror29
mirror29 merged commit ac26c6f into main Aug 4, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant