สรุประบบ EGP IT Procurement Monitor

ระบบติดตามประกาศจัดซื้อจัดจ้าง IT ภาครัฐอัตโนมัติสำหรับงาน IT: scrape e-GP, จัดหมวดหมู่, แจ้งเตือน LINE, วิเคราะห์ TOR และจัดการ workflow งานขาย

อัปเดต 6 ก.ย. 2569 — v2.0.1: e-GP เป็นหลัก / DataForThai สำรอง

ผู้ใช้ให้หยุดดึง DataForThai ในรอบปกติเพราะข้อมูลซ้ำกับ e-GP โดยเก็บข้อมูลเดิมไว้ และใช้ DataForThai เฉพาะเมื่อ e-GP เข้าไม่ได้

ผลตรวจ: 25/25 tests ผ่าน; source tests ใน container Node 20 ผ่าน 7/7; live smoke e-GP ได้ 10 รายการและ DataForThai calls = 0 บนสำเนา DB ชั่วคราว ไม่ส่ง LINE. Production healthy และ DB/sent IDs hash เท่าเดิม เก็บ 159 items (154 active), 505 expired, DataForThai-only เดิม 27 รายการ

ขอบเขตหลักฐาน: fallback ทดสอบด้วย simulated outage; ยังไม่มี outage จริงหลัง deploy ณ เวลาบันทึก

Backup ก่อน deploy: /opt/egp-pilot/backups/dft-fallback-20260906-jqjF4U/

เอกสารร่วม: Obsidian Projects/SmartWiki/Apps/monitoring/EGP-Pilot.md; local skill ~/.agents/skills/source-command-egp-monitor/SKILL.md; Git snapshot/runbook egp-pilot

Git release: f638942 — production snapshot + e-GP primary/DataForThai fallback — push ไป main แล้ว 2026-09-06; tests 25/25 ผ่าน และ gitleaks ไม่พบ secrets

อัปเดต 24 พ.ค. 2569: production ใช้ Hostinger VPS เป็น frontend + backend หลักแล้ว (egp-pilot container) ส่วน Vercel เดิมเป็น redirect-only ไป Pilot

v1.9.4 Modern Operations UI: ปรับ visual system เป็น charcoal + teal + amber, ยกระดับ cards/charts/filters/tabs/table/modal/detail panel และ responsive mobile spacing โดยไม่เปลี่ยน business rules

v1.9.5 Logo Contrast Fix: เอา white pill/background ที่ทำให้โลโก้ Smart Solution ขาวจมหายออก และล็อกขนาด header logo ให้คงสัดส่วนบน desktop/mobile

Self-healing hardening — 29 พ.ค. 2569: watchdog อยู่รันหลัง Node start, Chromium/CDP recover เองได้, scraper retry token/keyword upstream 5xx และ abort ก่อนเขียน DB เมื่อ e-GP upstream ล่มกว้าง

Source ปัจจุบัน (2026-09-06): runtime /opt/egp-pilot/app และ container /app; canonical Git checkout ~/Ai Project/Codex/EGP100x/egp-pilot/ มี source ใน app/ และ Docker files ที่ root. Desktop overlay รุ่นเก่าไม่ตรง runtime จึงห้าม full deploy ทับโดยไม่ reconcile

⚠️ Recovery — 8 มิ.ย. 2569: repo EGP/ บน iCloud Desktop พัง — ไฟล์ถูก evict เป็น dataless placeholder + CloudKit download ค้าง (Network Failure -1001/-1005) ทำให้ git mmap failed: Operation timed out. กู้โดย clone ใหม่จาก GitHub (ff1de2d) ไป ~/Developer/egp-it-monitor/ (off-iCloud) + ดึง config.js/data/sent_ids.json (560 ids)/data/results.json ที่ gitignored กลับด้วย brctl download. Production VPS ไม่กระทบ (รันแยกบน Hostinger). ทำงาน git ต่อที่ ~/Developer/egp-it-monitor อย่าใช้โฟลเดอร์ Desktop