3.0 KiB
Evidence Topic: Channel BI database runtime verification
Metadata
- Date: 2026-07-29
- Status: Superseded
- Scope: Local Web channel-BI read path from browser through PostgreSQL
- Confidence: Fact
- Source: Live local HTTP responses, browser DOM/console inspection, process/listener inspection and targeted automated tests
- Last verified: 2026-07-29
- Stale trigger: Restart or reconfiguration of the 8765 Web process; database migration or fact changes; changes to
arr_web,channel_analyticsor the BI frontend
Superseded for current values by
2026-07-30-channel-bi-post-update-data-contamination.md
after real uploads changed the Finance projection. The connection-path finding remains valid.
Question
Is the current Web “渠道BI” page actually connected to PostgreSQL, rather than only having an unverified code path or mock response?
Evidence
- Static path:
arr_web/static/app.jsrequests/api/monthsand/api/analytics;arr_web/app.pydelegates the analytics route toPostgresPortalRepository;channel_analytics/postgres.pyreads current Finance facts inREPEATABLE READ READ ONLYtransactions and validates the target database asbooking_test. - Live health:
GET http://127.0.0.1:8765/api/healthreturned HTTP 200 withdatabase_ready=true. - Live database-backed requests:
/api/monthsreturned the2026-07projection with one channel and one row;/api/analytics?month=2026-07returned BI schema 1.2 with QBD, one sold room, three room nights and total price 5400. - Browser verification: the live “渠道BI” tab rendered the same month, KPIs, QBD ranking and channel-by-room-type matrix; browser console error count was zero.
- Runtime identity: the existing Web process uses the controlled
booking-test-db.envand is bound to0.0.0.0:8765; upload processing is disabled, matchingprocessing_ready=false. - Regression: 24 tests covering channel analytics PostgreSQL behavior, analytics contracts, Web routes and repository schema passed.
Finding
The current local Web channel-BI path is fully connected and functioning from the rendered page through the live Web API to PostgreSQL. No connection code change is required for this task. processing_ready=false is a separate XML-upload runtime state and does not invalidate the BI read path.
Impact
Future channel-BI work should not begin by replacing or re-wiring the current repository. Reverify the live endpoints after process, configuration, migration or fact changes. Treat the existing all-interface listener as a local test process, not a production security boundary: bind it to loopback for local-only use or place it behind the documented Caddy HTTPS plus ARR application-login boundary.
Open Items
- Reverify
database_ready=true,/api/monthsand one known/api/analyticsmonth after the formal server deployment. - Do not expose port 8765 directly; use loopback for local testing or the Caddy boundary for deployment.