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
@@ -283,6 +283,22 @@ class AcceptanceTests(unittest.TestCase):
|
||||
with self.assertRaises(ValueError):
|
||||
self.api().ready(root)
|
||||
|
||||
def test_ready_rejects_sealed_viewer_missing_history_projection(self):
|
||||
root, manifest = self.prepared()
|
||||
viewer = root / 'review/review.json'
|
||||
data = receipts.read_json(viewer)
|
||||
del data['ledger']['capabilities'][0]['history']
|
||||
viewer.write_bytes(receipts.canonical_bytes(data))
|
||||
manifest['files'] = [dict(entry, **receipts.identify_file(viewer))
|
||||
if entry['path'] == 'review/review.json' else entry for entry in manifest['files']]
|
||||
(root / 'manifest.json').write_bytes(receipts.canonical_bytes(manifest))
|
||||
seal = receipts.read_json(root / 'READY.json')
|
||||
seal['manifest'] = dict(path='manifest.json', **receipts.identify_file(root / 'manifest.json'))
|
||||
(root / 'READY.json').write_bytes(receipts.canonical_bytes(seal))
|
||||
with mock.patch.object(self.api(), '_package', side_effect=lambda _, rid, __: manifest['packages'][rid]):
|
||||
with self.assertRaisesRegex(ValueError, 'viewer ledger projection'):
|
||||
self.api().ready(root)
|
||||
|
||||
def test_audit_explicit_selection_reads_actual_failed_linux_hashes(self):
|
||||
root, manifest = self.prepared()
|
||||
source = ROOT / 'artifacts/fidelity/linux-current-receipts/linux-01-06-matrix-preflight-linux'
|
||||
|
||||
Reference in new issue
Block a user