-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
area:corefd5 core libraryfd5 core libraryaudit-trailAudit trail / provenance chain featureAudit trail / provenance chain featureeffort:medium1-4 hours1-4 hoursfeatureNew feature or requestNew feature or request
Description
Parent: #161
Goal
Extend fd5 validate to verify audit chain integrity alongside the Merkle tree.
Spec
verify_chain(file: h5py.File) -> ChainStatus- ChainStatus:
Valid,NoLog,BrokenChain(index, expected, actual),Error(msg) - Validation rules:
- Each entry's parent_hash must equal the previous entry's implicit new hash
- The first entry's parent_hash should be a valid sha256: prefixed hash
- No duplicate timestamps with identical changes
- Integrate into
fd5 validateoutput: show "Audit chain: N entries, valid" or error verify()function already exists — add chain check as separate function, call from CLI
TDD
- Test valid chain passes
- Test tampered entry detected (modify middle entry)
- Test missing entry detected (gap in chain)
- Test file with no log returns NoLog
- Test single-entry chain
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:corefd5 core libraryfd5 core libraryaudit-trailAudit trail / provenance chain featureAudit trail / provenance chain featureeffort:medium1-4 hours1-4 hoursfeatureNew feature or requestNew feature or request