KB-3EBC

P10A-1B — D35 Segmentation Candidate v2 (Read-Only Patch, 2026-04-29)

11 min read Revision 1
p10ap10a-1bdieu-35dieu-38segmentationcandidate-v2read-onlys187

P10A-1B — Điều 35 Segmentation Candidate v2 (Read-Only Patch)

Date: 2026-04-29 Captured (UTC): 2026-04-29T04:02:21Z (source snapshot reused from P10A-1) Predecessor: knowledge/dev/laws/dieu38-trien-khai/reports/p10a-d35-segmentation-candidate-2026-04-29.md Mode: ZERO MUTATION. No DB queries needed (reused P10A-1 schema/vocab snapshot). Source body re-fetched read-only via GET /api/documents/.../full=true to compute per-segment hashes.


0. PASS Outcome

# Criterion Result
1 Root body ≤ 200 chars (no full-doc payload) ✅ 78 bytes (12 words)
2 dieu35.preamble.parent_key = dieu35.root
3 §4 SCHEMA split into ≥2 children, each < technical_spec soft_limit (1000 words) ✅ 7 children, max 389 words
4 Section_type diversity ≥ 4 12 distinct types
5 description present on every unit
6 word_count + length_flag_expected per unit
7 Report uploaded at v2 path ✅ (this file)

ALL 7 PASS.


1. Source Re-snapshot (unchanged from P10A-1)

Field Value
Path knowledge/dev/laws/dieu35-dot-governance-law.md
Revision 13
SHA256 4353ec6d453411a7c8e207658bbc4457d00f99747cba90551c8a4926894d2e5c
Bytes (UTF-8) 39,938

2. Distinct section_types used (12)

appendix, article, changelog, checklist, definition, governance_process, heading, instruction_block, paragraph, principle, process, technical_spec. All ∈ tac_section_type_vocab (active).


3. Unit Inventory (30 units)

sort unit_key parent_key section_type wc flag title
-1 dieu35.root article 12 normal ĐIỀU 35: LUẬT QUẢN TRỊ DOT — v5.2 FINAL (synthetic root)
0 dieu35.preamble dieu35.root heading 215 soft_limit Preamble (title block + meta)
1 dieu35.s1 dieu35.root principle 212 normal §1. MỤC TIÊU
2 dieu35.s2 dieu35.root paragraph 295 normal §2. PHẠM VI
3 dieu35.s3 dieu35.root definition 197 normal §3. DOT 2 CẤP
4 dieu35.s4 dieu35.root technical_spec 5 normal §4. SCHEMA (parent)
5 dieu35.s4.1 dieu35.s4 technical_spec 223 normal 4.1 dot_tools — 11 fields
6 dieu35.s4.sub2 dieu35.s4 technical_spec 310 normal ★ v5.1 KHOẢN 1 — UNIQUE PARTIAL + NOT NULL + REFERENCE TABLES
7 dieu35.s4.sub3 dieu35.s4 technical_spec 389 normal ★ v5.1 KHOẢN 1B — ĐỊNH NGHĨA 2 HÀM PHỤ TRỢ
8 dieu35.s4.sub4 dieu35.s4 technical_spec 277 normal ★ 4.1.1 DOT Description Contract
9 dieu35.s4.2 dieu35.s4 technical_spec 40 normal 4.2 dot_domains
10 dieu35.s4.3 dieu35.s4 technical_spec 34 normal 4.3 dot_coverage_required
11 dieu35.s4.4 dieu35.s4 technical_spec 147 normal 4.4 dot_config
12 dieu35.s5 dieu35.root process 462 normal §5. QUY TRÌNH TẠO DOT MỚI — 8 BƯỚC
13 dieu35.s6 dieu35.root governance_process 5 normal §6. VÒNG ĐỜI DOT (parent)
14 dieu35.s6.1 dieu35.s6 paragraph 19 normal 6.1 Trạng thái
15 dieu35.s6.2 dieu35.s6 governance_process 176 normal 6.2 Flow Sửa Bug DOT (fix_repair_dot)
16 dieu35.s6.3 dieu35.s6 governance_process 96 normal 6.3 Điều kiện từng bước
17 dieu35.s6.4 dieu35.s6 governance_process 85 normal 6.4 Verify 3 tầng
18 dieu35.s6.5 dieu35.s6 governance_process 99 normal 6.5 ADMIN Fallback
19 dieu35.s6.6 dieu35.s6 paragraph 36 normal 6.6 Paired test bắt buộc (NT12)
20 dieu35.s6.7 dieu35.s6 paragraph 21 normal 6.7 Retrofit
21 dieu35.s7 dieu35.root process 35 normal §7. ĐO LƯỜNG
22 dieu35.s8 dieu35.root governance_process 650 soft_limit §8. DOT TỰ QUẢN TRỊ — 4 CẶP
23 dieu35.s9 dieu35.root instruction_block 463 normal §9. BOOTSTRAP — 4 BLOCKS
24 dieu35.s10 dieu35.root checklist 142 normal §10. SUCCESS METRICS
25 dieu35.s11 dieu35.root governance_process 343 normal §11. RETROFIT CLAUSE
26 dieu35.s12 dieu35.root paragraph 30 normal §12. (Đã bỏ) tombstone
27 dieu35.appendix_a dieu35.root appendix 209 normal PHỤ LỤC A — 24 Domain Seed
28 dieu35.changelog dieu35.root changelog 316 normal CHANGELOG
29 dieu35.post_merge_todo dieu35.root checklist 132 normal GHI CHÚ BAN HÀNH (post-merge TODO)

Total: 30 units.

