KB-401A
15000x · 07 — Piece Event Runtime dry-run emission proof (bounded BEGIN/ROLLBACK; emit_mode=dry_run tagged; +1 row then reverted)
3 min read Revision 1
iu-corev0.615000xpiece-event-runtimedry-run-prooffn_iu_piece_emit_eventbegin-rollbackbounded
15000x · 07 — Piece Event Runtime dry-run emission proof (bounded)
Goal
Re-verify after 15000x productization that the Piece Event Runtime (migration 029 / 11000x):
- Emits when
piece_event_runtime.emit_enabled = true - Tags
safe_payload.emit_mode = 'dry_run'whendry_run_only = true - Reverts on ROLLBACK (gate + row)
- Post-state byte-identical to pre-state
SQL — ops/15000x-…/02_piece_event_runtime_dry_run_proof.sql
Bounded BEGIN…ROLLBACK. Direct call to fn_iu_piece_emit_event with correct arg order:
public.fn_iu_piece_emit_event(
'superseded', -- p_event_type
(SELECT canonical_address FROM target), -- p_canonical_address (15000x template piece)
(SELECT iu_id FROM target), -- p_subject_ref
'iu-core-15000x-dry-run', -- p_actor_ref
jsonb_build_object('macro','15000x-productization', …) -- p_safe_payload
)
In-TX transcript
BEGIN
UPDATE 1 -- emit_enabled = true
-- gate state
piece_event_runtime.dry_run_only | true
piece_event_runtime.emit_enabled | true
iu_core.routes_master_enabled | true
step | emit_id
-------------+--------------------------------------
emit_direct | e1a5b02a-de63-4e64-b9c6-19f5896bcba3
view_delta | 1 ← v_piece_event_outbox +1
piece_outbox_delta | 1 ← event_outbox(piece) +1
check | event_domain | event_type | emit_mode | pass
----------------+--------------+------------+-----------+------
dry_run_tagged | piece | superseded | dry_run | t
UPDATE 1 -- emit_enabled = false (in-TX close)
ROLLBACK
Post-rollback assertions
emit_enabled_post | false ← pre-state
dry_run_only_post | true ← pre-state
piece_outbox_post | 0 ← rolled back
macro_marker_present_post | 0 ← row vanished
What this confirms
| Claim | Evidence |
|---|---|
| Runtime fires when emit gate opens | emit_id returned, view_delta=1 |
| Discriminator stamps emit_mode='dry_run' | dry_run_tagged.pass=true |
| Master + runtime + registry gates respected | all three checked |
| ROLLBACK reverts gate + row | post-rollback assertions all green |
| Macro stays bounded | dot_config restored; zero piece events durable |
Why no live-emission proof
- Authority pack permits dry-run only.
- No subscriber wired (
iu_core.delivery_enabled = false). - Live-mode flip is 13000x+ carry-forward.
Carry-forward to 16000x+
When 16000x or later wants live emission, flip dry_run_only = false AFTER:
- At least one subscriber wired
- Bounded probe verifies subscriber acks an emitted row
- event_outbox(piece) growth baseline recorded
This 15000x dry-run proof becomes the "is runtime alive?" smoke test before each live-mode flip.