← Back to Pull requests

fix(queue): route unclaimed reminders past terminal seats #4215

Closed
unknown closed this pull request without merging on Nov 30, 2026 11:25 UTC
View on GitHub
unknown unknown commented on Nov 30, 2026 09:43 UTC
Author

A parked-owner escalation could leave its only notice with a terminal creator or parent. Delivery correctly types nothing into a terminal seat, so that notice could never be claimed there.

Skip known terminal candidates in this escalation's existing recipient check, resolving aliases through the current physical session. Selection continues through the existing creator, escalation owner, default receiver and person order. The shared topology resolver, terminal input guard and per-recipient notice ID stay in place.

Reported by Kayhusk in #4209.

Validation:

  • Five failures reproduced on unchanged production code; two unaffected controls passed.

  • All 386 tests across six routing, reminder and delivery files pass, with no skips.

  • All seven focused cases pass again in a separate process.

  • Daemon build and TypeScript checks pass.
  • The tests exercise the four reported cases plus aliases, person fallback and unavailable person selection. They check the persisted notice, mock-transport destination and payload, owner claim, and repeat deduplication.

    Cost: production +4/-2; tests +66/-1 across two files.

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Bug Fixes
    Escalations now skip known terminal seats and can route to an eligible acting owner across supported session types.
    Repeated escalation checks create only one notice and send it once.
    When both the parent and default recipient are terminal seats, escalation selects a human without attempting delivery. If no human is available, no notice is created.

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

    Diff: 217 lines (+162 / -55) across 2 files Reviewer: openrig-review Review duration: 101m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 217 lines diff across 2 files
    0.37
    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.322
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #4215"
    general weight: 0.35
    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: 36.7% (MEDIUM) · Higher = larger blast radius
    36.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: 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: 14.5% · Safe to merge
    14.5%