KB-5BB2

Phase 3B — Queue D30 Regression Pack

5 min read Revision 1
dieu45phase-3bd30regressionqueuemark-cutgates2026-05-26

Phase 3B — Queue D30 Regression Pack

Official queue-specific Điều 30 regression suite for future queue/cut runs. 10/10 PASS at Phase 3B exit.

# Check SQL Expected Result Status
Q1 event_outbox row count unchanged SELECT count(*) FROM event_outbox 134803 (Phase 3 baseline) 134,803 PASS
Q2 information_unit count unchanged SELECT count(*) FROM information_unit 192 192 PASS
Q3 production_documents absent SELECT to_regclass('public.production_documents') NULL NULL PASS
Q4 pg_cron absent SELECT count(*) FROM pg_extension WHERE extname='pg_cron' 0 0 PASS
Q5 extensions unchanged 4-tuple SELECT extname FROM pg_extension ORDER BY 1 {btree_gist,pgcrypto,plpgsql,postgres_fdw} same PASS
Q6 MARK/CUT alias bodies unchanged SELECT proname, md5(pg_get_functiondef(p.oid)) FROM pg_proc p JOIN pg_namespace n ON n.oid=p.pronamespace WHERE n.nspname='public' AND p.proname IN ('fn_iu_op_mark_file','fn_iu_op_verify_mark','fn_iu_op_cut','fn_iu_op_verify_cut','fn_iu_op_cleanup_dry_run','fn_iu_cut_from_manifest') per-fn md5 (pin below) matches PASS
Q7 fn_iu_create body unchanged SELECT md5(pg_get_functiondef('fn_iu_create'::regproc)) dcade99af1ef096892748c9f14082e11 (pre-apply) identical PASS
Q8 iu_vector_sync_point count unchanged SELECT count(*) FROM iu_vector_sync_point 152 152 PASS
Q9 risk-bearing gates safe SELECT key,value FROM dot_config WHERE key IN ('queue.job_substrate.enabled','queue.worker.enabled','queue.dlq.replay_enabled','queue.lease.reaper_enabled','queue.notify.enabled','iu_core.composer_enabled') all false all false PASS
Q10 iu_route_worker_cursor frozen SELECT last_run_at FROM iu_route_worker_cursor WHERE worker_name='iu_outbound_default' 2026-05-22 11:31:41.928657+00 identical PASS

MARK/CUT alias md5 pin (Phase 3B exit)

These md5s define the "official" alias contract at end of Phase 3B. Future packs that mutate any of these functions must accompany an equivalent contract-bump report.

proname md5(pg_get_functiondef)
fn_iu_cut_from_manifest c5d556bc22cc2d255c0484b5a969ebc5
fn_iu_op_cleanup_dry_run e3e82d1bf1c5b029c3f10ae0053d51e7
fn_iu_op_cut 66b813e50205448eb01170aebec614df
fn_iu_op_mark_file ffaa47fff7a906d93060141661080cd4
fn_iu_op_verify_cut ac61dade6519694310cbfd75d8b549fb
fn_iu_op_verify_mark bf20bd1929998073865808d17b1dd648

Bonus checks (passed, not numbered in the official 10)

  • Heartbeat row count: 2 (Phase 3 baseline) — unchanged at exit; the phase3b_synthetic_external row only existed inside BEGIN/ROLLBACK.
  • job_queue / job_dead_letter: 6 / 0 — unchanged; all phase3b probes ran in BEGIN/ROLLBACK with queue.job_substrate.enabled flipped true→ROLLBACK.
  • iu_outbound_default heartbeat row: untouched (last_tick_at=2026-05-22 11:31:41, ticks_total=0, last_tick_status=warn, metadata.marker=legacy_silent_passive).
  • hc_executor_last_run dot_config key still updating from the HC pattern (proven update at 2026-05-26T13:01:52 during Phase A baseline).

Phase 3B-specific signal (added durable rows)

Object Type Origin Counted toward Phase 3B baseline
5 × vocab.section_type.{invariant_list,matrix,open_decision_list,rationale,reference_mapping} dot_config rows Phase 3B Yes — see [[02-fn-iu-create-vocab-gap-fix]]
v_iu_section_type_vocab_sync VIEW Phase 3B New
fn_iu_section_type_vocab_sync_check() FUNCTION Phase 3B New
fn_queue_heartbeat_ping_external(text,text,text,jsonb) FUNCTION Phase 3B New

All other counts unchanged.

Test handler (re-runnable)

This whole pack can be re-executed at any time via:

-- Run from psql -U workflow_admin -d directus
\set ECHO queries
-- Q1..Q10 listed above, each runnable in isolation.
SELECT fn_iu_section_type_vocab_sync_check();  -- additional Phase 3B-introduced check

A future Phase 3C / Phase 4 author can fork this report and update the baseline counts column to reflect the new "expected" values for that pack.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-dieu45-phase-3b-queue-cutter-hardening/04-queue-d30-regression-pack.md