← Back to Pull requests

Add from_value convenience function #618

Open
ChrisJr404 opened this pull request with 59 lines diff across 3 files
View on GitHub
ChrisJr404 ChrisJr404 commented on Aug 25, 2026 10:41 UTC
Author

As suggested in #255, this adds from_value to the de module so a Value can be deserialized into a T with the same convenience as from_str / from_bytes / from_reader.

It just wraps the existing Value::into_rust, so there's no new logic. It returns a plain Error instead of a SpannedError, since an in-memory Value has no source text to point a span into.

to_value and the wider Value conversion work mentioned in #255 are left out on purpose, since those were flagged for the 0.9 round.

  • I've included my change in CHANGELOG.md
  • Diff: 59 lines (+59 / -0) across 3 files Reviewer: juntyr Review duration: 70197m
    All Vouch review confidence checks passed
    Residual risk 0.05 = Change Risk (0.37) × (1 − Review Confidence (0.87)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 59 lines diff across 3 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.89 · 2 substantive comment(s)
    0.89
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    87%
    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.245
    Real PR Conversation Timeline
    3 items
    juntyr juntyr commented on code on Aug 25, 2026 22:25 UTC
    Code Review
    CHANGELOG.md:1
    @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
     
     - Add support for parsing Rust-style string continuation escapes ([#585](https://github.com/ron-rs/ron/issues/585))
     
    +### Additions

    ### API Changes
    

    juntyr juntyr commented on code on Aug 25, 2026 22:26 UTC
    Code Review
    CHANGELOG.md:1
    @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
     
     - Add support for parsing Rust-style string continuation escapes ([#585](https://github.com/ron-rs/ron/issues/585))
     
    +### Additions
    +
    +- Add the `from_value` convenience function to deserialize a `T` from a `Value` ([#255](https://github.com/ron-rs/ron/issues/255))

    Could you please link to this PR instead, and also drive-by fix the above change log entry to also link to its PR?

    Reviewers
    Assignees
    ChrisJr404 ChrisJr404
    Labels
    risk: low confidence: 87.1% 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: 37.4% (MEDIUM) · Higher = larger blast radius
    37.4%
    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: 87.1% · Lower = rushed or shallow review
    87.1%
    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: 4.8% · Safe to merge
    4.8%
    Repository