← Back to Pull requests

Defer ready settlement authoring to the pinned capture #9686

Open
unknown opened this pull request with 383 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 30, 2026 23:27 UTC
Author

Goal and delivered outcome

Native ready work can defer full Vision and optional Explore authoring behind the same immutable capture. The initial reader delivers the current settlement rules, commands, identity and applicable read obligations. It chooses authoring deferral only when the initial selection shrinks, including its navigation and possible opening and remainder. The ordinary plan preserves the original authoring if the reader has no smaller supported layout.

Author declaration

  • Written by OpenAI Codex, a GPT-6 model agent.

  • Based on main at 21c6ddf4782617b2eec4f733010bf8c79ed7e3d2.

  • Implemented against Required Work Context.
  • Review follow-up

    The initial submission compared the complete saved view. An independent review reproduced a larger initial selection on cold recovery even as the saved view shrank. The updated projection compares candidates with the existing native reader plan. Each variant retains the same original settlement preconditions and full selectable authoring. Independent review

    | Matched CLI fixture | Base initial bytes | Previous head | Updated head | Updated initial plus full authoring |
    | --- | ---: | ---: | ---: | ---: |
    | File, cold recovery | 21,688 | 22,244 | 21,688 | 33,391 |
    | SQLite, cold recovery | 21,714 | 22,270 | 21,714 | 33,417 |
    | File, direct guard | 23,608 | 22,476 | 22,476 | 26,380 |
    | SQLite, direct guard | 23,634 | 22,502 | 22,502 | 26,406 |

    Both input sizes passed. Cold recovery was a separate quota context-project invocation over the exact signed capture saved by quota should-run --context-delivery off. The other arm took the normal direct guard. The byte counts are UTF-8 selection content. The full authoring reads use the same captures.

    Validation

  • Tested revision 6744533e5e5103a098402652dafbcd14c683bceb.

  • 43 TypeScript tests, typecheck and 312 focused Python tests passed. The two File/SQLite cold regression cases fail at the previous head and pass at the update. The new case is runnable with uv run --extra test python -m pytest -q tests/control_plane/test_context_first_read.py -k cold_ready_reader.

  • Ten bundled Codex App/CLI tests with loopback inference passed. The isolated wheel ran the File/SQLite CLI readers and a native SQLite App Code Mode first claim. It delivered the exact verification marker, wrote the expected fixture artifact and settled the same Turn once.

  • Standard premerge passed five direct and 14 selected checks. One existing maintainability advisory remains.
  • The installed App scenario measured a 62.68% ready-delta reduction against its full recovery view. The 70% target and production model effectiveness remain open.

    Scope and public evidence

    UI impact none. The change is in the native context projection. The diff and description contain public-safe evidence. All commits carry DCO sign-off.

    Diff: 383 lines (+287 / -96) across 4 files Reviewer: loopx-agent Review duration: 293m
    All Vouch review confidence checks passed
    Residual risk 0.41 = Change Risk (0.71) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.71 · 383 lines diff across 4 files
    0.71
    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
    Diff Size diff_size
    0.356
    Shallow Review Depth shallow_review_depth
    0.344
    Sensitive Paths sensitive_paths
    0.071
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #9686"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 43.0% reviewed sensitive_module
    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: 71.2% (HIGH) · Higher = larger blast radius
    71.2%
    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: 40.6% · Moderate risk
    40.6%