Commit Graph

110 Commits

Author SHA1 Message Date
2569718930@qq.com 6eca1da3f9 修复测试:aurora→denver 城市 key 重命名后更新断言 2026-05-14 01:27:04 +08:00
2569718930@qq.com 203094a97c 修复测试:移除 momentum_spike 断言 + Python 3.8 类型兼容
build_trading_alerts 已移除 momentum_spike 规则,对应测试也更新。
get_airport_obs_recent 返回类型改用 List[Dict] 兼容 3.8。

Tested: pytest 176 passed
2026-05-12 19:13:06 +08:00
AmandaloveYang 55bb06d213 移除 Masroor Air Base 机场城市(数据源、别名、时区、前端面板、文档、测试)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 16:39:04 +08:00
AmandaloveYang 9ff2a99618 修复测试:guard mock 补充 check_daily_query_limit 方法
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 14:24:35 +08:00
2569718930@qq.com 23e5d10f65 Fix Korean AMOS runway parsing 2026-05-10 19:34:18 +08:00
2569718930@qq.com f4f613ad02 Fix AMOS runway observations 2026-05-10 19:20:52 +08:00
2569718930@qq.com 3e14a23e02 修复 markets 测试:移除对已删除函数 build_market_monitor_digest 的 monkeypatch
Tested: python -m pytest tests/test_bot_basic_handler.py -xvs
2026-05-07 22:27:12 +08:00
2569718930@qq.com 2183c0399d 移除错误定价信号和市场聚焦摘要功能
保留关键市场警报推送(4 条触发规则不变),
移除 mispricing 信号分类/推送、focus digest 评分/聚合/定时推送、
/markets 手动查询等全套逻辑,净删除 1049 行。
2026-05-07 21:42:06 +08:00
2569718930@qq.com 4ed9321756 修复流式 AI 请求 max_tokens 不足导致 JSON 截断
此前流式 650 tokens,只够 4 个文字字段。新增 predicted_max
等 6 个字段后,中文解读经常超出上限致 JSON 不完整,触发重试。
现提升至 900 tokens(主请求 1200),并更新测试断言。
2026-05-06 16:51:31 +08:00
2569718930@qq.com c296bbb789 AI 机场报文解读流式请求增加最高温预测输出
此前 build_city_ai_stream_request 只要求 AI 输出 metar_read + reasoning,
明确禁止生成 predicted_max/range/confidence 等数值字段,流式解读只有
文字没有温度预测。现在让流式请求同步输出 predicted_max、range_low、
range_high、unit、confidence、final_judgment,使前端报文解读面板能
直接展示 AI 预测的今日最高温及置信区间。
2026-05-06 15:38:58 +08:00
2569718930@qq.com 96dfb4c5b3 This version of Antigravity is no longer supported. Please upgrade to receive the latest features. 2026-04-30 09:50:17 +08:00
2569718930@qq.com f0436f498a This version of Antigravity is no longer supported. Please upgrade to receive the latest features. 2026-04-29 21:10:56 +08:00
2569718930@qq.com 6da72b5488 This version of Antigravity is no longer supported. Please upgrade to receive the latest features. 2026-04-29 19:10:25 +08:00
2569718930@qq.com 5b32e71f5d This version of Antigravity is no longer supported. Please upgrade to receive the latest features. 2026-04-29 18:52:55 +08:00
2569718930@qq.com 20516000a2 Clarify scan terminal service boundaries
The scan terminal service had accumulated cache, payload, filtering, AI prompt, AI merge, METAR gate, ranking, and city-row construction details in one file. This splits those stable responsibilities into focused modules while preserving the endpoint payload shape and existing behavior.

Constraint: User-visible behavior and release version must remain unchanged for this internal refactor

Rejected: Rewrite the terminal scan flow around a new abstraction | too risky while production behavior is being stabilized

Confidence: high

Scope-risk: moderate

Directive: Keep scan_terminal_service.py as orchestration; add detailed rule changes to the focused modules instead of re-growing the service file

Tested: py_compile for extracted modules; ruff check .; pytest tests/test_scan_terminal_modules.py tests/test_web_observability.py; full pytest; npm run test:business; npm run build; git diff --cached --check
2026-04-28 17:13:45 +08:00
2569718930@qq.com 89a71d1bc0 Add Qingdao to the tradable city network
Qingdao needs the same airport-settlement path as the other Wunderground-backed APAC cities, so the registry, aliases, timezone, prewarm, official links, market focus, and tests now point to ZSQD / Qingdao Jiaodong International Airport.

