← Back to Pull requests

Embed native fuzz seed fixtures #60275

Merged
edznux-dd merged 4 files (35 lines) on Nov 20, 2026 18:27 UTC
View on GitHub
edznux-dd edznux-dd commented on Nov 12, 2026 12:07 UTC
Author

<!-- dd-meta {"pullId":"00000000-0000-0000-0000-000000000000","source":"chat","resourceId":"7d4d4cec-b44a-4c1f-9fd5-af7099020f2f","workflowId":"78ddd5ee-dfa6-40ce-bfd4-ab72273ceed1","codeChangeId":"78ddd5ee-dfa6-40ce-bfd4-ab72273ceed1","sourceType":"bits_ai_sre"} -->

What does this PR do?

Bits AI SRE Investigation • View in Bits AI SRE Investigation

Embeds the seed fixtures used by the GPU metrics and Go symbol native fuzz targets into their compiled test binaries. Regular GPU tests continue to read their full filesystem fixtures unchanged. Declares the embedded files in the corresponding Bazel test targets so rules_go can compile them.

Motivation

The fuzzing platform uploads only fuzz.test, so both targets failed during corpus setup when workers lacked the repository testdata directory. This caused jobs to error before executing fuzz inputs and produced zero useful coverage. Embedding the existing seed data makes the targets self-contained and prevents the recurring alert condition. The Bazel declarations ensure the same fix works under the repository's Bazel test graph.