Length flag summary

  • normal: 28 units
  • soft_limit: 2 units
    • dieu35.preamble — 215 words (heading.soft=100). Acceptable: preamble is metadata-heavy; could re-type to paragraph if needed (paragraph.soft=300, would flip to normal).
    • dieu35.s8 — 650 words (governance_process.soft=500). Within hard_limit (1500). Recommend P10A-2 split into 4 cặp DOT children if drift continues, or accept soft_limit_exception.
  • hard_limit: 0

4. Patch-by-patch summary (responses to GPT review)

# Patch Implementation
1 Root body minimal dieu35.root.body = "Điều 35 — Luật Quản trị DOT v5.2 FINAL (synthetic structural root)." (78 bytes, 12 words). body_sha256 = 5f32d336…3982bd.
2 Preamble child of root parent_key = "dieu35.root", section_type = "heading".
3 §4 split 1 parent (dieu35.s4, body=placeholder) + 7 children (s4.1, s4.sub2, s4.sub3, s4.sub4, s4.2, s4.3, s4.4) all technical_spec. Word counts: 5 / 223 / 310 / 389 / 277 / 40 / 34 / 147 — all < soft_limit 1000.
4 §6 split Detected 7 ### 6.x subheadings → split. Parent dieu35.s6 (placeholder body) + 6.1..6.7 children. 6.1/6.6/6.7 demoted to paragraph due to short bodies; 6.2/6.3/6.4/6.5 kept governance_process.
5 section_type diversity 12 distinct types vs 6 in v1. Mapping table: §1=principle, §2=paragraph, §3=definition, §4=technical_spec, §5=process, §6=governance_process, §7=process, §8=governance_process, §9=instruction_block, §10=checklist, §11=governance_process, §12=paragraph. Deviations from GPT guidance: none kept; all suggestions adopted. (§7 kept process per dispatch note "quá ngắn để đổi").
6 description + word_count + length_flag_expected Added to every unit. description derived from first_para heuristic (≤80 words), capped & cleaned of leading list/table/code-fence noise. length_flag_expected computed via vocab soft_limit_words / hard_limit_words per section_type.

Caveats on auto-generated description

  • For sections whose body opens with a table or SQL code fence (e.g. §3, §4.x, §5, §9), the heuristic falls through to the first non-decorative line, which sometimes lands inside an SQL block (e.g. dieu35.s3.description starts with CREATE OR REPLACE FUNCTION fn_dot_enforce_paired()…). Functionally valid as a "first prose-or-fenced summary" placeholder, but P10A-2 should regenerate description per Đ43 description-governance template (e.g. [MỤC ĐÍCH]: …) before INSERT.
  • dieu35.s3.section_type = definition has description_required=true, body_required=true — both satisfied (description non-empty, body 1215 bytes). ✅
  • dieu35.preamble.section_type = heading has description_required=false, body_required=false — descriptions provided regardless (defensive). ✅

5. Vocab-validation table (section_type vs body_required / description_required)

section_type body_req desc_req soft / hard units using all bodies present all descriptions present
article t t 500 / 1500 1
heading f f 100 / 300 1 ✅ (defensive)
principle t t 300 / 800 1
paragraph t t 300 / 1000 5
definition t t 200 / 500 1
technical_spec t t 1000 / 3000 8 ✅ (parent placeholder is short prose, not empty)
process t t 500 / 1500 2
governance_process t t 500 / 1500 6 ✅ (s6 parent is placeholder)
instruction_block t t 1000 / 3000 1
checklist t t 300 / 1000 2
appendix t t 2000 / 5000 1
changelog t t 500 / 2000 1

No body_required / description_required violations.


6. Open Items for P10A-2 (carry-forward, unchanged scope)

  • D1 root: kept as article (synthetic), 12-word body. Acceptable per article.body_required=true; body_sha256 hashed over the literal placeholder string. P10A-2 may keep or drop; if dropped, all §-units must be re-parented to publication-level.
  • D2 §4 children: split adopted; some carry markers (KHOẢN 1, 1B, 4.1.1) — keys dieu35.s4.sub2/sub3/sub4 chosen because the source uses ### ★ v5.1 KHOẢN ... headings without numeric prefixes. P10A-2 may rename to canonical dieu35.s4.kh1 / s4.kh1b / s4.1.1.
  • D3 (heading-only units): dieu35.preamble is the only heading-typed unit. Body 1397 bytes carries the title-meta block. Accept.
  • D4 description backfill: see §4 caveat — auto-gen heuristic is good enough for candidate but must be regenerated per Đ43 template at P10A-2 time.
  • D5 §12 tombstone: now typed paragraph per GPT guidance (was process).
  • §8 soft_limit: P10A-2 should split into 4 children (one per cặp DOT) or apply length_exception_reason.

7. Đ41 / VPS Code Hygiene

  • Zero repo files modified. No git activity required.
  • Temp artifacts on VPS (kept for audit; SHA256 recorded):
    • /tmp/seg2.py — segmenter v2 (sha256 90ebb12d76902c63579c799f1232244f4a1db109a30364dea7275927983b8d29)
    • /tmp/d35-segments-v2.json — full candidate JSON 26,111 bytes (sha256 fb32786c33f8fc459bbaddd6c539c7def4e21331ed0ef44993068eab5c1f7ee6)
    • /tmp/units-v2.json — units array, 24,679 bytes
  • Local mirror: /tmp/seg2.py (source).

8. STOP

P10A-1B closes here. All 7 PASS criteria met. Hand off to GPT for v2 review and P10A-2 dispatch.


P10A-1B report v2 | S187 | 2026-04-29 | Read-only patch | 7/7 PASS

Back to Knowledge Hub knowledge/dev/laws/dieu38-trien-khai/reports/p10a-d35-segmentation-candidate-v2-2026-04-29.md