KB-8789 rev 2

Yêu cầu Claude Code — Rà soát lần 2 + SSH Verify

3 min read Revision 2
councilclaude-coderesearchdieu26round2ssh-verify

YÊU CẦU CLAUDE CODE — RÀ SOÁT LẦN 2 + SSH VERIFY

Gửi: Claude Code CLI (claude-go) Lần: 2 (sau feedback lần 1 đã tích hợp vào v3.4) KHÔNG SỬA CODE. Chỉ đọc, verify SSH, báo cáo.


NHIỆM VỤ LẦN 2

1. ĐỌC LUẬT MỚI v3.4

search_knowledge("Điều 26 mới pivot table")

→ So sánh v3.3 (lần 1) vs v3.4 (lần 2). 9 điểm sửa. Đã đủ chưa?

2. SSH VERIFY 6 GAPS (G1-G6 từ lần 1)

# G1: status field trên managed collections
docker exec -i postgres psql -U directus -d directus -c "
  SELECT table_name, column_name FROM information_schema.columns 
  WHERE column_name='status' AND table_schema='public' 
  AND table_name IN (SELECT registry_collection FROM meta_catalog WHERE registry_collection IS NOT NULL);"

# G4: Guards/triggers TỒN TẠI không?
docker exec -i postgres psql -U directus -d directus -c "
  SELECT trigger_name, event_object_table FROM information_schema.triggers 
  WHERE trigger_name LIKE '%guard%' OR trigger_name LIKE '%validate%';"

# G6: meta_catalog có bao nhiêu dòng vs UNION ALL có bao nhiêu entries
docker exec -i postgres psql -U directus -d directus -c "
  SELECT COUNT(*) as meta_rows FROM meta_catalog WHERE registry_collection IS NOT NULL;"

3. VERIFY CODE ĐANG ĐỌC v_registry_counts (Q5 — ai đang dùng code cũ?)

# Tìm mọi file đọc v_registry_counts
grep -r "v_registry_counts" web/server/ web/pages/ scripts/ --include="*.ts" --include="*.vue" --include="*.js" -l

# Tìm mọi file đọc refresh_registry_counts
grep -r "refresh_registry_counts" web/server/ scripts/ sql/ --include="*.ts" --include="*.js" --include="*.sql" -l

# Tìm mọi file đọc record_count từ meta_catalog
grep -r "record_count" web/server/ web/pages/ --include="*.ts" --include="*.vue" -l

# Tìm mọi file đọc v_registry_summary
grep -r "v_registry_summary" web/server/ web/pages/ scripts/ --include="*.ts" --include="*.vue" --include="*.js" -l

Báo cáo: Danh sách CHÍNH XÁC file + dòng đang phụ thuộc code cũ. Nếu #DISABLE → break ở đâu?

4. ĐỀ XUẤT LỘ TRÌNH MISSION 1 CỤ THỂ

Dựa trên v3.4 (filter JSON):

  • pivot_definitions CREATE TABLE SQL cụ thể (jsonb fields)
  • pivot_count() FUNCTION SQL cụ thể (parse JSON → WHERE)
  • Danh sách triggers cụ thể cần #DISABLE
  • Danh sách files Nuxt cần sửa (từ grep kết quả trên)
  • Seed data 20 dòng INSERT (từ meta_catalog hiện tại)

5. KIỂM TRA TƯƠNG THÍCH

Có tính năng nào ĐÃ LÀM trong code (runner, scanner, DOT tools) mà v3.4 chưa xem xét? Ví dụ:

  • test_counting_contract() → giữ hay disable?
  • v_registry_summary → giữ hay disable?
  • refresh_registry_counts() → giữ hay disable?
  • active_count field meta_catalog → pivot populate hay giữ logic cũ?

OUTPUT

Upload: knowledge/current-state/reports/council-claude-code-review-dieu26-v3-round2.md


Claude Code Round 2 | SSH verify + code dependency analysis + Mission 1 roadmap