KB-E62E
§8 Tham chiếu HP + Luật + 20 TD
6 min read Revision 1
s176pg-reconfigtech-debtreferenceslaws
§8 THAM CHIẾU CHÉO HP + LUẬT + BÁO CÁO + 20 TD
Part of: PG Reform Tools — S176 mission Prev: 10-roadmap.md ← | → Next: 12-why-mo.md
§8.1 Hiến pháp + Luật
| Văn bản | Trạng thái | Liên quan PG-Reconfig |
|---|---|---|
| Hiến pháp v4.5.0 | ✅ BAN HÀNH S176 | NT3 có ngoại lệ. +Kiến trúc 4 DB + 3 lớp. Sẽ sửa v4.6.0 sau DESIGN tổng |
| Điều 33 Luật PostgreSQL v2.0 | ✅ BAN HÀNH S176 | §0 Kiến trúc, §13 Ngoại lệ, §14 Password GSM, §15 CI hooks. Sẽ sửa v2.1 sau DESIGN: +§16 DDL audit trigger, +§17 file_path constraint |
| Điều 35 Luật DOT v5.0 | ✅ S155 | 67 domain rules, 271 DOT — cần cập nhật target_db, target_layer, dot_type, kind, file_path_status |
| Điều 36 Luật Collection Protocol v4.0 | ✅ S155 | 17 health checks — DOT-COLLECTION-CREATE phải áp dụng đầy đủ |
| Điều 0-G Luật Khai Sinh | ✅ S157 | Birth registry — DOT-COLLECTION-CREATE phải insert, fix birth_registry count=0 |
| NT12 DOT cặp | OR | 148/223 vi phạm — fix theo batch §7.3 Đợt 5 |
| NT13 PG FIRST | OR | 5 ngoại lệ E1-E5 hợp pháp hoá |
| §0-AY (writer ngoài registry = vô hình) | OR | Bị vô hiệu hoá bằng metadata shells (KS.3) — cần sửa định nghĩa + constraint cứng |
data-connection-law.md v1.1 |
⛔ SUPERSEDED | Kiến trúc 3 lớp đã đưa lên HP v4.5.0 |
§8.2 Báo cáo điều tra S176
| Báo cáo | Path Agent Data | Trạng thái |
|---|---|---|
| K0 Timeline + Retention | knowledge/current-state/reports/s176-invest-k0-timeline-retention |
✅ rev 1 |
| K1 Official Channels | knowledge/current-state/reports/s176-invest-k1-official-channels |
✅ rev 1 |
| K2 Bypass Writers | knowledge/current-state/reports/s176-invest-k2-bypass-writers |
✅ rev 1 |
| K2-supplement (KS.1+KS.2+KS.3) | knowledge/current-state/reports/s176-invest-k2-supplement |
✅ rev 3 |
| K2-supplement KS.4 | idem | ⏳ rev 4 |
| K2-supplement KS.5 | idem | ⏳ rev 5 |
| K2-supplement KS.6 | idem | ⏳ rev 6 |
| K3 Credentials | knowledge/current-state/reports/s176-invest-k3-credentials-permissions |
⏳ |
| K4 Shadow Patterns | knowledge/current-state/reports/s176-invest-k4-shadow-patterns |
⏳ |
| K5 Catalog Baseline | knowledge/current-state/reports/s176-invest-k5-catalog-baseline |
⏳ |
| PG Reform Tools folder | knowledge/current-state/reform-PG-tools/ |
✅ Active (file này + 12 file khác) |
§8.3 20 TD S176 PG-Reconfig (nhóm theo block)
Từ K0-K2 (12 TD)
| TD | Priority | Mô tả ngắn |
|---|---|---|
| TD-375 | — | v_registry_counts TABLE writable (fix → VIEW/guard) |
| TD-376 | — | system_issues thiếu authenticity guard (gốc bệnh 9 writer S175) |
| TD-380 | — | retire_entity(), deprecate_entity() query bảng cũ — broken |
| TD-S176-PASSWORD-LEAK | 🔴 | Hardcoded Incomex2026PG_306ac539ad365fce git history |
| TD-S176-CI-CAT-ALL-BYPASS | 🔴 | Session var backdoor app.allow_meta_update |
| TD-S176-CI-SQL-AUTOAPPLY | 🟡 | 36 file SQL vĩnh viễn auto-apply qua marker |
| TD-S176-DOT-DEDUPE | 🟡 | 42 cặp DOT trùng tên (DOT-NNN vs DOT_SEMANTIC) |
| TD-S176-NT12-VIOLATION | 🟡 | 148/223 (66%) DOT thiếu cặp |
| TD-S176-DOT-RUN-LOG-MISSING | 🟡 | Bảng dot_run_log không tồn tại |
| TD-S176-BIRTH-REGISTRY-DEAD | 🟡 | Birth registry count=0 |
| TD-S176-CRON-INSTALLER-MISSING | 🟢 | 5/6 cron PG function không có installer DOT |
| TD-S176-DEAD-CODE-0048-MYSQL | 🟢 | 0048_link_policies_mysql.sql MySQL syntax fail PG |
| TD-S176-PG-DUMP-COMMITED | 🟢 | vps_pg_schema_incomex_metadata_kb_20260405.sql sensitive |
Từ KS.1 (3 TD)
| TD | Priority | Mô tả ngắn |
|---|---|---|
| TD-S176-DDL-MYSQL-ERA-AUDIT | 🔴 | INVISIBLE AUDIT GAP, cần PG event trigger |
| TD-S176-ADMIN-MONOPOLY-LEGACY | 🟡 | 2084 events user=admin, không phân biệt |
| TD-S176-LOG-WITH-SECRET | 🟡 | Rà log file tìm secret leak |
Từ KS.2 (2 TD + 1 closed)
| TD | Priority | Mô tả ngắn |
|---|---|---|
| TD-S176-2026-03-10-RESET | ✅ CLOSED | Hypothesis bị bác |
| TD-S176-SELF-HEALING-LATE | 🟡 | 4 tháng tối 2025-12-07→2026-03-10 không phát hiện |
| TD-S176-RUN-BEFORE-COMMIT | 🟡 | Operator chạy script trước commit → drift |
Từ KS.3 (4 TD)
| TD | Priority | Mô tả ngắn |
|---|---|---|
| TD-S176-METADATA-CATCHUP | 🔴 | 14/15 metadata shells, ~22% registry. Cần PG constraint + DOT + CI |
| TD-S176-VPS-FIRST-NO-HOOK | 🟡 | Workflow không hook validate metadata |
| TD-S176-LINTER-SELF-EXEMPT | 🟢 | dot-script-lint tự lách regex |
| TD-S176-INSTALLER-NOT-DOT | 🟢 | Định nghĩa DOT chưa cover installer |
§8.4 Tóm lược
Tổng: 20 TD (3 đỏ + 10 vàng + 6 xanh + 1 closed)
Đỏ phải fix sớm:
- TD-S176-PASSWORD-LEAK (Đợt 1)
- TD-S176-DDL-MYSQL-ERA-AUDIT (Đợt 8 + Đ33 §16)
- TD-S176-METADATA-CATCHUP (Đợt 8+9 + Đ33 §17)
- TD-S176-CI-CAT-ALL-BYPASS (Đợt 4)
File 11 — §8 Tham chiếu + TD | Index | S176 | Living doc