FIX7 Manifest Set and Exactly 27 Child Contract DDL
Manifest Set And Exactly 27 Child-Contract DDL
Normative full DDL artifact. Roles: qt001_cp_owner NOLOGIN, qt001_cp_migrator NOLOGIN, qt001_cp_reader NOLOGIN; schema qt001_cp owner qt001_cp_owner. Structural domains: sha256=bytea length 32; nonempty_text; positive/nonnegative bigint. Policy values are FK-bound sealed code-catalog rows, never CHECK literals.
manifest_set: manifest_id uuid PK; manifest_type_id uuid FK code_catalog; version_no positive; parent_manifest_id FK self; lifecycle_status_id FK code_catalog; expected_item_count positive; payload_sha256 sha256; canonicalizer_id uuid; candidate_control_epoch nonnegative; validity/creator/seal/activation/supersession fields; UNIQUE(type,version); one active unsuperseded per type. manifest_item_envelope: (manifest_id,item_id) PK/FK manifest; item_id globally UNIQUE; ordinal positive UNIQUE/manifest; item_sha256; retired+evidence consistency. Sealed/active/history immutable; no delete; rollback=new version.
Every child expands exact header (manifest_id uuid FK manifest_set, item_id uuid, PK(manifest_id,item_id), FK(manifest_id,item_id)->manifest_item_envelope) and is owner-only. Exact child set:
01 policy_rule_manifest(rule_set_id,rule_order,fact_id,operator_primitive_id,operand_type_id,exactly-one typed operand,required; unique rule order)
02 operator_primitive_manifest(primitive_code,implementation_regprocedure,source_sha256,signature_sha256,volatility_code_id,strict,side_effect_free; unique code)
03 metric_manifest(metric_code,unit_id,value_type_id)
04 unit_manifest(unit_code,dimension_code)
05 storage_class_manifest(storage_code,immutable_versioned,readback_adapter,adapter source/signature hashes)
06 principal_class_manifest(class_code,may_sign,may_bind,may_verify,may_migrate)
07 authority_action_manifest(action_code)
08 principal_separation_manifest(action_id,left_class_id,right_class_id,must_differ; left<>right)
09 readiness_gate_manifest(gate_code,fact_adapter,adapter source/signature hashes,policy_rule_set_id,max_age_seconds,required)
10 hash_component_manifest(contract/component/domain/canonicalizer/source_relation/stable_order_key/required; nonempty no-NULL order)
11 dependency_manifest(root+source hash,dependency+source hash,kind_id,resolution_id,analyzer_run,evidence)
12 bypass_vector_manifest(vector_code,adapter/source/signature,rule set,max age,required)
13 capability_manifest(code,verifier class,workload,max age,required)
14 capability_measurement_requirement(capability,metric,operator,exactly-one typed operand,required)
15 capability_artifact_requirement(capability,artifact_kind_id from bootstrap catalog,minimum_count)
16 signoff_requirement_manifest(scope,tier nullable,action,required class,max age; UNIQUE NULLS NOT DISTINCT)
17 tier_manifest(code,rank; both unique)
18 activation_policy_manifest(target type,quorum profile,approval max age,postactivation deadline)
19 quorum_requirement_manifest(profile,class,required_count=1)
20 authority_scope_manifest(identity,type,protected,entrypoint,expected owner/ACL/source hashes)
21 privilege_set_manifest(set,grantee,object,privilege code ID,grantable false)
22 dynamic_sql_target_manifest(callsite+source hash,target_oid+identity,template hash)
23 workload_profile_manifest(code,row_count,collision_count<=row_count,seed/expected/environment hashes)
24 analyzer_contract_manifest(code,binary/version/feature/corpus/expected hashes,max age)
25 plan_payload_manifest(plan,target/rule/tier/strategy/source hashes,expected_delta)
26 gateway_manifest(identity,regprocedure,source/signature/target hashes,fail_closed=true)
27 writer_repoint_manifest(identity,old/new/gateway/rollback-stub hashes).
ARTIFACT_KIND is bootstrap code catalog, not child 28. Seal proves child/envelope both-EXCEPT empty, count/hash/contiguous ordinal exact. Activation exact quorum+epoch. Directus/PUBLIC no authority DML/DDL/execute; Directus SELECT only presentation views. Required negative suite for every child: missing/extra/orphan/wrong manifest/NULL/unknown FK/duplicate/invalid hash/Directus+PUBLIC DML/sealed update+delete/wrong count/noncontiguous ordinal/hash mismatch plus every family CHECK/UNIQUE/FK mutation. The authoritative local artifact expands the shared header in all 27 CREATE TABLE statements; authored SQL must match the expanded DDL exactly.