KB-7D4C

SR-BASELINE-SCAN Progress — Codex — run-2026-07-08a

6 min read Revision 1
reportscodexhistorical-sync

SR-BASELINE-SCAN Progress — Codex — run-2026-07-08a

WHO: codex RUN_ID: run-2026-07-08a GO: GO_SR_BASELINE_SCAN

TODO

  • Read .claude/skills/incomex-rules.md.
  • Read OR via search_knowledge("operating rules SSOT").
  • Read Constitution via search_knowledge("hiến pháp v4.0 constitution").
  • Read related foundation law via search_knowledge("law-01-foundation-principles").
  • Read required scan format v0.2 revision 5.
  • Read UI HTML and self-resolved JS for master-list-quy-trinh-v1.
  • Read UI HTML and self-resolved JS for mow-unified-canvas-v2.
  • Produce Codex-only JSONL/evidence/validator files for both UIs.
  • Run validator and record real output.
  • Run read-only PG check for master-list-quy-trinh-v1 if access works.
  • Final report with Bước 0-6 evidence.

Evidence Log

  • Local /opt/incomex is absent in desktop environment; production files will be read over SSH alias contabo using read-only commands.

Files Read

  • .claude/skills/incomex-rules.md.
  • knowledge/dev/ssot/vps/vps-operating-rules.md via search_knowledge("operating rules SSOT"), version shown: 1.0, date 2026-02-28.
  • knowledge/dev/laws/constitution.md via search_knowledge("hiến pháp v4.0 constitution"), current hit title showed Hiến pháp ... v4.6.3 BAN HÀNH.
  • knowledge/dev/laws-new/newlaws/notes/dieu1-foundation-principles-compatibility-note.md and old source pointer knowledge/dev/laws/law-01-foundation-principles.md via search_knowledge("law-01-foundation-principles").
  • knowledge/dev/laws-new/kestra/quy-trinh/chuan-format-bao-cao-quet-ui-v0-2.md via Agent Data/API, revision 5, truncated:false.
  • /opt/incomex/docs/mcp-writes/ui-preview/master-list-quy-trinh-v1.html.
  • /opt/incomex/docs/mcp-writes/ui-preview/master-list.js.
  • /opt/incomex/docs/mcp-writes/ui-preview/eco-nav.js.
  • /opt/incomex/docs/mcp-writes/ui-preview/mow-unified-canvas-v2.html.
  • /opt/incomex/docs/mcp-writes/ui-preview/mvx-v3.js.

3 câu Tuyên ngôn

  • Vĩnh viễn: baseline dùng run_id/who riêng, JSONL sort theo slot_key, anchor theo config_key > code_marker > text_marker; các lần sau có thể diff không phụ thuộc thứ tự dòng hay dữ liệu runtime.
  • Nhầm được không: validator kiểm 9 field, no null, no extra, slot_key formula, prefix anchor, no numeric array index, sorted, duplicate; output chỉ dùng file __codex, không đọc/ghi file agent khác.
  • 100% tự động: validator JSON được sinh và kiểm lại từ disk; PG-check master chạy SELECT read-only và ghi MATCH; không có bước sửa tay PG/UI/DOT.

Bước 0-6

  • Bước 0 nền tảng: áp dụng SSOT/read-only; không ghi PG, không sửa UI/source/DOT/manifest.
  • Bước 1 nhận việc: Owner đã cấp WHO=codex, RUN_ID=run-2026-07-08a, GO_SR_BASELINE_SCAN.
  • Bước 2 thiết kế: nhiệm vụ là baseline scan read-only, không phải feature/collection mới. UI1 nhận dạng config-driven; UI2 nhận dạng canvas + builder/proposal.
  • Bước 3 code/output: tạo đúng 3 file mỗi UI trong /opt/incomex/docs/mcp-writes/sua-re/scans/manual-baseline/run-2026-07-08a/<ui_id>/, đều mang hậu tố __codex.
  • Bước 4 triển khai: N/A theo mission read-only, không PR/deploy/merge.
  • Bước 5 verify: validator PASS từ file trên disk; PG-check master MATCH.
  • Bước 6 update/report: report này cập nhật tại knowledge/current-state/reports/. OR/TD không cần update vì không thay luật, không thay hạ tầng, không phát sinh debt triển khai.

Output Files

  • /opt/incomex/docs/mcp-writes/sua-re/scans/manual-baseline/run-2026-07-08a/master-list-quy-trinh-v1/master-list-quy-trinh-v1__codex.jsonl
  • /opt/incomex/docs/mcp-writes/sua-re/scans/manual-baseline/run-2026-07-08a/master-list-quy-trinh-v1/master-list-quy-trinh-v1__codex.evidence.md
  • /opt/incomex/docs/mcp-writes/sua-re/scans/manual-baseline/run-2026-07-08a/master-list-quy-trinh-v1/master-list-quy-trinh-v1__codex.validator.json
  • /opt/incomex/docs/mcp-writes/sua-re/scans/manual-baseline/run-2026-07-08a/mow-unified-canvas-v2/mow-unified-canvas-v2__codex.jsonl
  • /opt/incomex/docs/mcp-writes/sua-re/scans/manual-baseline/run-2026-07-08a/mow-unified-canvas-v2/mow-unified-canvas-v2__codex.evidence.md
  • /opt/incomex/docs/mcp-writes/sua-re/scans/manual-baseline/run-2026-07-08a/mow-unified-canvas-v2/mow-unified-canvas-v2__codex.validator.json

Validator Output

master-list-quy-trinh-v1 validator:
overall_status=PASS
slot_count=30
checks=json_parse PASS, exact_9_fields PASS, no_null PASS, no_extra_fields PASS,
slot_key_formula PASS, anchor_type_prefix PASS, no_numeric_array_index PASS,
sorted_by_slot_key PASS, no_duplicate_slot_key PASS, evidence_exists PASS,
pg_anchor_check MATCH
errors=[]

mow-unified-canvas-v2 validator:
overall_status=PASS
slot_count=86
checks=json_parse PASS, exact_9_fields PASS, no_null PASS, no_extra_fields PASS,
slot_key_formula PASS, anchor_type_prefix PASS, no_numeric_array_index PASS,
sorted_by_slot_key PASS, no_duplicate_slot_key PASS, evidence_exists PASS,
pg_anchor_check N_A
errors=[]

Disk Recheck Output

wc -l:
30 master-list-quy-trinh-v1__codex.jsonl
86 mow-unified-canvas-v2__codex.jsonl
116 total

independent JSONL check:
master-list-quy-trinh-v1: rows=30 sorted=True duplicate=False errors=[]
mow-unified-canvas-v2: rows=86 sorted=True duplicate=False errors=[]

PG Check Output

SELECT COUNT(*) AS current_count
FROM sua_re_ui_khai_niem_nhap
WHERE ui_id='master-list-quy-trinh-v1' AND is_current=true;

 current_count
---------------
            30
(1 row)

anchor compare:
pg_count=30
scan_count=30
missing_in_scan=[]
extra_in_scan=[]
pg_anchor_check=MATCH