-
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
Add audit module to the fd5 Rust crate with AuditEntry struct and read/write functions.
Spec
AuditEntrystruct (serde Serialize/Deserialize):parent_hash: Stringtimestamp: String(ISO-8601)author: Author(struct withauthor_type: String,id: String,name: String)message: Stringchanges: Vec<Change>(struct withaction: String,path: String,attr: String,old: Option<String>,new: Option<String>)
read_audit_log(file: &File) -> Fd5Result<Vec<AuditEntry>>— read/parse_fd5_audit_logappend_audit_entry(file: &File, entry: &AuditEntry) -> Fd5Result<()>- JSON serialization via serde_json
- VarLenUnicode attribute storage
TDD
- Test round-trip: write → read → assert equal
- Test append preserves existing entries
- Test empty/missing log returns Ok(vec![])
- Test malformed JSON returns clear error
- Test serde serialization matches Python format exactly
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