← Back to Pull requests

Respect transcript logging for malformed tool-call warnings #837

Merged
gorkadabo1 merged 2 files (20 lines) on Nov 23, 2026 09:15 UTC
View on GitHub
gorkadabo1 gorkadabo1 commented on Nov 16, 2026 11:58 UTC
Author

What does this PR do?

Fixes #836. Malformed native tool-call JSON currently logs raw tool arguments at WARNING level, even when transcript logging is disabled. This can expose private information in application logs. This PR passes the existing 200-character prefix through transcript_for_log(), preserving the WARNING level, malformed-JSON rejection, diagnostic length limit, and explicit opt-in visibility when transcript logging is enabled.

It also adds one regression test covering disabled and enabled transcript logging, as well as malformed-JSON rejection.

Validation

  • Regression test: fails on unchanged upstream code and passes with the fix.

  • Standalone reproducer: passed with the fix.

  • Slurm CPU tests: 341 passed, 1 skipped (optional Apple MLX dependency).

  • Ruff lint, Ruff formatting, mypy, and git diff --check: passed.
  • The patch applies cleanly to the related files at #806 head 1707d332, but full integration with that PR was not tested. I did not run the full test suite or validate on GPU, hosted providers, or end-to-end pipelines.

    Diff: 20 lines (+19 / -1) across 2 files Reviewer: andimarafioti Review duration: 9917m
    All Vouch review confidence checks passed
    Residual risk 0.07 = Change Risk (0.23) × (1 − Review Confidence (0.68)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.23 · 20 lines diff across 2 files
    0.23
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.35 · 1 substantive comment(s)
    0.35
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    67%
    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.182
    Real PR Conversation Timeline
    2 items
    andimarafioti andimarafioti approved these changes on Nov 23, 2026 09:15 UTC
    Approved Reviewer
    Reviewers
    Assignees
    gorkadabo1 gorkadabo1
    Labels
    risk: low confidence: 67.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: 22.7% (LOW) · Higher = larger blast radius
    22.7%
    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: 67.5% · Lower = rushed or shallow review
    67.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: 7.4% · Safe to merge
    7.4%