Commit Graph

225 Commits

Author SHA1 Message Date
2569718930@qq.com 6c203bee60 This version of Antigravity is no longer supported. Please upgrade to receive the latest features. 2026-05-01 11:27:16 +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 b122e7cbae Stabilize the decision workspace data boundaries
The scan terminal had grown into overlapping CSS, request-state, AI-provider, and city-card data responsibilities. This refactor separates those boundaries without changing product behavior: CSS modules are split by surface, city AI prompt/provider/fallback logic is isolated, and scan terminal request state now has reusable RemoteData adapters plus business-state tests.

Constraint: Preserve existing global scan-terminal class names and API responses during the refactor

Constraint: No new dependencies; keep this as a file-boundary cleanup

Rejected: Introduce React Query now | higher migration risk than the requested lightweight query-client path

Rejected: Rewrite AI stream behavior | progressive/fallback states are product-sensitive and were only adapter-split

Confidence: high

Scope-risk: moderate

Reversibility: clean

Directive: Keep AI stream state changes covered by business snapshots before changing fallback/cache wording

Tested: npm run test:business; npx tsc --noEmit; npm run build; python pytest -q; ruff check; py_compile targeted city AI modules

Not-tested: Live DeepSeek provider network replay and browser visual QA
2026-04-28 14:45:34 +08:00
2569718930@qq.com 51969d0b4a Keep scan terminal lint clean after helper split
The AI helper extraction left a stale private helper import in the scan terminal service. Removing it keeps CI aligned with the current call graph without changing runtime behavior.

Constraint: CI runs ruff F401 as a blocking check.
Confidence: high
Scope-risk: narrow
Reversibility: clean
Tested: .\.codex-tmp\pydeps\bin\ruff.exe check .
Not-tested: Full backend test suite; change is import-only.
2026-04-28 08:38:00 +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 de0effc40b Make city AI helpers maintainable outside scan service
The scan terminal service had grown into a 3.5k-line file that mixed endpoint orchestration, AI provider calls, fallback copy, JSON repair, and deterministic evidence guards. This extracts the city-AI helper layer into a focused module while preserving the old private names through imports for existing tests and callers.

Constraint: Keep behavior unchanged after the previous evidence-guard fixes and avoid a broad service rewrite.

Rejected: Split every scan-terminal concern at once | too much regression risk for this maintenance pass.

Confidence: high

Scope-risk: narrow

Tested: pytest tests/test_web_observability.py -q

Tested: npm run build
2026-04-28 06:40:53 +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 9ded30b125 feat: implement AI-driven weather scan terminal with decision utilities and forecast visualization 2026-04-27 02:18:34 +08:00
2569718930@qq.com e2ad51ee65 feat: implement AI city forecast streaming service and documentation 2026-04-27 01:38:37 +08:00
2569718930@qq.com 97719a7ff0 feat: implement market scan data utilities and service for city weather card decisioning 2026-04-27 00:50:14 +08:00
2569718930@qq.com d46e0c2e81 feat: implement AI-powered pinned city forecast dashboard with real-time METAR and market analysis integration 2026-04-27 00:19:52 +08:00
2569718930@qq.com ef8ef833b9 feat: implement AI-driven METAR summary service and dashboard UI components 2026-04-26 14:03:13 +08:00
2569718930@qq.com f9ad34d7c0 feat: implement scan terminal service with AI-powered city analysis and caching support 2026-04-26 13:50:46 +08:00
2569718930@qq.com d42cdf6b51 feat: implement AI city forecast streaming service and UI components for scan terminal 2026-04-26 13:43:55 +08:00
2569718930@qq.com 5344779e32 feat: implement streaming AI city forecast service and frontend hook for real-time terminal updates 2026-04-26 13:12:03 +08:00
2569718930@qq.com dacefec39d feat: implement AI city forecast streaming service and UI component for scan terminal 2026-04-26 12:58:33 +08:00
2569718930@qq.com d54050ceb0 feat: implement AI-driven city weather analysis and market decision dashboard components 2026-04-26 10:02:54 +08:00
2569718930@qq.com da2126e33e feat: implement ScanTerminalDashboard with AI-driven city streaming and analysis features 2026-04-26 09:13:18 +08:00
2569718930@qq.com 1595f4a92e feat: implement ScanTerminalDashboard with AI-driven city forecast streaming and opportunity tracking 2026-04-26 08:12:31 +08:00
2569718930@qq.com 763f131850 feat: implement AI city scanning terminal with streaming SSE support and concurrency-limited request queueing 2026-04-26 07:58:19 +08:00
2569718930@qq.com 9ef998e9e0 feat: implement ScanTerminalDashboard UI and backend service for AI-driven city weather forecasting 2026-04-26 07:24:39 +08:00
2569718930@qq.com b25c9312da feat: add multi-model Open-Meteo data collection and implement scan terminal dashboard service 2026-04-26 06:55:16 +08:00
2569718930@qq.com 901b870240 feat: implement scan terminal service with caching and add corresponding dashboard UI components 2026-04-26 05:58:07 +08:00
2569718930@qq.com 62dd1201db feat: implement scan terminal service with caching, background refresh, and AI-driven analysis capabilities 2026-04-26 05:20:38 +08:00
2569718930@qq.com 7e3146d612 feat: implement scan_terminal_service for market data analysis and caching 2026-04-26 05:03:49 +08:00
2569718930@qq.com fdf001a801 feat: implement ScanTerminalDashboard component and scan_terminal_service for real-time market opportunity monitoring 2026-04-26 04:11:20 +08:00
2569718930@qq.com ce0f7629a2 feat: implement scan terminal dashboard with AI-driven city analysis and state management 2026-04-26 03:42:13 +08:00
2569718930@qq.com d71d5979e1 feat: add scan terminal dashboard with AI city analysis integration 2026-04-26 02:47:24 +08:00
2569718930@qq.com 9bbb713d45 feat: implement scan terminal dashboard with dedicated API route and service layer 2026-04-26 02:22:56 +08:00
2569718930@qq.com e6dbef1ece feat: implement ScanTerminalDashboard component and associated CSS module for PolyWeather map interface 2026-04-26 01:55:30 +08:00
2569718930@qq.com d5fb40a544 feat: implement weather dashboard components, state management, and API routes for terminal scanning and assistant chat 2026-04-25 06:42:24 +08:00
2569718930@qq.com 3083d6b8fe feat: implement scan terminal service with caching, background refresh, and AI-driven market analysis support 2026-04-25 04:25:17 +08:00
2569718930@qq.com 0e5a1f2652 feat: implement ScanTerminalDashboard with modular components and backend integration for Polymarket data collection 2026-04-25 03:26:28 +08:00
2569718930@qq.com b614778f13 Relax V4 scan timeout and trim output 2026-04-25 02:58:06 +08:00
2569718930@qq.com 62a12257f0 Upgrade V4 scan to city analysis 2026-04-25 02:19:37 +08:00
2569718930@qq.com df6a2c73ed Add V4 scan run logs 2026-04-25 01:09:08 +08:00
2569718930@qq.com 091d2efef3 Add DeepSeek V4 scan review 2026-04-24 23:32:32 +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 8f7ffae83d Group scan opportunities by city 2026-04-24 14:41:33 +08:00
2569718930@qq.com 467f736602 feat: implement dashboard store and API routes for city market scanning and analysis 2026-04-24 12:46:44 +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