Constraint: User supplied Wunderground Qingdao/ZSQD settlement URL.
Rejected: Add a partial registry-only entry | it would show in APIs without frontend links, prewarm coverage, or alias support.
Confidence: high
Scope-risk: narrow
Reversibility: clean
Tested: pytest tests/test_country_networks.py tests/test_web_observability.py::test_cities_endpoint_includes_new_wunderground_cities -q
Tested: npm run build
Not-tested: Live Wunderground fetch for ZSQD in production.
2026-04-28 07:08:33 +08:00
2569718930@qq.com 0c9b07faaf Keep provider reads behind deterministic evidence guards
DeepSeek can return a polished city forecast that conflicts with already-computed stale-observation, observed-break, or peak-window evidence. The completion path now carries the deterministic fallback guard state and overwrites only the critical fields when provider text or numbers contradict those local facts.

Constraint: Airport-read latency optimization keeps provider output narrow, so backend completion remains the authority for final highs and evidence conflicts.

Rejected: Trust provider final wording when present | it can reintroduce stale METAR anchors or miss observed high breaks.

Confidence: high

Scope-risk: narrow

Tested: pytest tests/test_web_observability.py -q

Tested: npm run build
2026-04-28 06:36:33 +08:00
2569718930@qq.com 0eab2fe628 Treat stale observations as weak evidence
City-card fallback reads now stop using stale METAR or official observations as strong live anchors. A stale observation no longer forces high/low revisions, and both backend and browser AI cache keys include the observation fingerprint so updated report times, receipt times, temperatures, or stale status invalidate old AI text.

Constraint: Cached city AI reads must not survive a material observation update

Rejected: Let stale METAR trigger observed-break revisions | stale reports can be older than the active temperature path

Confidence: high

Scope-risk: moderate

Tested: pytest tests/test_web_observability.py -q

Tested: npm run build
2026-04-28 06:28:29 +08:00
2569718930@qq.com 0a3242c6ec Tighten fallback reads around peak-window evidence
Fallback city-card reads now distinguish three cases that previously collapsed into the generic fast-evidence copy: observed highs above the model path, observed highs still lagging after the peak window, and low observations before the peak window that should wait for confirmation rather than down-revise immediately. The same pass removes three unused private helpers from the scan terminal service.

Constraint: Fallback output must be useful before the full AI airport-bulletin read returns

Rejected: Treat any low latest METAR as a down-revision | early-day observations can be below the forecast before the peak window

Rejected: Keep unused helper wrappers | they were unreferenced and added noise to an already large module

Confidence: high

Scope-risk: moderate

Tested: pytest tests/test_web_observability.py -q

Tested: npm run build
2026-04-28 06:22:07 +08:00
2569718930@qq.com d1d9f80f0f Revise fallback highs after observed breaks
Fast evidence mode should not say DEB and models support the center when the latest METAR has already exceeded that center or the model upper edge. The fallback now treats the live observation as a lower bound for the daily high and explains the upward revision pressure.

Constraint: Fallback output must remain useful before the full AI bulletin read returns

Rejected: Keep the original DEB center until AI completes | it can be lower than an already-observed temperature

Confidence: high

Scope-risk: narrow

Tested: pytest tests/test_web_observability.py::test_city_ai_fallback_revises_up_when_latest_metar_breaks_above_models tests/test_web_observability.py::test_city_ai_fallback_reasoning_identifies_fast_evidence_mode tests/test_web_observability.py::test_city_ai_stream_request_only_asks_provider_for_observation_read -q

Tested: npm run build
2026-04-27 12:33:56 +08:00
2569718930@qq.com c3f092fc28 Speed up streamed airport bulletin reads
The city card only needs the provider to interpret the latest METAR or official observation. Deterministic fields such as the high-temperature center, model cluster note and fallback risks are already available server-side, so the stream request now asks DeepSeek for only the observation read and concise reasoning.

Constraint: City cards still need a complete payload for both Chinese and English UI modes

Rejected: Keep generating the full decision schema in the stream | too much model output for every card

Rejected: Retry failed streams by default | it can double latency and the fallback can use partial streamed text

Confidence: high

Scope-risk: moderate

Tested: pytest tests/test_web_observability.py::test_city_ai_stream_request_only_asks_provider_for_observation_read tests/test_web_observability.py::test_city_ai_fallback_reasoning_identifies_fast_evidence_mode tests/test_web_observability.py::test_city_ai_partial_json_trims_dangling_taf_clause tests/test_web_observability.py::test_city_ai_schema_completion_trims_dangling_taf_clause -q

Tested: npm run build
2026-04-27 09:51:09 +08:00
2569718930@qq.com ee2a5338bb Avoid overstating fallback AI bulletin reads
The city decision fallback path is generated when the full DeepSeek city-airport read has not completed, so the reasoning copy now labels the state as fast evidence mode instead of saying the AI read is normal.

Constraint: Fallback output may use only DEB, model cluster, and latest observation evidence

Rejected: Keep 'AI read normal' wording | it implies a completed AI interpretation when the fallback path is active

Confidence: high

