ข้ามไปยังเนื้อหา

Operations Runbook

  1. ยืนยัน environment variables ของ kobi-web และ backend dependencies ครบ
  2. ยืนยันว่า endpoint หลักของ kobi-ai ตอบได้: /api/sessions/start, /api/ai/*, /api/chat/*, /api/maps/*, /api/dashboard/*
  3. ยืนยันว่าระบบ auth และ project context โหลดได้ในหน้า /chat
  4. ยืนยันว่าอย่างน้อย general และ idea mode boot ได้ตาม preload
ScenarioExpected
New chat ใน generalsession start คืน thread + canonical path แล้ว stream ได้
Deep-link thread ของ mode อื่นauto-switch mode ถูกต้อง
New chat ใน idea/strategy โดยไม่มี boardเปิด scope picker หรือกัน send
Maps realtime connectได้ token + room scope ตรง mapId
Analytics ก่อน setupchat input ถูก block
Analytics หลัง setupchat send ได้ตามปกติ
Batch HITL resumeactions state และ workspace converge
flowchart TB
  A[Open /chat] --> B[create/restore thread]
  B --> C[send first message]
  C --> D{actions required?}
  D -- no --> E[stream done persisted]
  D -- yes --> F[approve/reject batch]
  F --> G[/api/ai/resume]
  G --> H[workspace refresh]
  1. ตรวจว่า request ส่ง scope key ที่ถูกกับ mode หรือไม่
  2. ตรวจว่าข้อมูล scope ใน URL ตรงกับ thread metadata หรือไม่
  3. ตรวจ mapping ใน kobi_scope_threads ว่าสัมพันธ์กับ thread ปัจจุบันหรือไม่
  4. ตรวจสิทธิ์ project/share session ว่ายัง valid หรือไม่
  5. ตรวจว่า metadata มี field นอก allowlist จนโดน reject หรือไม่
  6. ถ้า maps mode เจอ 503 ให้ตรวจว่าโดน map_scope_schema_outdated หรือไม่ (ต้อง apply migration ที่เกี่ยวข้อง)
SymptomRoot cause ที่พบบ่อยแนวทาง
stream ค้างไม่จบprovider done event ไม่สมบูรณ์ใช้ fallback finalization และ persist summary
ส่งข้อความแล้ว notFoundthread หาย/ไม่ตรง scoperecover thread แล้ว retry message persist
เริ่มแชตใหม่แล้ว fail 503 ใน mapsmap thread FK ยังชี้ schema เก่าapply migration 20260304_align_thread_map_fk_to_kobi_maps.sql
maps ต่อ realtime ไม่ได้token room mismatch / scope mismatchตรวจ mapId และ assertion ใน token route
analytics ส่งไม่ได้dataset/template ยังไม่พร้อมทำ onboarding ให้ครบและเช็ก gate status
  • ai_stream_error_rate
  • scope_mismatch_rate
  • hitl_resume_fallback_rate
  • maps_realtime_connect_failure_rate
  • analytics_gate_block_duration