objectfs: use EROFS as snapshot format with blob and packfile storage #36
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 286 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.339
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #36"
general
weight: 0.35
justinsb
This PR implements EROFS-based snapshots and blob/packfile storage for ObjectFS in S3/GCS:
Key Changes
1. EROFS Inode Extended Attributes & ComposeFS Nodes (
pkg/erofs):- Added
XattrNodeandMetadataOnlyNodeinterfaces.- Implemented
BuildInlineXattrsandReadXattrsto encode and decode inline EROFS extended attributes (user.digest,user.sha256,trusted., etc.).- Updated
WriteImageto allocate slot-aligned inode entries for inline xattrs and handle composefs metadata-only nodes (zero data blocks allocated for external file payloads).- Updated
DataReaderto handle composefs metadata-only inodes (RawBlkaddr == 0).2. Binary Blob & Packfile Storage Engine (
pkg/objectfs/blob):- Implemented 8-byte file header (4-byte magic
OBJB, 1-byte version, 1-byte filetype, 2-byte padding).- Supported standalone blob files (
filetype=1) for large blobs (>64MB) with encoding headers, final lengths, and SHA256 checksums.- Supported packfiles (
filetype=2) and pack index files (filetype=3) for grouping smaller blobs with compressed payloads, table descriptors, and O(log N) binary search lookup in.idxindex tables.- Implemented
BlobStorefor writing and fetching blobs from storage backends.3. ObjectFS Volume Snapshots & Recovery (
pkg/objectfs/controller):- Updated
Volume.FlushToBackendto persist blobs toBlobStoreand compile composefs-style EROFS snapshots stored atvolumes/<volumeID>/meta/<timestamp>.erofswith alatestsnapshot pointer.- Verified generated EROFS snapshot images using
erofs.Fsck.- Implemented
CreateSnapshot,ListSnapshots, andRestoreSnapshotinVolumeandServer.- Implemented snapshot recovery in
LoadFromBackend, restoring directory hierarchies and file metadata while lazy-loading content on demand viaBlobStore.4. Testing:
- Added unit tests for inline xattrs and composefs metadata compilation in
pkg/erofs/erofs_test.go.- Added unit tests for blob encoding, packfile generation,
.idxindexing, andBlobStoreoperations inpkg/objectfs/blob/blob_test.go.- Added unit tests for EROFS snapshot creation, recovery from backend, and snapshot rollbacks in
pkg/objectfs/controller/service_test.go.Fixes #35