KB-5DB9

12000x · 03 — Phase D · Workflow-from-7-step-pieces proof (digest 0d1da72850c71618a759cf08709f3825)</title> <parameter name="tags">["iu-core","v0.6","12000x","phase-d","workflow","fn_iu_compose","begin-rollback","pass"]

4 min read Revision 1

12000x · 03 — Phase D · Workflow-from-7-step-pieces proof

Goal

Prove fn_iu_compose can mint a multi-step workflow as a single atomic operation: 7 new piece IUs + a workflow collection + 7 ordered memberships in one call, with ordering and roles correct, and a deterministic manifest digest the rest of the system can index against. BEGIN/ROLLBACK; assert ZERO persistence on rollback.

SQL

BEGIN;
UPDATE dot_config SET value='true' WHERE key='iu_core.composer_enabled';
SELECT public.fn_iu_compose(
  'iu_core.12000x.workflow.invoice-approval','workflow',
  'Invoice approval workflow (12000x proof)',
  'Demonstrates fn_iu_compose minting 7 step pieces into one workflow',
  jsonb_build_array(
    jsonb_build_object('role','step','new_piece', jsonb_build_object(
      'canonical_address','iu_core/12000x/wf/invoice/01-receive',
      'title','Step 1 — Receive invoice', 'body','Accept invoice via intake channel.',
      'unit_kind','design_doc_section','section_type','process')),
    -- 02-validate, 03-3way-match, 04-route-approval, 05-decision, 06-post-gl, 07-notify (analogous)
  ),
  'iu-core-12000x');

Live response

{
  "ok": true,
  "collection_id": "84115abf-6aea-4272-8bb7-d0409906d924",
  "pieces_minted": 7,
  "collection_key": "iu_core.12000x.workflow.invoice-approval",
  "collection_kind": "workflow",
  "minted_unit_ids": ["2810afc2-…","00a323de-…","b0eb9f84-…","2774f59a-…","80bee251-…","4d1e0c36-…","858352ec-…"],
  "pieces_attached": 7
}

D.1 — Collection row

id manifest_digest collection_kind source_axis_kind
84115abf-6aea-4272-8bb7-d0409906d924 0d1da72850c71618a759cf08709f3825 workflow composed

source_axis_kind=composed (assembly generated, not from cut).

D.2 — Validate

{"ok": true, "errors": [], "warnings": [], "piece_count": 7}

D.3 — Render (ordered piece view)

piece_order piece_role canonical_address
0 step iu_core/12000x/wf/invoice/01-receive
1 step iu_core/12000x/wf/invoice/02-validate
2 step iu_core/12000x/wf/invoice/03-3way-match
3 step iu_core/12000x/wf/invoice/04-route-approval
4 step iu_core/12000x/wf/invoice/05-decision
5 step iu_core/12000x/wf/invoice/06-post-gl
6 step iu_core/12000x/wf/invoice/07-notify

All 7 pieces emitted in declaration order with role 'step'.

D.4 — Manifest digest idempotency

Two successive fn_iu_collection_manifest_refresh calls both returned manifest_digest = 0d1da72850c71618a759cf08709f3825. Idempotent refresh is the precondition for using the digest as an external indexing key.

D.5 — Birth-gate L1 PILOT warnings (expected noise)

Transcript carries 14 WARNING "Birth gate L1 PILOT-ONLY: P-pub1/P-pub2 missing" emissions from fn_iu_birth_gate_layer1 on design_doc_section IUs. Pre-existing, not 12000x-specific; function continues and IUs are created. Triage candidate for 13000x.

Pass criteria

  • fn_iu_compose returned ok:true
  • 7 pieces minted, 7 pieces attached
  • Validation ok:true with piece_count=7, empty errors/warnings
  • Render produced 7 rows in piece_order 0..6 with correct canonical addresses
  • Manifest digest stable across re-refreshes
  • Post-ROLLBACK: leftover_collections_12000x=0, leftover_ius_12000x=0

PHASE D PASS.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-12000x-product-factory-execution-event-proof-open-goal/03-phase-D-workflow-from-steps.md