KB-1D62

Clone SQL D — Issue/Event Boundary (sha256 06b7cdd8…)

2 min read Revision 1
one-roofnonprod-clonesqlevent-boundary

-- STEP D — ISSUE / EVENT / LOG BOUNDARY (CLONE ONLY) -- sha256: 06b7cdd81bae6848741cdb6e660480bdf371c8e8fbfb1a3b8cba8c7fc299bde5 -- (1) payload shaping read-only (coverage/candidate/would-be-issue JSON). -- (2) emit boundary BEGIN..ROLLBACK: N1 insert governance/coverage.scan_completed -- (active=false) -> REJECT 'is inactive'; N2 governance/totally.made_up -> -- REJECT 'unknown'; gov_emit_in_txn=0; ROLLBACK. -- (3) issue boundary read-only ONLY (system_issues has 9 triggers; nothing written). -- RESULT: emit fail-closed both cases, gov_emit=0, system_issues unchanged (PASS). \set ON_ERROR_STOP off \pset pager off SELECT jsonb_build_object('event','coverage.scan_completed','total_cells',210,'gap_cells',(SELECT count(*) FROM v_object_owner_gap),'coverage_pct',100.0) AS coverage_payload; BEGIN; SAVEPOINT n1; INSERT INTO event_outbox (id,event_domain,event_type,event_stream,delivery_lane,event_severity,event_subject_table,event_subject_ref,safe_payload,occurred_at) SELECT gen_random_uuid(),'governance','coverage.scan_completed',event_stream,delivery_lane,'info','v_object_owner_gap','clone-test','{}'::jsonb,now() FROM event_type_registry WHERE event_domain='governance' AND event_type='coverage.scan_completed'; ROLLBACK TO n1; SAVEPOINT n2; INSERT INTO event_outbox (id,event_domain,event_type,event_stream,delivery_lane,event_severity,safe_payload,occurred_at) VALUES (gen_random_uuid(),'governance','totally.made_up','s','l','info','{}'::jsonb,now()); ROLLBACK TO n2; ROLLBACK;

Back to Knowledge Hub knowledge/dev/reports/architecture/one-roof-nonprod-clone-full-coverage-pipeline-2026-06-02/sql/D_issue_event_boundary_clone.sql