Docs ↔ Code Discrepancy Audit
/docs-verifystatus (2026-07-11):
- Baseline FAIL → remediation Waves → re-audit CONDITIONAL PASS (Vol 2 ports)
- PASS after residual P1 cleanup: Vol 8
sourceDb, Vol 14 LEG packages, audit 04 diagram (2026-07-11)- Latest PASS DELTA (Vol 2 ports):
audits/docs-verify-2026-07-11-delta-vol2-pass.md
Checklist ด้านล่างเป็นประวัติงาน — รายการที่พบในรอบถาม “มีอะไรผิดอีก” ถูก remediate แล้ว (ดู A.8)
วันที่ตรวจ: 2026-07-11
ขอบเขต: ทุก volume ใน docs/ (Volume 0–16 + docs/index.md) เทียบกับโค้ดจริงใน vtrc-api/, cu-central-api/, centralize-api/, vtrc-web/, vtrc-rc-backoffice/
วัตถุประสงค์: รายการข้อผิดพลาดที่ต้องแก้ในคู่มือ — ใช้เป็น checklist งานแก้ไขเอกสาร (ไม่ใช่แผนแก้โค้ด)
วิธีใช้: แก้ตาม Priority P0 → P1 → P2 แล้วติ๊ก
[ ]→[x]
หลังแก้แต่ละ theme ให้บันทึกในvolume-17-appendices/08-changelog-errata.md
Executive Summary / สรุปผู้บริหาร
คู่มือส่วนใหญ่ (โดยเฉพาะ Volume 2–3 หลังแก้ 2026-07-10) ถูกต้องเรื่อง END_POINT_CENTRALIZE → cu-central-api แต่ยังมี ความขัดแย้งข้าม volume จำนวนมาก:
| Theme | ความรุนแรง | Volumes ที่กระทบ |
|---|---|---|
A. NestJS centralize-api ถูกเขียนเป็น live HR/auth bridge | 🔴 P0 | 0, 1, 4, 8, 9, 12, 15 |
| B. พอร์ต cu-central (8080 vs 8082 vs 9000) | 🔴 P0 | 0, 3, 5, 10, 16 |
| C. KBANK = ธนาคารกรุงเทพ (ผิด — คือกสิกรไทย) | 🔴 P0 | 0, 1 |
| D. Redis / OTP บน vtrc-api (vestigial vs active) | 🔴 P0 | 0, 1, 12, 13 |
E. statusKcash map / K-Cash cron | 🔴 P0 | 0, 1, 11 |
| F. Volume 7 Apollo/Docker/auth เอกสารไม่ตรงโค้ด | 🔴 P0 | 7 |
| G. นับไฟล์/endpoint/model ผิด | 🟡 P1 | 3, 4, 5, 6, 7 |
| H. Debt ID / env appendix / glossary ขัดกันเอง | 🟡 P1 | 14, 16 |
| I. file:line citation drift | 🟢 P2 | หลายเล่ม |
English: Highest risk is readers following Vol 0/1/9 flows that still route HR/auth through NestJS + Redis, while production code uses cu-central-api GraphQL/LDAP and stores OTP in MariaDB.
ไทย: ความเสี่ยงสูงสุดคือผู้อ่านทำตาม flow ในเล่ม 0/1/9 ที่ยังส่ง HR/auth ไป NestJS+Redis ทั้งที่ production ใช้ cu-central-api และเก็บ OTP ใน MariaDB
Canonical Truths (อ้างอิงจากโค้ด — ใช้แก้เอกสารทุกจุด)
ใช้ตารางนี้เป็น source of truth เมื่อแก้คู่มือ:
| ข้อเท็จจริง | ค่าที่ถูกต้อง | หลักฐาน |
|---|---|---|
Live HR bridge จาก vtrc-api | END_POINT_CENTRALIZE → cu-central-api GraphQL | vtrc-api/api/.env.example:36-37, centralize/controllers/graphql.js |
NestJS centralize-api | Service คนละตัว; REST /api/*; caller จาก vtrc-api ไม่ยืนยัน (E-08) | ไม่มี HTTP client ไป NestJS ใน vtrc-api |
cu-central default APP_PORT | 8080 | cu-central-api/main-api/src/config.js:20 |
พอร์ตใน .env.example ของ vtrc-api | 8082 (ค่าตัวอย่างที่ vtrc-api ชี้ไป — ไม่ใช่ default ของ cu-central) | vtrc-api/api/.env.example:36 |
Dockerfile EXPOSE 9000 ของ cu-central | docs-only / ไม่ใช่ listen default | cu-central-api/main-api/Dockerfile |
| Compose cu-central prod map | มักเป็น 8000:8000 | cu-central-api/docker-compose.yml |
| KBANK | ธนาคารกสิกรไทย (Kasikorn) ไม่ใช่กรุงเทพ | vtrc-api/api/src/config.js:389 |
statusKcash SUCCESS | id '9' → status SUCCESS (label PAID) | config.js:508-511 |
| K-Cash import | manual (importUpdateStatus) — ไม่มี cron ดึงผลธนาคาร | crons.js:14-27 |
Cron APP_NO===1 | เฉพาะ fund rate job; updateDelegatesExpire + statLog รันทุก replica | crons.js:14-27 |
| OTP store | cu-central MariaDB otp, default TTL 3 นาที — ไม่ใช่ Redis ของ vtrc | SMS_OTP_EXPIRE_MINUTES; sendOtp |
| vtrc-api Redis | เชื่อมต่อได้ แต่ cache call sites ส่วนใหญ่ commented / vestigial | lib/redis.js + callers |
| Dual MariaDB ใน vtrc-api | db + db2 เท่านั้น — ไม่มี dbHr ใน connector.js | vtrc-api/api/src/connector.js |
| NBC MSSQL name | dbHRMI_Center_NBC ไม่ใช่ dbHRMI_NBC | employee.service.ts / entities |
NestJS hrPaySlip | POST /api/hrPaySlip ไม่ใช่ GET | hrpayslip.controller.ts:18 |
| NestJS employee GETs | 14 routes; รวมทั้งระบบ ≈ 17 | employee.controller.ts |
| Device key field | API_DEVICE_KEY[].**key** ไม่ใช่ apiKey | config.js + index.js |
| Session Redis key | sess:{userUid}_{sessionId} ไม่ใช่ sess:<sid> | session.js |
| syncModels active | 79 (ไม่ใช่ 88) | lib/model.js |
| Frontend GraphQL URI | จาก window.location.href ผ่าน checkLinkURL() — ไม่ใช่ NODE_ENV | ทั้งสอง frontend apollo.js |
พอร์ต — เขียนให้ถูกแบบนี้ในเอกสาร
cu-central-api:
- default ในโค้ด: APP_PORT = 8080
- vtrc-api .env.example ชี้: http://localhost:8082/api/graphql (ค่าที่ทีมตั้งตอน dev — ต้อง align กับ env จริง)
- docker-compose (prod-style): มัก map 8000
- อย่าเขียนว่า “cu-central = port 8082” โดยไม่มีเงื่อนไข
- อย่าเขียน port 9000 เป็น listen portP0 — ต้องแก้ก่อน (ข้อเท็จจริงผิด / ทำให้ผู้อ่านทำผิด)
Theme A — NestJS ถูกเขียนเป็น live bridge
| # | ไฟล์ | สิ่งที่เอกสารบอก | สิ่งที่โค้ดจริง | Action |
|---|---|---|---|---|
| A1 | volume-00/.../02-system-map.md | Slip/HR → NestJS centralize-api | → cu-central GraphQL | [ ] แก้ diagram + prose ให้ตรง Vol 2.1 |
| A2 | volume-00/.../03-employee-day.md | cache miss → NestJS | → cu-central | [ ] แก้ขั้นตอน 09:00 ให้ตรง summary table |
| A3 | volume-00/.../05-key-features.md | time attendance → NestJS + Redis | → cu-central GraphQL | [ ] แก้ diagram Feature 10 |
| A4 | volume-01/.../04-payroll-slip.md | NestJS + Redis cache | cu-central; Redis ไม่บน path | [ ] แก้ flow |
| A5 | volume-01/.../10-time-attendance.md | diagram NestJS (ขัดกับข้อความบรรทัด ~94) | cu-central | [ ] ทำให้ diagram ตรงกับ prose |
| A6 | volume-01/.../02-organization.md | proxy ผ่าน NestJS | cu-central | [ ] แก้ชื่อ service |
| A7 | volume-04/.../index.md | topology vtrc-api → centralize-api | ไม่มี edge นี้ | [ ] ลบ/ใส่ “unconfirmed caller (E-08)” |
| A8 | volume-04/.../09-scorecard-comparison.md | auth forward → NestJS | → cu-central | [ ] แก้ |
| A9 | volume-08/.../01-persistence-topology.md | NestJS เป็น reader หลักของ PaySlip/Time | cu-central เป็น live path | [ ] แยก “live path” vs “NestJS template” |
| A10 | volume-08/.../09-identity-across-databases.md | fetch ผ่าน NestJS | cu-central | [ ] แก้ steps 2–4 |
| A11 | volume-09/.../02-authentication-flow.md | login → NestJS GraphQL /signin + MSSQL password | cu-central LDAP /auth/signin | [ ] rewrite flow ทั้งบท |
| A12 | volume-09/.../05-credential-secrets.md | gate = NestJS password | cu-central LDAP | [ ] แก้ |
| A13 | volume-09/.../10-supply-chain-runtime.md | forward password → NestJS | cu-central | [ ] แก้ |
| A14 | volume-12/.../01-hosting-topology.md | NestJS:3000 บน prod VM เดียวกับ traffic | ไม่ยืนยัน; ไม่ใช่ END_POINT_CENTRALIZE | [ ] ใส่ E-08 disclaimer |
| A15 | volume-12/.../05-nginx-ssl.md | nginx proxy NestJS | upstream เป็น cu-central replicas | [ ] แก้ |
| A16 | volume-15/.../08-infrastructure-evolution.md | current: vtrc-api → centralize-api | → cu-central | [ ] แก้ current-state diagram |
กฎแก้: คำว่า centralize/ ใน vtrc-api = folder ประวัติศาสตร์ ที่เรียก cu-central — ห้าม equate กับ NestJS centralize-api/ โดยไม่มีคำว่า “unconfirmed / separate service”
Theme B — พอร์ต
| # | ไฟล์ | Claim ผิด | แก้เป็น | Action |
|---|---|---|---|---|
| B1 | volume-00/.../02-system-map.md | cu-central Port 9000 | ระบุ APP_PORT default 8080; EXPOSE 9000 เป็น Dockerfile เท่านั้น | [ ] |
| B2 | volume-03 index / 04-centralize-bridge.md / 10-scorecard.md | “port 8082 = cu-central” | แยก default 8080 vs .env.example 8082 | [ ] |
| B3 | volume-05/.../09-scorecard-ownership.md | cu-central = 8082 | เหมือน B2 | [ ] |
| B4 | volume-10/.../01-api-topology.md (+ index) | default APP_PORT 8082 | 8080 | [ ] |
| B5 | volume-16/.../06-environment-variables.md | cu-central PORT=8082 | APP_PORT=8080 | [ ] |
Theme C — KBANK = กรุงเทพ (ผิด)
| # | ไฟล์ | Action |
|---|---|---|
| C1 | volume-00/.../04-admin-day.md | [ ] เปลี่ยน “ธนาคารกรุงเทพ” → ธนาคารกสิกรไทย (KBANK) |
| C2 | volume-00/.../06-quick-glossary.md | [ ] แก้คำนิยาม KBANK / K-Cash |
| C3 | volume-00/.../05-key-features.md | [ ] แก้ข้อความ cron + ธนาคาร |
| C4 | volume-01/.../11-payments-kbank.md | [ ] แก้ชื่อธนาคารทั้งบท |
Theme D — Redis / OTP
| # | ไฟล์ | Claim ผิด | ความจริง | Action |
|---|---|---|---|---|
| D1 | volume-00/.../02-system-map.md | payslip Redis payslip:{emp}:{date} | path ไม่เขียน Redis | [ ] ลบหรือใส่ “vestigial / commented” |
| D2 | volume-12/.../07-database-redis.md | vtrc Redis = OTP TTL 5m + cron locks | OTP อยู่ cu-central DB; cron ไม่ใช้ Redis | [ ] rewrite ส่วน vtrc-redis |
| D3 | volume-13/.../06-redis-operations.md | KEYS otp:* บน vtrc-redis | OTP ในตาราง otp | [ ] แก้ runbook |
| D4 | volume-13/.../08-debug-playbooks.md | debug OTP ผ่าน Redis | ดู DB / cu-central | [ ] แก้ |
| D5 | volume-13/.../07-user-session-management.md | “รับ OTP (เก็บใน Redis)” | DB | [ ] แก้ |
Theme E — K-Cash / statusKcash / cron
| # | ไฟล์ | Claim ผิด | ความจริง | Action |
|---|---|---|---|---|
| E1 | volume-00/.../04-admin-day.md | เช็คว่า cron ดึงผล K-Cash | ไม่มี cron — import manual | [ ] |
| E2 | volume-00/.../05-key-features.md | cron “ดึงผล K-Cash” | ไม่มีใน crons.js | [ ] |
| E3 | volume-00/.../04-admin-day.md | POST /api/downloadExcel | GET /download/excel/:table | [ ] |
| E4 | volume-01/.../07-welfare-hospital.md | code 9 → PAID | code 9 → status SUCCESS | [ ] |
| E5 | volume-11/.../03-welfare-hospital.md | statusKcash id 0=SUCCESS; labels บัญชีปิด ฯลฯ | ดู config.js:488-518 เท่านั้น | [ ] rewrite ตารางทั้งก้อนจากโค้ด |
| E6 | volume-11/.../03-welfare-hospital.md | FAILED → PAIDCASH; 10 statuses | FAILED → CASH; statuses ≥12 | [ ] |
| E7 | volume-12/.../11-cron-scorecard.md + runbooks | ทุก job gate APP_NO===1 | เฉพาะ fund rate | [ ] |
Theme F — Volume 7 (backoffice) เอกสารเพี้ยนหนัก
| # | ไฟล์ | Claim ผิด | ความจริง | Action |
|---|---|---|---|---|
| F1 | volume-07/.../03-apollo-checklinkurl.md | createHttpLink, getApikey(), isLoggedIn() เป็น JWT string, axios refresh | createUploadLink, apiKeyNews(), isLoggedIn() เป็น boolean, refresh ผ่าน Queries.refreshTokenBO | [ ] rewrite ทั้งบทจากโค้ดจริง |
| F2 | volume-07/.../02-bootstrap-build.md | Docker serve -s; node:16-alpine | multi-stage → nginx:1.24.0 | [ ] |
| F3 | volume-07/.../02 + 04 | มี PrivateRoute | ไม่มี — pattern {isLoggedIn() && <Route…/>} | [ ] |
| F4 | volume-07/.../04-routing-auth-gate.md | menu ผ่าน axios + getApikey | axiosWorkforce.get(...) | [ ] |
| F5 | volume-07/.../02-bootstrap-build.md | jsconfig.json + REACT_APP_API_URL ใช้งาน | ไม่มี jsconfig; REACT_APP_API_URL ไม่ถูกอ้างใน src | [ ] |
| F6 | เอกสาร axios “13 ตัว” / ชื่อไฟล์ผิด | 15 ไฟล์ axios*.js; ชื่อจริงต่างจากที่ลิสต์ | [ ] อัปเดตรายชื่อจาก filesystem |
หมายเหตุ: ตาราง
checkLinkURLorigin→endpoint ใน Vol 6/7 ถูกต้อง — อย่าลบทิ้งตอน rewrite ส่วน Apollo narrative
P1 — ควรแก้ (นับผิด / citation ผิด / ขัดกันเองใน docs)
Theme G — Counts & paths
| # | ไฟล์ | Claim | จริง | Action |
|---|---|---|---|---|
| G1 | Vol 3 index / 01 / 05 | syncModels 88 | 79 active | [ ] |
| G2 | Vol 3 05-persistence.md | models/core/user/user.js on db | ไม่มี — มีแค่ models/centralize/user on db2 | [ ] |
| G3 | Vol 3 | resolvers 43 = typeDefs 43 | typeDefs ~43–44; resolvers 41 (+index) | [ ] |
| G4 | Vol 3 | controllers 30 folders | 31 | [ ] |
| G5 | Vol 3 | repositories 32 | 31 | [ ] |
| G6 | Vol 3 02-graphql-pipeline.md | Gate #4 → SESSION_INVALID / SESSION_EXPIRED | CANNOT_ACCESS / TOKEN_INVALID | [ ] |
| G7 | Vol 5 หลายไฟล์ | 12 / 16 endpoints | Employee 14 GET; รวม 17 | [ ] |
| G8 | Vol 0 02 | GET /api/hrPaySlip | POST | [ ] |
| G9 | Vol 0/8 | DB dbHRMI_NBC | dbHRMI_Center_NBC | [ ] |
| G10 | Vol 6 | queries 95 | ~137–138 gql | [ ] |
| G11 | Vol 6 | components/user/ 56 | 36 | [ ] |
| G12 | Vol 7 | pages 66 | 64 | [ ] |
| G13 | Vol 0 | axios instances 16 | 15 | [ ] |
| G14 | Vol 1 13-subsystems.md | axios configs 29 | ไม่ตรง (15 axios + อื่น) | [ ] |
| G15 | Vol 0 05-key-features.md | paths vtrc-api/typeDefs/... | ต้องมี api/src/ | [ ] |
| G16 | Vol 0 glossary | dbHr ใน connector.js:8-48 | dbHr อยู่ cu-central | [ ] |
| G17 | Vol 8 identity | EmpID = business code | PK UUID-ish; business = EmpCode | [ ] |
| G18 | Vol 8 | sourceDb = 'vtrc'|'nbc' | ค่าจริงเป็น HRMI SourceDB strings | [ ] |
| G19 | Vol 8 | AuthSession vs LoginSession สลับบทบาท | LoginSession = login gate; AuthSession = mobile RSA bypass | [ ] |
| G20 | Vol 10 02-auth-headers.md | key.apiKey; sess:<sid> | value.key; sess:{uid}_{sid} | [ ] |
| G21 | Vol 10 09-forward-proxy.md | apiKey default + TokenExpiredError instanceof | conditional header; errorCode == "TokenExpiredError" | [ ] |
| G22 | Vol 10 07-error-model.md | backoffice checkError maps TOKEN_* | แมปข้อความอังกฤษ→ไทยเท่านั้น | [ ] |
| G23 | Vol 4 01-repository-map.md | lib/ = 24 subdirs | 31 | [ ] |
| G24 | Vol 12 compose | ทั้ง stack network_mode: host | เฉพาะ nginx | [ ] |
| G25 | Vol 12 Redis cu | rate-limit + session:* | prefixes อื่น; key = sess:{uid}_{sid} | [ ] |
| G26 | Vol 13 deploy | pull GCR tag แล้ว compose up โดยตรง | compose image ชื่อ local ไม่ตรง tag | [ ] |
| G27 | Vol 2 OTP | “OTP TTL 15 นาที (default 3)” | default 3 เท่านั้น | [ ] |
| G28 | Vol 14 LEG-10/29 | html-pdf / firebase ใน cu-central | มีใน vtrc-api เป็นหลัก | [ ] |
Theme H — Docs ขัด docs (Volume 14 ↔ 16)
| # | ปัญหา | Action |
|---|---|---|
| H1 | volume-16/.../04-debt-id-index.md สลับ SEC/LEG IDs กับ Vol 14 | [ ] ทำให้ A.4 ตรง Vol 14 ทีละ ID (อย่าแก้ Vol 14 ให้ตาม A.4 ถ้า Vol 14 เป็นต้นทางของ Wave tasks) |
| H2 | นับ Critical/High ไม่ตรงระหว่าง Vol 14 index, scorecard, A.4 | [ ] reconcile ตัวเลขเดียว |
| H3 | 06-environment-variables.md ชื่อตัวแปรผิด (DB_USER vs DB_USERNAME, PORT vs APP_PORT, Nest DB_NAME vs doc DB_DATABASE) | [ ] regenerate จาก .env.example + configuration.ts จริง |
| H4 | A.2 acronyms: VTRC = “Volunteer…” vs A.1 glossary | [ ] เลือกคำนิยามเดียว |
| H5 | A.1 glossary ขาด END_POINT_CENTRALIZE, ports, db/db2 | [ ] เพิ่ม entries จาก Canonical Truths |
| H6 | A.3 file-index: vtrc-web/webpack.config.js | [ ] → vtrc-web/config/webpack.config.js |
| H7 | A.3 / env: config.js:488-518 ระบุเป็น KBANK | [ ] เป็น statusKcash ไม่ใช่ KBANK_* |
| H8 | Vol 15 target Node 20 LTS (EOL เม.ย. 2026 ตามวันที่คู่มือ) | [ ] อัปเดต target LTS ที่ยัง support |
| H9 | Vol 14 scorecard Critical set ไม่รวม SEC-2/5 ตาม 01-critical | [ ] ทำให้ตรง |
P2 — citation / LOC drift (แก้เมื่อแตะไฟล์นั้น)
ตาม Errata E-06 — line numbers เลื่อนได้ตามเวลา แก้เมื่อแก้ไขบทนั้นอยู่แล้ว:
| พื้นที่ | ตัวอย่าง drift |
|---|---|
routes.js execSync | doc: 73,120… → จริง: 75,122,229,279,357 |
| Vol 6 LOC (Leave Form, Login, Slip…) | คลาด ±1–40 บรรทัด |
Vol 2 docker-compose.yml:35 nginx host | จริงบรรทัด 34 |
Vol 2 graphql.js:90 เป็นหลักฐาน apiKey | setup อยู่ :17-22 |
| Vol 10 auth route line ranges | signInByPass ไม่ได้อยู่ที่บรรทัดที่อ้าง |
| Vol 5 NestJS route order ในตาราง | ลำดับ method ไม่ตรง controller |
กฎ: อย่า cite ช่วงบรรทัดยาวโดยไม่เปิดไฟล์ยืนยันในวันเดียวกับที่เขียน
สิ่งที่ตรวจแล้วว่าถูกต้อง (อย่า “แก้” กลับ)
เพื่อกัน regression ตอนแก้:
checkLinkURL()mapping (prod / uat / localhost) ใน Vol 6 และตารางใน Vol 7- AntD v3 (web) / v4 (backoffice); React 16; Apollo Client v2 / react-apollo 3.x
- Dual MariaDB
db/db2ใน vtrc-api @auth(accessRole, accessMenu)บน vtrc-api- NestJS global
JwtAuthGuard+@Public()บนทุก route ปัจจุบัน - TypeORM + MSSQL dual connections ใน NestJS
- GraphQL path default
/api/graphql; UAT path ผ่าน env / origin branching - Changelog 2026-07-10 เรื่อง
END_POINT_CENTRALIZE→ cu-central (ทิศทางถูกต้อง — แต่พอร์ต 8082 ยังต้อง qualify)
Checklist งานแก้ไข (ลำดับแนะนำ)
- [ ] อัปเดต Canonical Truths section ใน Vol 0 + Vol 2 ให้เป็นหน้าเดียวที่ทุก volume อ้างอิง (โดยเฉพาะพอร์ต + NestJS role)
- [ ] Sweep Theme A ทั้ง repo docs — ค้นหา
centralize-api (NestJS)ในบริบท live path แล้วแก้ - [ ] Sweep Theme C — ค้นหา
กรุงเทพ+KBANKใน docs - [ ] Rewrite
volume-11/.../03-welfare-hospital.mdstatusKcashจากconfig.js:488-518 - [ ] Rewrite
volume-07/.../03-apollo-checklinkurl.mdจากvtrc-rc-backoffice/src/config/apollo.js - [ ] Rewrite Redis/OTP ใน Vol 12.7 + Vol 13.6/7/8
- [ ] Reconcile A.4 debt IDs ↔ Vol 14; regenerate A.6 env appendix จาก
.env.example - [ ] เพิ่ม Errata ใหม่ ใน
08-changelog-errata.md(ดูด้านล่าง) - [ ] อัปเดต Changelog วันที่แก้จริง
Errata ที่ควรเพิ่มใน A.8 (ยังไม่มีใน E-01…E-08)
คัดลอกไปใส่ volume-17-appendices/08-changelog-errata.md Part 2:
E-09 — NestJS ยังถูกอ้างเป็น live bridge ในหลาย volume
ที่มา: Audit 2026-07-11
รายลัพธ์: Vol 0, 1, 4, 8, 9, 12, 15 ยังมี diagram/prose ที่ให้ vtrc-api เรียก NestJS สำหรับ slip/auth/HR ทั้งที่ live path คือ cu-central-api
ผลกระทบ: วิศวกรใหม่ debug ผิด service
แนวทางแก้: Theme A ในไฟล์นี้
E-10 — พอร์ต cu-central สับสน (8080 / 8082 / 9000)
ที่มา: Audit 2026-07-11
รายลัพธ์: คู่มือมักระบุ 8082 เป็น default ของ cu-central; โค้ด default คือ 8080; Dockerfile EXPOSE 9000
ผลกระทบ: local setup / health check ผิดพอร์ต
แนวทางแก้: Theme B + Canonical Truths
E-11 — KBANK ถูกเขียนว่าธนาคารกรุงเทพ
ที่มา: Vol 0, 1
รายลัพธ์: ผิด — เป็นกสิกรไทย
แนวทางแก้: Theme C
E-12 — OTP / Redis ของ vtrc-api ถูกอธิบายเกินจริง
ที่มา: Vol 12, 13
รายลัพธ์: OTP อยู่ MariaDB ของ cu-central; vtrc Redis ส่วนใหญ่ vestigial
แนวทางแก้: Theme D
E-13 — statusKcash ใน Vol 11 ไม่ตรง config.js
ที่มา: Vol 11.3
รายลัพธ์: ตาราง id/label ในเอกสารไม่ตรงโค้ด (SUCCESS = '9')
แนวทางแก้: Theme E
E-14 — Volume 7 Apollo/Docker docs ไม่ตรงโค้ด
ที่มา: Vol 7.2–7.4
รายลัพธ์: อธิบาย API/functions/Dockerfile ที่ไม่มีใน repo
แนวทางแก้: Theme F
E-15 — A.4 Debt ID index ไม่ตรง Vol 14
ที่มา: Vol 16 A.4
รายลัพธ์: SEC/LEG ID สลับ — อ้างอิง Wave 15 อาจชี้ผิดรายการ
แนวทางแก้: Theme H1
วิธี verify หลังแก้
สำหรับแต่ละ claim ที่แก้:
# ตัวอย่าง — อย่าเชื่อเอกสารโดยไม่เปิดไฟล์
# 1) เปิดไฟล์ที่อ้าง
# 2) ยืนยันด้วย grep/ค้นหาชื่อฟังก์ชัน ไม่ใช่แค่เลขบรรทัด
# 3) ถ้า claim เป็น count — นับจาก filesystem/โค้ดใหม่เกณฑ์ผ่าน:
- ไม่มี diagram ที่ลากลูกศร
vtrc-api → NestJS centralize-apiโดยไม่มีป้าย “unconfirmed” - ไม่มีประโยค “KBANK = กรุงเทพ”
- ไม่มี runbook ที่บอกให้
KEYS otp:*บน vtrc-redis เพื่อหา OTP สมัครสมาชิก - ตาราง
statusKcashตรงconfig.js:488-518ทีละแถว - A.4 debt IDs ตรง Vol 14 ทีละ ID
สถิติการตรวจ
| รายการ | ค่าประมาณ |
|---|---|
| ไฟล์ docs ที่อยู่ในขอบเขต | ~200 .md |
| Themes หลักที่พบ | 9 (A–I) |
| รายการ P0 ที่ต้องแก้ | ~40+ |
| รายการ P1 | ~30+ |
| Volumes ที่ถูกต้องเป็นส่วนใหญ่หลังแก้ 2026-07-10 | 2, 3 (ยกเว้นพอร์ต/count), 6 (ยกเว้น counts), 10 (ยกเว้น citations), 5 (ยกเว้น endpoint counts) |
| Volumes ที่ต้อง rewrite ส่วนใหญ่ | 0 (บางบท), 7 (Apollo/Docker), 9 (auth flow), 11.3 (statusKcash), 16 (A.4/A.6) |
หมายเหตุขอบเขต
- ไม่ได้ รันระบบจริง / e2e เพื่อยืนยัน behavior ทุกข้อ — ยืนยันจาก static code + config ใน workspace
- ไม่ได้ เทียบ
docs/audit/ทีละบรรทัดกับ volumes ใหม่ทั้งหมด (audit เป็นเอกสารเก่า — ดู index.md) - Modernization (Vol 15) ที่เป็นแผนอนาคตไม่ถือว่า “ผิด” ยกเว้น current-state claims
- การวิเคราะห์นี้เป็น analysis only — ยังไม่ได้แก้เนื้อหา volume อื่น (ยกเว้นการสร้างไฟล์นี้)
Generated by /analysis docs↔code audit · 2026-07-11 `)