← Back to Pull requests

Add Additional MediaType and DeviceType variants; upgrade nix and strum #46

Open
unknown opened this pull request with 191 lines diff across 2 files
View on GitHub
unknown unknown commented on Jan 09, 2024 04:20 UTC
Author

Vendor can now Display
Rename Vendor:Vbox to Vendor::VirtualBox
Rename Vendor::None to Vendor::ATA to match its vendor string
Make Device::vendor an Option that defaults to Option::None instead of Vendor::None when vendor is unknown
Add MediaType::Optical for when a CD or DVD drive (or a virtual variant of the same) is detected
Add MediaType::Partitions to represent detection of a partition table on a device
Add MediaType::Partition to represent when a device represents a partition
Rename MediaType::Virtual to MediaType::Qemu to distinguish it from Virtual Box media
Add MediaType::VirtualBox
Add MediaType::Unrecognised with a field to expose the vendor of unrecognized media
MediaType can now Display
Add DeviceType::Unrecognised to expose the value of a device type that is not represented as an enum variant

MediaType::Unknown still exists but is now only used when the matching rules don't have any input to work with.

Upgrade nix from 0.23 to 0.26. There is a newer version 0.27 but it has breaking changes.
Upgrade strum from 0.24 to 0.25

  • Update the cargo edition from 2018 to 2021
  • udev cannot be easily upgraded; there is a breaking change to Enumerator ownership related scan_devices which will require a significant refactor to some of the _iter functions.

    Lastly I bumped the crate version from 0.11 to 0.12.0 to represent that this is a breaking change. [edited this comment to reflect your feedback]

    Diff: 191 lines (+143 / -48) across 2 files Reviewer: cholcombe973 Review duration: 1501918m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.43) × (1 − Review Confidence (0.41)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 191 lines diff across 2 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    40%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.315
    Real PR Conversation Timeline
    1 comments
    "Review active on #46"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 40.9% 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: 42.9% (MEDIUM) · Higher = larger blast radius
    42.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: 40.9% · Lower = rushed or shallow review
    40.9%
    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: 25.3% · Safe to merge
    25.3%