← Back to Pull requests

ci(all-green): link uploaded junit tests to their pipeline #11386

Merged
Eleee28 merged 4 files (237 lines) on Nov 23, 2026 15:16 UTC
View on GitHub
Eleee28 Eleee28 commented on Nov 23, 2026 13:28 UTC
Author

What does this PR do?

Links the JUnit results that All Green uploads back to the pipeline (workflow run attempt) that produced them, so Datadog can correlate them.

  • .mochamultireporterrc.js stamps GITHUB_RUN_ATTEMPT into each JUnit testsuite as a property, next to the existing ci. properties. The stamped ci.pipeline.url now includes /attempts/N.

  • scripts/upload-junit.mjs groups the downloaded reports under junit-results/<run-id>/ by run id and stamped run attempt. It runs one datadog-ci junit upload per group, with that run's GITHUB_RUN_ID and GITHUB_RUN_ATTEMPT (up to 4 uploads at a time).

  • - GITHUB_WORKFLOW, GITHUB_JOB and GITHUB_RUN_NUMBER stay blank, so pipeline name/number and job name still come from the existing --xpath-tag mappings.
    - JOB_CHECK_RUN_ID is now blanked too. Otherwise datadog-ci tags the tests with All Green's own job id.
    - Reports without a stamped attempt (e.g. artifacts from older commits) keep the previous unattributed upload.
  • scripts/upload-junit.spec.mjs covers the grouping and the upload env.
  • Motivation

    Since JUnit uploads moved to All Green, every report is uploaded with GITHUB_RUN_ID=''. Datadog builds the pipeline correlation id of a GitHub test event from GITHUB_SERVER_URL, GITHUB_REPOSITORY, GITHUB_RUN_ID and GITHUB_RUN_ATTEMPT. With an empty run id, the uploaded tests can't be linked to their pipeline. As a result, pipeline-level test flags such as @ci.tests.has_runs and @_dd.ci.tests.has_failed_runs are never set on these workflows' pipelines, even when tests failed.

    Additional Notes

  • Draft until validated in Datadog once All Green runs on this PR: uploaded test events should carry a pipeline correlation id, and the sibling workflows' pipelines should get the ci.tests. flags.

  • Tested locally: npm run lint, scripts/upload-junit.spec.mjs and integration-tests/mocha-parallel-files.spec.js.

  • .mochamultireporterrc.js only stamps the run attempt (and /attempts/N in the URL) when GITHUB_RUN_ATTEMPT is set.

  • Rerun behaviour is unchanged: a rerun still re-uploads the newest artifact of every job, but each report now links to the attempt that actually produced it.

  • Internal reference: SDCT-1176.

  • Replaces #11370, which was opened from a fork and could not get CI credentials.
  • Diff: 237 lines (+217 / -20) across 4 files Reviewer: juan-fernandez Review duration: 107m
    All Vouch review confidence checks passed
    Residual risk 0.06 = Change Risk (0.40) × (1 − Review Confidence (0.85)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 237 lines diff across 4 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.80 · 5 substantive comment(s)
    0.80
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    85%
    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.327
    Real PR Conversation Timeline
    16 items
    dd-octo-sts[bot] dd-octo-sts[bot] commented on Nov 23, 2026 13:29 UTC
    Bot

    Overall package size

    Self size: 9.55 MB
    Deduped: 10.3 MB
    No deduping: 10.3 MB

    <details><summary>Dependency sizes</summary>
    | name | version | self size | total size |
    |------|---------|-----------|------------|
    | import-in-the-middle | 3.5.3 | 131.25 kB | 531.9 kB |
    | opentracing | 0.14.7 | 194.81 kB | 194.81 kB |
    | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |

    </details>

    <sub>🤖 This report was automatically generated by heaviest-objects-in-the-universe<sub>

    datadog-prod-us1-3[bot] datadog-prod-us1-3[bot] commented on Nov 23, 2026 13:32 UTC
    Bot

    <a target='_blank' href='https://app.datadoghq.com/ci/pipeline-executions?query=ci_level%3Ajob+%40git.commit.sha%3Aa9c344603eee098d34a1240faa3885ac27fa5109&referrer=pr-comment&start=1795443472000'><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.datadoghq.com/static/images/pr_comments/software_delivery/badges_header/pipelines-ok.svg"/><img src="https://static.datadoghq.com/static/images/pr_comments/software_delivery/badges_header/pipelines-ok-light.svg" alt="Pipelines" align="center" /></picture></a> &nbsp;<a target='_blank' href='https://app.datadoghq.com/ci/test/runs?query=test_level%3Atest+%40git.commit.sha%3A7a523685fe38225398b3bca5e64cafa8d7ec06ef&referrer=pr-comment&start=1795443472000'><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.datadoghq.com/static/images/pr_comments/software_delivery/badges_header/tests-ok.svg"/><img src="https://static.datadoghq.com/static/images/pr_comments/software_delivery/badges_header/tests-ok-light.svg" alt="Tests" align="center" /></picture></a>

    <details><summary><b>🎉 All green!</b></summary>

    🧪 All tests passed
    ❄️ No new flaky tests detected
    </details>

    🎯 Code Coverage (<a target='_blank' href='https://app.datadoghq.com/ci/code-coverage/github.com%2Fdatadog%2Fdd-trace-js/pull-requests/11386'>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>: 98.57% <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: a9c3446 | <a href="https://docs.datadoghq.com/integrations/guide/source-code-integration/#pr-comments">Docs</a> | <a href="https://app.datadoghq.com/ci/pull-request/Z2l0aHViLmNvbS9kYXRhZG9nL2RkLXRyYWNlLWpzLzExMzg2?referrer=pr-comment">View more details</a> | Give us <a href="https://dd.enterprise.slack.com/archives/C07E3U2QRMM">feedback</a>!
    </sub>

    codecov[bot] codecov[bot] commented on Nov 23, 2026 13:36 UTC
    Bot

    Codecov Report


    :white_check_mark: All modified and coverable lines are covered by tests.
    :white_check_mark: Project coverage is 99.15%. Comparing base (58f3376) to head (a9c3446).
    :warning: Report is 3 commits behind head on master.

    <details><summary>Additional details and impacted files</summary>

    @@           Coverage Diff           @@
    ##           master   #11386   +/-   ##
    =======================================
      Coverage   99.15%   99.15%           
    =======================================
      Files        1136     1136           
      Lines      188152   188159    +7     
      Branches       86       86           
    =======================================
    + Hits       186563   186570    +7     
      Misses       1589     1589           
    

    | Flag | Coverage Δ | |
    |---|---|---|
    | ai-guard | 63.29% <ø> (-0.02%) | :arrow_down: |
    | apm-capabilities | 55.13% <ø> (-0.01%) | :arrow_down: |
    | apm-integrations | 81.92% <ø> (-0.01%) | :arrow_down: |
    | appsec | 59.14% <ø> (-0.01%) | :arrow_down: |
    | debugger | 70.85% <ø> (-0.02%) | :arrow_down: |
    | instrumentation | 60.11% <ø> (+0.05%) | :arrow_up: |
    | llmobs | 82.50% <ø> (-0.02%) | :arrow_down: |
    | master-coverage | 99.15% <ø> (?) | |
    | openfeature | 68.02% <ø> (-0.02%) | :arrow_down: |
    | platform | 68.11% <ø> (-0.01%) | :arrow_down: |
    | profiling | 66.46% <ø> (-0.02%) | :arrow_down: |
    | serverless | 66.63% <ø> (-0.02%) | :arrow_down: |
    | test-optimization | 82.00% <ø> (+<0.01%) | :arrow_up: |

    Flags with carried forward coverage won't be shown. Click here to find out more.
    </details>

    :umbrella: View full report in Codecov by Harness.
    :loudspeaker: Have feedback on the report? Share it here.
    <details><summary> :rocket: New features to boost your workflow: </summary>

  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

  • </details>

    pr-commenter[bot] pr-commenter[bot] commented on Nov 23, 2026 13:40 UTC
    Bot

    Benchmarks

    Benchmark execution time: 2026-11-23 15:00:14

    Comparing candidate commit a9c344603eee098d34a1240faa3885ac27fa5109 in PR branch elena.juarros/SDCT-1176-correlate-all-green-junit with baseline commit 58f3376a0a914bb7fc737850519f8c464e00a8bb in branch master.

    📊 Benchmarking dashboard

    Found 0 performance improvements and 0 performance regressions! Performance is the same for 2472 metrics, 15 unstable metrics.

    <details>
    <summary><h3>Explanation</h3></summary>

    This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

    🟩 = significantly better candidate vs. baseline
    🟥 = significantly worse candidate vs. baseline

    We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

    If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

    Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

    <details>
    <summary><h4>More details about the CI and significant changes</h4></summary>

    You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

    CIs of the difference of means are often centered around 0%, because often changes are not that big:

    ---------------------------------(------|---^--------)-------------------------------->
                                  -0.6%    0%  0.3%     +1.2%
                                     |          |        |
             lower bound of the CI --'          |        |
    sample mean (center of the CI) -------------'        |
             upper bound of the CI ----------------------'
    

    As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

    For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

    ----------------------------------------|---------|---(---------^---------)---------->
                                           0%        1%  1.3%      2.2%      3.1%
                                                      |   |         |         |
           significant impact threshold --------------'   |         |         |
                          lower bound of CI --------------'         |         |
           sample mean (center of the CI) --------------------------'         |
                          upper bound of CI ----------------------------------'
    

    </details>

    </details>

    <details>
    <summary><h3>Unstable benchmarks</h3></summary>

    These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

    scenario:appsec-appsec-enabled-20

  • unstable max_rss_usage [-65.201MB; +54.128MB] or [-24.855%; +20.634%]
  • scenario:appsec-iast-no-vulnerability-iast-enabled-default-config-20

  • unstable max_rss_usage [-18.359MB; +5.993MB] or [-7.896%; +2.577%]
  • scenario:appsec-iast-no-vulnerability-iast-enabled-default-config-24

  • unstable max_rss_usage [-37.106MB; +13.528MB] or [-11.084%; +4.041%]
  • scenario:appsec-iast-with-vulnerability-iast-enabled-default-config-20

  • unstable max_rss_usage [-37.715MB; +19.558MB] or [-10.741%; +5.570%]
  • scenario:appsec-iast-with-vulnerability-iast-enabled-default-config-26

  • unstable max_rss_usage [-29.475MB; +14.652MB] or [-9.584%; +4.764%]
  • scenario:openfeature-initialization-configuration-20

  • unstable max_rss_usage [-4.437MB; +7.472MB] or [-5.639%; +9.494%]
  • scenario:openfeature-initialization-error-20

  • unstable max_rss_usage [-7.980MB; +2.459MB] or [-10.223%; +3.150%]
  • scenario:openfeature-scale-full-24

  • unstable max_rss_usage [-21.323MB; +31.428MB] or [-8.012%; +11.809%]
  • scenario:openfeature-scale-full-26

  • unstable max_rss_usage [-6.641MB; +33.583MB] or [-2.888%; +14.604%]
  • scenario:plugin-cassandra-driver-batch-20

  • unstable cpu_user_time [-115.202ms; +181.546ms] or [-5.383%; +8.484%]

  • unstable execution_time [-116.730ms; +181.961ms] or [-5.444%; +8.486%]

  • unstable throughput [-59745.242op/s; +38696.420op/s] or [-6.343%; +4.108%]
  • scenario:plugin-graphql-long-with-depth-off-26

  • unstable execution_time [-344.799ms; +318.774ms] or [-5.361%; +4.956%]

  • unstable max_rss_usage [-27.316MB; +38.953MB] or [-13.728%; +19.577%]
  • scenario:plugin-graphql-long-with-depth-on-max-26

  • unstable max_rss_usage [-34270.047KB; +33778.714KB] or [-17.620%; +17.367%]
  • </details>

    juan-fernandez juan-fernandez commented on Nov 23, 2026 13:53 UTC
    Contributor

    /datadog autotest review
    @codex review

    chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] commented on Nov 23, 2026 13:54 UTC
    Bot

    <!-- codex-pull-request-review-summary -->
    <!-- codex-review-state:v1 {"code_review":{"commit_sha":"a9c344603eee098d34a1240faa3885ac27fa5109","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":"a9c344603eee098d34a1240faa3885ac27fa5109","has_any_findings":null,"has_unresolved_findings":null,"status":"completed"}} -->
    <!-- codex-security-review:v1 {"blockingSeverityThreshold":"P0","headSha":"a9c344603eee098d34a1240faa3885ac27fa5109","mergeGateEnabled":false,"pullRequestNumber":11386,"repository":"DataDog/dd-trace-js","status":"completed"} -->
    <details>
    <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary>

    This comment shows the latest Codex review activity on this pull request.

    | Review | Status | Commit | Review trigger |
    | --- | --- | --- | --- |
    | 📝 Code Review | ✅ Completed <relative-time datetime="2026-11-23T15:15:49.855420Z">2026-11-23T15:15:49.855420Z</relative-time> | a9c3446 | Draft marked ready |
    | 🔒 Security Review | ✅ Completed <relative-time datetime="2026-11-23T15:17:17.695619Z">2026-11-23T15:17:17.695619Z</relative-time> | a9c3446 | Draft marked ready |

    <details> <summary>ℹ️ About Codex in GitHub</summary>
    <br/>

    Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review

  • Mark a draft as ready

  • Comment "@codex review" or "@codex security review".
  • Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

    </details>

    </details>

    chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] commented on Nov 23, 2026 13:55 UTC
    Bot

    <!-- codex-review-receipt:v1 -->

    Codex Review: Didn't find any major issues. Nice work!

    Reviewed commit: bff12874c0

    <details> <summary>ℹ️ About Codex in GitHub</summary>
    <br/>

    Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review

  • Mark a draft as ready

  • Comment "@codex review".
  • If Codex has suggestions, it will comment; otherwise it will react with 👍.

    Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

    </details>

    chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] commented on Nov 23, 2026 13:57 UTC
    Bot

    <!-- codex-review-receipt:v1 -->

    🛡️ Codex Security Review · _Automatically triggered_

    Security review completed. No security issues were found in this pull request.

    Reviewed commit: bff12874c0

    View security finding report

    _Only the user who started this review can view the report in Codex._

    <details> <summary>ℹ️ About Codex security reviews in GitHub</summary>
    <br/>

    This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"

  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
  • Once complete, Codex will leave suggestions, or a comment if no findings are found.

    </details>

    datadog-prod-us1-3[bot] datadog-prod-us1-3[bot] commented on code on Nov 23, 2026 13:59 UTC
    Code Review
    scripts/upload-junit.mjs:1
    @@ -18,34 +22,86 @@ const XPATH_TAGS = [
       "ci.job.name=/testcase/..//property[@name='ci.job.name']/@value",
     ]
     
    -// datadog-ci derives its own ci.pipeline.name/id/number/url and ci.job.name tags directly from
    -// these GITHUB_* variables (the All Green job's own), applying the same values to every file in
    -// the batched upload — which would overwrite the per-test XPATH_TAGS values above. Blanking just
    -// these four leaves every other GITHUB_*-derived tag (repository URL, PR association, commit SHA)
    -// untouched, since those don't collide with anything XPATH_TAGS sets.
    +// datadog-ci derives ci.pipeline.*/ci.job.* tags from these GITHUB_* variables, which are All Green's
    +// own here and would overwrite the per-test XPATH_TAGS values above. JOB_CHECK_RUN_ID is All Green's
    +// job id, so it would point the uploaded tests at a job that did not run them.
     const NO_PIPELINE_ATTRIBUTION_ENV = {
       GITHUB_WORKFLOW: '',
       GITHUB_JOB: '',
       GITHUB_RUN_ID: '',
       GITHUB_RUN_NUMBER: '',
    +  JOB_CHECK_RUN_ID: '',
    +}
    +
    +const uploadSemaphore = new Semaphore(MAX_CONCURRENT_UPLOADS)
    +
    +/**
    + * @param {string} file
    + */
    +function isJunitReport (file) {
    +  const name = basename(file)
    +  return name.endsWith('.xml') && (name.includes('junit') || name.includes('test') || name.includes('TEST-'))
    +}
    +
    +/**
    + * Group the downloaded reports under `junit-results/<run-id>/` by the run attempt stamped into
    + * each report, so each group can be uploaded with its own run's GITHUB_RUN_ID and GITHUB_RUN_ATTEMPT.
    + * Datadog derives the pipeline correlation id from those two values; without it, the tests can't
    + * be linked to the pipeline that ran them.
    + *
    + * @param {string} inputDir
    + * @returns {Array<{ runId: string, runAttempt: string | undefined, files: string[] }>}
    + */
    +export function groupJunitReports (inputDir) {
    +  const groups = new Map()
    +  for (const runId of readdirSync(inputDir)) {
    +    const runDir = join(inputDir, runId)
    +    for (const file of readdirSync(runDir, { recursive: true })) {
    +      if (!isJunitReport(file)) continue
    +      const path = join(runDir, file)
    +      const runAttempt = readFileSync(path, 'utf8').match(RUN_ATTEMPT_PROPERTY)?.[1]
    +      const key = `${runId}/${runAttempt}`
    +      let group = groups.get(key)
    +      if (!group) {
    +        group = { runId, runAttempt, files: [] }
    +        groups.set(key, group)
    +      }
    +      group.files.push(path)
    +    }
    +  }
    +  return [...groups.values()]
    +}
    +
    +/**
    + * Reports without a stamped run attempt (e.g. from before it was stamped) keep the old
    + * unattributed upload.
    + *
    + * @param {{ runId: string, runAttempt: string | undefined }} group
    + * @returns {Record<string, string>}
    + */
    +export function junitUploadEnv ({ runId, runAttempt }) {
    +  if (!runAttempt) return NO_PIPELINE_ATTRIBUTION_ENV
    +  return { ...NO_PIPELINE_ATTRIBUTION_ENV, GITHUB_RUN_ID: runId, GITHUB_RUN_ATTEMPT: runAttempt }
     }
     
     /**
    - * Upload every sibling workflow's downloaded junit reports to Datadog in a single call.
    - * `--auto-discovery` already walks `junit-results/<run-id>/<artifact-name>/*.xml` recursively and
    - * uploads every matching file itself (with its own internal concurrency), so there's no need to
    - * merge the reports into one document first — each testcase's `node_version` and `ci.*` properties
    - * (see `XPATH_TAGS`) keep matrix cells and originating workflows distinguishable regardless of which
    - * file they came from.
    + * Upload every sibling workflow's downloaded junit reports to Datadog, one call per run attempt.
      *
      * @returns {Promise<import('./run-upload.mjs').UploadResult[]>}
      */
     export async function uploadAllJunit () {
       if (!existsSync(INPUT_DIR)) return []
     
    -  const result = await runUpload('datadog-ci', [
    -    'junit', 'upload', '--service', 'dd-trace-js-tests', '--auto-discovery', INPUT_DIR,
    -    ...XPATH_TAGS.flatMap(tag => ['--xpath-tag', tag]),
    -  ], NO_PIPELINE_ATTRIBUTION_ENV)
    -  return [result]
    +  return await Promise.all(groupJunitReports(INPUT_DIR).map(async group => {
    +    await uploadSemaphore.acquire()
    +    try {
    +      return await runUpload('datadog-ci', [
    +        'junit', 'upload', '--service', 'dd-trace-js-tests',

    <!-- datadog-code-review reviewer-id=bad90057-5c12-4101-ad47-d91c9dff0f90 -->
    <!-- datadog-autotest-inline:v1:prod -->
    <!-- datadog-autotest-delivery:v1:prod:5ed1152c32b4ef47d14f1ae720e4f9f66cf9981cd518aa3321da053f714dce54:inline-0 -->

    <sub><sub>!P1</sub></sub> Sync Git metadata once across JUnit upload groups

    <!-- autotest-finding-meta prod_data_type=none finding_id=cff30493-f8dd-496c-9fe5-c6c74fa03e9b prod_effect=static -->
    When All Green finds multiple JUnit groups, every upload runs its own Git metadata sync against the same checkout. This repeats the commit lookup and, when Datadog is missing commits, can make several processes try to deepen the checkout and generate Git packs concurrently. The previous single JUnit upload ran this sync once.

      return await Promise.all(groupJunitReports(INPUT_DIR).map(async (group, index) => {
        await uploadSemaphore.acquire()
        try {
          return await runUpload('datadog-ci', [
            'junit', 'upload', '--service', 'dd-trace-js-tests',
            ...(index === 0 ? [] : ['--skip-git-metadata-upload']),
    

    <!-- datadog-autotest-feedback-legend:v1 -->
    React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it
    <details><summary>What each reaction means</summary>

  • 👍 Useful: correct, and you're fixing it or will.

  • 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.

  • 😕 Unclear: you can't tell what it means or why it matters.

  • 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.

  • </details>

    <sub>🤖 Bits Code Review</sub> <sub>· <a href="https://app.datadoghq.com/code/d9b102e9-f2ed-4d70-97d9-1d9ce79dace1?referrer=autotest-pr-comment">Open Bits AI session</a></sub>

    datadog-prod-us1-3[bot] datadog-prod-us1-3[bot] commented on Nov 23, 2026 13:59 UTC
    Reviewer

    <img src="https://img.shields.io/badge/BITS%20CODE%20REVIEW-FAIL-CC0000?labelColor=632CA6&style=for-the-badge&logo=data:image/svg%2Bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA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LDExLjc1LDExLjc1LDAsMCwxLTkuMjkuODUsMjAsMjAsMCwwLDEtMy43MS0xLjE5bC03Ljk1LDEuMSw0LjgzLDQwLjIsNTUuNy0xMFpNNjUuODgsMTEzLjkybC0uNDYtNC4zNyw5LjA5LTEzLjg4LDEwLjMzLDMsOC44OC0xNC44NCwxMC42NSw3LDguMS0xNywyLjg3LDMwLjkxWiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg%3D%3D" alt="Bits Code Review: FAIL" height="36"/>

    Each JUnit upload group repeats Git metadata synchronization against the same checkout. When runner diagnostic logs are readable, a sibling workflow’s run ID and attempt can also be sent alongside All Green’s job name.

    <sub>Open Bits AI session</sub>

    <sub>🤖 Bits Code Review · Commit bff1287</sub>

    <!-- autotest-meta model=gpt-6.1-sol engine=codex reasoning_effort=high verdict=FAIL ddrs_bucket=unknown session_id=d9b102e9-f2ed-4d70-97d9-1d9ce79dace1 -->

    <!-- datadog-code-review reviewer-id=bad90057-5c12-4101-ad47-d91c9dff0f90 -->
    <!-- datadog-autotest:v1:prod -->
    <!-- datadog-autotest-delivery:v1:prod:5ed1152c32b4ef47d14f1ae720e4f9f66cf9981cd518aa3321da053f714dce54:bundle -->

    datadog-prod-us1-3[bot] datadog-prod-us1-3[bot] commented on code on Nov 23, 2026 13:59 UTC
    Code Review
    scripts/upload-junit.mjs:1
    @@ -18,34 +22,86 @@ const XPATH_TAGS = [
       "ci.job.name=/testcase/..//property[@name='ci.job.name']/@value",
     ]
     
    -// datadog-ci derives its own ci.pipeline.name/id/number/url and ci.job.name tags directly from
    -// these GITHUB_* variables (the All Green job's own), applying the same values to every file in
    -// the batched upload — which would overwrite the per-test XPATH_TAGS values above. Blanking just
    -// these four leaves every other GITHUB_*-derived tag (repository URL, PR association, commit SHA)
    -// untouched, since those don't collide with anything XPATH_TAGS sets.
    +// datadog-ci derives ci.pipeline.*/ci.job.* tags from these GITHUB_* variables, which are All Green's
    +// own here and would overwrite the per-test XPATH_TAGS values above. JOB_CHECK_RUN_ID is All Green's
    +// job id, so it would point the uploaded tests at a job that did not run them.
     const NO_PIPELINE_ATTRIBUTION_ENV = {
       GITHUB_WORKFLOW: '',
       GITHUB_JOB: '',
       GITHUB_RUN_ID: '',
       GITHUB_RUN_NUMBER: '',
    +  JOB_CHECK_RUN_ID: '',

    <!-- datadog-code-review reviewer-id=bad90057-5c12-4101-ad47-d91c9dff0f90 -->
    <!-- datadog-autotest-inline:v1:prod -->
    <!-- datadog-autotest-delivery:v1:prod:5ed1152c32b4ef47d14f1ae720e4f9f66cf9981cd518aa3321da053f714dce54:inline-1 -->

    <sub><sub>!P2</sub></sub> Suppress All Green’s job name in correlated uploads

    <!-- autotest-finding-meta prod_data_type=none finding_id=da8159d2-1d4d-4f11-856c-6239fd0314ec prod_effect=static -->
    When the runner's diagnostic logs expose the job display name, datadog-ci 5.17.0 puts All Green’s name in _dd.ci.env_vars.DD_GITHUB_JOB_NAME. The newly correlated uploads then pair a sibling workflow’s run ID and attempt with All Green’s job name, even though the XPath tag still identifies the job that ran the tests. Set DD_GITHUB_JOB_NAME to an empty string in the upload environment and update the environment assertions.

    <!-- datadog-autotest-feedback-legend:v1 -->
    React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it
    <details><summary>What each reaction means</summary>

  • 👍 Useful: correct, and you're fixing it or will.

  • 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.

  • 😕 Unclear: you can't tell what it means or why it matters.

  • 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.

  • </details>

    <sub>🤖 Bits Code Review</sub> <sub>· <a href="https://app.datadoghq.com/code/d9b102e9-f2ed-4d70-97d9-1d9ce79dace1?referrer=autotest-pr-comment">Open Bits AI session</a></sub>

    Eleee28 Eleee28 commented on Nov 23, 2026 15:01 UTC
    Author

    /datadog autotest review
    @codex review

    chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] commented on Nov 23, 2026 15:03 UTC
    Bot

    <!-- codex-review-receipt:v1 -->

    Codex Review: Didn't find any major issues. Nice work!

    Reviewed commit: a9c344603e

    <details> <summary>ℹ️ About Codex in GitHub</summary>
    <br/>

    Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review

  • Mark a draft as ready

  • Comment "@codex review".
  • If Codex has suggestions, it will comment; otherwise it will react with 👍.

    When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

    </details>

    datadog-prod-us1-3[bot] datadog-prod-us1-3[bot] commented on Nov 23, 2026 15:09 UTC
    Reviewer

    <img src="https://img.shields.io/badge/BITS%20CODE%20REVIEW-PASS-1a7f37?labelColor=632CA6&style=for-the-badge&logo=data:image/svg%2Bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjggMTI4Ij48cGF0aCBkPSJNNjMuNTUsNzQuMzJhNTUuMiw1NS4yLDAsMCwxLTEwLTguMzJjLS4zMS0uMjMtLjI2LTEuMjUtLjI2LTEuMjVBNTUuODEsNTUuODEsMCwwLDAsNjguOTQsNzMuMWExMi43NCwxMi43NCwwLDAsMCw5LjgxLS44MywyNSwyNSwwLDAsMCw3LjUzLTYuNjRsLjM0LjU5YTE0LjkzLDE0LjkzLDAsMCwxLTEuMjksMy4wNiw4LDgsMCwwLDAsMi4yNC44MWw2LS45M2ExOC4xMiwxOC4xMiwwLDAsMCwyLTE0LjMxYy0uOTMtMy01Ljc5LTkuMS02LjE0LTkuNDMtMS4yMi0xLjE3LjIxLTUuNy0yLjIxLTEwLjY1Qzg0LjY1LDI5LjU0LDc4LDI0LjA5LDc1LjA5LDIxLjcyYy44NS42Miw2LjEsMi43NCw4LjU1LDUuNjkuMjMtLjMuMzItMS44OS41My0yLjI5LTIuMS0yLjc2LTIuMjYtNy42Ni0yLjI2LTlBMTQuODcsMTQuODcsMCwwLDAsODAuNjksMTFhOC4xNiw4LjE2LDAsMCwxLDIuNjUsNC41MywxOC41MSwxO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MuODgtLjI5LDQuMzcsMCwxLC41MywxLDIuMTguMzEsMy43Mi0xLDIuMjItMi4zMyw0LjY3LTMuODgsNC44Ny0yLjUyLjM0LTQuOTEtMS03LjYzLTMuMDZBMi4yMywyLjIzLDAsMCwxLDc5LjI1LDU2LjYyWk01NS4zNCwzOS43NWM0LTIuNzMsOS4xNi0xLjY1LDguMy0uODMtMS42NSwxLjU2LjU0LDEuMS43OCw0YTUsNSwwLDAsMS0xLjEyLDRBMjUuNDksMjUuNDksMCwwLDAsNTguNyw0OGEyNiwyNiwwLDAsMC0yLjg1LDEuMTMsNy4zMiw3LjMyLDAsMCwxLS43My0uNTVBNS41Myw1LjUzLDAsMCwxLDU1LjM0LDM5Ljc1Wm02MC4xMSwyNy44Mi0zMi41MSw1LjlhMTYsMTYsMCwwLDEtMy43NSwzLjMzLDExLjc1LDExLjc1LDAsMCwxLTkuMjkuODUsMjAsMjAsMCwwLDEtMy43MS0xLjE5bC03Ljk1LDEuMSw0LjgzLDQwLjIsNTUuNy0xMFpNNjUuODgsMTEzLjkybC0uNDYtNC4zNyw5LjA5LTEzLjg4LDEwLjMzLDMsOC44OC0xNC44NCwxMC42NSw3LDguMS0xNywyLjg3LDMwLjkxWiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg%3D%3D" alt="Bits Code Review: PASS" height="36"/>

    <details>
    <summary>More details</summary>

    Run-attempt grouping and upload environments are consistent with the stamped report metadata. End-to-end Datadog pipeline correlation remains unverified.

    </details>
    Was this helpful? React 👍 or 👎

    <sub>Open Bits AI session</sub>

    <sub>🤖 Bits Code Review · Commit a9c3446</sub>

    <!-- autotest-meta model=gpt-6.1-sol engine=codex reasoning_effort=high verdict=PASS ddrs_bucket=unknown session_id=6bb5a7a1-d67d-42ea-9aa6-60795dc93236 -->

    <!-- datadog-code-review reviewer-id=bad90057-5c12-4101-ad47-d91c9dff0f90 -->
    <!-- datadog-autotest:v1:prod -->
    <!-- datadog-autotest-delivery:v1:prod:1a7c9733758a34ddc5f7d2a2bbb801a97b0c725c94f02e9763e1b9d57c74be1a:bundle -->

    juan-fernandez juan-fernandez approved these changes on Nov 23, 2026 15:14 UTC
    Approved Reviewer

    Approved these changes.

    Assignees
    Eleee28 Eleee28
    Labels
    risk: low confidence: 85.2% 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.1% (MEDIUM) · Higher = larger blast radius
    40.1%
    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: 85.2% · Lower = rushed or shallow review
    85.2%
    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.9% · Safe to merge
    5.9%