uc30 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- uc30/__init__.py +3 -0
- uc30/build_chain.py +112 -0
- uc30/build_ecosystem_fixtures.py +131 -0
- uc30/build_fixtures.py +123 -0
- uc30/build_lifecycle_fixtures.py +125 -0
- uc30/chains/full/capa.json +131 -0
- uc30/chains/full/chain.json +34 -0
- uc30/chains/full/clinical.json +135 -0
- uc30/chains/full/concept.json +129 -0
- uc30/chains/full/design.json +131 -0
- uc30/chains/full/fsca.json +135 -0
- uc30/chains/full/passport.json +9 -0
- uc30/chains/full/postmarket.json +133 -0
- uc30/chains/full/production.json +133 -0
- uc30/chains/full/registration.json +133 -0
- uc30/chains/full/retirement.json +131 -0
- uc30/chains/full/risk.json +131 -0
- uc30/chains/full/supplier.json +131 -0
- uc30/chains/full/vv.json +133 -0
- uc30/check_links.py +97 -0
- uc30/check_uc30.py +294 -0
- uc30/claims_map.py +152 -0
- uc30/cli.py +71 -0
- uc30/crosswalk_eval_result.py +107 -0
- uc30/export_record.py +137 -0
- uc30/fixtures/EXPECTED.json +266 -0
- uc30/fixtures/fx_authorized.json +105 -0
- uc30/fixtures/fx_cross_border_patient.json +131 -0
- uc30/fixtures/fx_duplicate_item.json +118 -0
- uc30/fixtures/fx_eco_contract_manufacturer.json +131 -0
- uc30/fixtures/fx_eco_cro.json +130 -0
- uc30/fixtures/fx_eco_hospital.json +131 -0
- uc30/fixtures/fx_eco_logistics.json +131 -0
- uc30/fixtures/fx_eco_metrology.json +131 -0
- uc30/fixtures/fx_eco_notified_body_audit.json +131 -0
- uc30/fixtures/fx_eco_patient.json +131 -0
- uc30/fixtures/fx_eco_regulator.json +129 -0
- uc30/fixtures/fx_eco_reverse_logistics.json +131 -0
- uc30/fixtures/fx_eco_secondary_distributor.json +131 -0
- uc30/fixtures/fx_lc_capa.json +126 -0
- uc30/fixtures/fx_lc_clinical.json +126 -0
- uc30/fixtures/fx_lc_concept.json +124 -0
- uc30/fixtures/fx_lc_design.json +126 -0
- uc30/fixtures/fx_lc_fsca.json +125 -0
- uc30/fixtures/fx_lc_postmarket.json +126 -0
- uc30/fixtures/fx_lc_production.json +126 -0
- uc30/fixtures/fx_lc_registration.json +126 -0
- uc30/fixtures/fx_lc_retirement.json +124 -0
- uc30/fixtures/fx_lc_risk.json +126 -0
- uc30/fixtures/fx_lc_supplier.json +126 -0
- uc30/fixtures/fx_lc_vv.json +126 -0
- uc30/fixtures/fx_md_audit_trail_order.json +108 -0
- uc30/fixtures/fx_md_batch_release.json +108 -0
- uc30/fixtures/fx_md_change_impact.json +108 -0
- uc30/fixtures/fx_md_class1_dressing.json +108 -0
- uc30/fixtures/fx_md_class3_pacemaker_vigilance.json +108 -0
- uc30/fixtures/fx_md_expired_grant.json +108 -0
- uc30/fixtures/fx_md_ifu_revision_scope.json +106 -0
- uc30/fixtures/fx_md_ivd_glucose_supplier.json +108 -0
- uc30/fixtures/fx_md_pms_report.json +108 -0
- uc30/fixtures/fx_md_samd_dcr_duplicate.json +121 -0
- uc30/fixtures/fx_md_sterilization_subcontractor.json +108 -0
- uc30/fixtures/fx_md_udi_without_claim.json +103 -0
- uc30/fixtures/fx_multi_regime.json +133 -0
- uc30/fixtures/fx_multi_regime_missing_cn.json +131 -0
- uc30/fixtures/fx_order_violation.json +105 -0
- uc30/fixtures/fx_passport_linked.json +125 -0
- uc30/fixtures/fx_passport_wrong.json +124 -0
- uc30/fixtures/fx_registry_drift.json +105 -0
- uc30/fixtures/fx_scope_not_covering.json +103 -0
- uc30/fixtures/fx_tampered_evidence.json +105 -0
- uc30/fixtures/fx_unauthorized_same_shape.json +105 -0
- uc30/fixtures/fx_unclaimed_item.json +100 -0
- uc30/fixtures/fx_unenrolled_producer.json +105 -0
- uc30/fixtures/fx_unversioned_item.json +104 -0
- uc30/fixtures/fx_verifier_declared.json +129 -0
- uc30/fixtures/fx_verifier_incomplete.json +126 -0
- uc30/fixtures/fx_version_wrong_type.json +105 -0
- uc30/fuzz_uc30.py +194 -0
- uc30/schema/division_20261129.json +103 -0
- uc30/schema/evidence_record.schema.json +138 -0
- uc30/uc30_mcp.py +178 -0
- uc30/verify_chain.py +105 -0
- uc30-0.1.0.dist-info/METADATA +171 -0
- uc30-0.1.0.dist-info/RECORD +90 -0
- uc30-0.1.0.dist-info/WHEEL +5 -0
- uc30-0.1.0.dist-info/entry_points.txt +3 -0
- uc30-0.1.0.dist-info/licenses/LICENSE +404 -0
- uc30-0.1.0.dist-info/licenses/LICENSE-CODE +23 -0
- uc30-0.1.0.dist-info/top_level.txt +1 -0
uc30/__init__.py
ADDED
uc30/build_chain.py
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""Build a full-lifecycle record chain (12 stages) and link each record to its predecessor by digest.
|
|
4
|
+
|
|
5
|
+
python uc30/build_chain.py # writes uc30/chains/full/*.json + chain.json
|
|
6
|
+
"""
|
|
7
|
+
import hashlib, json, os
|
|
8
|
+
|
|
9
|
+
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
10
|
+
OUT = os.path.join(HERE, 'chains', 'full')
|
|
11
|
+
PASSPORT = {'subject_id': 'dev-ip400', 'udi': '(01)09501101530003', 'manufacturer': 'synthetic-manufacturer', 'model': 'IP-400'}
|
|
12
|
+
STAGES = ['concept', 'design', 'risk', 'vv', 'clinical', 'supplier', 'production',
|
|
13
|
+
'registration', 'postmarket', 'capa', 'fsca', 'retirement']
|
|
14
|
+
REQS = {
|
|
15
|
+
'concept': ['need_statement', 'intended_use', 'classification'],
|
|
16
|
+
'design': ['design_input', 'design_output', 'design_review'],
|
|
17
|
+
'risk': ['risk_plan', 'risk_analysis', 'risk_control'],
|
|
18
|
+
'vv': ['unit_verification', 'integration_test', 'usability_validation'],
|
|
19
|
+
'clinical': ['clinical_evaluation', 'pmcf_plan', 'pmcf_report'],
|
|
20
|
+
'supplier': ['supplier_audit', 'incoming_qc', 'supplier_approval'],
|
|
21
|
+
'production': ['process_validation', 'batch_record', 'release_decision'],
|
|
22
|
+
'registration': ['technical_documentation', 'udi_assignment', 'submission_record'],
|
|
23
|
+
'postmarket': ['pms_report', 'vigilance_record', 'trend_report'],
|
|
24
|
+
'capa': ['root_cause', 'corrective_action', 'effectiveness_check'],
|
|
25
|
+
'fsca': ['fsca_plan', 'customer_notification', 'recall_decision'],
|
|
26
|
+
'retirement': ['retention_plan', 'disposal_record', 'final_review'],
|
|
27
|
+
}
|
|
28
|
+
STAKE = {
|
|
29
|
+
'concept': ['manufacturer'], 'design': ['manufacturer'], 'risk': ['manufacturer'],
|
|
30
|
+
'vv': ['manufacturer', 'metrology_lab'], 'clinical': ['sponsor', 'cro', 'patient'],
|
|
31
|
+
'supplier': ['supplier'], 'production': ['manufacturer', 'contract_manufacturer'],
|
|
32
|
+
'registration': ['manufacturer', 'notified_body'], 'postmarket': ['hospital', 'distributor'],
|
|
33
|
+
'capa': ['manufacturer'], 'fsca': ['logistics', 'hospital', 'regulator'],
|
|
34
|
+
'retirement': ['manufacturer'],
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def canon(o):
|
|
39
|
+
return json.dumps(o, sort_keys=True, separators=(',', ':'), ensure_ascii=False)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def h(s):
|
|
43
|
+
return hashlib.sha256(s.encode('utf-8')).hexdigest()
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def root_of(members):
|
|
47
|
+
return 'sha256:' + h(canon(members))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def build(stage, prev, prev_digest):
|
|
51
|
+
name = 'chain_%s' % stage
|
|
52
|
+
members = [
|
|
53
|
+
{'human_owner': 'h1', 'kind': 'agent', 'member_id': 'a1', 'role': 'prepare-deliverable'},
|
|
54
|
+
{'human_owner': 'h1', 'kind': 'agent', 'member_id': 'a2', 'role': 'verify-claims'},
|
|
55
|
+
{'human_owner': 'h1', 'kind': 'human', 'member_id': 'h1', 'role': 'accountable-release'},
|
|
56
|
+
]
|
|
57
|
+
items = ['d1', 'd2', 'd3']
|
|
58
|
+
kinds = ['draft-deliverable', 'verification-note', 'release-block-decision']
|
|
59
|
+
producers = ['a1', 'a2', 'h1']
|
|
60
|
+
at = ['2026-12-08T09:10:00Z', '2026-12-09T13:40:00Z', '2026-12-10T08:30:00Z']
|
|
61
|
+
batch = {'batch_id': 'b-' + name, 'committed_at': '2026-12-10T09:00:00Z',
|
|
62
|
+
'leaves': [{'artifact_sha256': h('chain-%s-%s' % (stage, i)), 'item_id': i} for i in items]}
|
|
63
|
+
claims = {i: {'basis': 'bytes hashed into the batch', 'claim': 'the %s artefact exists' % i,
|
|
64
|
+
'source': 'synthetic note %s' % i} for i in items}
|
|
65
|
+
evidence = [{'artifact_sha256': h('chain-%s-%s' % (stage, i)), 'authority_ref': 'g-1',
|
|
66
|
+
'item_id': i, 'kind': k, 'produced_at': t, 'produced_by': p, 'state_version': 'psv-07'}
|
|
67
|
+
for i, k, p, t in zip(items, kinds, producers, at)]
|
|
68
|
+
reqs = REQS[stage]
|
|
69
|
+
provided = {r: items[n] for n, r in enumerate(reqs)}
|
|
70
|
+
stake = STAKE[stage]
|
|
71
|
+
sev = {s: items[n % len(items)] for n, s in enumerate(stake)}
|
|
72
|
+
passport_root = 'sha256:' + h(canon(PASSPORT))
|
|
73
|
+
lc = {'stage': stage, 'requirements': reqs, 'provided': provided,
|
|
74
|
+
'stakeholders': stake, 'stakeholder_evidence': sev,
|
|
75
|
+
'subject_id': PASSPORT['subject_id'], 'passport_root': passport_root}
|
|
76
|
+
if prev:
|
|
77
|
+
lc['predecessor'] = 'chains/full/%s.json' % prev
|
|
78
|
+
lc['predecessor_digest'] = prev_digest
|
|
79
|
+
return {
|
|
80
|
+
'case': name, 'device_context': 'synthetic-full-chain', 'subject': 'full-chain %s record' % stage,
|
|
81
|
+
'batch': batch, 'claims': claims, 'evidence': evidence,
|
|
82
|
+
'grant': {'expires_at': '2026-12-20T00:00:00Z', 'gate_version': 'gate-0.3', 'grant_id': 'g-1',
|
|
83
|
+
'granted_by': 'h1', 'grantee': 'a1', 'issued_at': '2026-11-20T08:00:00Z',
|
|
84
|
+
'scope': ['prepare-deliverable', 'record-verification', 'accountable-release']},
|
|
85
|
+
'registry': {'members': members, 'registry_root': root_of(members), 'team': 'team-synthetic'},
|
|
86
|
+
'note': 'Synthetic full-chain record. No production data.',
|
|
87
|
+
'device_class': 'IIb', 'lifecycle': lc,
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def main():
|
|
92
|
+
os.makedirs(OUT, exist_ok=True)
|
|
93
|
+
prev, prev_digest = None, None
|
|
94
|
+
digests = []
|
|
95
|
+
for stage in STAGES:
|
|
96
|
+
doc = build(stage, prev, prev_digest)
|
|
97
|
+
p = os.path.join(OUT, stage + '.json')
|
|
98
|
+
json.dump(doc, open(p, 'w', encoding='utf-8'), ensure_ascii=False, indent=1, sort_keys=True)
|
|
99
|
+
digests.append('sha256:' + h(canon(doc)))
|
|
100
|
+
prev = stage
|
|
101
|
+
prev_digest = digests[-1]
|
|
102
|
+
chain_root = 'sha256:' + h('|'.join(digests))
|
|
103
|
+
manifest = {'chain': 'full-lifecycle', 'stages': STAGES, 'records': digests, 'chain_root': chain_root,
|
|
104
|
+
'subject_id': PASSPORT['subject_id'], 'passport_root': 'sha256:' + h(canon(PASSPORT))}
|
|
105
|
+
json.dump(manifest, open(os.path.join(OUT, 'chain.json'), 'w', encoding='utf-8'), ensure_ascii=False, indent=1)
|
|
106
|
+
json.dump({'identity': PASSPORT, 'passport_root': 'sha256:' + h(canon(PASSPORT))},
|
|
107
|
+
open(os.path.join(OUT, 'passport.json'), 'w', encoding='utf-8'), ensure_ascii=False, indent=1)
|
|
108
|
+
print('chain written: %d stages, root %s' % (len(STAGES), chain_root[:20]))
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
if __name__ == '__main__':
|
|
112
|
+
main()
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""Build the five ecosystem-stakeholder fixtures and register them in EXPECTED.json.
|
|
4
|
+
|
|
5
|
+
python uc30/build_ecosystem_fixtures.py
|
|
6
|
+
"""
|
|
7
|
+
import hashlib, json, os
|
|
8
|
+
|
|
9
|
+
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
10
|
+
FX = os.path.join(HERE, 'fixtures')
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def canon(o):
|
|
14
|
+
return json.dumps(o, sort_keys=True, separators=(',', ':'), ensure_ascii=False)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def h(s):
|
|
18
|
+
return hashlib.sha256(s.encode('utf-8')).hexdigest()
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def root_of(members):
|
|
22
|
+
return 'sha256:' + hashlib.sha256(canon(members).encode('utf-8')).hexdigest()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
STAGES = {
|
|
26
|
+
'concept': ['need_statement', 'intended_use', 'classification'],
|
|
27
|
+
'design': ['design_input', 'design_output', 'design_review'],
|
|
28
|
+
'risk': ['risk_plan', 'risk_analysis', 'risk_control'],
|
|
29
|
+
'vv': ['unit_verification', 'integration_test', 'usability_validation'],
|
|
30
|
+
'clinical': ['clinical_evaluation', 'pmcf_plan', 'pmcf_report'],
|
|
31
|
+
'supplier': ['supplier_audit', 'incoming_qc', 'supplier_approval'],
|
|
32
|
+
'production': ['process_validation', 'batch_record', 'release_decision'],
|
|
33
|
+
'registration': ['technical_documentation', 'udi_assignment', 'submission_record'],
|
|
34
|
+
'postmarket': ['pms_report', 'vigilance_record', 'trend_report'],
|
|
35
|
+
'capa': ['root_cause', 'corrective_action', 'effectiveness_check'],
|
|
36
|
+
'fsca': ['fsca_plan', 'customer_notification', 'recall_decision'],
|
|
37
|
+
'retirement': ['retention_plan', 'disposal_record', 'final_review'],
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
CASES = {
|
|
41
|
+
'fx_eco_logistics': dict(stage='production', klass='IIb', stakeholders=['manufacturer', 'logistics'],
|
|
42
|
+
map_all=True, predecessor=True, subject='cold-chain distribution and chain-of-custody record'),
|
|
43
|
+
'fx_eco_metrology': dict(stage='vv', klass='IIa', stakeholders=['manufacturer', 'metrology_lab'],
|
|
44
|
+
map_all=True, predecessor=True, subject='calibration certificate with traceability and uncertainty budget'),
|
|
45
|
+
'fx_eco_hospital': dict(stage='postmarket', klass='IIb', stakeholders=['hospital', 'regulator'],
|
|
46
|
+
map_all=True, predecessor=True, subject='hospital acceptance test and clinical-use record'),
|
|
47
|
+
'fx_eco_cro': dict(stage='clinical', klass='III', stakeholders=['sponsor', 'cro'],
|
|
48
|
+
map_all=False, predecessor=True, subject='clinical investigation site agreement and monitoring report'),
|
|
49
|
+
'fx_eco_regulator': dict(stage='registration', klass='III', stakeholders=['manufacturer', 'notified_body'],
|
|
50
|
+
map_all=True, predecessor=False, subject='notified-body certificate scope and registration record'),
|
|
51
|
+
'fx_eco_patient': dict(stage='clinical', klass='IIb', stakeholders=['patient', 'manufacturer'],
|
|
52
|
+
map_all=True, predecessor=True, subject='patient consent, withdrawal and delegated authority record'),
|
|
53
|
+
'fx_eco_contract_manufacturer': dict(stage='production', klass='IIb', stakeholders=['manufacturer', 'contract_manufacturer'],
|
|
54
|
+
map_all=True, predecessor=True, subject='contract-manufacturer release authority and batch record'),
|
|
55
|
+
'fx_eco_reverse_logistics': dict(stage='fsca', klass='III', stakeholders=['logistics', 'hospital', 'regulator'],
|
|
56
|
+
map_all=False, predecessor=True, subject='reverse logistics and field-action execution record'),
|
|
57
|
+
'fx_eco_secondary_distributor': dict(stage='postmarket', klass='IIa', stakeholders=['distributor', 'pharmacy'],
|
|
58
|
+
map_all=True, predecessor=True, subject='secondary distributor to pharmacy handover and stock record'),
|
|
59
|
+
'fx_eco_notified_body_audit': dict(stage='registration', klass='III', stakeholders=['manufacturer', 'notified_body'],
|
|
60
|
+
map_all=True, predecessor=True, subject='notified-body audit trail beyond certificate scope'),
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def build(name, c):
|
|
65
|
+
members = [
|
|
66
|
+
{'human_owner': 'h1', 'kind': 'agent', 'member_id': 'a1', 'role': 'prepare-deliverable'},
|
|
67
|
+
{'human_owner': 'h1', 'kind': 'agent', 'member_id': 'a2', 'role': 'verify-claims'},
|
|
68
|
+
{'human_owner': 'h1', 'kind': 'human', 'member_id': 'h1', 'role': 'accountable-release'},
|
|
69
|
+
]
|
|
70
|
+
items = ['d1', 'd2', 'd3']
|
|
71
|
+
kinds = ['draft-deliverable', 'verification-note', 'release-block-decision']
|
|
72
|
+
producers = ['a1', 'a2', 'h1']
|
|
73
|
+
at = ['2026-12-08T09:10:00Z', '2026-12-09T13:40:00Z', '2026-12-10T08:30:00Z']
|
|
74
|
+
batch = {'batch_id': 'b-' + name, 'committed_at': '2026-12-10T09:00:00Z',
|
|
75
|
+
'leaves': [{'artifact_sha256': h('uc30-eco-%s-%s' % (name, i)), 'item_id': i} for i in items]}
|
|
76
|
+
claims = {i: {'basis': 'bytes hashed into the batch',
|
|
77
|
+
'claim': 'the %s artefact exists under grant g-1' % i,
|
|
78
|
+
'source': 'synthetic note %s' % i} for i in items}
|
|
79
|
+
evidence = [{'artifact_sha256': h('uc30-eco-%s-%s' % (name, i)), 'authority_ref': 'g-1',
|
|
80
|
+
'item_id': i, 'kind': k, 'produced_at': t, 'produced_by': p, 'state_version': 'psv-07'}
|
|
81
|
+
for i, k, p, t in zip(items, kinds, producers, at)]
|
|
82
|
+
stake = c['stakeholders']
|
|
83
|
+
if c['map_all']:
|
|
84
|
+
sev = {s: items[n] for n, s in enumerate(stake)}
|
|
85
|
+
else:
|
|
86
|
+
sev = {stake[0]: 'd1'} # deliberate: the CRO has no evidence item
|
|
87
|
+
reqs = STAGES[c['stage']]
|
|
88
|
+
provided = {r: items[n] for n, r in enumerate(reqs)}
|
|
89
|
+
lc = {'stage': c['stage'], 'requirements': reqs, 'provided': provided,
|
|
90
|
+
'stakeholders': stake, 'stakeholder_evidence': sev}
|
|
91
|
+
if c['predecessor']:
|
|
92
|
+
lc['predecessor'] = 'uc30://record/predecessor-' + c['stage']
|
|
93
|
+
lc['predecessor_digest'] = 'sha256:' + h('uc30-predecessor-' + c['stage'])
|
|
94
|
+
return {
|
|
95
|
+
'case': name, 'device_context': 'synthetic-ecosystem-device', 'subject': c['subject'],
|
|
96
|
+
'batch': batch, 'claims': claims, 'evidence': evidence,
|
|
97
|
+
'grant': {'expires_at': '2026-12-20T00:00:00Z', 'gate_version': 'gate-0.3',
|
|
98
|
+
'grant_id': 'g-1', 'granted_by': 'h1', 'grantee': 'a1',
|
|
99
|
+
'issued_at': '2026-11-20T08:00:00Z',
|
|
100
|
+
'scope': ['prepare-deliverable', 'record-verification', 'accountable-release']},
|
|
101
|
+
'registry': {'members': members, 'registry_root': root_of(members), 'team': 'team-synthetic'},
|
|
102
|
+
'note': 'Synthetic ecosystem fixture for use case 30. No production data, no customer data, no real device.',
|
|
103
|
+
'device_class': c['klass'], 'lifecycle': lc,
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def main():
|
|
108
|
+
exp_path = os.path.join(FX, 'EXPECTED.json')
|
|
109
|
+
exp = json.load(open(exp_path, encoding='utf-8'))
|
|
110
|
+
have = {r['case'] for r in exp['expected']}
|
|
111
|
+
for name, c in CASES.items():
|
|
112
|
+
doc = build(name, c)
|
|
113
|
+
json.dump(doc, open(os.path.join(FX, name + '.json'), 'w', encoding='utf-8'),
|
|
114
|
+
ensure_ascii=False, indent=1, sort_keys=True)
|
|
115
|
+
if name not in have:
|
|
116
|
+
if name == 'fx_eco_cro':
|
|
117
|
+
row = {'case': name, 'verdict': 'FAIL', 'reason': 'STAKEHOLDER_EVIDENCE_MISSING'}
|
|
118
|
+
elif name == 'fx_eco_regulator':
|
|
119
|
+
row = {'case': name, 'verdict': 'NOT EVALUABLE', 'reason': 'STAGE_TRACE_MISSING'}
|
|
120
|
+
elif name == 'fx_eco_reverse_logistics':
|
|
121
|
+
row = {'case': name, 'verdict': 'FAIL', 'reason': 'STAKEHOLDER_EVIDENCE_MISSING'}
|
|
122
|
+
else:
|
|
123
|
+
row = {'case': name, 'verdict': 'PASS', 'reason': None}
|
|
124
|
+
exp['expected'].append(row)
|
|
125
|
+
have.add(name)
|
|
126
|
+
json.dump(exp, open(exp_path, 'w', encoding='utf-8'), ensure_ascii=False, indent=1)
|
|
127
|
+
print('ecosystem fixtures written:', len(CASES), '| EXPECTED rows:', len(exp['expected']))
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
if __name__ == '__main__':
|
|
131
|
+
main()
|
uc30/build_fixtures.py
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""UC30 fixture factory: one normal record plus nine records each broken in exactly one place. All synthetic, no production data.
|
|
3
|
+
|
|
4
|
+
python build_fixtures.py
|
|
5
|
+
"""
|
|
6
|
+
import copy, hashlib, json, os
|
|
7
|
+
|
|
8
|
+
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
9
|
+
FX = os.path.join(HERE, 'fixtures')
|
|
10
|
+
os.makedirs(FX, exist_ok=True)
|
|
11
|
+
|
|
12
|
+
NOTE = ('Synthetic fixture for use case 30. No production data, no customer data, no real device. '
|
|
13
|
+
'Organisation, people and device names are placeholders; digests are computed over placeholder text.')
|
|
14
|
+
|
|
15
|
+
MEMBERS = [
|
|
16
|
+
{'member_id': 'a1', 'kind': 'agent', 'human_owner': 'h1', 'role': 'prepare-deliverable'},
|
|
17
|
+
{'member_id': 'a2', 'kind': 'agent', 'human_owner': 'h1', 'role': 'verify-claims'},
|
|
18
|
+
{'member_id': 'h1', 'kind': 'human', 'human_owner': 'h1', 'role': 'accountable-release'},
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
GRANT = {'grant_id': 'g-1', 'granted_by': 'h1', 'grantee': 'a1',
|
|
22
|
+
'scope': ['prepare-deliverable', 'record-verification', 'accountable-release'],
|
|
23
|
+
'issued_at': '2026-11-20T08:00:00Z', 'expires_at': '2026-12-05T00:00:00Z', 'gate_version': 'gate-0.3'}
|
|
24
|
+
|
|
25
|
+
ITEMS = [
|
|
26
|
+
('d1', 'draft-deliverable', 'a1', '2026-11-24T09:10:00Z', 'psv-07', 'placeholder body: draft v1'),
|
|
27
|
+
('d2', 'verification-note', 'a2', '2026-11-25T13:40:00Z', 'psv-07', 'placeholder body: claim check'),
|
|
28
|
+
('d3', 'release-block-decision', 'h1', '2026-11-26T08:30:00Z', 'psv-07', 'placeholder body: release decision'),
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
CLAIMS = {
|
|
32
|
+
'd1': {'claim': 'the draft deliverable exists as produced by a1 under grant g-1',
|
|
33
|
+
'source': 'placeholder draft v1', 'basis': 'bytes hashed into the batch'},
|
|
34
|
+
'd2': {'claim': 'every assertion in the draft was checked by an agent that is not its producer',
|
|
35
|
+
'source': 'placeholder claim-check note', 'basis': 'bytes hashed into the batch'},
|
|
36
|
+
'd3': {'claim': 'release was decided by the accountable human, not by either agent',
|
|
37
|
+
'source': 'placeholder release decision', 'basis': 'bytes hashed into the batch'},
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
COMMIT = '2026-11-26T09:00:00Z'
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def h(s):
|
|
44
|
+
return hashlib.sha256(s.encode('utf-8')).hexdigest()
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def canon(o):
|
|
48
|
+
return json.dumps(o, sort_keys=True, separators=(',', ':'), ensure_ascii=False)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def root_of(members):
|
|
52
|
+
return 'sha256:' + h(canon(members))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def fresh():
|
|
56
|
+
ev = [{'item_id': i, 'kind': k, 'artifact_sha256': h(t), 'produced_at': t, 'produced_by': by,
|
|
57
|
+
'authority_ref': 'g-1', 'state_version': sv} for i, k, by, t, sv, txt in ITEMS]
|
|
58
|
+
return {
|
|
59
|
+
'case': 'base', 'note': NOTE,
|
|
60
|
+
'registry': {'team': 'team-placeholder', 'members': copy.deepcopy(MEMBERS), 'registry_root': root_of(MEMBERS)},
|
|
61
|
+
'grant': copy.deepcopy(GRANT),
|
|
62
|
+
'evidence': ev,
|
|
63
|
+
'claims': copy.deepcopy(CLAIMS),
|
|
64
|
+
'batch': {'batch_id': 'b-1', 'committed_at': COMMIT,
|
|
65
|
+
'leaves': [{'item_id': e['item_id'], 'artifact_sha256': e['artifact_sha256']} for e in ev]},
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
VARIANTS = []
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def variant(name, note, mutate):
|
|
73
|
+
d = fresh()
|
|
74
|
+
d['case'] = name
|
|
75
|
+
d['note'] = NOTE + ' ' + note
|
|
76
|
+
mutate(d)
|
|
77
|
+
VARIANTS.append(d)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
variant('fx_authorized', 'All conditions hold.', lambda d: None)
|
|
81
|
+
variant('fx_tampered_evidence', 'Batch leaf for d2 still carries the pre-edit digest.',
|
|
82
|
+
lambda d: d['batch']['leaves'][1].__setitem__('artifact_sha256', '0' * 64))
|
|
83
|
+
variant('fx_unauthorized_same_shape', 'Grant expired before the batch was committed.',
|
|
84
|
+
lambda d: d['grant'].__setitem__('expires_at', '2026-11-01T00:00:00Z'))
|
|
85
|
+
variant('fx_unclaimed_item', 'd3 carries no written claim.',
|
|
86
|
+
lambda d: d['claims'].pop('d3'))
|
|
87
|
+
variant('fx_unversioned_item', 'd2 carries no process-state version.',
|
|
88
|
+
lambda d: d['evidence'][1].pop('state_version'))
|
|
89
|
+
variant('fx_scope_not_covering', 'Grant scope covers preparation only; d2 is verification.',
|
|
90
|
+
lambda d: d['grant'].__setitem__('scope', ['prepare-deliverable']))
|
|
91
|
+
variant('fx_order_violation', 'd3 was produced after the batch commit.',
|
|
92
|
+
lambda d: d['evidence'][2].__setitem__('produced_at', '2026-11-27T10:00:00Z'))
|
|
93
|
+
variant('fx_duplicate_item', 'd1 appears twice with different digests.',
|
|
94
|
+
lambda d: (d['evidence'].append(dict(d['evidence'][0], artifact_sha256='1' * 64)),
|
|
95
|
+
d['batch']['leaves'].append({'item_id': 'd1', 'artifact_sha256': '1' * 64})))
|
|
96
|
+
variant('fx_registry_drift', 'Published root was computed over a roster that no longer matches.',
|
|
97
|
+
lambda d: d['registry'].__setitem__('registry_root', root_of(MEMBERS[:-1])))
|
|
98
|
+
variant('fx_unenrolled_producer', 'd2 was produced by a3, who is not in the roster.',
|
|
99
|
+
lambda d: d['evidence'][1].__setitem__('produced_by', 'a3'))
|
|
100
|
+
|
|
101
|
+
for d in VARIANTS:
|
|
102
|
+
p = os.path.join(FX, d['case'] + '.json')
|
|
103
|
+
json.dump(d, open(p, 'w', encoding='utf-8'), ensure_ascii=False, indent=1, sort_keys=True)
|
|
104
|
+
print('%-34s %6d B' % (os.path.basename(p), os.path.getsize(p)))
|
|
105
|
+
|
|
106
|
+
EXPECTED = [
|
|
107
|
+
('fx_authorized', 'PASS', None),
|
|
108
|
+
('fx_tampered_evidence', 'FAIL', 'INCLUSION_MISMATCH'),
|
|
109
|
+
('fx_unauthorized_same_shape', 'NOT EVALUABLE', 'AUTHORITY_NOT_CURRENT'),
|
|
110
|
+
('fx_unclaimed_item', 'FAIL', 'CLAIM_UNMAPPED'),
|
|
111
|
+
('fx_unversioned_item', 'FAIL', 'STATE_VERSION_MISSING'),
|
|
112
|
+
('fx_scope_not_covering', 'FAIL', 'SCOPE_NOT_COVERING'),
|
|
113
|
+
('fx_order_violation', 'FAIL', 'ORDER'),
|
|
114
|
+
('fx_duplicate_item', 'FAIL', 'DUPLICATE_ITEM'),
|
|
115
|
+
('fx_registry_drift', 'FAIL', 'REGISTRY_ROOT_MISMATCH'),
|
|
116
|
+
('fx_unenrolled_producer', 'NOT EVALUABLE', 'PRODUCER_NOT_ENROLLED'),
|
|
117
|
+
]
|
|
118
|
+
|
|
119
|
+
json.dump({'self_test': 'python check_uc30.py --self-test',
|
|
120
|
+
'expected': [{'case': c, 'verdict': v, 'reason': r} for c, v, r in EXPECTED],
|
|
121
|
+
'note': 'Fixed before running. If any line differs, the instrument is wrong, not the fixture.'},
|
|
122
|
+
open(os.path.join(FX, 'EXPECTED.json'), 'w', encoding='utf-8'), ensure_ascii=False, indent=1)
|
|
123
|
+
print('%-34s %d rows' % ('EXPECTED.json', len(EXPECTED)))
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""Build the twelve full-lifecycle fixtures (one per stage) and register them in EXPECTED.json.
|
|
4
|
+
|
|
5
|
+
Run from the repository root or from uc30/:
|
|
6
|
+
python uc30/build_lifecycle_fixtures.py
|
|
7
|
+
"""
|
|
8
|
+
import hashlib, json, os, sys
|
|
9
|
+
|
|
10
|
+
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
11
|
+
FX = os.path.join(HERE, 'fixtures')
|
|
12
|
+
|
|
13
|
+
STAGES = {
|
|
14
|
+
'concept': (['need_statement', 'intended_use', 'classification'], 'I'),
|
|
15
|
+
'design': (['design_input', 'design_output', 'design_review'], 'IIa'),
|
|
16
|
+
'risk': (['risk_plan', 'risk_analysis', 'risk_control'], 'IIb'),
|
|
17
|
+
'vv': (['unit_verification', 'integration_test', 'usability_validation'], 'IIb'),
|
|
18
|
+
'clinical': (['clinical_evaluation', 'pmcf_plan', 'pmcf_report'], 'III'),
|
|
19
|
+
'supplier': (['supplier_audit', 'incoming_qc', 'supplier_approval'], 'IIa'),
|
|
20
|
+
'production': (['process_validation', 'batch_record', 'release_decision'], 'IIb'),
|
|
21
|
+
'registration': (['technical_documentation', 'udi_assignment', 'submission_record'], 'III'),
|
|
22
|
+
'postmarket': (['pms_report', 'vigilance_record', 'trend_report'], 'IIb'),
|
|
23
|
+
'capa': (['root_cause', 'corrective_action', 'effectiveness_check'], 'IIa'),
|
|
24
|
+
'fsca': (['fsca_plan', 'customer_notification', 'recall_decision'], 'III'),
|
|
25
|
+
'retirement': (['retention_plan', 'disposal_record', 'final_review'], 'IIa'),
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
ANCHOR = {
|
|
29
|
+
'concept': 'ISO 13485:2016 7.2; MDR Annex II 1.1',
|
|
30
|
+
'design': 'ISO 13485 7.3; 21 CFR 820.30',
|
|
31
|
+
'risk': 'ISO 14971:2019 4-7; 21 CFR 820.30(g)',
|
|
32
|
+
'vv': 'IEC 62304:2006+A1 5-7; IEC 62366-1:2015 5',
|
|
33
|
+
'clinical': 'MDR Annex XIV; MDCG 2020-1',
|
|
34
|
+
'supplier': 'ISO 13485 7.4; 21 CFR 820.50',
|
|
35
|
+
'production': 'ISO 13485 7.5; 21 CFR 820.70/820.75',
|
|
36
|
+
'registration': 'MDR Annex II/III; 21 CFR 807; UDI (MDR Art. 27)',
|
|
37
|
+
'postmarket': 'MDR Art. 83-86; 21 CFR 803/806',
|
|
38
|
+
'capa': '21 CFR 820.100; ISO 13485 8.5.2/8.5.3',
|
|
39
|
+
'fsca': 'MDR Art. 87-88; 21 CFR 806',
|
|
40
|
+
'retirement': 'ISO 13485 4.2.5; MDR Annex II 6',
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def canon(o):
|
|
45
|
+
return json.dumps(o, sort_keys=True, separators=(',', ':'), ensure_ascii=False)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def h(s):
|
|
49
|
+
return hashlib.sha256(s.encode('utf-8')).hexdigest()
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def root_of(members):
|
|
53
|
+
return 'sha256:' + hashlib.sha256(canon(members).encode('utf-8')).hexdigest()
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def build(stage, reqs, klass):
|
|
57
|
+
case = 'fx_lc_%s' % stage
|
|
58
|
+
members = [
|
|
59
|
+
{'human_owner': 'h1', 'kind': 'agent', 'member_id': 'a1', 'role': 'prepare-deliverable'},
|
|
60
|
+
{'human_owner': 'h1', 'kind': 'agent', 'member_id': 'a2', 'role': 'verify-claims'},
|
|
61
|
+
{'human_owner': 'h1', 'kind': 'human', 'member_id': 'h1', 'role': 'accountable-release'},
|
|
62
|
+
]
|
|
63
|
+
items = ['d1', 'd2', 'd3']
|
|
64
|
+
kinds = ['draft-deliverable', 'verification-note', 'release-block-decision']
|
|
65
|
+
producers = ['a1', 'a2', 'h1']
|
|
66
|
+
at = ['2026-12-08T09:10:00Z', '2026-12-09T13:40:00Z', '2026-12-10T08:30:00Z']
|
|
67
|
+
batch = {'batch_id': 'b-' + case, 'committed_at': '2026-12-10T09:00:00Z',
|
|
68
|
+
'leaves': [{'artifact_sha256': h('uc30-lc-%s-%s' % (case, i)), 'item_id': i} for i in items]}
|
|
69
|
+
claims = {i: {'basis': 'bytes hashed into the batch',
|
|
70
|
+
'claim': 'the %s artefact for stage %s exists under grant g-1' % (i, stage),
|
|
71
|
+
'source': 'synthetic note %s' % i} for i in items}
|
|
72
|
+
evidence = [{'artifact_sha256': h('uc30-lc-%s-%s' % (case, i)), 'authority_ref': 'g-1',
|
|
73
|
+
'item_id': i, 'kind': k, 'produced_at': t, 'produced_by': p, 'state_version': 'psv-07'}
|
|
74
|
+
for i, k, p, t in zip(items, kinds, producers, at)]
|
|
75
|
+
provided = {r: items[n] for n, r in enumerate(reqs)}
|
|
76
|
+
if stage == 'fsca':
|
|
77
|
+
provided.pop('customer_notification', None) # deliberate FAIL
|
|
78
|
+
lifecycle = {'stage': stage, 'requirements': reqs, 'provided': provided,
|
|
79
|
+
'standard_refs': [ANCHOR[stage]]}
|
|
80
|
+
if stage != 'concept' and stage != 'retirement':
|
|
81
|
+
lifecycle['predecessor'] = 'uc30://record/%s' % case
|
|
82
|
+
lifecycle['predecessor_digest'] = 'sha256:' + h('uc30-predecessor-%s' % stage)
|
|
83
|
+
doc = {
|
|
84
|
+
'case': case,
|
|
85
|
+
'device_context': 'synthetic-%s-device' % stage,
|
|
86
|
+
'subject': 'full-lifecycle fixture: %s stage' % stage,
|
|
87
|
+
'batch': batch,
|
|
88
|
+
'claims': claims,
|
|
89
|
+
'evidence': evidence,
|
|
90
|
+
'grant': {'expires_at': '2026-12-20T00:00:00Z', 'gate_version': 'gate-0.3',
|
|
91
|
+
'grant_id': 'g-1', 'granted_by': 'h1', 'grantee': 'a1',
|
|
92
|
+
'issued_at': '2026-11-20T08:00:00Z',
|
|
93
|
+
'scope': ['prepare-deliverable', 'record-verification', 'accountable-release']},
|
|
94
|
+
'registry': {'members': members, 'registry_root': root_of(members), 'team': 'team-synthetic'},
|
|
95
|
+
'note': 'Synthetic full-lifecycle fixture for use case 30. No production data, no customer data, no real device.',
|
|
96
|
+
'device_class': klass,
|
|
97
|
+
'lifecycle': lifecycle,
|
|
98
|
+
}
|
|
99
|
+
return doc
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def main():
|
|
103
|
+
os.makedirs(FX, exist_ok=True)
|
|
104
|
+
exp_path = os.path.join(FX, 'EXPECTED.json')
|
|
105
|
+
exp = json.load(open(exp_path, encoding='utf-8'))
|
|
106
|
+
have = {r['case'] for r in exp['expected']}
|
|
107
|
+
for stage, (reqs, klass) in STAGES.items():
|
|
108
|
+
doc = build(stage, reqs, klass)
|
|
109
|
+
p = os.path.join(FX, doc['case'] + '.json')
|
|
110
|
+
json.dump(doc, open(p, 'w', encoding='utf-8'), ensure_ascii=False, indent=1, sort_keys=True)
|
|
111
|
+
if doc['case'] not in have:
|
|
112
|
+
if stage == 'fsca':
|
|
113
|
+
row = {'case': doc['case'], 'verdict': 'FAIL', 'reason': 'STAGE_EVIDENCE_MISSING'}
|
|
114
|
+
elif stage == 'retirement':
|
|
115
|
+
row = {'case': doc['case'], 'verdict': 'NOT EVALUABLE', 'reason': 'STAGE_TRACE_MISSING'}
|
|
116
|
+
else:
|
|
117
|
+
row = {'case': doc['case'], 'verdict': 'PASS', 'reason': None}
|
|
118
|
+
exp['expected'].append(row)
|
|
119
|
+
have.add(doc['case'])
|
|
120
|
+
json.dump(exp, open(exp_path, 'w', encoding='utf-8'), ensure_ascii=False, indent=1)
|
|
121
|
+
print('fixtures written:', len(STAGES), '| EXPECTED rows:', len(exp['expected']))
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
if __name__ == '__main__':
|
|
125
|
+
main()
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{
|
|
2
|
+
"batch": {
|
|
3
|
+
"batch_id": "b-chain_capa",
|
|
4
|
+
"committed_at": "2026-12-10T09:00:00Z",
|
|
5
|
+
"leaves": [
|
|
6
|
+
{
|
|
7
|
+
"artifact_sha256": "c751817dabdf9552f87cdb99c8a8fa60eb92aabe5bab28595f824ab3e680878d",
|
|
8
|
+
"item_id": "d1"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"artifact_sha256": "705513f9408fae9c070527b47323facb34903af5f594ab1b700dd262d63b6f68",
|
|
12
|
+
"item_id": "d2"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"artifact_sha256": "72b9bcc08c34c98c1f93f9019c854516770474a839a3bce2f1532a36f4921113",
|
|
16
|
+
"item_id": "d3"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"case": "chain_capa",
|
|
21
|
+
"claims": {
|
|
22
|
+
"d1": {
|
|
23
|
+
"basis": "bytes hashed into the batch",
|
|
24
|
+
"claim": "the d1 artefact exists",
|
|
25
|
+
"source": "synthetic note d1"
|
|
26
|
+
},
|
|
27
|
+
"d2": {
|
|
28
|
+
"basis": "bytes hashed into the batch",
|
|
29
|
+
"claim": "the d2 artefact exists",
|
|
30
|
+
"source": "synthetic note d2"
|
|
31
|
+
},
|
|
32
|
+
"d3": {
|
|
33
|
+
"basis": "bytes hashed into the batch",
|
|
34
|
+
"claim": "the d3 artefact exists",
|
|
35
|
+
"source": "synthetic note d3"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"device_class": "IIb",
|
|
39
|
+
"device_context": "synthetic-full-chain",
|
|
40
|
+
"evidence": [
|
|
41
|
+
{
|
|
42
|
+
"artifact_sha256": "c751817dabdf9552f87cdb99c8a8fa60eb92aabe5bab28595f824ab3e680878d",
|
|
43
|
+
"authority_ref": "g-1",
|
|
44
|
+
"item_id": "d1",
|
|
45
|
+
"kind": "draft-deliverable",
|
|
46
|
+
"produced_at": "2026-12-08T09:10:00Z",
|
|
47
|
+
"produced_by": "a1",
|
|
48
|
+
"state_version": "psv-07"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"artifact_sha256": "705513f9408fae9c070527b47323facb34903af5f594ab1b700dd262d63b6f68",
|
|
52
|
+
"authority_ref": "g-1",
|
|
53
|
+
"item_id": "d2",
|
|
54
|
+
"kind": "verification-note",
|
|
55
|
+
"produced_at": "2026-12-09T13:40:00Z",
|
|
56
|
+
"produced_by": "a2",
|
|
57
|
+
"state_version": "psv-07"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"artifact_sha256": "72b9bcc08c34c98c1f93f9019c854516770474a839a3bce2f1532a36f4921113",
|
|
61
|
+
"authority_ref": "g-1",
|
|
62
|
+
"item_id": "d3",
|
|
63
|
+
"kind": "release-block-decision",
|
|
64
|
+
"produced_at": "2026-12-10T08:30:00Z",
|
|
65
|
+
"produced_by": "h1",
|
|
66
|
+
"state_version": "psv-07"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"grant": {
|
|
70
|
+
"expires_at": "2026-12-20T00:00:00Z",
|
|
71
|
+
"gate_version": "gate-0.3",
|
|
72
|
+
"grant_id": "g-1",
|
|
73
|
+
"granted_by": "h1",
|
|
74
|
+
"grantee": "a1",
|
|
75
|
+
"issued_at": "2026-11-20T08:00:00Z",
|
|
76
|
+
"scope": [
|
|
77
|
+
"prepare-deliverable",
|
|
78
|
+
"record-verification",
|
|
79
|
+
"accountable-release"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"lifecycle": {
|
|
83
|
+
"passport_root": "sha256:9f8301dc9c27a4846180ee06965104f3c28a9ac1a7caab08d7722fefa61c2439",
|
|
84
|
+
"predecessor": "chains/full/postmarket.json",
|
|
85
|
+
"predecessor_digest": "sha256:4d47041618afc02e44194b7119e6eb165a97e052d15bb7dde2401d3cb3160d1b",
|
|
86
|
+
"provided": {
|
|
87
|
+
"corrective_action": "d2",
|
|
88
|
+
"effectiveness_check": "d3",
|
|
89
|
+
"root_cause": "d1"
|
|
90
|
+
},
|
|
91
|
+
"requirements": [
|
|
92
|
+
"root_cause",
|
|
93
|
+
"corrective_action",
|
|
94
|
+
"effectiveness_check"
|
|
95
|
+
],
|
|
96
|
+
"stage": "capa",
|
|
97
|
+
"stakeholder_evidence": {
|
|
98
|
+
"manufacturer": "d1"
|
|
99
|
+
},
|
|
100
|
+
"stakeholders": [
|
|
101
|
+
"manufacturer"
|
|
102
|
+
],
|
|
103
|
+
"subject_id": "dev-ip400"
|
|
104
|
+
},
|
|
105
|
+
"note": "Synthetic full-chain record. No production data.",
|
|
106
|
+
"registry": {
|
|
107
|
+
"members": [
|
|
108
|
+
{
|
|
109
|
+
"human_owner": "h1",
|
|
110
|
+
"kind": "agent",
|
|
111
|
+
"member_id": "a1",
|
|
112
|
+
"role": "prepare-deliverable"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"human_owner": "h1",
|
|
116
|
+
"kind": "agent",
|
|
117
|
+
"member_id": "a2",
|
|
118
|
+
"role": "verify-claims"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"human_owner": "h1",
|
|
122
|
+
"kind": "human",
|
|
123
|
+
"member_id": "h1",
|
|
124
|
+
"role": "accountable-release"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"registry_root": "sha256:2ff62a1f615669daddd486af1080cfa8439e5624f58b27260f5a865032a0646d",
|
|
128
|
+
"team": "team-synthetic"
|
|
129
|
+
},
|
|
130
|
+
"subject": "full-chain capa record"
|
|
131
|
+
}
|