Skip to content

Task #94: BCTC consistency check + Dashboard forecast loading fix - #77

Open
thanhhale288 wants to merge 3 commits into
mainfrom
cursor/epic5-phase6-task94-bctc-consistency-check
Open

Task #94: BCTC consistency check + Dashboard forecast loading fix#77
thanhhale288 wants to merge 3 commits into
mainfrom
cursor/epic5-phase6-task94-bctc-consistency-check

Conversation

@thanhhale288

Copy link
Copy Markdown
Owner

Summary

  • Add BCTC consistency API and UI banner: compare extracted benchmark fields against DB history and flag mismatches without silently overwriting values (Task #94).
  • Split Benchmark page into reusable components (Wave B follow-up) and fix DocAI smoke test selectors after the refactor.
  • Fix Dashboard stuck on "Đang tải dữ liệu" by rendering core macro data first and loading ML forecast in the background.
  • Add scripts/run_backend.sh and scripts/debug_segfault.py to reproduce backend startup and isolate segfault points during local fullstack debugging.

Test plan

  • ./scripts/run_backend.sh starts backend on :8000 without segfault when opening Dashboard
  • Open http://localhost:5173 — Dashboard renders summary/IIP/VA without waiting for forecast
  • Forecast line appears later or shows a warning if ML artifact is missing
  • Benchmark extract → consistency banner flags fields that disagree with DB history
  • PYTHONPATH=. pytest tests/benchmark/test_bctc_consistency.py -q
  • PYTHONPATH=. pytest tests/benchmark/test_docai_extract_smoke.py -q

Made with Cursor

thanhhale288 and others added 3 commits August 19, 2026 16:09
…s and cleanup audit.

- Retrain LightGBM from main checkout: MAPE 8.95 (artifact_path now data/models/, not stale worktree).
- Regenerate ml_monitoring_baseline.json: all 4 models present (arima 31.72 / xgboost 6.80 / lightgbm 8.95 / lstm 10.09). Drift no longer null for lightgbm.
- Add lightgbm_importance.json produced by retrain.
- Commit .scratch/handoff-wave1..4.md (previously untracked batch wave reports).
- Add epic5-survey-fixables.md audit report (Epic 5 gaps + future directions).
- Restore shop_matcher.joblib to committed state (binary drifted from eval run, not a real retrain).
- Remove 20 stale worktrees (t66–t81, t95, task54-55-ci-fix, task64-handoff, new-design-system); all branches merged to main.

Co-authored-by: Cursor <cursoragent@cursor.com>
Capture a stable backend startup command with thread-safe defaults and include a debug script that isolates ML/runtime crash points step-by-step.

Co-authored-by: Cursor <cursoragent@cursor.com>
Render core dashboard data as soon as summary and macro APIs return, and fetch forecast in the background so a slow or hung ML endpoint no longer blocks the whole page.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant