← Back to Pull requests

Verify MiniMax inherited latency timing and document coverage #847

Merged
salignatmoandal merged 3 files (185 lines) on Nov 23, 2026 10:14 UTC
View on GitHub
salignatmoandal salignatmoandal commented on Nov 17, 2026 22:03 UTC
Author

Summary

MiniMax already inherits the OpenAI-compatible handler's first-audio timing, but the latency matrix omits it and no dedicated MiniMax regression verifies those timing boundaries. This completes the specific inherited-timing coverage requested in #590's audit.

Before / after

| Before | After |
| --- | --- |
| MiniMax inherits timing instrumentation without dedicated regression coverage or a latency-matrix entry. | Controlled-clock tests verify the timing boundaries and Realtime finalization; the matrix documents MiniMax coverage. |

What changes

The tests feed timed SSE bytes through the actual MiniMax decoder and inherited PCM block assembly. They establish TTFA on the first decoded PCM samples, before a full output block is available, and E2E on the first yielded block. Metadata-only events do not count as audio. Later segments and cancellation after first delivery preserve the initial measurements; empty/cancelled work and discarded trackers cannot populate another response's timings.

A Realtime test drives the real service finalization path and verifies response identity, both timings in response.done metadata, the terminal log and tracker cleanup. The coverage matrix now lists MiniMax and explains its SSE timing boundary. Production code is unchanged.

Test plan

  • Six new controlled-clock cases pass.

  • MiniMax, shared HTTP TTS and finalization cohort: 118 passed, 2 skipped. The skipped cases require an explicitly enabled live MiniMax call.

  • Ruff lint/format and git diff --check pass.
  • The timing cases stub the encoded transport stream, keeping provider decoding and block assembly real. Existing handler tests exercise the HTTP transport separately. No paid provider request was made; the full repository suite was not run.

    Diff: 185 lines (+184 / -1) across 3 files Reviewer: andimarafioti Review duration: 7931m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.42) × (1 − Review Confidence (0.68)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 185 lines diff across 3 files
    0.42
    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.313
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    2 items
    andimarafioti andimarafioti approved these changes on Nov 23, 2026 10:14 UTC
    Approved Reviewer
    Reviewers
    Assignees
    salignatmoandal salignatmoandal
    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: 42.2% (MEDIUM) · Higher = larger blast radius
    42.2%
    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: 13.7% · Safe to merge
    13.7%