← Back to Pull requests

fix(api): skip container members in get_impact by default #376

Closed
unknown closed this pull request without merging on Nov 14, 2026 13:07 UTC
View on GitHub
unknown unknown commented on Nov 12, 2026 18:44 UTC
Author

Problem

get_impact walks up to the event model, storyboard or component that holds the root. It then walks down through every member. For swimlane/acme-storefront/cart@1 this lists 67 nodes, including every acme-reviews entity that does not depend on cart.

Change

  • A container is still reported, but its members are not walked by default.

  • The new request field include_containers restores the full walk.

  • The walk stays two-way. Outbound and incoming references are followed as before.

  • If the root is a container, its members are listed.

  • Container members are members[...] on event models and components, and slices[...] and traces[...] on storyboards.

  • The MCP tool get_impact accepts include_containers.

  • classify_impact is unchanged. It is the dependents-only view.
  • The default output of get_impact changes. Callers that need the full walk must set include_containers. No client in this repo depends on it.

    Tests

  • Graph tests: an unrelated sibling is excluded by default and included with the flag. The container is in both results. A container root lists its members.

  • Handler test for the same case through the service.

  • MCP test accepts the new parameter.
  • Closes #76

    <!-- CURSOR_SUMMARY -->
    ---

    [!NOTE]

    Medium Risk

    Default get_impact results shrink, so external callers that relied on sibling members appearing must opt in with include_containers; in-repo clients are updated and covered by new tests.

    > Overview

    get_impact no longer expands container membership by default, so unrelated siblings inside an event model, component, or storyboard are not counted as impacted when traversal only reaches the container.

    > A new optional flag include_containers on GetImpactRequest and the MCP get_impact tool restores walking through members[...], slices[...], and traces[...]. Containers are still returned at the edge; only the downward member walk is gated (the root container still lists its members). classify_impact is unchanged.

    > Docs for repair workflows and the MCP reference table describe the new default and parameter. Graph, handler, MCP, and fixture tests cover default vs include_containers=true behavior.

    > <sup>Reviewed by Cursor Bugbot for commit cbe51055c8183976b206e53c488790f1600c3d83. Bugbot is set up for automated code reviews on this repo. Configure here.</sup>

    <!-- /CURSOR_SUMMARY -->

    Diff: 314 lines (+235 / -79) across 3 files Reviewer: yordis Review duration: 2543m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 314 lines diff across 3 files
    0.40
    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.344
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #376"
    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: 40.3% (MEDIUM) · Higher = larger blast radius
    40.3%
    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: 15.9% · Safe to merge
    15.9%