Scope-risk: narrow

Tested: pytest tests/test_web_observability.py::test_city_ai_fallback_reasoning_identifies_fast_evidence_mode tests/test_web_observability.py::test_city_ai_partial_json_trims_dangling_taf_clause tests/test_web_observability.py::test_city_ai_schema_completion_trims_dangling_taf_clause -q
2026-04-27 09:45:11 +08:00
2569718930@qq.com 4eb50ce880 Prevent dangling TAF fragments in city AI reads
City AI can return a partially streamed JSON string when the provider truncates output. The fallback previously kept an unfinished clause such as '但TAF显示', which made the forecast explanation look broken even though earlier evidence was usable.

Constraint: Provider JSON can be truncated after useful fields have already streamed

Rejected: Drop all partial AI text | would lose valid METAR interpretation already returned before truncation

Confidence: high

Scope-risk: narrow

Tested: pytest city AI truncation regression tests

Tested: npm run build

Not-tested: Live DeepSeek provider response
2026-04-27 08:28:00 +08:00
2569718930@qq.com d609d3803e feat: implement scan terminal service with caching and background refresh logic 2026-04-27 06:23:09 +08:00
2569718930@qq.com 99ffa717ef Use model cluster for tail no scan signals 2026-04-24 15:12:53 +08:00
2569718930@qq.com 42d4a4e198 Simplify scan opportunity list and speed quotes 2026-04-24 14:26:47 +08:00
2569718930@qq.com c61a3f500d feat: implement Polymarket read-only data service and add scan terminal dashboard components 2026-04-24 10:19:16 +08:00
2569718930@qq.com f313a9cc26 Fix detail pricing labels and price semantics tests 2026-04-24 03:18:01 +08:00
2569718930@qq.com ddc0180ae6 Implement EMOS scan terminal with REST-only market data 2026-04-23 23:49:52 +08:00
2569718930@qq.com e2eb5eb429 feat: implement PolymarketReadOnlyLayer for data collection and add comprehensive unit tests 2026-04-23 21:15:47 +08:00
2569718930@qq.com ca81fda287 feat: implement analysis service, dashboard components, and data collection utilities for PolyWeather 2026-04-23 21:10:22 +08:00
2569718930@qq.com 54b326ff42 feat: implement comprehensive Polymarket weather analysis service with frontend dashboard and market scanning capabilities 2026-04-23 20:45:32 +08:00
2569718930@qq.com 94f1a64522 Use Shenzhen market for Lau Fau Shan 2026-04-23 00:31:31 +08:00
2569718930@qq.com 974b55e34f Add full probability distributions to dashboard 2026-04-22 01:43:13 +08:00
2569718930@qq.com e5facb041c Handle range-based Polymarket temperature buckets 2026-04-22 00:38:19 +08:00
2569718930@qq.com 5a1610d428 feat: implement Polymarket WebSocket cache and add dashboard panel UI components 2026-04-22 00:09:49 +08:00
2569718930@qq.com bb6fe21166 feat: implement read-only Polymarket data collection layer with market discovery and price fetching 2026-04-21 21:54:20 +08:00
2569718930@qq.com 82ec594277 启用概率校准和 WebSocket 报价配置 2026-04-21 21:06:48 +08:00
2569718930@qq.com 582ded8cfb 改进METAR当日状态判断与展示 2026-04-21 19:13:33 +08:00
2569718930@qq.com f5fe8b9b95 feat: implement Supabase entitlement service for signup trials and subscription management 2026-04-19 20:19:38 +08:00
2569718930@qq.com d1fa49ee35 Fix city-local nearby station time labels 2026-04-19 18:45:25 +08:00
2569718930@qq.com d6cc3b1b90 Fix city-local time display for nearby stations 2026-04-19 15:37:13 +08:00
2569718930@qq.com 717106eec6 Anchor Paris weather data to Le Bourget 2026-04-19 14:25:38 +08:00
2569718930@qq.com b2f15ae7d8 Clarify intraday suppression headlines 2026-04-19 14:15:46 +08:00
2569718930@qq.com 7c3b8ec459 Add EMOS auto retraining and gating 2026-04-19 04:08:48 +08:00
2569718930@qq.com 22060efae6 Clamp EMOS calibrated mu to observed max and add tests 2026-04-19 03:56:35 +08:00
2569718930@qq.com 1892d638fa Promote EMOS to the primary probability engine 2026-04-19 03:36:26 +08:00
2569718930@qq.com fbbd13b1c3 Add nearby station timing sync labels 2026-04-19 02:38:34 +08:00
2569718930@qq.com 80072e3a7f Enable fast METAR refresh for Lagos 2026-04-19 01:55:42 +08:00
2569718930@qq.com 25122fed4a Use realtime METAR cluster for Moscow nearby maps 2026-04-18 16:28:08 +08:00