KB-5728 rev 5
02 — Current Live Status
7 min read Revision 5
start-herecurrent-live-statuslive-stateiu-corepipeline-fnsgatesno-vector-staging-zone
02 — Current Live Status
Snapshot tính đến ngày 2026-05-26 (sau 100000x PASS + 110500x APPLIED + LIVE-PROVEN mig 042R durable).
DB connection
- Container Docker:
postgres(imagepostgres:16, Up 5 weeks, healthy) - Database:
directus - Apply channel:
workflow_adminquapg_hba local trustsocket bên trong container - Kết nối:
docker exec -i postgres psql -U workflow_admin -d directus
Pipeline functions live (5 core)
| Function | Args | Returns | Macro |
|---|---|---|---|
fn_iu_mark_create_manifest |
(p_manifest jsonb, p_mark_report_md text, p_coverage_proof jsonb, p_determinism_digest text, p_source_kind text, p_source_ref text, p_idempotency_key text, p_actor text) |
jsonb | 91000x (mig 038) |
fn_iu_verify_mark |
(p_staging_record_id uuid, p_apply boolean, p_approval_doc_id text, p_approver text, p_actor text) |
jsonb | 91000x (mig 039) |
fn_iu_cut_from_manifest |
(p_staging_record_id uuid, p_apply boolean, p_source_hash text, p_actor text) |
jsonb | 100000x (mig 040R) |
fn_iu_verify_cut_result |
(p_run_id uuid, p_actor text) |
jsonb | 100000x (mig 041R) |
fn_iu_staging_cleanup |
(p_apply boolean, p_actor text) |
TABLE(staging_record_id, staging_kind, lifecycle_before, lifecycle_after, action) | 91000x (mig 037) |
Operator alias functions (5, LIVE post-110500x)
| Function | Wraps |
|---|---|
fn_iu_op_mark_file |
fn_iu_mark_create_manifest |
fn_iu_op_verify_mark |
fn_iu_verify_mark |
fn_iu_op_cut |
fn_iu_cut_from_manifest (auto-resolves source_hash from staged manifest) |
fn_iu_op_verify_cut |
fn_iu_verify_cut_result |
fn_iu_op_cleanup_dry_run |
fn_iu_staging_cleanup(false, ...) |
Supporting functions (cần để author manifest hoặc verify axes)
| Function | Args | Purpose |
|---|---|---|
fn_iu_create |
(p_canonical_address, p_title, p_body, p_actor, p_unit_kind, p_section_type, p_owner_ref, p_publication_type, p_parent_ref uuid) returns jsonb {iu_id} |
tạo information_unit row (gọi từ trong CUT, không gọi trực tiếp từ alias) |
fn_iu_collection_add_piece |
(p_collection_id uuid, p_iu_id uuid, p_piece_order integer, p_piece_role text, p_actor text) returns jsonb |
thêm IU vào collection (gọi từ CUT) |
fn_iu_compose |
(p_collection_key text, ...) returns jsonb |
composer entry |
fn_iu_reconstruct_source |
(p_doc_code text) returns TABLE |
Axis A check |
fn_iu_subtree |
(p_root uuid) returns TABLE |
Axis C check |
fn_iu_composer_enabled |
() returns boolean |
reads dot_config.iu_core.composer_enabled |
State counts (entry 2026-05-26)
| Counter | Value | Note |
|---|---|---|
information_unit rows |
175 | Pre-DIEU-37 |
| DIEU-28 pieces | 27 | |
| DIEU-32 pieces | 23 | |
| DIEU-35 pieces | 36 | |
| DIEU-36 pieces | 0 | |
| DIEU-37 pieces | 0 | clean target — first-cut candidate |
iu_vector_sync_point |
152 | |
iu_core.iu_staging_record |
3 | 1 sql_snapshot pending + 1 mark_manifest consumed + 1 nosql_payload rejected |
iu_core.iu_staging_payload |
4 | |
dot_iu_command_catalog |
41 | +5 sau 110500x apply |
dot_iu_command_run |
21 | |
public schema fns |
507 | +5 sau 110500x apply |
Qdrant iu_core_iu_chunks |
149 | untouched |
Gates
| Key | Value | Note |
|---|---|---|
iu_core.composer_enabled |
false |
mở để CUT, đóng ngay sau |
iu_core.retention_enabled |
false |
KHÔNG enable global |
CHECK vocabs (cần khớp chính xác)
| Cột | Vocab |
|---|---|
iu_core.iu_staging_record.staging_kind |
{mark_manifest, review_package, cut_preview, sql_snapshot, nosql_payload, draft_iu_composition, agent_intermediate, event_working_state} |
iu_core.iu_staging_record.lifecycle_status |
{pending, pending_review, approved, consumed, rejected, expired, cleaned} |
iu_core.iu_staging_record.source_kind |
{agent, user, system, import} |
iu_core.iu_staging_payload.payload_kind |
{json, text, blob_ref} |
information_unit.unit_kind (qua fn_iu_create) |
{design_doc_section, law_unit} |
information_unit.section_type |
{appendix, article, changelog, checklist, definition, governance_process, heading, instruction_block, paragraph, principle, process, section, technical_spec} |
iu_piece_membership.piece_role |
{title, intro, body, step, clause, appendix, reference} |
dot_iu_command_catalog.category |
{collection, piece, lifecycle, read, health} |
dot_iu_command_run.run_mode |
{plan, apply, verify} |
dot_iu_command_run.run_status |
{planned, applied, verified, refused, failed} |
iu_sql_link.link_role |
11-vocab (use represents cho "piece represents this DB object") |
Macro / Mig live history
| Mig | Status | Notes |
|---|---|---|
| 033 (25000x) | LIVE | auto-instantiate (untouched) |
| 037 (91000x) | LIVE | lifecycle hardening + cleanup + unregister |
| 038 (91000x) | LIVE | fn_iu_mark_create_manifest |
| 039 (91000x) | LIVE | fn_iu_verify_mark |
| 040R (100000x) | LIVE | fn_iu_cut_from_manifest (re-authored per live signatures) |
| 041R (100000x) | LIVE | fn_iu_verify_cut_result |
| 042R (110000x→110500x) | LIVE (applied 2026-05-26) | 5 fn_iu_op_* aliases + 5 DOT entries; Điều 37 alias proof PASS |
Last pg_dump baseline (informational)
- Pre-100000x: 893,887,758 bytes
- Post-100000x: 893,909,489 bytes (+21,731 B for 040R+041R)
- Pre-110000x (= post-100000x): 893,909,489 bytes
- Expected post-110000x: +25-35 KB for 5 alias fns + 5 DOT rows
Files surface inventory
KB paths an agent should know:
knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-cutting-operator-start-here/— ONBOARDING (this pack)knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-110000x-operator-alias-surface-d30-d31-protection/— alias surface macro reports (12 docs)knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-100000x-reauthor-apply-cut-verify-full-proof/— live pipeline (10 docs)knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-operational-cut-workflow-mark-review-cut-verify/— 80000x doctrine (11 docs)knowledge/dev/laws/dieu30-regression-protection-law.md— Điều 30 lawknowledge/dev/architecture/dieu31-review-request.md— Điều 31 reviewknowledge/dev/laws/dieu37-governance-organization-law.md— first KB test source