← Back to Pull requests

Classify structurally empty Astra assistant turns #877

Closed
unknown closed this pull request without merging on Oct 09, 2026 23:33 UTC
View on GitHub
unknown unknown commented on Oct 09, 2026 22:04 UTC
Author

Summary


  • define a valid quiet Responses terminal structurally: completed, nonempty terminal output containing only completed empty assistant messages and valid optional reasoning items, with no observed visible/tool output

  • accept that contract with or without reasoning instead of using reasoning tokens as authorization for silence

  • emit payload-free terminal-shape metadata for quiet acceptance, malformed terminal rejection, and observed-output loss

  • cover message-only 4/0, reasoning-only, reasoning+message 50/44 and 53/47, malformed/missing items, finalized text/refusal/tool loss, and WebSocket/SSE parity
  • Production evidence and boundary


    Two production surfaces independently produced the same previously rejected terminal metadata after #876:

  • Global trace 2c9d3af779d9a31957392e8716fb9d1e: three Astra WebSocket attempts, each completed, 4 output / 0 reasoning tokens, one message item, no reasoning or function-call item, no visible-text events, Structured; turn ended Error.

  • Ordinary coordinator trace e00d0b6ebfa3cc4c47b31a7598c0fd57: requests 585e76f2-3274-470f-919b-161bc40b91ee, 8c77731c-0f7b-44d0-aa29-71f34d9051c7, and c5793151-b9fb-47fd-828b-fa7a4b9ea516 had the same counts/status/event classification and failed after three attempts.
  • Existing production metadata does not expose message role, ID, status, content-array presence, or content-part structure, so it does not prove that either payload met the newly explicit valid-empty-message contract. This change does not guess from token counts: it accepts only the typed protocol shape, preserves rejection for missing/malformed/incomplete items, and preserves rejection whenever any text, refusal, or tool output was observed. New diagnostics report only structural counts/presence/classification flags, never payload text, reasoning, tool arguments, envelopes, or secrets.

    The successful post-#876 53/47 quiet Astra turn and its subsequent same-model turn remain valid evidence that runtime quiet settlement, usage/replay handling, Idle, and next-turn continuity work. They do not prove the message subshape.

    Validation


  • cargo fmt --all

  • git diff --check

  • ./dev.py check --lanes task,spec-shape,spec-anchors

  • Allium 3.5 direct check: no findings; tool retains its repository diagnostic nonzero exit behavior

  • hosted CI is the Rust qualification authority; no primary heavy build was run
  • Diff: 302 lines (+226 / -76) across 3 files Reviewer: scottopell Review duration: 88m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 302 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%
    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.342
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #877"
    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: 40.1% (MEDIUM) · Higher = larger blast radius
    40.1%
    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: 15.8% · Safe to merge
    15.8%