← Back to Pull requests

app_rpt: Tell the peer to stay down when a dialplan timeout drops the link #1311

Open
unknown opened this pull request with 230 lines diff across 2 files
View on GitHub
unknown unknown commented on Oct 03, 2026 22:17 UTC
Author

TIMEOUT(absolute) softhangs the inbound channel while Rpt() is still running. ast_write() drops frames once that hangup is pending, so !!DISCONNECT!! never reaches the caller. The caller treats the hangup as a failed link and redials.

When the only softhangup flag is AST_SOFTHANGUP_TIMEOUT, clear the deadline, queue !!DISCONNECT!!, and stop retries. The existing text flush sends that text before the channel goes down. A link-off command and a network drop are unchanged.

AI Use Disclosure (ASL003)


Check exactly ONE of the first two boxes.
  • No material AI involvement (none, or only trivial use such as autocomplete, spell/grammar check, or translation)

  • Material AI involvement (significant generated code/text, or AI used to find an issue or design the approach). Commits include an Assisted-by: trailer, or tools are listed below.
  • Tools used (if material):

    Contributor Attestation


    Check ALL FOUR boxes.
  • I have reviewed every line of this change, understand it, and can explain and defend it in review without deferring to a tool

  • I have built, run, and tested this change

  • To my knowledge, this contribution does not violate any license, copyright, or third-party rights, and is compatible with this project's license

  • This change contains no secrets, credentials, personal data, or non-public node or user information
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    Bug Fixes
    Improved handling of timed-out inbound node connections: eligible connections now disconnect cleanly without repeated retries.
    * Other hangup causes and excluded connection types continue to follow their existing behavior.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 230 lines (+172 / -58) across 2 files Reviewer: greptile-apps[bot] Review duration: 9m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.42) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 230 lines diff across 2 files
    0.42
    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%
    46%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.326
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #1311"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 42% (MEDIUM) · Higher = larger blast radius
    42%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 22.4% · Safe to merge
    22.4%