← Back to Pull requests

[Debugger] Add system-test coverage for the debugger guardrails #7287

Closed
unknown closed this pull request without merging on Aug 13, 2026 16:03 UTC
View on GitHub
unknown unknown commented on Jul 09, 2026 13:24 UTC
Author

Motivation

Add focused system-test coverage for the debugger guardrails required for GA.

Changes

  • Add method- and line-probe evaluation-timeout tests covering an expensive regex and a large collection filter. Aborted evaluations must produce exactly one evaluation-error snapshot with evaluationErrors[] populated and no captured data.

  • Add snapshot-size guardrail coverage verifying that the request containing the snapshot is ≤1 MB and includes a payload-pruning marker.

  • Add capture-timeout coverage verifying that the affected collection reports notCapturedReason=timeout, without incorrectly satisfying the snapshot-size guardrail.

  • Add the dedicated DEBUGGER_CAPTURE_TIMEOUT scenario with a 10 ms capture budget, CI orchestration, and compatible weblog filtering.

  • Add the /debugger/snapshot/capture-timeout fixture to supported .NET, Java, and Node.js weblogs and document the endpoint.

  • Extend test_default_max_length to verify that truncated strings report truncated=true.

  • Extract the shared captures_contain_data helper into tests.debugger.utils.

  • Enable capture-timeout coverage for supported .NET, Java, and Node.js tracer versions. Keep unsupported weblogs and the evaluation-timeout and snapshot-size guardrails disabled through manifests until support lands.
  • Workflow

    1. ⚠️ Create your PR as draft ⚠️
    2. Work on you PR until the CI passes
    3. Mark it as ready for review
    Test logic is modified? -> Get a review from RFC owner.
    Framework is modified, or non obvious usage of it -> get a review from R&P team

    :rocket: Once your PR is reviewed and the CI green, you can merge it!

    🛟 #apm-shared-testing 🛟

    Reviewer checklist

    [ ] Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
    [ ] A docker base image is modified?
    [ ] the relevant build-XXX-image label is present
    [ ] A scenario is added, removed or renamed?
    * [ ] Get a review from R&P team

    Diff: 277 lines (+207 / -70) across 3 files Reviewer: grantseltzer Review duration: 50559m
    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 · 277 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.337
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #7287"
    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: 39.6% (MEDIUM) · Higher = larger blast radius
    39.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: 15.6% · Safe to merge
    15.6%