Commit Graph

252 Commits

Author SHA1 Message Date
Alfred
0295f9d709 feat: expose analysis context pack overview (#1515)
Refs #1389
2026-05-30 09:20:11 +08:00
mumu
647b9d24e5 fix: support Longbridge OAuth token cache (#1490)
* fix: support Longbridge OAuth token cache

* fix(review-feedback-1490): bump the runtime dependency minimum or fail with a clear upgrade

* fix(review-feedback-1490): 补充对应回归测试

* fix(review-feedback-1490): Point OAuth cache at the dsa home in Docker

* fix(review-feedback-1490): 修复或给出明确的 CI 重跑通过证据

* fix(review-feedback-1490): 处理 Docker/Actions 持久化 token cache 已损坏时无法被新的 LONGBRIDGE OAUTH TOKEN

* fix: tighten Longbridge OAuth compatibility

* fix: refresh stale Longbridge OAuth cache

* fix: guard Longbridge OAuth SDK availability
2026-05-29 23:08:16 +08:00
Alfred
8aa214acc2 feat: 接入 AnalysisContextPack 低敏 Prompt 摘要 P3 (#1491)
* feat: inject AnalysisContextPack prompt summary

* fix: align agent pack summary with prefetched news
2026-05-28 19:04:17 +08:00
Alfred
0bb515cc5e fix: 问股 single-agent 增加 provider-aware trace (#1473)
* fix: add provider-aware trace for ask chat

* fix: drop mismatched provider trace attempts
2026-05-26 19:13:05 +08:00
mumu
8a23124d01 feat: add #1391 Phase 2 run diagnostic summaries (#1444)
* fix(issue-1412): [bug]-stock_list格式问题

* fix(review-feedback-1413): preserve exchange hint for dotted A-share inputs

* fix(review-feedback-1413): Keep normalized A-share codes usable by market routing and preserve

* fix(review-feedback-1413): Limit raw dotted codes to fetchers that can parse them

* fix(review-feedback-1413): Keep Tushare daily input normalized for ETF detection

* fix(review-feedback-1413): 澄清结构化检测中的外部模型/API 与运行时配置迁移风险

* fix(review-feedback-1413): 处理或明确确认该失败与本 PR 无关且已有维护者豁免依据

* fix: keep stock list input as bare codes

* docs: add phase-0 run diagnostics contract

* fix(review-feedback-1435): 修正描述并澄清/补齐运行时代码变更的验证证据

* fix(review-feedback-1435): 补齐前缀提示识别,并增加对应回归测试

* fix(review-feedback-1435): 修正

* fix(review-feedback-1435): 解决冲突并更新描述/验证记录后再合入

* fix(review-feedback-1435): 解决冲突,并在最终 head 上重新确认 python -m pytest tests/test a share fetcher code

* fix(review-feedback-1435): 修复并补齐回归覆盖后再复核最终 head

* fix(review-feedback-1435): data provider/baostock fetcher.py 的 convert stock code 只从 .SH/.SS/.SZ

* fix: preserve A-share exchange hints

* fix(review-feedback-1435): 修正 docs/run-diagnostics-p0.md 对 Tushare 本轮范围的矛盾描述

* feat: add phase 1 run diagnostics trace plumbing

* feat: add phase 2 run diagnostic summaries

* fix(review-feedback-1441): 打通 trace id 与数据源运行快照,改动目标明确

* fix(review-feedback-1444): 修复 Agent 模式新报告通过历史诊断 API 返回 unknown 的正确性问题

* fix(review-feedback-1444): Propagate diagnostics lookup errors instead of masking them

* fix(review-feedback-1444): 补对应回归断言

* fix(review-feedback-1444): 解决冲突后再合入

* fix(review-feedback-1444): 解决冲突

* fix(review-feedback-1444): 解决冲突

* fix(review-feedback-1444): 解决

* fix(review-feedback-1444): 解决

* fix(review-feedback-1444): 解决冲突

* fix(review-feedback-1444): 解决

* fix(review-feedback-1444): 解决

* fix(review-feedback-1444): 解决冲突后再合入

* fix(review-feedback-1444): 解决冲突后再合入

* fix(review-feedback-1444): 解决冲突后再合入

* fix(review-feedback-1444): 解决冲突

* fix(review-feedback-1444): Derive news diagnostics from retrieval evidence

* fix(review-feedback-1444): 解决冲突后再合入

* fix(review-feedback-1444): 解决冲突并基于解决后的最终 diff 重新确认 docs/CHANGELOG.md、诊断链路和测试结果

* fix(review-feedback-1444): 解决冲突

* fix(review-feedback-1444): 解决冲突后再合入

* fix(review-feedback-1444): 解决冲突并重新跑阻断型 CI,尤其是 backend-gate 和相关诊断/API/history 回归

* fix(review-feedback-1444): preserve report timestamp when enriching task results

* fix: address run diagnostics review feedback

* fix: redact diagnostic copy text secrets

* fix(review-feedback-1444): 补一条多渠道部分失败的回归测试
2026-05-26 00:05:24 +08:00
Alfred
3aa26ba7d8 feat: add visible chat context compression (#1460)
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-05-25 20:31:20 +08:00
Alfred
79b284014d feat: inject market phase prompt context (#1442) 2026-05-25 20:27:24 +08:00
Alfred
a3c627c384 feat: add runtime market phase context plumbing (#1434)
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-05-24 15:00:53 +08:00
Alfred
c452e7ff09 docs: complete alert center P8 documentation (#1430) 2026-05-23 21:56:53 +08:00
Alfred
f98b7271fa feat: add market phase inference baseline (#1424)
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-05-23 19:22:01 +08:00
mumu
e8305ba738 fix(issue-1399): [bug]-docker-挂载-.env-文件时-os.replace()-更新 (#1401) 2026-05-22 22:45:44 +08:00
TianleZhang
bb814ff89d feat: 邮件报告补充 财务摘要 / 股东回报 / 关联板块,并接入 HK/US 基本面 (#1369)
* feat: enrich email report with financial / dividend / related-boards blocks for CN/HK/US

Render three structured sections in single-stock and dashboard markdown reports
(used by email and other static channels) sourced from fundamental_context:

- 财务摘要: report date, revenue, parent net profit, operating cash flow, ROE,
  YoY growth, gross margin
- 股东回报: TTM cash dividend per share (pre-tax), TTM event count, TTM yield,
  latest ex-dividend date
- 关联板块: belong_boards with sector-leading/lagging signal & change_pct when
  available; auto-collapses to a 2-col (name / type) layout when no sector
  ranking data exists (typical for HK/US)

To unlock the offshore (HK/US) data path:

- Add YfinanceFundamentalAdapter producing the same bundle shape as the
  AkShare adapter, with growth, financial_report (incl. currency),
  TTM dividend events, and sector+industry as belong_boards
- Route get_fundamental_context for hk/us through a new
  _build_offshore_fundamental_context helper instead of short-circuiting
  to not_supported; keep capital_flow / dragon_tiger / boards as
  not_supported (no equivalent feed)
- Stop overwriting belong_boards in the pipeline for non-CN markets so the
  adapter-provided sector/industry data survives

Notification renderer:

- Attach fundamental_context onto AnalysisResult so the notification layer
  can reach it without an extra DB round-trip
- Currency-aware formatting: USD -> 亿/万美元, HKD -> 亿/万港元,
  CNY/other -> 亿/万元; per-share amounts get the same suffix
- Right-align numeric columns and center the report-date column in the
  financial summary and shareholder return tables for cleaner rendering

Tests:

- Offline coverage for the new yfinance adapter (symbol conversion, bundle
  shape, refusal to use QoQ as YoY, graceful degradation when yfinance is
  unavailable)
- Offshore market path through DataFetcherManager.get_fundamental_context
- Adaptive related-boards rendering (2-col when no sector signal,
  4-col when at least one row carries data)
- Currency-aware amount formatting for AAPL (USD) and HK09988 (CNY)

* fix: split financial vs dividend currency and recompute TTM yield for HK/US

HK ADRs typically report financialCurrency=CNY but pay dividends in HKD
(live yfinance confirms: 9988.HK / 0700.HK both have financialCurrency=CNY
and currency=HKD; BABA US ADR has financialCurrency=CNY and currency=USD).
Previously the adapter wrote a single currency field shared by both the
financial report and the dividend block, which rendered HK dividends as
yuan in the email report.

This change writes earnings.financial_report.currency from
info.financialCurrency and earnings.dividend.currency from info.currency
independently, and the notification renderer reads each block's own
currency (falling back to financial_report.currency when dividend.currency
is absent, which keeps AkShare A-share rendering unchanged).

TTM dividend yield was sourced from info.dividendYield, mixing the
numerator (TTM cash window) with a denominator-defined yield from a
different yfinance computation. The yield is now recomputed as
ttm_cash_dividend_per_share / latest_price * 100 with both sides in the
trading currency (latest_price falls through info.currentPrice ->
regularMarketPrice -> previousClose). info.dividendYield is now a
last-resort passthrough (no *100, since current yfinance already returns
percent), behind info.trailingAnnualDividendYield (decimal).

Docs (full-guide / full-guide_EN) updated: HK/US now returns
valuation/growth/earnings/belong_boards rather than not_supported, with
the dual-currency split and the TTM yield formula explicitly documented.
CHANGELOG entries rewritten to reflect the corrected behavior.

Verified live against 9988.HK / 0700.HK / AAPL / 600519: the rendered
email shows financial summary in 亿元 for HK ADRs (CNY statements) while
the shareholder return block shows 港元 (HKD dividends), and the
recomputed yields match ttm_cash / latest_price in the same currency.

---------

Co-authored-by: suan baby <suanai@tianle.me>
2026-05-21 20:04:32 +08:00
Alfred
2caa1292e9 feat: add P6 portfolio and watchlist alerts (#1379) 2026-05-21 19:15:24 +08:00
mumu
8be6546caa feat: improve stock news relevance ranking
Improve stock-news relevance scoring and ranking.

Fix lower-case US ticker suffix matching, preserve Chinese preference for A/HK weakly-related news, and cover the addressed review edge cases.
2026-05-20 22:49:25 +08:00
mumu
6684e327dd chore: prioritize daily analysis workflow (#1373) 2026-05-20 22:24:44 +08:00
Alfred
3881de0ac9 fix: deduplicate alert trigger history (#1364)
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-05-20 20:39:24 +08:00
mumu
57cb614d82 fix: 优化大盘分析信号展示 (#1354)
* improve market review signal display

* refine market review signal output

* simplify market news catalyst display
2026-05-19 23:19:09 +08:00
JinHyuk Sung
c65972642c fix: prefer realtime quote for current portfolio snapshots (#1349)
* Fix portfolio realtime snapshot pricing

* Address portfolio snapshot review feedback

---------

Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-05-19 19:11:35 +08:00
Alfred
296f0f1746 feat: 告警中心支持 MA/RSI/MACD/KDJ/CCI 日线技术指标规则 P5 (#1345)
* feat: add technical indicator alert rules

* docs: add alert center p5 screenshot

* fix: reject unfetchable indicator alert periods
2026-05-19 18:59:46 +08:00
Alfred
b43d636df1 feat: 记录告警通知结果与持久化冷却 P4 (#1337)
* feat: record alert notification attempts and cooldowns

* fix: address alert cooldown review feedback
2026-05-18 22:42:24 +08:00
Alfred
a872a9e03e feat: 新增 Web 告警中心 MVP(P3) (#1334)
* feat: add web alert center MVP

* fix: guard alert rule list request ordering
2026-05-18 18:37:48 +08:00
mumu
0a987086d3 feat: Web 个股分析支持选择策略 (#1331)
* feat: support strategy selection in web analysis

* fix(review-feedback-1331): The worker receives the original skills list, while TaskInfo stores a

* fix(review-feedback-1331): 补充对应 Web/API 文档,或在 PR 中明确说明现有哪份文档已覆盖且本次无需更新的依据
2026-05-17 22:59:49 +08:00
Alfred
adaf6cbfbe feat: 增加 P2 告警评估 Worker (#1323)
* feat: add alert evaluation worker

* fix: retry failed alert notifications
2026-05-17 16:32:24 +08:00
mumu
e407b5bf14 feat: Add report LLM model visibility toggle (#1294) 2026-05-16 15:12:39 +08:00
mumu
fb98a62938 fix: 大盘分析的历史执行记录丢失 (#1306) (#1307)
* fix(issue-1306): 大盘分析的历史执行记录丢失

* fix(review-feedback-1307): also special-case the history detail/client path to surface the saved

* fix(review-feedback-1307): 补齐大盘复盘历史记录的 Web/API 契约闭环与对应文档落点

* fix(review-feedback-1307): Disable stock rerun for market-review history rows

* fix(review-feedback-1307): Disable follow-up for market-review history rows

* fix(review-feedback-1307): 避免大盘复盘历史被整体回测当作普通股票分析记录处理

* fix(review-feedback-1307): 澄清结构化检测提示中的外部模型/API 与运行时配置迁移风险是否为误报,或补齐对应兼容性证据

* fix(review-feedback-1307): 修复普通个股历史不回归问题
2026-05-16 13:36:17 +08:00
mumu
f8458c582a feat: Configure market review index colors (#1295) 2026-05-15 22:35:40 +08:00
mumu
1a64da4700 [codex] fix fundamental timeout defaults (#1288) 2026-05-15 20:57:48 +08:00
Alfred
60d8211aa4 docs: close notification issue 1200 (#1276) 2026-05-13 22:04:36 +08:00
Alfred
a75a0c502e feat: complete p6 notification channel cleanup (#1275) 2026-05-13 19:19:54 +08:00
Alfred
9f56238420 feat: 支持 ntfy 一等通知渠道(P6-A) (#1271)
* feat: add ntfy notification channel

* test: add ntfy smoke evidence images

* fix: validate ntfy endpoint in structured config

* fix: align ntfy endpoint validation
2026-05-13 12:47:46 +08:00
mumu
8a0b093d24 fix: auto repair Docker mount permissions (#1263) 2026-05-11 23:13:37 +08:00
mumu
d2f677fe5b fix(issue-1261): [bug]-docker-部署启动失败 (#1262) 2026-05-11 22:05:09 +08:00
Alfred
9f70705234 feat: 添加 P4 通知降噪机制 (Refs #1200) (#1260)
* feat: add notification noise controls

* docs: clarify notification timezone fallback

* fix: address notification noise review feedback
2026-05-11 07:45:41 +08:00
zbl-96
72da793233 fix(data-provider): skip unavailable optional fetchers and back off longbridge reconnects (#1249)
* fix(data-provider): skip unavailable optional fetchers and back off longbridge reconnects

* fix(data-provider): back off unavailable longbridge routes

* fix(data-provider): back off noisy pytdx name lookups

* docs: align PR 1249 changelog and compatibility notes

* fix(config): preserve legacy schedule override precedence
2026-05-10 23:28:30 +08:00
mumu
595908c81a chore: reorganize root files (#1257)
* chore: reorganize root files

* fix: mark moved docs assets as binary
2026-05-10 19:50:22 +08:00
mumu
fef9dfca68 feat: expose env config backup in web settings (#1253)
* feat: expose env config backup in web settings
2026-05-10 19:03:47 +08:00
mumu
7d44cd0fa7 docs: remove transient PR notes (#1255) 2026-05-10 15:17:41 +08:00
mumu
c325a14b8f Add web market review trigger (#1242)
* feat: add web market review trigger
2026-05-10 15:05:31 +08:00
mumu
caf50cc0bd feat: show home setup status hint (#1243) 2026-05-10 14:02:28 +08:00
mumu
9f4755bda2 Stabilize actionable stock decisions (#1245)
* fix: stabilize actionable decisions
2026-05-10 13:33:48 +08:00
Alfred
0adcef3627 feat: add notification routing strategy (#1248)
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-05-10 13:24:02 +08:00
mumu
d6e4699627 fix: 北交所股票处理差异,异常 (#1234) (#1235)
* fix(issue-1234): [bug]-北交所股票处理差异,异常
2026-05-09 21:48:37 +08:00
mumu
7bb7dc99dd Fix HK historical data provider routing (#1232) 2026-05-09 19:57:42 +08:00
Alfred
8eb5fe4f28 docs: productize webhook body templates (#1200) (#1226) 2026-05-09 19:57:13 +08:00
Alfred
a4a619d49c feat: add web notification channel test (#1200) (#1218) 2026-05-07 19:09:05 +08:00
Alfred
f9549c7f39 fix: add notification baseline diagnostics (#1200) (#1205)
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-05-06 18:46:35 +08:00
Alfred
762c6553c5 docs: improve LLM provider guide for issue 1180 (#1198)
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-05-05 21:22:14 +08:00
mumu
469609e6a5 docs: sync Anspire Open docs and deployment guides (#1195) 2026-05-05 21:13:00 +08:00
mumu
695365b3d8 feat: add Anspire Open LLM support (#1193)
* feat: add Anspire Open LLM support
2026-05-04 23:53:22 +08:00
mumu
650a1c3134 feat: add price change event alerts (#1178)
* feat: add price change event alerts
2026-05-02 22:36:26 +08:00