446 Commits

Author SHA1 Message Date
zhulinsen
03fe7a00a9 feat: 补齐大盘报告与 Web 个股页的概念板块展示 (#1764) (#1778)
* feat(issue-1764): feat:-补齐大盘报告与-web-个股页的概念板块展示

* fix(review-feedback-1778): 确认历史报告 fallback 路径是否完整透传 conceptRankings,否则会出现新字段在部分历史详情/API 场景中静默丢失

* fix: render market review industry and concept rankings side-by-side

* fix: refine related board display and concept ranking cache
2026-06-27 23:07:18 +08:00
hsms4710-pixel
743ca5b1b4 feat: 添加信号归因分析功能 (Issue #1742) (#1796)
* feat: 修复 reviewer blocker 问题

- 同步 agent 路径(executor.py, decision_agent.py)
- 添加 SignalAttribution 字段验证器(自动转换、归零、归一化)
- 更新 docs/CHANGELOG.md
- 添加回归测试(tests/test_signal_attribution.py)
- 修复 notification.py 和模板的 None 值显示问题

Closes #1742

* fix: 修复 signal_attribution 完整契约

Reviewer feedback 指出的完整契约收敛:

## 1. [Correctness] 归一化接入真实 parse 路径
- 问题:Pydantic validator 没有进入主分析路径(dashboard 是 raw dict)
- 修复:将归一化函数移到 src/utils/data_processing.py,
  在 _parse_response() 和 agent runner.py 的 parse_dashboard_json() 中调用
- 确保 LLM 返回的字符串/负数/总和≠100 被正确处理

## 2. [Correctness] 同步 HistoryService 路径
- 问题:_generate_single_stock_markdown() 不读取 signal_attribution
- 修复:在 history_service.py 中添加信号归因展示代码

## 3. [Process] 修复 CHANGELOG.md 格式
- 问题:两行 [Unreleased] 条目拼在同一行
- 修复:分割成独立行

## 4. [验证] 添加真实路径回归测试
- tests/test_signal_attribution_real_paths.py:
  - 归一化函数测试(9个)
  - _parse_response 集成测试(1个)
  - HistoryService 展示测试(2个)

## 5. [Process] 修复 executor.py prompt 模板格式
- 问题:signal_attribution JSON 例子没转义花括号,导致 .format() 报错
- 修复:将 { 转成 {{,} 转成 }}

Co-authored-by: qyj <jiangqiyuan@tencent.com>

* fix: remove trailing whitespace in notification.py and report_schema.py

* fix: converge signal_attribution contract across all paths

- Add signal_attribution to check_content_integrity() as recommended field
- Normalize signal_attribution in _parse_response() and parse_dashboard_json()
- Sync HistoryService._generate_single_stock_markdown() to render signal_attribution
- Update CHANGELOG.md to reflect actual implementation (explicit normalization, not schema-level)
- Add end-to-end tests covering all paths: _parse_response, notification, Jinja2, HistoryService
- Fix tests to accept signal_attribution as recommended field (missing does not fail integrity check)

* fix: address all reviewer blockers

- Fix generate_single_stock_report() to render signal_attribution
- Fix normalization: clamp values to [0, 100], keep all-zero as 0 (not 25)
- Update docs/full-guide.md and docs/full-guide_EN.md with signal_attribution description
- Add supplement tests covering generate_single_stock_report, normalization edge cases, and _parse_response integration

* fix: 修复 CI 静态检查失败和文档表述不一致

- 修复 tests/test_signal_attribution_supplement.py 的 flake8 错误(F821 undefined name 'AnalysisResult')
- 将 AnalysisResult import 移到文件顶部
- 更新 docs/CHANGELOG.md 表述,反映实际行为(all-zero 保留为 0,有效贡献度归一化到 100)
- 所有 40 个 signal_attribution 测试通过

* fix: converge signal attribution runtime contract

* fix: hide empty signal attribution blocks

* fix: reject non-finite signal attribution weights

---------

Co-authored-by: qiyuanjiang <qiyuanjiang@tencent.com>
Co-authored-by: qyj <jiangqiyuan@tencent.com>
Co-authored-by: hsms4710-pixel <228664208+hsms4710-pixel@users.noreply.github.com>
Co-authored-by: zhulinsen <zhuls97@163.com>
2026-06-27 22:41:44 +08:00
zhulinsen
ef9371003c feat: harden JP/KR suffix market support (#1817)
* feat: harden JP/KR suffix market support

* fix: define yfinance index quote metadata

* fix(review-feedback-1817): Handle JP 4-digit bare-code lookup in analysis paths

* fix(review-feedback-1817): Route 4-digit JP bases through API normalization

* fix(review-feedback-1817): 补齐外部 API/provider/运行时配置风险说明或证明该检测为误报
2026-06-27 22:10:08 +08:00
zhulinsen
db5e32306e fix: prefetch portfolio snapshot quotes (#1810)
* fix: prefetch portfolio snapshot quotes

* fix: keep portfolio quote prefetch concurrent

* fix: stop sharing fetcher manager across portfolio quote workers

Previously _prefetch_realtime_position_prices reused a single
DataFetcherManager for all workers when prefetch_realtime_quotes
returned a full count. That count only signals a successful bulk
fetch on the underlying fetcher's module-level cache; it does not
guarantee every per-symbol get_realtime_quote() is a cache hit
(mixed-market portfolios, cache misses, or providers that report
counts loosely). With a shared manager, manager-owned per-fetcher
locks (_call_fetcher_method) re-serialize the cache-miss reads
and re-trigger the #1803 30s timeout the prefetch was meant to
avoid.

Discard the prefetch manager after warming the module-level
fetcher cache and let each worker own its DataFetcherManager.
Independent locks restore true concurrency, while cache hits
still work because the realtime cache is fetcher-module-level.

Add a regression test that exercises len>=5, full-count bulk
prefetch, and a per-symbol fetch path that still blocks; it
verifies a fresh manager per worker and max_active>=2.
2026-06-27 20:38:21 +08:00
zhulinsen
688e980714 fix: show phase decision in default reports (#1807) 2026-06-27 16:46:10 +08:00
zhulinsen
1864b160e4 fix: preserve empty markdown table cells (#1806) 2026-06-27 16:32:34 +08:00
Wenyu Chiou
cb72be7408 feat(market): bring tw to first-class on decision-signal / portfolio / intelligence (service + API + frontend) (#1801)
Follow-up to the #1773 data-layer MVP (Taiwan suffix-only detection + routing,
merged in 2086e3c). That MVP deferred the service/API/frontend layers, leaving a
live defect: tw was absent from the DecisionSignal/Portfolio service VALID_MARKETS,
so _normalize_market("tw") raised ValueError on the decision-signal write path.
The analysis pipeline auto-extracts a DecisionSignal after history save
(_extract_decision_signal_after_history_save), so every tw analysis silently
failed to persist a signal while jp/kr succeeded -- tw was the only
yfinance-supported market that could be analyzed but never produced a signal.

Converge the tw market contract for DecisionSignal + Portfolio + Intelligence in
one pass (mirroring jp/kr #1720), per the human review on #1801 asking not to
land it piecemeal:

Backend service + API:
- src/services/{portfolio,intelligence}_service.py: VALID_MARKETS /
  _ALLOWED_MARKETS + _normalize_market error strings accept tw
- src/services/decision_signal_service.py: _normalize_market error string
  (VALID_MARKETS is imported from portfolio_service, so the set change propagates)
- src/services/decision_signal_extractor.py: drop the now-stale "(e.g. tw)" guard
  comment (tw is supported; the guard still protects genuinely-unsupported markets)
- api/v1/schemas/{decision_signals,intelligence,portfolio}.py: Pydantic Literals + tw
- api/v1/endpoints/decision_signals.py + docs/architecture/api_spec.json: market
  filter description + DecisionSignalMarket enum gain tw; test_api_schema_pydantic
  exact-match vs create_app().openapi() passes (api_spec kept CRLF)

Frontend (DecisionSignal + Portfolio typed consumers only; tsc + vitest pass):
- apps/dsa-web/src/types/{decisionSignals,portfolio}.ts + pages/{DecisionSignalsPage,
  PortfolioPage}.tsx + utils/{decisionSignalLabels,stockCode}.ts + i18n/uiText.ts:
  add tw to the DecisionSignalMarket / portfolio market unions, the market filter
  options, the tw display label, and .TW/.TWO stock-code normalization
- the alert Market-Light surface (types/alerts.ts MarketRegion, featureText
  ALERT_MARKET_REGION_*) is intentionally LEFT OUT: the backend market_light_service
  is cn/hk/us only, so exposing tw there would be a front/back mismatch

Tests:
- flip the two #1773 graceful-skip regressions to first-class assertions and add
  test_extract_and_persist_writes_tw_signal (end-to-end persist guard)
- frontend: PortfolioPage + stockCode vitest gain tw cases

Docs (reconcile the tw contract so changelog/topic docs/code state one fact):
- docs/CHANGELOG.md: rewrite the #1772 [Unreleased] entries so they no longer say
  "service/API deferred" + "tw gracefully skipped" alongside "tw now supported"
- docs/market-support.md, docs/decision-signals.md, docs/intelligence-sources.md:
  sync the tw market enum / filter / examples; keep the boundary note

Still deferred (separate follow-ups): the Taiwan stock-index/seed + Web autocomplete,
and the alert (大盘红绿灯) Market-Light tw support (needs a market_light backend change).

Refs #1772
2026-06-26 21:21:38 +08:00
Wenyu Chiou
2086e3cca4 feat(market): Taiwan (台股) suffix-only market detection + routing (#1773)
Per the maintainer review on #1772/#1773, scope this PR to market detection
and data routing only — no Taiwan stock-index / seed / pool-resolution, so a
bare code can never be silently rewritten to a .TW suffix (the index path is a
deferred follow-up with the jp/kr-style honest doc + entry-point tests).

- data_provider/base.py: _is_tw_market / _is_tw_suffix_stock, _market_tag,
  normalize_stock_code, get_daily_data + get_realtime_quote routing,
  _DAILY_MARKET_FETCHER_SUPPORT (YfinanceFetcher only), offshore fundamental path
- data_provider/yfinance_fetcher.py: _get_tw_main_indices (^TWII / ^TWOII) +
  .TW/.TWO suffix passthrough
- src/core/trading_calendar.py: XTAI / Asia/Taipei + get_market_for_stock
- src/market_context.py: detect_market + Taiwan prompt guidelines
- src/{market_phase_summary, services/stock_code_utils, core/pipeline}: tw plumbing
  (stock_code_utils only recognizes .TW/.TWO codes; no bare->suffix rewrite)
- src/services/decision_signal_extractor.py: gracefully skip tw (recognized by
  the data layer but not yet supported by the signal service) — no swallowed
  ValueError + traceback
- tests: test_tw_market_support.py + test_decision_signal_extractor.py
  (test_build_payload_skips_tw_market_gracefully — real tw skip regression)
- docs/market-support.md + CHANGELOG

Deferred follow-ups: stock index/seed + autocomplete + frontend, API market
enums + api_spec, and the service-layer market enums.

Bare numeric codes keep A-share semantics; only an explicit .TW/.TWO suffix
opts into Taiwan.

Refs #1772
2026-06-25 22:55:08 +08:00
zhulinsen
b308e44827 fix: repair backtest empty result handling (#1779) 2026-06-24 21:52:07 +08:00
zhulinsen
0344901c6b fix: keep decision signal details out of summaries (#1781) 2026-06-24 21:51:32 +08:00
Alfred
1f91024dec feat: 新增 codex_cli 本地生成后端 Phase2 (#1769)
* feat: add codex cli generation backend

* fix: harden local CLI backend phase 2

* fix: harden local cli output file handling

* fix: tighten codex cli backend contracts

* fix: support codex cli windows smoke path

* fix: make local cli tests portable on windows

* fix: avoid duplicate codex final output accounting
2026-06-24 20:19:19 +08:00
Alfred
2f75e832e3 feat: 添加 GenerationBackend Phase 1 抽象 (#1751)
* feat: add generation backend abstraction

* fix: tighten generation backend phase1 contract

* fix: preserve market review backend config errors
2026-06-22 22:42:53 +08:00
Alfred
df09b7ccf4 feat: add provider prompt cache controls (#1744) 2026-06-22 20:50:54 +08:00
mumu
ecd026e958 fix: docker重新部署时,.env设置里的通知变量$content_jso… (#1739) (#1741)
* fix(issue-1739): [bug]-docker重新部署时,.env设置里的通知变量$content_j

* fix(review-feedback-1741): escape/unescape the braced forms too, or reject them before persisting

* fix(review-feedback-1741): preserve braced templates during env import

* fix(review-feedback-1741): 澄清外部模型/API 配置风险提示是否命中真实 diff

* fix(review-feedback-1741): limit raw parsing to CUSTOM WEBHOOK BODY TEMPLATE or re-apply the
2026-06-22 20:49:37 +08:00
mumu
f2e778c058 feat: 支持客户端多时间定时推送 (#1731)
* feat: support runtime multi-time scheduling

* fix(review-feedback-1731): 修复 and add the missing workers value here, likely None to preserve the

* fix: refine scheduler settings UI

* fix: compact scheduler time inputs

* fix(review-feedback-1731): Refresh scheduler status after saving changes

* fix(review-feedback-1731): Refresh scheduler status after env imports

* fix(review-feedback-1731): Do not mark swallowed analysis failures as success

* fix: align serve scheduler ownership

* fix: preserve runtime scheduler startup semantics

* fix: ignore immediate run when cli owns schedule

* fix(review-feedback-1731): main.py + api/app.py:--serve-only 下虽然 runtime schedule requested 被置为

* fix(review-feedback-1731): apps/dsa-desktop/main.js / main.py / api/app.py / src/services/runtime

* fix: preserve runtime scheduler ownership semantics

* fix(review-feedback-1731): 修正 Desktop 启动会自动分析/调度,以及 Web 调度开关在 runtime 状态与持久配置不一致时无法触发 reconcile 的问题

* fix: remove duplicate scheduler save diff variable

* fix: allow empty schedule times config

* fix: reject busy scheduler run-now requests

* fix(review-feedback-1731): 确认并修正 runtime scheduler 重建时可能重复注册 AGENT EVENT MONITOR ENABLED 后台任务的问题

* fix: keep runtime event monitor idempotent

* fix: preserve runtime scheduler CLI flags

* fix(review-feedback-1731): preserve schedule CLI flags in runtime runs

* fix(review-feedback-1731): 修正 --serve --schedule / --serve + SCHEDULE ENABLED=true 下 API

* fix(review-feedback-1731): 修复当前 diff 引入的运行时并发风险和 Uvicorn 兼容风险
2026-06-21 22:24:19 +08:00
mumu
3b1daa4fe1 fix: handle result-only market phases in history summaries (#1732) 2026-06-21 14:33:36 +08:00
mumu
0ab94a8c3e fix: support KR stock autocomplete suggestions (#1723)
* fix: support KR stock autocomplete suggestions

* fix(review-feedback-1723): 补充自动补全 JP/KR 建议渲染截图、前后对比或无法截图说明

* fix(review-feedback-1723): 补充 Web 自动补全 JP/KR 建议渲染的截图或无法截图说明

* fix(review-feedback-1723): docs/review-evidence-kr-autocomplete-ui.md 是针对本 PR

* fix(review-feedback-1723): 修正 PR 描述与当前 head 的实际改动、验证范围不一致问题

* fix(review-feedback-1723): 修正 PR 描述与当前 diff 的实质性不一致,避免合入记录误导后续维护者

* fix(review-feedback-1723): 收敛 PR 描述与实际 diff 的契约不一致,避免用户误以为裸 005930 已会解析为 005930.KS

* fix(review-feedback-1723): 把描述、验证证据和兼容性说明收敛到当前 6 个改动文件真实范围,或补齐描述中声称的后端/历史链路实现与测试

* fix(review-feedback-1723): 收敛 PR 描述与实际 diff,避免把未实现的 bare-code/历史展示能力作为本 PR 已交付内容合入

* fix(review-feedback-1723): 补上相应真实代码与测试后再审

* fix(review-feedback-1723): 补齐所声称的后端实现与测试后再评审

* fix(review-feedback-1723): PR description 与当前完整 diff 不一致:描述声称新增 bare JP/KR code

* fix(review-feedback-1723): PR 描述与当前完整 diff 不一致

* fix(review-feedback-1723): 补充 Refs 1718,方便后续追踪

* fix(review-feedback-1723): 收敛描述与验证证据

* fix: resolve JP KR bare stock codes

* fix: backfill JP KR daily analysis context

* fix(review-feedback-1723): preserve persisted phase timing

* fix: align JP KR history lookup keys

* fix(review-feedback-1723): preserve raw code for snapshot lookups

* fix(review-feedback-1723): 收敛
2026-06-20 10:39:40 +08:00
Alfred
dda5269123 fix: address P6 signal linkage gaps (#1724) 2026-06-19 23:04:52 +08:00
mumu
9ea2dab7ad fix: backfill report decision signals (#1719)
* fix: backfill report decision signals

* fix(review-feedback-1719): 确认并修复“不明确建议”可能被默认回填成 hold 信号的正确性风险 and persist the report date in

* fix(review-feedback-1719): 修复 legacy decision type 被当作明确 action 导致误回填的问题

* fix(review-feedback-1719): Prevent stale backfills from staying active

* fix(review-feedback-1719): anchor the same metadata-based TTL that default expires at uses to the

* fix(review-feedback-1719): 修复或明确处理懒回填时间锚点的时区/时间域不一致风险
2026-06-19 13:26:52 +08:00
mumu
e49301a79f feat: 支持日本/韩国 suffix-only 个股分析 (#1720)
* feat: support JP/KR suffix stock analysis

* fix(review-feedback-1720): 解决冲突后再合入
2026-06-19 11:59:59 +08:00
Alfred
cc98a26cf1 feat: add legacy message stability audit (#1716) 2026-06-19 09:44:09 +08:00
Alfred
a7876fe11c feat: link decision signals with alerts and portfolio risk (#1715)
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-06-19 09:43:40 +08:00
mumu
626b63c144 feat: feed intelligence sources into analysis contexts (#1709)
* feat: add intelligence source ingestion baseline

* feat: feed local intelligence into analysis contexts

* fix(review-feedback-1708): Reject DNS names that resolve privately and Validate redirect targets

* fix(review-feedback-1709): 处理大盘复盘本地资讯可能被搜索结果截断掉的问题,并澄清结构化检测到的外部模型/API 或运行时配置风险是否为真实变更

* fix(review-feedback-1708): Pin DNS resolution before fetching and Stream feeds before enforcing

* fix(review-feedback-1709): filter by published at for analysis evidence, or keep missing publish

* fix(review-feedback-1708): Sanitize fetch errors before returning them and Normalize nullable

* fix(review-feedback-1709): Normalize symbol scope before lookup

* fix(review-feedback-1708): Avoid rolling back prior item inserts on duplicate races and Reject

* fix(review-feedback-1709): Use the effective news window for local evidence and add the plain

* fix(review-feedback-1708): 落地可配置 RSS/Atom 情报源、存储、查询、retention 和基础安全边界

* fix(review-feedback-1709): 补充“revert 本 PR 或移除本地资讯接入入口/清退本地资讯源配置数据”级别说明即可

* fix(review-feedback-1708): 落地 RSS/Atom 情报源的存储、拉取、查询、retention 和基础安全边界

* fix(review-feedback-1709): 补 Refs 1707

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

* fix(review-feedback-1709): src/services/intelligence service.py 回退了资讯源 URL 安全防护:移除了 hostname DNS

* fix: harden intelligence source ingestion

* fix(review-feedback-1709): Sanitize upstream fetch errors before returning them

* feat: add NewsNow intelligence sources

* fix(review-feedback-1709): 确认并修复

* fix(review-feedback-1709): 补一个未命中敏感规则的异常回归测试

* fix(review-feedback-1709): 处理

* docs: enhance NEWSNOW_BASE_URL compatibility guidance with official links

- Add official NewsNow GitHub deployment guide link to .env.example
- Include curl-based API contract verification example for production validation
- Update CHANGELOG.md with official repository reference and deployment recommendation
- Clarify risk of public example instance and necessity for self-hosted in production
- All HTTP 500 responses already use sanitize_diagnostic_text for privacy

Ref #1707
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(review-feedback-1709): 补齐官方 NewsNow 实例链接文档或 API 契约确认,明确指出公开实例风险(需结合当前部署指南文档,更新 .env.example

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-19 09:42:42 +08:00
mumu
0ed601022f fix: 升级 AlphaSift 并兼容热点详情龙头股字段 (#1714)
* fix: update AlphaSift pin and hotspot detail fields

* fix(review-feedback-1714): fix still returning no concept stocks despite the leaders being
2026-06-19 09:28:32 +08:00
mumu
cd37608506 feat: add intelligence source ingestion baseline (#1708)
* feat: add intelligence source ingestion baseline

* fix(review-feedback-1708): Reject DNS names that resolve privately and Validate redirect targets

* fix(review-feedback-1708): Pin DNS resolution before fetching and Stream feeds before enforcing

* fix(review-feedback-1708): Sanitize fetch errors before returning them and Normalize nullable

* fix(review-feedback-1708): Avoid rolling back prior item inserts on duplicate races and Reject

* fix(review-feedback-1708): 落地可配置 RSS/Atom 情报源、存储、查询、retention 和基础安全边界

* fix(review-feedback-1708): 落地 RSS/Atom 情报源的存储、拉取、查询、retention 和基础安全边界
2026-06-18 21:43:33 +08:00
Alfred
1f9ce289d2 feat: 新增 DecisionSignal 反馈、后验验证与统计 P5 (#1710)
* feat: add decision signal outcomes and feedback

* fix: align outcome filters and retry rotation
2026-06-18 21:23:11 +08:00
Alfred
4fa81a421c feat: add legacy LLM usage telemetry (#1698) 2026-06-17 18:46:01 +08:00
Amorend
ef7264f76a feat: add token usage dashboard (#1667)
* feat: add token usage dashboard

* fix: correct usage metadata inference

* refactor: scope token usage dashboard

* fix: guard token usage period refresh

* fix: polish token usage dashboard i18n

---------

Co-authored-by: knight0940 <evilgenius0256@gmail.com>
Co-authored-by: zhulinsen <zhuls97@163.com>
2026-06-15 22:33:01 +08:00
Alfred
c0321de3f5 feat: 补齐 #1390 P3 决策信号生命周期与去重 (#1692)
* Implement decision signal lifecycle deduplication

* Fix API router prefix compatibility

* Fix null decision signal expiry defaults
2026-06-15 20:32:54 +08:00
mumu
e126c7913a fix: 增强 AlphaSift 热点题材缓存回退 (#1691)
* fix: harden alphasift hotspot fallback

* fix(review-feedback-1691): either copy directories recursively or enumerate the cache files and

* fix: address alphasift hotspot review feedback

* fix(review-feedback-1691): route the migration through the new recursive helper or explicitly and

* fix(review-feedback-1691): only use the new friendly refresh-failure message here, or localize
2026-06-14 20:35:10 +08:00
mumu
3b5ef16144 feat: harden AlphaSift data source routing (#1680)
* feat: harden alphasift data source routing

* fix(review-feedback-1680): Keep the sample AlphaSift pin in sync and Avoid circuit-breaking

* fix(review-feedback-1680): Defer half-open health checks until a source is attempted and Treat

* fix(review-feedback-1680): fix only bypasses this branch for fetchers that opt into allow empty

* fix(review-feedback-1680): Avoid accepting truncated Tencent histories

* fix(review-feedback-1680): 修正 .env.example 的 AlphaSift 快照源默认说明,并避免在 docs/CHANGELOG.md

* fix(review-feedback-1680): src/config.py、src/services/alphasift service.py

* fix(review-feedback-1680): requirements.txt、src/config.py、.env.example、src/services/alphasift

* fix(review-feedback-1680): 修复 TencentFetcher 对显式历史窗口的处理问题

* fix(review-feedback-1680): Check the cap was hit before rejecting Tencent history

* fix(review-feedback-1680): Use Tencent's hyphenated date format and Convert Tencent daily volume

* fix(review-feedback-1680): Accept the executor timeout argument and preserve capped windows with

* fix: limit empty daily data opt-in behavior

* docs: restore AlphaSift 3.22 changelog entry
2026-06-14 18:47:41 +08:00
Alfred
6d4c93d2b7 feat: extract decision signals from analysis reports (#1686) 2026-06-14 18:26:30 +08:00
LouisHong
145ee6b5a5 fix: [issue #1652] stabilize run-flow live states and layout polish (#1682)
* fix: polish run-flow topology layout and i18n

* fix: prevent task panel layout squeeze

* test: update run flow frontend coverage

* fix: isolate market context run flow

* fix: handle completed task flow refresh

* feat: show running run-flow nodes

* fix: show chip provider runs in flow

* fix: stabilize stock run flow live updates

* fix: refine run-flow history lookup and spacing

* fix: update run-flow edge states and layout gaps

* fix: polish run-flow task panel text
2026-06-14 17:57:16 +08:00
mumu
a81dc3b4af fix: optimize alphasift hotspot details (#1677) 2026-06-13 18:57:43 +08:00
mumu
89fab774f6 fix: 过滤低质量股票新闻结果 (#1674)
* fix: filter low-quality stock news results

* fix: filter adult spam news results

* fix(review-feedback-1674): Require content evidence before dropping URL-only hits and Match

* fix(review-feedback-1674): Move admission filtering before dimension limiting

* fix(review-feedback-1674): Match app/download terms as tokens before filtering

* fix(review-feedback-1674): Recognize Chinese numeric ratings in app-page filter

* fix(review-feedback-1674): 收敛后再合入

* fix(review-feedback-1674): 收敛后再合入

* fix: tighten stock news admission signals

* fix: narrow noisy news admission heuristics

* fix: handle app metric news admission

* fix: require context for app listing spam

* fix: preserve app metric news results

* fix: require strong app spam evidence

* fix: honor official source labels

* fix: preserve official labels and app metrics

* fix: detect separated adult contact ids

* fix: preserve app metrics and service news

* fix: match alphanumeric adult contacts

* fix: require adult spam solicitation signals

* fix: preserve neutral mobile app metrics

* fix: reduce app and adult false positives
2026-06-13 15:19:44 +08:00
mumu
ecc370e50b feat: adapt AlphaSift hotspot contract (#1675)
* feat: adapt alphasift hotspot contract

* fix(review-feedback-1675): update sample install spec with new allowed pin

* fix(review-feedback-1675): 补充 “revert 本 PR / 恢复旧 AlphaSift pin” 级别的回滚说明,并明确无关联 issue 或补充 Refs

* fix: harden alphasift hotspot metadata migration

* fix(review-feedback-1675): preserve hotspot route events in the new detail path

* fix(review-feedback-1675): 修正旧 AlphaSift pin 回滚/重装路径说明,避免运维按文档操作时被 install allow-list 拒绝

* fix(review-feedback-1675): src/services/alphasift service.py:当 AlphaSift v2 detail payload

* fix(review-feedback-1675): 补对应回归测试
2026-06-13 14:46:18 +08:00
mumu
a82ae51ca8 feat: enable daily market context by default (#1673) 2026-06-13 10:58:18 +08:00
mumu
716128d1d2 fix: avoid live AlphaSift hotspot import on cache miss (#1671) 2026-06-13 10:34:07 +08:00
mumu
0db0c78da8 feat: 个股分析接入当日大盘上下文 (#1623)
* feat: add daily market context for stock analysis

* fix(review-feedback-1623): Share the market context service across worker threads and Use the

* fix(review-feedback-1623): Avoid overwriting per-region context reports and Expand history lookup

* fix(review-feedback-1623): add position even though the guardrail supposedly softened the

* fix(review-feedback-1623): Avoid generating the CLI market review twice

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

* fix(review-feedback-1623): 修复普通 CLI/调度运行中大盘复盘被上下文预热摘要替代的问题,并收敛 PR 描述与当前实现范围

* fix(review-feedback-1623): 修正保守护栏的误判风险,并同步收敛 PR 描述范围

* fix(review-feedback-1623): 处理并发生成大盘上下文的锁语义风险,并澄清/补充外部模型或运行时配置风险检测的依据

* fix(review-feedback-1623): 收敛大盘上下文预热对用户可见大盘复盘的行为影响,并补齐外部模型/API 与运行时配置检测风险的澄清或验证证据

* fix(review-feedback-1623): Do not skip multi-market reviews after one cached context and Do not

* fix(review-feedback-1623): Prime context with the effective trading date

* fix(review-feedback-1623): 收敛 PR 描述与实际 diff 的范围不一致,并澄清结构化检测提示的 provider/model/base

* fix(review-feedback-1623): 补一句“本 PR 不修改 LLM provider/model/base url、默认模型、配置清理或迁移逻辑”,避免后续审查继续误判

* fix(review-feedback-1623): 收敛 PR 描述与实际 diff 的范围矛盾

* fix(review-feedback-1623): 补齐这些承诺的实现

* fix(review-feedback-1623): 收敛 PR 描述与实际 diff 范围,避免以未实现能力作为验收项

* fix(review-feedback-1623): 收敛 PR 描述与实际范围,并澄清外部模型/API 与运行时配置检测风险

* fix(review-feedback-1623): Match freshly saved reviews to the target trade date

* fix(review-feedback-1623): preserve structured market-light risk signals

* fix(review-feedback-1623): Escape market-summary sentinels before prompting

* fix(review-feedback-1623): 修复同日缓存复用时把低敏摘要当完整大盘复盘输出的行为风险,并收敛 PR 描述与实际 diff

* fix(review-feedback-1623): 收敛

* fix(review-feedback-1623): 收敛 PR 描述与实际 scope

* fix(review-feedback-1623): 修正大盘复盘复用语义,并让 PR 描述与实际 scope 对齐

* fix(review-feedback-1623): 修正同日大盘上下文缓存复用语义,并让 PR 描述与实际 scope 对齐

* fix(review-feedback-1623): Disable cached market context when skipping market review

* fix(review-feedback-1623): 收敛 PR 描述与实际 scope,并补充外部模型/API 与运行时配置语义未变化的可核验证据

* fix(review-feedback-1623): 修正 PR 描述与实际 scope 的实质性不一致,并补齐或澄清 LLM/provider/model/base URL

* fix(review-feedback-1623): 修正 operation advice 契约漂移,并让 PR 描述/验收范围与当前实际 diff 对齐

* fix(review-feedback-1623): 收敛 main.py 中大盘复盘复用导致的通知/执行语义变化,并补对应回归测试

* fix(review-feedback-1623): 修复生成型大盘上下文未绑定当前 query id 的行为风险,并收敛 PR body 与实际 diff 范围

* fix(review-feedback-1623): 修复缓存语言匹配问题,并收敛 PR 描述与实际 diff/验收范围的一致性

* fix(review-feedback-1623): 收敛当前实现与描述/文档中的验收边界,并澄清 schedule/CLI 首次运行无历史大盘复盘时是否应生成并注入上下文

* fix(review-feedback-1623): 收敛 PR 描述与 docs/CHANGELOG.md 中关于验收边界的表述,避免与实际 diff 实质性矛盾

* fix(review-feedback-1623): 修正 PR 描述与实际 diff 的范围漂移

* fix(review-feedback-1623): Reuse the cached runtime market context on fallback

* fix(review-feedback-1623): PR 描述:当前完整改动文件列表没有 api/ 、apps/dsa-web/ 、日报状态表或四阶段日报持久化相关实现,但 PR

* fix(review-feedback-1623): 收敛描述范围

* fix(review-feedback-1623): 收敛并发生成复用路径的正确性风险,并修正 PR 描述的实际范围与验收项

* fix(review-feedback-1623): 收敛描述和验收范围

* fix(review-feedback-1623): PR 描述的 Background / Acceptance Criteria 仍包含独立 API、Web

* fix(review-feedback-1623): 收敛 PR 描述与实际实现边界,并补齐 LLM/provider/base url 相关兼容性说明或验证证据

* fix(review-feedback-1623): PR 描述与实际 diff 范围不一致:描述和验收项仍写有独立 API、Web

* fix(review-feedback-1623): Wait long enough for in-flight market reviews

* fix(review-feedback-1623): 修复共享 market review lock 释放后仍不生成匹配上下文的行为风险,并同步收敛 PR description 的实际范围

* fix(review-feedback-1623): 修复锁竞争 fallback 下丢失运行时服务的问题,并同步收敛 PR description 与实际 diff 范围

* fix(review-feedback-1623): 收敛 PR description 与实际改动范围

* fix(review-feedback-1623): PR 描述与实际 diff 存在实质性矛盾:描述声称提供独立 API、Web

* fix(review-feedback-1623): reuse runtime market context and handle English negations

* fix: honor daily market context config

* docs: remove unrelated changelog entries

* fix(review-feedback-1623): preserve the skipped market-review artifact

* fix(review-feedback-1623): add low position cap and are not in CONSERVATIVE TEXT MARKERS , so an
2026-06-13 10:33:04 +08:00
mumu
4b3f679b2d feat: adapt AlphaSift hotspot topics (#1635)
* feat: adapt AlphaSift hotspot topics

* fix(review-feedback-1635): preserve cached hotspots when refresh returns no rows and Avoid

* fix(review-feedback-1635): Reload detail when refreshing the selected hotspot and Fall back when

* fix(review-feedback-1635): update by the requested topic or a request token

* fix(review-feedback-1635): preserve analysis when optional serve startup fails and Fall back when

* fix(review-feedback-1635): 当前 CI 状态为 failure,且 backend-gate 为 cancelled、docker-build 为 skipped

* fix(review-feedback-1635): 让 backend-gate / docker-build 在当前 head 上完成并通过,或给出可接受的维护者级豁免说明

* fix(review-feedback-1635): 当前 CI 仍未闭环:结构化事实显示 backend-gate 被取消、docker-build skipped

* fix(review-feedback-1635): 修复 hotspot detail 的上游 schema 容错问题,并让当前 head 的阻断 CI 重新跑通

* fix(review-feedback-1635): docs/CHANGELOG.md:当前 diff 不是在 [Unreleased] 扁平格式下追加本 PR

* fix(review-feedback-1635): CI 闭环未完成:结构化事实显示当前 CI 状态为 failure,backend-gate cancelled、docker-build

* fix(review-feedback-1635): 让当前 head 的阻断型 CI 完整通过,并修正文档中的 AlphaSift commit hash 不一致

* fix(review-feedback-1635): CI 仍未在当前 head 完整通过:结构化事实显示

* fix(review-feedback-1635): 修复 docs/CHANGELOG.md 对主线既有 [Unreleased] 条目的删除,并补齐 AlphaSift

* fix(review-feedback-1635): Accept slash-containing hotspot topics

* fix(review-feedback-1635): Try industry constituents for industry hotspots

* fix(review-feedback-1635): Clear old hotspot details when loading a new topic and preserve the

* test: isolate main schedule environment

* chore: clean AlphaSift PR scope

* fix: respect AlphaSift hotspot fallbacks
2026-06-12 22:38:42 +08:00
LouisHong
efa41e0ada feat: [issue #1652] add live run-flow diagnostics (#1656)
* feat: add live run-flow updates and diagnostics

* feat: update task status filter to include 'cancel_requested'

* feat: enhance run-flow diagnostics and task management with cancel-requested status handling

* fix: stabilize run flow live updates

* fix: align live run-flow review contracts

* fix: sanitize live run-flow events
2026-06-12 20:58:58 +08:00
LouisHong
fa9d9b0084 feat: [issue #1652] add run-flow snapshot contract and APIs (#1653)
* feat: add run-flow snapshot contract and APIs

* fix: address run-flow contract review notes

---------

Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-06-10 22:50:35 +08:00
volcanoAlbert
f587459ed1 feat: add portfolio account archive action 持仓管理页面添加账户删除功能 (#1647)
* feat: add portfolio account archive action

* fix: exclude archived accounts from risk snapshots
2026-06-10 22:48:08 +08:00
Alfred
ad15ebcec5 feat: 新增 DecisionSignal 持久化 API(#1390 P1) (#1645)
* feat: add decision signal persistence api

Refs #1390

* fix: handle HK decision signal filters without market
2026-06-10 22:46:33 +08:00
Alfred
da274f7061 fix: 锁定问股追问的当前标的上下文 P2 (#1619)
* fix: keep ask-stock follow-ups scoped

* fix: normalize watchlist stock comparisons

* docs: document watchlist stock code equivalence

* fix: tighten ask-stock tool scope guard

* fix: close ask-stock review gaps

* fix: close ask-stock review gaps
2026-06-10 22:45:58 +08:00
LouisHong
4f536026f8 fix: clarify runtime logging context (#1643)
* fix: clarify market review logging context

* docs: update changelog for logging context
2026-06-09 01:08:55 +08:00
Alfred
ff6494b5d7 feat: 新增建议动作 taxonomy 字段边界 P0 (#1631)
* feat: add decision action taxonomy fields

* fix: tighten decision action fallback handling

* fix: align legacy decision action guard fallback

* fix: tighten legacy decision action word boundaries

* fix: align decision action compound parsing

* fix: clean decision action residue

* fix: align web action label contract

* fix: classify avoided sell actions as hold
2026-06-08 07:24:07 +08:00
mumu
d704fe377d feat: add Web UI language switch (#1621)
* feat: add Web UI language switch

* fix(review-feedback-1621): 补充 zh/en 切换后的登录页、首页、设置页和侧边导航截图或可访问构建预览证据

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

* fix(review-feedback-1621): Pin the smoke test's initial language

* fix(review-feedback-1621): Web UI 改动缺少截图或等价可视证据

* fix(review-feedback-1621): 补一个 storage accessor 抛错时 fallback 到 zh 或 navigator 语言的回归测试

* fix(review-feedback-1621): 修复前端 lint/build 失败并补齐 Web 验证证据

* fix(review-feedback-1621): apps/dsa-web/ :本 PR 新增语言切换入口并改动

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

* fix(review-feedback-1621): 解决冲突,并补齐 Web UI 变更的可视证据与 Web 侧验证说明

* fix(review-feedback-1621): 解决冲突并重新确认 diff 与 CI 结果

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

* fix(review-feedback-1621): add a file-level test

* fix: complete Web UI language switch evidence

* fix(review-feedback-1621): 确认设置页英文字段 label 语义回归、Playwright smoke locale 稳定性,以及结构化检测命中的外部模型/API

* fix(review-feedback-1621): 修正 PR 描述与实际实现不一致,并补齐 Playwright smoke 验证结果或明确未执行原因

* fix: complete web language behavior

* fix(review-feedback-1621): src/services/task queue.py / src/services/analysis service.py /

* fix: honor market review request language

* fix(review-feedback-1621): Keep UI language from overriding report language and Use localized

* fix(review-feedback-1621): docs/full-guide.md / docs/full-guide EN.md 把 PR 评审证据、执行命令、沙箱

* fix(review-feedback-1621): 修正 PR 描述与当前实现不一致的问题,并补齐运行时模型配置相关的兼容性/迁移证据

* fix(review-feedback-1621): 收敛后再合入
2026-06-06 21:45:20 +08:00
mumu
1e94490953 fix: widen analytical intel search lookback (#1615)
* fix: widen analytical intel search lookback

* fix(review-feedback-1615): 澄清或修正分析类 180 天目标窗口在 provider 粗粒度映射下可能实际扩大到 1 年的问题
2026-06-06 06:49:38 +08:00
mumu
2f26042b05 fix: 报告页运行诊断与输入数据块状态口径不一致 (#1602) (#1603)
* fix(issue-1602): [bug]-报告页运行诊断与输入数据块状态口径不一致

* fix: clarify report diagnostics evidence scope

* fix(review-feedback-1603): 更新 PR body,使范围、验证、兼容性风险和回滚说明与当前 head 一致
2026-06-05 23:19:52 +08:00