← Back to Pull requests

objectfs: EROFS snapshots as an SDS projection (position-named, registry embedded, no latest pointer) #142

Closed
unknown closed this pull request without merging on Oct 03, 2026 14:36 UTC
View on GitHub
unknown unknown commented on Oct 02, 2026 22:56 UTC
Author

Part of #97. Fixes #108.

Summary of Changes


  • Taken at safe position & watermark: Ensure no active transaction is pending, and snapshot position never exceeds the Permanent (s3Seq) watermark.

  • Position-based naming: Name snapshots by stream sequence position using 20 digits: volumes/<volumeID>/meta/<stream_seq, 20 digits>.erofs (lexicographical order equals stream order).

  • Eliminate meta/latest pointer: Discover the latest snapshot by listing objects under volumes/<volumeID>/meta/, where the highest sequence position wins.

  • Embedded registry and metadata in root xattrs: Embed trusted.sds.position, trusted.sds.registry (serialized sds.v1.Registry), and trusted.sds.snapshot_time as root directory extended attributes in the EROFS snapshot image.

  • Content flushing: Flush referenced Content rows to the blob store during snapshot compilation and discard unreferenced rows. Append an SDS SnapshotPointer framework record to the stream following upload.

  • Deterministic Crash Recovery: Rebuild controller memory on startup by mounting the latest EROFS snapshot projection, extracting its position and registry from root xattrs, and replaying subsequent records from that position with sds.StreamReader.

  • APIs & CLI: Update ListSnapshots, CreateSnapshot, and objectfsctl to report snapshot position and creation timestamp.

  • Documentation: Update docs/objectfs.md to describe ObjectFS as an SDS application and mark the case study in docs/structured-data-streams.md as completed.

  • Tests: Add unit and integration tests verifying registry round-trip, safe position / watermark enforcement, highest-position discovery without pointer files, restart recovery from snapshot plus stream replay, and content flushing.
  • Diff: 224 lines (+168 / -56) across 2 files Reviewer: justinsb Review duration: 939m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 224 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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.324
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #142"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.9% (MEDIUM) · Higher = larger blast radius
    36.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.6% · Safe to merge
    14.6%