← Back to Pull requests

Fix Kafka Consumer cluster tests broken on master #25733

Closed
unknown closed this pull request without merging on Oct 21, 2026 20:52 UTC
View on GitHub
unknown unknown commented on Oct 21, 2026 17:45 UTC
Author

What does this PR do?

Fixes two Kafka Consumer unit tests that fail on master with AttributeError: KafkaClient ... has no attribute 'open_consumer':

  • test_configured_topic_missing_from_cluster_does_not_block_other_groups

  • test_configured_topic_created_after_first_run_is_collected
  • The check_against_fake_cluster helper stubbed open_consumer, close_consumer, and consumer_get_cluster_id_and_list_topics, which no longer exist. This PR drops those stubs and has the fake broker's list_topics report a cluster_id, so the real KafkaClient.get_cluster_id runs instead of being stubbed. The helper docstring is updated to match.

    Motivation

    #25666 added the helper, and #25667 then removed the consumer methods it stubs. Each PR passed CI on its own, but together they break Kafka Consumer tests on master and on every PR that runs them (for example this run on #25706).

    This PR changes tests only, so it needs no changelog entry.

    Checklist before requesting review

  • I self-reviewed the full diff, and this description matches the final change

  • Tests cover the change, or this description explains why none are needed

  • Automated review comments, including Codex review, were addressed or answered

  • I, the human author, understand this change, can explain it to reviewers, and believe it meets the repository standards
  • 🤖 Generated with Claude Code

    Diff: 215 lines (+161 / -54) across 2 files Reviewer: iliakur Review duration: 187m
    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 · 215 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 #25733"
    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: 36.6% (MEDIUM) · Higher = larger blast radius
    36.6%
    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%