← Back to Pull requests

Read original Turn context through native DSH pages #9700

Open
unknown opened this pull request with 229 lines diff across 2 files
View on GitHub
unknown unknown commented on Dec 01, 2026 03:33 UTC
Author

Outcome

DSH's native read clips long lines. An original Turn observation is stored as a single JSON line, so relevant facts may be outside the returned text. loopx turn run-once --host dsh --dsh-context-pages makes the shared first-read selection and exact original observation available through short, numbered native reads.

The in-process SDK host verifies the original capture under the admitted Turn, publishes both ranges in a private file for the attempt, and cleans it up at exit. The projected input supplies the offsets and source digests. The original inline task and recovery command are available when page preparation fails. Omitting the option uses the existing delivery. The Turn journal and the Core admission and settlement contracts still govern all effects.

Evidence

  • Installed wheel exercised the published DSH SDK/runtime pairs 0.1.5rc1 and 0.2.2rc2 against isolated deterministic providers. On both versions the raw native read clipped a 36,115-byte observation. The opted-in route read the 14,212-byte first selection and every original byte, including a 3,385-byte UTF-8 fixture field with escaping. Validation committed one follow-up debit, and replay made zero provider calls and zero additional debits.

  • Reading both ranges end to end took 17 native reads in this fixture. This change qualifies readable capture transport. Warm-delta savings and live-model cost still need measurement.

  • 572 focused tests passed, including default delivery, missing and changed capture fallback, and wrong-Turn rejection. The local premerge gate passed. Its maintainability advisory for loopx/status.py reproduces identically on the verified base.
  • The transport reuses the shared typed selection and private capture reader. Its scope is the ordinary DSH SDK invocation and the fixture evidence above.

    Diff: 229 lines (+171 / -58) across 2 files Reviewer: loopx-agent Review duration: 47m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.37) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 229 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%
    42%
    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.325
    Real PR Conversation Timeline
    1 comments
    "Review active on #9700"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% 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.0% (MEDIUM) · Higher = larger blast radius
    37.0%
    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: 43.0% · Lower = rushed or shallow review
    43.0%
    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: 21.1% · Safe to merge
    21.1%