← Back to Pull requests

Preserve causal no-spend receipts across replanning ownership changes #9677

Closed
unknown closed this pull request without merging on Nov 30, 2026 19:23 UTC
View on GitHub
unknown unknown commented on Nov 30, 2026 19:01 UTC
Author

Goal And Delivered Outcome

A Turn admitted before a prerequisite becomes blocked can write back an exact causal wait and settle without spending a slot. After #9647, that receipt had to pass the ownership filter used to decide whether waiting can defer Goal replanning. File and SQLite both rejected the valid blocked-peer receipt at finalization. Its compact facts did not retain current claim ownership.

Causal closeout now checks the registered pending dependency at both write and readback. The planning consumers keep the stricter rule for blocked work in an unclaimed or same-agent lane. The receipt retains its existing wire format, original Turn and zero-debit settlement.

Author Declaration

  • Written by model_agent · gpt-6.2-sol · OpenAI.

  • Implements the existing blocked-no-spend closeout and Goal-replanning contracts. C1 contract Goal and quota contract
  • | Criterion | Local evidence |
    | --- | --- |
    | A registered blocked dependency can settle and replay the original Turn | The added File and SQLite cases fail on main with the same finalization error and pass on this head. One validation and one durable writeback are observed. Replay preserves the same receipt, explicit spend appends nothing and the independent successor remains selectable. |
    | Same-agent blocked work leaves Goal replanning available | The existing File and SQLite CLI planner cases and native Vision coverage continue to pass. |
    | Historical receipt shape remains readable | The native causal tests revalidate the existing compact receipt through the settlement owner. Core staging includes the two changed TypeScript modules byte-for-byte. |
    | Exact local gate | 18 real-provider CLI cases, 176 targeted native TypeScript tests, strict TypeScript compile and scoped premerge. |

    The change is confined to the shared Todo proof and causal quota receipt consumers, with the existing CLI fixture extended to cover the failed product path. Hosted checks and independent review follow the existing branch rules.

    Diff: 290 lines (+217 / -73) across 3 files Reviewer: loopx-agent Review duration: 22m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 290 lines diff across 3 files
    0.45
    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%
    60%
    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.339
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #9677"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 44.9% (MEDIUM) · Higher = larger blast radius
    44.9%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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.7% · Safe to merge
    17.7%