[verified] add BOT tourism source adapter

This commit is contained in:
Kunthawat Greethong
2026-08-23 10:19:40 +07:00
parent 3e978c5948
commit a113a51589
15 changed files with 800 additions and 38 deletions

View File

@@ -4,10 +4,11 @@
| Milestone | Status | Evidence | Next action |
|---|---|---|---|
| M0 repo foundation | complete | Flask API, Vue/Vite shell | replace fixture with source adapter |
| Tourism deterministic signal | complete | 7 backend tests pass | add replayable real source |
| M0 repo foundation | complete | Flask API, Vue/Vite shell | keep research/paper guardrails |
| M1 BOT Tourism adapter | complete | 18 tests, live BOT fetch, raw/snapshot persistence | validate multiple vintages |
| Tourism deterministic signal | complete | live foreign-arrivals YoY surprise | add occupancy/airport metric |
| Internal paper ledger | complete | POST/readback through live API | persist in PostgreSQL later |
| Dashboard | complete | Vite build + live HTML/API checks | visual browser capture after permission is available |
| Dashboard | complete | Vite build + served source check with live-sign copy | visual browser capture after permission is available |
| LLM analysis | deferred | intentionally no LLM dependency in M0 | add after signal lineage is stable |
| Webhook receiver | deferred | contract only, no external receiver | choose after core app is usable |
| MT5 bridge | deferred | not started | paper bridge after webhook decision |
@@ -17,16 +18,20 @@
- Research and paper modes only.
- No live orders, external webhook receiver, broker credentials, or MT5 connection.
- Deterministic signal is authoritative; LLM will remain downstream.
- Fixture source is clearly marked and must be replaced before investment use.
- Fixture and provisional BOT sources are explicitly labelled; neither is investment-ready without validation.
- `target_weight` is recorded in the internal paper ledger; it is not an order.
## Verification
- Backend: 10 unittest tests pass.
- Independent review: **PASSED**; no concrete security or logic blockers.
- Backend: 18 unittest tests pass.
- Independent M1 review: **PASSED**; no concrete security or logic blockers.
- Reviewer suggestions: set `PAPER_COOKIE_SECURE=1` outside local HTTP; replace in-memory sessions before multi-worker deployment.
- M1 reviewer backlog: add schema-drift, duplicate/reordered-row, and malformed-vintage regression fixtures.
- Frontend: `npm run build` passes with Vite.
- Backend health endpoint returns HTTP 200 JSON.
- Dashboard served HTML contains the current title, Vue mount point and Vite entry.
- Paper ledger POST and readback work through the live API.
- BOT source live fetch parsed 138 monthly periods and persisted raw HTML plus normalized snapshot.
- Data-health reports `source_mode=bot`, `status=provisional`, and `replayable=true`.
- Live vintage replay returned the same theme surprise as the current dashboard summary.
- Browser visual capture was blocked by Chrome remote-debugging permission; no permission dialog was clicked.