-
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 fd5 edit CLI subcommand that modifies an attribute and appends an audit log entry.
Spec
fd5 edit <file> <path>.<attr> <value> [--message MSG] [--in-place]- Default: copy-on-write (creates
_edited.h5copy) --in-place: edit original file--message/-m: commit message (optional, defaults to "Edit .")- Reads identity from
~/.fd5/identity.toml - Creates
AuditEntrywith: parent_hash, timestamp, author, message, changes - Appends entry to
_fd5_audit_log, then recomputes content_hash
Flow
- Open file (copy or in-place)
- Read current content_hash → parent_hash
- Read current attribute value → old
- Write new attribute value
- Append AuditEntry to
_fd5_audit_log - Recompute and write content_hash
TDD
- Test edit creates audit entry
- Test edit preserves existing audit log entries
- Test copy-on-write creates new file
- Test in-place modifies original
- Test message defaults
- Test identity is recorded
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