Describe how you validated your changes

  • go test -tags=test ./pkg/gpu/amd ./pkg/dyninst/gosymname

  • Built both fuzz test binaries and ran each from /tmp with -test.run=^$, confirming baseline coverage setup and a passing fuzz run without access to the repository fixtures.

  • bazel test //pkg/dyninst/gosymname:gosymname_test //pkg/gpu/amd:amd_test --test_output=errors
  • Additional Notes

    The change addresses the fuzz target packaging incompatibility in code; it does not alter memory limits or fuzzing infrastructure configuration. The Bazel embedsrcs declarations were added in response to review feedback because data alone does not satisfy rules_go's go:embed requirements.

    ---

    PR by Bits - View session in Datadog

    Comment @datadog to request changes

    Diff: 35 lines (+29 / -6) across 4 files Reviewer: grantseltzer Review duration: 11899m
    All Vouch review confidence checks passed
    Residual risk 0.05 = Change Risk (0.29) × (1 − Review Confidence (0.82)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.29 · 35 lines diff across 4 files
    0.29
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.75 · 5 substantive comment(s)
    0.75
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    82%
    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.214
    Real PR Conversation Timeline
    10 items
    datadog-prod-us1-5[bot] datadog-prod-us1-5[bot] commented on Nov 12, 2026 12:07 UTC
    Bot

    View session in Datadog

    Bits Code status: ✅ Done

    Comment @datadog to request changes

    github-actions[bot] github-actions[bot] commented on code on Nov 12, 2026 12:09 UTC
    Code Review
    pkg/dyninst/gosymname/fuzz_test.go:1
    @@ -6,19 +6,23 @@
     package gosymname
     
     import (
    -	"os"
    +	_ "embed"
     	"testing"
     
     	"github.com/stretchr/testify/require"
     	"go.yaml.in/yaml/v3"
     )
     
    +// The fuzzing infrastructure uploads only the compiled test binary, so keep
    +// the fuzz seeds in the binary instead of depending on the worker's checkout.
    +//
    +//go:embed testdata/symbols.yaml

    [P1] Declare the embedded fixtures in both Bazel test targets

    gosymname_test and amd_test currently list these fixtures only in data and have no embedsrcs. rules_go requires files referenced by //go:embed to be declared in embedsrcs; runtime data declarations do not supply the embed configuration. Consequently, both Bazel test targets fail to compile after this change. Add testdata/symbols.yaml to the gosymname target's embedsrcs and both GPU metrics files to the AMD target's embedsrcs.

    github-actions[bot] github-actions[bot] commented on Nov 12, 2026 12:09 UTC
    Reviewer

    AI review by Codex (OpenAI) - workflow run

    The patch is incorrect: both new embed directives lack the corresponding Bazel embedsrcs declarations, breaking compilation of the affected Bazel test targets. The embedding approach otherwise preserves the existing fuzz seeds.

    datadog-prod-us1-5[bot] datadog-prod-us1-5[bot] commented on Nov 12, 2026 12:31 UTC
    Bot

    🎯 Code Coverage (<a target='_blank' href='https://app.datadoghq.com/ci/code-coverage/github.com%2Fdatadog%2Fdatadog-agent/pull-requests/60275'>details</a>)<br>• <strong><span title="Percentage of modified executable lines covered by tests in this PR">Patch Coverage</span></strong>: 100.00%<br>• <strong><span title="Percentage of all executable lines covered by tests in the entire codebase">Overall Coverage</span></strong>: 66.98% <span title="Change in overall coverage compared to the base branch">(+0.01%)</span><br>

    <sub>
    This comment will be updated automatically if new data arrives. <br />
    🔗 Commit SHA: 6d62d47 | <a href="https://docs.datadoghq.com/integrations/guide/source-code-integration/#pr-comments">Docs</a> | Give us <a href="https://dd.enterprise.slack.com/archives/C07E3U2QRMM">feedback</a>!
    </sub>

    dd-octo-sts[bot] dd-octo-sts[bot] commented on Nov 12, 2026 12:56 UTC
    Bot

    Static quality checks

    ✅ Please find below the results from static quality gates
    Comparison made with ancestor 3aaabde0b6a9900a9e1f75b8b1383b2dbffec288
    📊 Static Quality Gates Dashboard
    🔗 SQG Job

    <details>
    <summary>33 successful checks with minimal change (&lt; 2 KiB)</summary>

    ||Quality gate|Current Size|
    |--|--|--|
    |✅|agent_deb_amd64|766.085 MiB|
    |✅|agent_deb_amd64_fips|696.576 MiB|
    |✅|agent_heroku_amd64|314.345 MiB|
    |✅|agent_msi|671.893 MiB|
    |✅|agent_rpm_amd64|766.061 MiB|
    |✅|agent_rpm_amd64_fips|696.552 MiB|
    |✅|agent_rpm_arm64|735.287 MiB|
    |✅|agent_rpm_arm64_fips|671.564 MiB|
    |✅|agent_suse_amd64|766.061 MiB|
    |✅|agent_suse_amd64_fips|696.552 MiB|
    |✅|agent_suse_arm64|735.287 MiB|
    |✅|agent_suse_arm64_fips|671.564 MiB|
    |✅|docker_agent_amd64|821.724 MiB|
    |✅|docker_agent_arm64|815.643 MiB|
    |✅|docker_agent_jmx_amd64|1012.653 MiB|
    |✅|docker_agent_jmx_arm64|995.288 MiB|
    |✅|docker_cws_instrumentation_amd64|9.513 MiB|
    |✅|docker_cws_instrumentation_arm64|8.877 MiB|
    |✅|docker_dogstatsd_amd64|40.334 MiB|
    |✅|docker_dogstatsd_arm64|38.334 MiB|
    |✅|docker_host_profiler_amd64|282.577 MiB|
    |✅|docker_host_profiler_arm64|295.263 MiB|
    |✅|dogstatsd_deb_amd64|31.086 MiB|
    |✅|dogstatsd_deb_arm64|28.997 MiB|
    |✅|dogstatsd_rpm_amd64|31.086 MiB|
    |✅|dogstatsd_suse_amd64|31.086 MiB|
    |✅|iot_agent_deb_amd64|48.382 MiB|
    |✅|iot_agent_deb_arm64|44.755 MiB|
    |✅|iot_agent_deb_armhf|45.529 MiB|
    |✅|iot_agent_rpm_amd64|48.383 MiB|
    |✅|iot_agent_suse_amd64|48.382 MiB|
    |✅|docker_cluster_agent_amd64|218.331 MiB|
    |✅|docker_cluster_agent_arm64|231.046 MiB|

    </details>

    cit-pr-commenter-54b7da[bot] cit-pr-commenter-54b7da[bot] commented on Nov 12, 2026 13:09 UTC
    Bot

    Regression Detector

    Regression Detector Results

    Metrics dashboard\
    Target profiles\
    Job ID: 842e091d-91eb-4377-92d3-1068a342ad77

    Baseline: 9c2be34f89ccb66a29d4f0467bf371ceb758dc7b
    Comparison: 162203553820caf8949cb7f6bd9445c6117e2ad5
    [Diff](9c2be34f89ccb66a29d4f0467bf371ceb758dc7b...162203553820caf8949cb7f6bd9445c6117e2ad5)

    Optimization Goals: ✅ No significant changes detected

    <details>
    <summary><h2>
    Fine details of change detection per experiment
    </h2></summary>

    | perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
    |------|---------------------------------------------|--------------------|----------|----------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
    | ➖ | quality_gate_metrics_logs | memory utilization | +0.32 | [+0.09, +0.54] | 1 | Logs bounds checks dashboard |
    | ➖ | quality_gate_logs | % cpu utilization | +0.29 | [-0.71, +1.28] | 1 | Logs bounds checks dashboard |
    | ➖ | dsd_uds_10mb_3k_timestamped_contexts_cpu | % cpu utilization | +0.26 | [-0.04, +0.57] | 1 | Logs |
    | ➖ | quality_gate_security_idle | memory utilization | +0.17 | [+0.12, +0.22] | 1 | Logs bounds checks dashboard |
    | ➖ | dsd_uds_10mb_3k_timestamped_contexts_memory | memory utilization | +0.09 | [-0.14, +0.31] | 1 | Logs |
    | ➖ | quality_gate_private_action_runner | memory utilization | +0.01 | [-0.11, +0.13] | 1 | Logs bounds checks dashboard |
    | ➖ | quality_gate_security_no_fs_load | memory utilization | -0.08 | [-0.14, -0.02] | 1 | Logs bounds checks dashboard |
    | ➖ | quality_gate_idle_all_features | memory utilization | -0.20 | [-0.24, -0.15] | 1 | Logs bounds checks dashboard |
    | ➖ | quality_gate_security_mean_fs_load | memory utilization | -0.25 | [-0.30, -0.19] | 1 | Logs bounds checks dashboard |
    | ➖ | quality_gate_idle | memory utilization | -0.27 | [-0.32, -0.22] | 1 | Logs bounds checks dashboard |
    | ➖ | python_openmetrics | % cpu utilization | -0.32 | [-0.98, +0.34] | 1 | Logs bounds checks dashboard |
    | ➖ | dsd_uds_client_drop_detector_cpu | % cpu utilization | -1.20 | [-1.91, -0.48] | 1 | Logs |
    </details>

    Bounds Checks: ❌ Failed

    | perf | experiment | bounds_check_name | replicates_passed | observed_value | links |
    |------|------------------------------------|-----------------------|-------------------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
    | ✅ | python_openmetrics | checks_execution_time | 10/10 | 82.69 ≤ 100 | bounds checks dashboard |
    | ✅ | python_openmetrics | cpu_usage | 10/10 | 1344.13 ≤ 1500 | bounds checks dashboard |
    | ✅ | python_openmetrics | memory_usage | 10/10 | 4.30GiB ≤ 4.75GiB | bounds checks dashboard |
    | ✅ | quality_gate_idle | intake_connections | 10/10 | 5 ≤ 6 | bounds checks dashboard |
    | ✅ | quality_gate_idle | memory_usage | 10/10 | 195.63MiB ≤ 202MiB | bounds checks dashboard |
    | ❌ | quality_gate_idle | total_bytes_received | 8/10 | 822.41KiB > 819.20KiB | bounds checks dashboard |
    | ✅ | quality_gate_idle_all_features | intake_connections | 10/10 | 2 ≤ 5 | bounds checks dashboard |
    | ✅ | quality_gate_idle_all_features | memory_usage | 10/10 | 464.16MiB ≤ 544MiB | bounds checks dashboard |
    | ❌ | quality_gate_idle_all_features | total_bytes_received | 9/10 | 1.25MiB > 1.25MiB | bounds checks dashboard |
    | ✅ | quality_gate_logs | intake_connections | 10/10 | 18 ≤ 40 | bounds checks dashboard |
    | ✅ | quality_gate_logs | memory_usage | 10/10 | 224.97MiB ≤ 240MiB | bounds checks dashboard |
    | ✅ | quality_gate_logs | missed_bytes | 10/10 | 0B ≤ 0B | bounds checks dashboard |
    | ✅ | quality_gate_logs | total_bytes_received | 10/10 | 264.11MiB ≤ 292MiB | bounds checks dashboard |
    | ✅ | quality_gate_metrics_logs | cpu_usage | 10/10 | 353.28 ≤ 2000 | bounds checks dashboard |
    | ✅ | quality_gate_metrics_logs | intake_connections | 10/10 | 20 ≤ 40 | bounds checks dashboard |
    | ✅ | quality_gate_metrics_logs | memory_usage | 10/10 | 431.91MiB ≤ 463MiB | bounds checks dashboard |
    | ✅ | quality_gate_metrics_logs | missed_bytes | 10/10 | 0B ≤ 0B | bounds checks dashboard |
    | ✅ | quality_gate_metrics_logs | total_bytes_received | 10/10 | 953.43MiB ≤ 1.04GiB | bounds checks dashboard |
    | ✅ | quality_gate_private_action_runner | memory_usage | 10/10 | 77.11MiB ≤ 80MiB | bounds checks dashboard |
    | ✅ | quality_gate_security_idle | cpu_usage | 10/10 | 28.60 ≤ 100 | bounds checks dashboard |
    | ✅ | quality_gate_security_idle | memory_usage | 10/10 | 343.16MiB ≤ 365MiB | bounds checks dashboard |
    | ✅ | quality_gate_security_mean_fs_load | cpu_usage | 10/10 | 42.81 ≤ 200 | bounds checks dashboard |
    | ✅ | quality_gate_security_mean_fs_load | memory_usage | 10/10 | 325.68MiB ≤ 343MiB | bounds checks dashboard |
    | ✅ | quality_gate_security_no_fs_load | cpu_usage | 10/10 | 23.64 ≤ 100 | bounds checks dashboard |
    | ✅ | quality_gate_security_no_fs_load | memory_usage | 10/10 | 319.70MiB ≤ 356MiB | bounds checks dashboard |

    <details>
    <summary><h2>
    Explanation
    </h2></summary>

    Confidence level: 90.00%
    Effect size tolerance: |Δ mean %| ≥ 5.00%

    Performance changes are noted in the perf column of each table:

    ✅ = significantly better comparison variant performance
    ❌ = significantly worse comparison variant performance
    ➖ = no significant change in performance

    A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

    For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

    1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

    2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate*, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

    3. Its configuration does not mark it "erratic".
    </details>

    CI Pass/Fail Decision

    ❌ Failed. Some Quality Gates were violated.

  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.

  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_idle, bounds check total_bytes_received: 8/10 replicas passed. Failed 2 which is > 0. Gate FAILED.

  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.

  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_idle_all_features, bounds check total_bytes_received: 9/10 replicas passed. Failed 1 which is > 0. Gate FAILED.

  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.

  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.

  • quality_gate_logs, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.

  • quality_gate_metrics_logs, bounds check cpu_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_metrics_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.

  • quality_gate_metrics_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_metrics_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.

  • quality_gate_metrics_logs, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.

  • quality_gate_private_action_runner, bounds check memory_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_security_idle, bounds check cpu_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_security_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_security_mean_fs_load, bounds check cpu_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_security_mean_fs_load, bounds check memory_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_security_no_fs_load, bounds check cpu_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_security_no_fs_load, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • grantseltzer grantseltzer approved these changes on Nov 12, 2026 19:10 UTC
    Approved Reviewer

    Approved these changes.

    copilot-pull-request-reviewer[bot] copilot-pull-request-reviewer[bot] commented on Nov 20, 2026 16:18 UTC
    Reviewer

    <!-- ccr-overview-v2 -->

    🟢 Approval recommended

    No active review issues remain for the changes embedding fuzz seed fixtures and declaring their Bazel inputs.

    No open issues 🎉

    <details>
    <summary><strong>What changed in this PR</strong></summary>

    Makes the GPU metrics and Go symbol fuzz targets self-contained by embedding their seed fixtures in the compiled test binaries, avoiding corpus setup failures on workers without a repository checkout.

    Changes:

  • Embed existing seed fixtures for both fuzz targets while preserving filesystem-based fixtures for regular GPU tests.

  • Add Bazel embedsrcs declarations so both test targets can compile the embedded data.
  • | File | Description |
    | ---- | ----------- |
    | pkg/​gpu/​amd/​gpumetrics_test.go | Embed GPU metrics seeds and use them in the fuzz target. |
    | pkg/​gpu/​amd/​BUILD.bazel | Declare the two embedded GPU metrics fixtures. |
    | pkg/​dyninst/​gosymname/​fuzz_test.go | Load symbol fuzz seeds from embedded YAML. |
    | pkg/​dyninst/​gosymname/​BUILD.bazel | Declare the embedded symbol fixture. |
    </details>

    <sub>Review effort: Balanced</sub>

    zhuminyi zhuminyi approved these changes on Nov 20, 2026 16:28 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    edznux-dd edznux-dd
    Labels
    risk: low confidence: 82.4% 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: 28.8% (LOW) · Higher = larger blast radius
    28.8%
    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: 82.4% · Lower = rushed or shallow review
    82.4%
    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: 5.1% · Safe to merge
    5.1%