← Back to Pull requests

GH-634: FILE: Readers must resolve the value from inline when inline and a locator are both set #635

Open
unknown opened this pull request with 221 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 03, 2026 12:28 UTC
Author

Rationale for this change


#603 allows a reader to resolve a value that sets both inline and a locator from either, so engines can return different bytes for the same value once the referenced data changes. The current text also expects producers to write the same bytes in both without limiting this to the time the value is written. This can be read as requiring them to keep the referenced data unchanged, which writers can't guarantee when it is outside their control, e.g., in a storage bucket managed by users rather than by the engine.

What changes are included in this PR?


  • Specifies that if inline and a locator are both set, readers must resolve the value from inline, and the locator fields record where those bytes came from. This restores the reader rule from the original FILE PR #585 ("If inline is set, it supplies the bytes for readers"), which #603 changed to "a reader may resolve the value from either", while keeping #603's clarification that both may be set.

  • Requires inline to be a copy of the referenced bytes at the time the value is written, and states that producers are not required to ensure that the referenced data stays unchanged or available afterwards.
  • No existing value becomes invalid, and for values that set both inline and a locator, readers may only return inline.

    This is an alternative to #644, which instead keeps the reader's choice and makes the result undefined if the referenced data changes. See the discussion on the mailing list: https://lists.apache.org/thread/t5n2ch4p4yx7czf7gpl909ypmdgzm3nh

    Do these changes have PoC implementations?


    Hardwood (hardwood#1494) already reads inline first when it is set.

    Closes #634

    Diff: 221 lines (+165 / -56) across 2 files Reviewer: danielcweeks Review duration: 39410m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.37) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 221 lines diff across 2 files
    0.37
    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%
    46%
    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.323
    Real PR Conversation Timeline
    1 comments
    "Review active on #635"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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.8% (MEDIUM) · Higher = larger blast radius
    36.8%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 19.6% · Safe to merge
    19.6%