Điều tra Đ26, Đ28, Đ39, VPS TDs — Production Evidence
Điều tra Đ26, Đ28, Đ39, VPS TDs — Production Evidence
Date: 2026-04-05 | Status: ĐIỀU TRA XONG
1. Đ26 Luật Pivot — P3 còn gì?
✅ Hoạt động tốt
| Hạng mục | Evidence |
|---|---|
pivot_count() |
Exists, 1 arg |
refresh_pivot_results() |
35 pivots refreshed OK |
refresh_meta_catalog_from_pivot() |
Cron */10 chạy OK |
pivot_definitions |
37 definitions |
pivot_results |
Data live, refreshed_at 2026-04-05 06:42 |
meta_catalog |
161 rows, 6 count columns |
| Cron pivot-refresh | */10 min — OK |
| Cron pivot-results | */10 min — OK |
dot-pivot-health |
6/8 PASS, 2 WARNING |
dot-matrix-health |
Exists, runs |
Nuxt /knowledge/pivot |
HTTP 200 ✅ |
Nuxt /knowledge/registries/matrix |
HTTP 200 ✅ |
taxonomy_matrix collection |
Exists in Directus |
⚠️ Cần xử lý
| Hạng mục | Vấn đề | Severity |
|---|---|---|
trg_auto_sync_registry_counts |
DISABLED (tgenabled='D') | P1 — counts chỉ update qua cron, không real-time |
matrix_results table |
KHÔNG TỒN TẠI — refresh_matrix_results() cron chạy nhưng có thể dùng view/pivot_results thay thế |
P2 — cần verify |
dot-pivot-health |
2 WARNING items | P2 — chạy --fix |
Kết luận Đ26
85% done. Pivot core hoạt động. P3 = enable trigger + fix 2 warning. Không cần code mới.
2. Đ28 Kỹ thuật Hiển thị — S150-P3 scope?
Hiện trạng
| Hạng mục | Status |
|---|---|
| Nuxt pages | 51 pages deployed |
| Pivot page | ✅ Live |
| Matrix page | ✅ Live |
| Registries (entity, species, taxonomy, health, changelog, system_issue, unmanaged) | ✅ Live |
| Knowledge tree | ✅ /admin/knowledge-tree |
| Approval desk | ✅ /approval-desk |
| Blueprints | ✅ /blueprints |
Đ28 yêu cầu gì?
Đ28 = "Kỹ thuật Hiển thị" — rules about HOW data renders on Nuxt. Key requirements:
- ✅ UTable/Nuxt UI components (không custom)
- ✅ Config-driven display (Directus → Nuxt, không hardcode)
- ⬜ Hiển thị labels/facets theo Đ24 — cần verify từng trang
- ⬜ Matrix display enhancements —
taxonomy_matrixcollection exists nhưng chưa rõ UI đã render hết chưa
Kết luận Đ28
70% done. Pages deployed + live. P3 = verify Đ24 label integration + matrix display completion. Cần review Nuxt source code chi tiết — KHÔNG cần PG work.
3. Đ39 Knowledge Graph — làm được gì không cần Langroid?
PG tables đã có
| Table | Rows | Ghi chú |
|---|---|---|
kg_quality_log |
0 | Empty — chưa có quality scoring |
evolution_snapshots |
1 | 1 snapshot |
kg_source_authority |
5 | Source ranking |
kg_acl_config |
— | Access control config |
kg_auto_approve_rules |
— | Auto-approve rules |
kg_constraint_config |
— | Constraint config |
kg_priority_templates |
— | Priority templates |
kg_signal_config |
— | Signal config |
kg_thresholds |
— | Quality thresholds |
Governance data (Đ37+38 — KG foundation)
| Table | Rows | Ghi chú |
|---|---|---|
governance_registry |
5 | 5 agencies |
normative_registry |
40 | 40 normative documents |
normative_relations |
13 | Inter-law relations |
law_jurisdiction |
38 | Law → domain mappings |
law_dot_enforcement |
265 | Law → DOT enforcement links |
Có thể làm bằng PG/DOT (không cần Langroid)
- ✅ Governance data — đã có, có thể enriching thêm relations
- ✅ PG views —
v_system_topology,v_gov_*(hiện 0 views — cần tạo) - ✅ Quality scoring baseline — populate
kg_quality_logtừ existing data - ✅ evolution_snapshots — schedule periodic snapshots
- ✅ normative_bindings table — chưa tồn tại, Đ38 cần
BẮT BUỘC cần Langroid/AI
- ❌ Scaffold Graph — AI phân tích document → extract entities/relations
- ❌ Priority Graph HTN — AI planning
- ❌ Self-Learning RLKGF — reinforcement learning
- ❌ Conversational Acquisition — AI asks user for missing info
- ❌ Auto-classification — AI species/category assignment
Kết luận Đ39
Phase 0+1 done (40%). PG tables + governance data exists. Phase 2-4 = AI features → Langroid REQUIRED. Nhưng có thể hoàn thiện PG foundation (views, quality baseline, snapshot schedule) trước khi cần AI.
4. VPS TDs — Verify thực tế
TD-VPS-GET401: GET API trả 401?
GET /documents/knowledge__dev__ssot__operating-rules.md → HTTP 200 ✅
GET /documents/knowledge__dev__laws__constitution.md → HTTP 200 ✅
GET /documents/knowledge__current-state__reports__kb-protection-phase2-report → HTTP 200 ✅
GET without API key → HTTP 200 (⚠️ no auth required!)
Kết luận: GET 401 bug ĐÃ FIX (hoặc không reproduce). Nhưng GET không yêu cầu API key = security concern.
TD-VPS-UPLOAD: MCP upload hoạt động?
POST /documents (test doc) → HTTP 200 ✅
DELETE (cleanup) → OK
Kết luận: Upload HOẠT ĐỘNG. (Note: PUT/PATCH API vẫn broken — returns success nhưng không persist. Đã confirm ở S166-KB.)
TD-VPS-MEM: Docker memory
incomex-agent-data 1.051 GiB / 2.5 GiB (42%)
postgres 201.5 MiB / 2 GiB (10%)
incomex-nginx 31.82 MiB / 256 MiB (12%)
incomex-nuxt 120.6 MiB / 512 MiB (24%)
incomex-directus 190.2 MiB / 1 GiB (19%)
incomex-qdrant 111 MiB / 1 GiB (11%)
uptime-kuma 133.9 MiB / 11.68 GiB (1%)
---
System RAM: 2.9 GiB used / 11 GiB total (26%)
Disk: 51G / 96G (53%)
Kết luận: Agent Data 1.05 GiB ổn định (mem_limit raised to 2.5G). System healthy.
TD-VPS-ORPHAN: Qdrant orphan vectors
Documents: 868 | Vectors: 1,312 | Ratio: 1.51
Orphan estimate: 1,312 - 868 = 444 vectors
Kết luận: ~444 orphan vectors (~34% dư). Cần chạy dot-vector-audit để cleanup.
DOT Registry
dot_tools: 270 total, 254 active, 16 inactive
Tổng kết
| Điều | % Xong | Blocker chính | Next action |
|---|---|---|---|
| Đ26 | 85% | Trigger disabled, 2 warnings | Enable trigger + fix warnings |
| Đ28 | 70% | Đ24 label verify, matrix UI | Review Nuxt source |
| Đ39 | 40% | Phase 2-4 = Langroid | PG foundation (views, quality) |
| TD | Status | Action |
|---|---|---|
| TD-VPS-GET401 | ✅ Không reproduce | Close (nhưng note: API open without key) |
| TD-VPS-UPLOAD | ✅ POST works | Note: PUT/PATCH broken |
| TD-VPS-MEM | ✅ 1.05G/2.5G stable | Monitor |
| TD-VPS-ORPHAN | ⚠️ 444 orphans (34%) | Chạy dot-vector-audit |
Điều tra xong | 0 files sửa | Chờ user duyệt priorities