fix(01): WR-01 preserve validated capability history in checkpoint viewer
This commit is contained in:
1 parent
6e5ee0bd25
commit
548c97aa58
4 files changed
+57
-2
No files matched your search
@@ -26,7 +26,7 @@ def ready(checkpoint):
|
||||
raise ValueError('Synthetic checkpoint is tooling-only, not final materials')
|
||||
names = {entry['path'] for entry in manifest['files']}
|
||||
required = set(MATERIALS) | {'protocol/scenarios.json', 'protocol/capabilities.json',
|
||||
'protocol/agenda.json', 'protocol/settings-template.json',
|
||||
'protocol/agenda.json', 'protocol/settings-template.json', 'protocol/capability-ledger.json',
|
||||
'protocol/annotation-template.json', 'review/index.html', 'review/viewer.mjs',
|
||||
'review/review.json'}
|
||||
if required - names:
|
||||
@@ -50,6 +50,11 @@ def ready(checkpoint):
|
||||
# Exported ledger links are already normalized by the exporter. Recheck
|
||||
# every active link against the sealed actual materials at final handoff.
|
||||
ledger = read_json(root / 'review/review.json')['ledger']
|
||||
expected_ledger = read_json(root / 'protocol/capability-ledger.json')
|
||||
for field in ('current', 'history'):
|
||||
if [(row['id'], row.get(field)) for row in ledger['capabilities']] != [
|
||||
(row['id'], row[field]) for row in expected_ledger['capabilities']]:
|
||||
raise ValueError('Malformed viewer ledger projection: ' + field)
|
||||
for capability in ledger['capabilities']:
|
||||
for link in capability.get('source_links', []):
|
||||
if link.get('href'):
|
||||
|
||||
Reference in new issue
Block a user