Conversation
ba4d2e6 to
f97ca39
Compare
There was a problem hiding this comment.
Pull request overview
This pull request refactors hash handling and introduces audit logging functionality to the DVS (Data Version System). The changes move from using string-based hash identifiers to a structured Hashes type that contains both MD5 and Blake3 hashes, and adds operation tracking through UUIDs and audit logs.
Changes:
- Introduced a new
auditmodule withAuditEntryandAuditFiletypes for tracking file operations - Created a
hashesmodule to encapsulate hash algorithms (Blake3, MD5) in a structuredHashestype - Refactored the
Backendtrait to use&Hashesinstead of&strparameters across all methods - Added UUID-based operation tracking to link related file operations
- Implemented audit log writing in
LocalBackendthat appends JSON entries toaudit.log.jsonl
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| dvs/src/audit.rs | New module defining audit log structures with timestamps, user info, and file hashes |
| dvs/src/hashes.rs | New module defining HashAlg enum and Hashes struct with hash computation and retrieval methods |
| dvs/src/lib.rs | Updated module structure and public exports to include audit and hashes modules |
| dvs/src/file.rs | Refactored to use Hashes type, added UUID parameter to save method, integrated audit logging on successful saves |
| dvs/src/backends/mod.rs | Updated Backend trait signatures to accept &Hashes instead of &str, added log_audit method |
| dvs/src/backends/local.rs | Implemented hash algorithm selection (hardcoded to Blake3), refactored all methods to use Hashes, implemented log_audit with JSONL append |
| dvs/src/paths.rs | Updated test to include UUID parameter in save call |
| dvs/README.md | Simplified documentation, removed detailed usage instructions |
| Cargo.toml / Cargo.lock | Added uuid dependency with v4 feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.