KB-27CE

25000x · 06 — Bulk scaleout 12× via the event orchestrator (8 wf + 4 file, all digest-match)

3 min read Revision 1
iu-corev0.625000xphase-ebulk-scaleout-12xorchestrator-drivendigest-match-invariant

25000x · 06 — Bulk scaleout 12× via the event orchestrator

Driver

ops/25000x-event-automation-real-product-scaleout-ui-ops-finalization/05_bulk_scaleout_via_event_orchestrator.sql

A single TX:

  1. Flip iu_core.composer_enabled + iu_core.auto_instantiate_enabled to true.
  2. Loop 1..8 calling fn_iu_auto_instantiate_from_event for tpl:wf:onboarding/v2 with synthetic event_ids 25000b00-…001..008.
  3. Loop 1..4 calling the same function for tpl:file:status-report/v2 with synthetic event_ids 25000b10-…001..004.
  4. Flip both gates back to false before COMMIT.
  5. Read-back inside TX, COMMIT, then verify post-commit durability.

All 12 calls returned {"status":"ok"}. NOTICE log: wf bulk #1..8 -> ok (8) + file bulk #1..4 -> ok (4) + bulk scaleout completed: 8 wf + 4 file instances ok.

Result

Surface Pre-call Post-commit Delta
iu_auto_instantiate_event_log for actor iu-core-25000x-bulk 0 12 +12
iu_collection_template_instance_lineage for actor 0 12 +12
iu_piece_collection matching tpl-inst:auto:25000x-bulk-% 0 12 +12
gates composer_enabled / auto_instantiate_enabled true (inside TX) false (post-commit) gate-toggle proven again

Digest-match invariant: 12 matches / 0 diverges / 12 total. Phase F shared-graph invariant from 12000x holds at n=12.

Per-template observability after bulk

template_collection_key    | emit_mode | instance_count | instances_last_hour
---------------------------+-----------+----------------+---------------------
tpl:file:status-report/v2  | live      |              4 |                   4
tpl:wf:onboarding/v2       | live      |              9 |                   9

Total auto-instantiated rows: 13 (1 durable + 12 bulk). With 4 pre-existing manual lineage rows: 17 total lineage rows.

Rollback proof

fn_iu_auto_instantiate_rollback_by_actor('iu-core-25000x-bulk', true) (dry-run) reports would_delete_log_rows=12 / lineage=12 / instances=12. dry_run=false cascades sidecar log → lineage → instance collection → membership. Verified in Phase C10.

Why this is a better proof than 18000x bulk

Concern 18000x bulk 25000x bulk (orchestrator-driven)
Mechanism direct fn_iu_compose + fn_iu_collection_record_template_instance productized fn_iu_auto_instantiate_from_event
Idempotency none idempotency_key UNIQUE
Event correlation none event_id + event_type tagged per instance
Rollback only via 8000x compensation primitives per-actor fn (dry-run default)
Observability manual ad-hoc 2 views (per-row + per-template summary)
Templates exercised 1 (wf/v2 × 3) 2 (wf/v2 × 8 + file/v2 × 4)
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-25000x-event-automation-real-product-scaleout-ui-ops-open-goal/06-bulk-scaleout-12x-via-orchestrator.md