Trim whitespace around nested RawValue on deserialisation #640
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.32) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.32 · 122 lines diff across 1 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
Shallow Review Depth
shallow_review_depth
0.289
Diff Size
diff_size
0.288
Real PR Conversation Timeline
1 comments
"Review active on #640"
general
weight: 0.35
juntyr
Fixes #631.
Nested
RawValues kept the plain whitespace around them, so pretty-printing added its own on top and a pretty-printed file grew by a space on every read/write cycle (b: [1, 2]becameb: [1, 2], thenb: [1, 2], ...).Following the discussion in the issue, non-comment whitespace around a nested
RawValueis now trimmed when deserialising; comments are kept, and if trimming the end would leave an unclosed line comment, the line break that closes it is kept. Top-levelRawValues and the publicRawValueconstructors are unchanged.Tests: added trimming and pretty round-trip stability tests in
tests/407_raw_value.rs. They fail on master and pass now. Updated the existing assertions that encoded the leading space, and theraw_value_inside_adjacently_taggedknown-bug test, which was the same extra-space bug and now round-trips.cargo test --all-featurespasses,cargo fmt --checkis clean.CHANGELOG.md