12000x · 04 — Phase E · File-from-5-piece-specs proof (full role vocab: title/intro/body/appendix/reference)</title> <parameter name="tags">["iu-core","v0.6","12000x","phase-e","file-collection","fn_iu_compose","role-vocab","pass"]
12000x · 04 — Phase E · File-from-piece-specs proof
Goal
Prove fn_iu_compose can also produce collection_kind='file' from 5 piece specs covering the full role vocabulary (title|intro|body|appendix|reference). Not just workflows of 'step' pieces. File is the bigger Product Factory use case (legal docs, policy files, manuals).
SQL
SELECT public.fn_iu_compose(
'iu_core.12000x.file.security-policy','file',
'Security policy file (12000x proof)',
'Demonstrates fn_iu_compose creating a file collection from 5 piece specs',
jsonb_build_array(
jsonb_build_object('role','title','new_piece', jsonb_build_object(
'canonical_address','iu_core/12000x/file/security/00-title',
'title','Acme Corp Security Policy v1','body','# Acme Corp Security Policy v1',
'unit_kind','design_doc_section','section_type','heading')),
jsonb_build_object('role','intro','new_piece', jsonb_build_object(
'canonical_address','iu_core/12000x/file/security/01-intro',
'title','Introduction','body','This policy defines the rules…',
'unit_kind','design_doc_section','section_type','section')),
jsonb_build_object('role','body','new_piece', jsonb_build_object(
'canonical_address','iu_core/12000x/file/security/02-access',
'title','Access control rules','body','Least-privilege, MFA, quarterly review.',
'unit_kind','design_doc_section','section_type','principle')),
jsonb_build_object('role','appendix','new_piece', jsonb_build_object(
'canonical_address','iu_core/12000x/file/security/03-incident-checklist',
'title','Incident response checklist','body','Contain → triage → escalate → postmortem.',
'unit_kind','design_doc_section','section_type','checklist')),
jsonb_build_object('role','reference','new_piece', jsonb_build_object(
'canonical_address','iu_core/12000x/file/security/04-references',
'title','References','body','ISO 27001 / NIST CSF / SOC 2.',
'unit_kind','design_doc_section','section_type','section'))
),
'iu-core-12000x');
Live response
{
"ok": true,
"collection_id": "f142cea4-8a6e-4804-86da-00e24f897fbe",
"pieces_minted": 5,
"collection_key": "iu_core.12000x.file.security-policy",
"collection_kind": "file",
"minted_unit_ids": ["328b32a4-…","aab251da-…","cde684fe-…","a4595a42-…","f48cb148-…"],
"pieces_attached": 5
}
E.1 — Collection row
| id | manifest_digest | collection_kind | source_axis_kind |
|---|---|---|---|
| f142cea4-8a6e-4804-86da-00e24f897fbe | 0032f9ef0633726c9f96819c3b2d7d00 | file | composed |
E.2 — Validate
{"ok": true, "errors": [], "warnings": [], "piece_count": 5}
E.3 — Render
| piece_order | piece_role | canonical_address |
|---|---|---|
| 0 | title | iu_core/12000x/file/security/00-title |
| 1 | intro | iu_core/12000x/file/security/01-intro |
| 2 | body | iu_core/12000x/file/security/02-access |
| 3 | appendix | iu_core/12000x/file/security/03-incident-checklist |
| 4 | reference | iu_core/12000x/file/security/04-references |
All 5 role-vocabulary entries accepted and rendered in declaration order. Confirms iu_piece_membership_role_chk ({title,intro,body,step,clause,appendix,reference}) covers the full file-product spectrum.
E.4 — Role-mixed manifest digest differs from workflow digest
File digest 0032f9ef0633726c9f96819c3b2d7d00 ≠ workflow digest 0d1da72850c71618a759cf08709f3825 because the piece graphs (and roles) are different. Desired property: digest is a function of {collection_kind, source_axis_kind, ordered piece_role+iu_id list}, not of collection identity.
Pass criteria
- fn_iu_compose returned ok:true, collection_kind:"file"
- 5 pieces minted, 5 attached
- Validate ok:true, piece_count=5
- Render preserved role ordering across full role vocabulary
- Post-ROLLBACK: zero file-collection rows leftover
PHASE E PASS.