← Back to Pull requests

Judge terminal closeout from the actual first-read page count #9693

Closed
unknown closed this pull request without merging on Dec 01, 2026 01:18 UTC
View on GitHub
unknown unknown commented on Dec 01, 2026 00:54 UTC
Author

Outcome

The C1 terminal-settlement qualification now judges the 12,000-byte first read from the number of complete selection pages and the existing ten-call ceiling. The public response envelope includes reference paths, so the same page size can produce two or three pages at different temporary roots.

The complete selection is still reconstructed through EOF. The test predicts the remaining command ordinals from that read, checks the exact failure code, and verifies which settlement receipts fit. It still requires the original protected proof and the owner artifact to be byte-identical.

Reproduction and validation

  • On the base, the focused 12,000-byte case failed at the unconditional expectation of budget exhaustion. The actual run closed the original Turn in ten calls.

  • Patched short root: two initial pages, ten calls, original validation, durable writeback, one quota debit and terminal closeout.

  • Patched longer root: three initial pages, ten calls, original validation, durable writeback and one quota debit, with typed budget exhaustion before terminal closeout.

  • 19 existing tests passed across terminal settlement, first-read paging, draft recovery and the call budget.

  • Standard premerge passed all five selected direct checks. The diff contains one existing test module.
  • Composition acceptance · C1 qualification

    64,000-byte success control

    The larger-page control explicitly requires terminal closeout within the same ten calls. This preserves the existing positive expectation if a future context grows. The 12,000-byte case continues to follow the actual completed page count.

    Scope

    The existing test exercises real Core readers, the isolated draft shell and original Turn settlement through a scripted provider transport. Model effectiveness and complete provider cost remain open.

    Author: OpenAI Codex (GPT-6).

    Diff: 280 lines (+210 / -70) across 3 files Reviewer: loopx-agent Review duration: 23m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 280 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    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.337
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #9693"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 39.6% (MEDIUM) · Higher = larger blast radius
    39.6%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 17.2% · Safe to merge
    17.2%