Skip to content

Prefer local Git metadata over CI provider values - #13279

Open
juan-fernandez wants to merge 5 commits into
masterfrom
juan-fernandez/git-metadata-precedence
Open

juan-fernandez wants to merge 5 commits into
masterfrom
juan-fernandez/git-metadata-precedence

Conversation

@juan-fernandez

@juan-fernandez juan-fernandez commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

Use explicit DD_GIT_* overrides, then metadata from the readable local Git checkout, then CI-provider Git metadata when the checkout cannot be read. Preserve CI job and pull-request relationship data, and keep test events, TIA requests, and packfile upload metadata on the selected session SHA.

Motivation

GitHub Actions pull-request jobs can check out the PR head while GITHUB_SHA still identifies a synthetic merge commit. Using different revisions across events, TIA requests, and Git uploads breaks their correlation.

Additional Notes

This intentionally changes default reported Git metadata when CI-provider values disagree with a readable checkout. Provider-only standard Git fields stay absent when unavailable locally. Explicit customer overrides retain priority.

Validation: Java 21 focused suites passed (18 tests across GitInfoProviderTest, GitClientGitInfoBuilderTest, CIProviderGitInfoBuilderTest, and GitDataUploaderImplTest), and both changed modules passed Spotless formatting. Coverage includes missing local remote/branch/tag, CI fallback, explicit overrides, and upload SHA selection. Full tracer and real-backend/end-to-end suites have not been run.

Contributor Checklist

Jira ticket: Not linked

Shared correctness fixture update: https://github.com/DataDog/test-environment/pull/612

test-environment-branch: juan-fernandez/git-metadata-precedence

Git tag enumeration now uses --no-column so configured column formatting cannot combine multiple tags into one invalid value. All three real-Git parser tests and Spotless pass, including tag enumeration with forced column output. The shared snapshot fixture update is linked in DataDog/test-environment#612.

An explicit SHA selecting another revision clears inferred tags and commit details for the previous revision. Explicit DD metadata retains priority, and CI job and PR relationship fields remain intact.

15 GitInfoProvider tests and internal-api Spotless checks pass with JDK 21.

@juan-fernandez juan-fernandez added type: bug fix Bug fix comp: ci visibility Continuous Integration Visibility tag: ai generated Largely based on code generated by an AI or LLM labels Nov 6, 2026
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - sbt-scalatest

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 59.84 58.86 $\color{red}{\blacktriangle}$ +0.98 57.69 $\color{red}{\blacktriangle}$ +2.15 92/433
agentEvpProxy 59.27 n/a n/a n/a n/a -

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - nebula-release-plugin

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 37.04 38.67 $\color{green}{\blacktriangledown}$ -1.63 37.91 $\color{green}{\blacktriangledown}$ -0.87 46/216
agentless 37.61 37.91 $\color{green}{\blacktriangledown}$ -0.30 37.91 $\color{green}{\blacktriangledown}$ -0.30 46/216
agentlessCodeCoverage 47.63 46.30 $\color{red}{\blacktriangle}$ +1.33 46.30 $\color{red}{\blacktriangle}$ +1.33 46/216
agentlessLineCoverage 58.18 57.69 $\color{red}{\blacktriangle}$ +0.49 57.69 $\color{red}{\blacktriangle}$ +0.49 46/216

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - heliboard

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 10.13 10.33 $\color{green}{\blacktriangledown}$ -0.20 9.92 $\color{red}{\blacktriangle}$ +0.21 40/210

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@datadog-prod-us1-5

This comment has been minimized.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - pass4s

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 6.26 10.75 $\color{green}{\blacktriangledown}$ -4.49 10.75 $\color{green}{\blacktriangledown}$ -4.49 46/217
agentless 8.56 10.33 $\color{green}{\blacktriangledown}$ -1.77 10.33 $\color{green}{\blacktriangledown}$ -1.77 47/218
agentlessCodeCoverage 12.84 15.41 $\color{green}{\blacktriangledown}$ -2.57 17.38 $\color{green}{\blacktriangledown}$ -4.54 40/198

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@dd-octo-sts

dd-octo-sts Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.08 s 13.93 s [+0.4%; +1.8%] (maybe worse)
startup:insecure-bank:tracing:Agent 12.93 s 12.99 s [-1.1%; +0.2%] (no difference)
startup:petclinic:appsec:Agent 16.99 s 17.52 s [-7.3%; +1.3%] (no difference)
startup:petclinic:iast:Agent 17.57 s 17.63 s [-1.3%; +0.7%] (no difference)
startup:petclinic:profiling:Agent 17.44 s 17.43 s [-0.9%; +1.1%] (no difference)
startup:petclinic:sca:Agent 17.66 s 17.54 s [-0.2%; +1.5%] (no difference)
startup:petclinic:tracing:Agent 16.60 s 16.74 s [-1.9%; +0.2%] (no difference)

Commit: f6b959ad · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - netflix-zuul

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 92.71 93.23 $\color{green}{\blacktriangledown}$ -0.52 91.39 $\color{red}{\blacktriangle}$ +1.32 48/218
agentless 85.84 84.36 $\color{red}{\blacktriangle}$ +1.48 82.69 $\color{red}{\blacktriangle}$ +3.15 46/216
agentlessCodeCoverage 100.16 101.00 $\color{green}{\blacktriangledown}$ -0.84 99.00 $\color{red}{\blacktriangle}$ +1.16 46/216
agentlessLineCoverage 117.22 116.18 $\color{red}{\blacktriangle}$ +1.04 113.88 $\color{red}{\blacktriangle}$ +3.34 47/218

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - reactive-streams-jvm

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 22.48 22.99 $\color{green}{\blacktriangledown}$ -0.51 22.54 $\color{green}{\blacktriangledown}$ -0.06 49/253
agentless 20.48 19.59 $\color{red}{\blacktriangle}$ +0.89 19.59 $\color{red}{\blacktriangle}$ +0.89 48/245
agentlessCodeCoverage 20.00 20.39 $\color{green}{\blacktriangledown}$ -0.39 20.39 $\color{green}{\blacktriangledown}$ -0.39 48/245
agentlessLineCoverage 27.33 26.98 $\color{red}{\blacktriangle}$ +0.35 27.52 $\color{green}{\blacktriangledown}$ -0.19 27/156

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@juan-fernandez

Copy link
Copy Markdown
Contributor Author

/datadog autotest review

@juan-fernandez

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T09:09:26.062259Z f6b959a Draft marked ready
🔒 Security Review ✅ Completed 2026-11-08T09:08:24.004310Z f6b959a Draft marked ready
ℹ️ About Codex in GitHub

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.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - sonar-kotlin

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 14.27 13.67 $\color{red}{\blacktriangle}$ +0.60 13.67 $\color{red}{\blacktriangle}$ +0.60 48/230
agentless 12.67 12.37 $\color{red}{\blacktriangle}$ +0.30 12.37 $\color{red}{\blacktriangle}$ +0.30 48/230
agentlessCodeCoverage 15.93 16.04 $\color{green}{\blacktriangledown}$ -0.11 16.04 $\color{green}{\blacktriangledown}$ -0.11 48/230
agentlessLineCoverage 17.50 17.73 $\color{green}{\blacktriangledown}$ -0.23 17.73 $\color{green}{\blacktriangledown}$ -0.23 48/230

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d40da19a7e

ℹ️ About Codex in GitHub

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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

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

Reviewed commit: d40da19a7e

View security finding report

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

ℹ️ About Codex security reviews in GitHub

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.

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

CI fallback can combine local repository and branch values with a CI-provided SHA. The new precedence also exposes commit-message truncation for messages containing a quote-comma-quote sequence.

Open Bits AI session

🤖 Bits Code Review · Commit d40da19

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - jolokia

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 99.12 99.00 $\color{red}{\blacktriangle}$ +0.12 97.04 $\color{red}{\blacktriangle}$ +2.08 48/239
agentless 94.15 93.23 $\color{red}{\blacktriangle}$ +0.92 91.39 $\color{red}{\blacktriangle}$ +2.76 46/233
agentlessCodeCoverage 103.13 103.04 $\color{red}{\blacktriangle}$ +0.09 101.00 $\color{red}{\blacktriangle}$ +2.13 46/235
agentlessLineCoverage 103.78 105.12 $\color{green}{\blacktriangledown}$ -1.34 103.04 $\color{red}{\blacktriangle}$ +0.74 60/278

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - okhttp

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 20.37 19.20 $\color{red}{\blacktriangle}$ +1.17 19.20 $\color{red}{\blacktriangle}$ +1.17 50/237
agentless 19.66 18.45 $\color{red}{\blacktriangle}$ +1.21 18.45 $\color{red}{\blacktriangle}$ +1.21 48/234
agentlessCodeCoverage 22.91 21.65 $\color{red}{\blacktriangle}$ +1.26 21.65 $\color{red}{\blacktriangle}$ +1.26 48/237
agentlessLineCoverage 39.29 37.91 $\color{red}{\blacktriangle}$ +1.38 37.91 $\color{red}{\blacktriangle}$ +1.38 48/233

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - spring_boot

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 16.26 16.04 $\color{red}{\blacktriangle}$ +0.22 16.36 $\color{green}{\blacktriangledown}$ -0.10 48/230
agentless 9.83 9.73 $\color{red}{\blacktriangle}$ +0.10 9.92 $\color{green}{\blacktriangledown}$ -0.09 48/230
agentlessCodeCoverage 14.22 13.67 $\color{red}{\blacktriangle}$ +0.55 13.67 $\color{red}{\blacktriangle}$ +0.55 48/230
agentlessLineCoverage 22.61 22.54 $\color{red}{\blacktriangle}$ +0.07 22.54 $\color{red}{\blacktriangle}$ +0.07 48/230

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - sonar-java

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 32.50 9.92 $\color{red}{\blacktriangle}$ +22.58 14.23 $\color{red}{\blacktriangle}$ +18.27 48/230
agentless -5.10 9.35 $\color{green}{\blacktriangledown}$ -14.45 12.62 $\color{green}{\blacktriangledown}$ -17.72 48/230
agentlessCodeCoverage 77.77 81.05 $\color{green}{\blacktriangledown}$ -3.28 86.07 $\color{green}{\blacktriangledown}$ -8.30 48/230
agentlessLineCoverage 114.96 120.92 $\color{green}{\blacktriangledown}$ -5.96 123.36 $\color{green}{\blacktriangledown}$ -8.40 48/230

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@juan-fernandez

Copy link
Copy Markdown
Contributor Author

/datadog autotest review

@juan-fernandez

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

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

Reviewed commit: b55af59663

View security finding report

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

ℹ️ About Codex security reviews in GitHub

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b55af59663

ℹ️ About Codex in GitHub

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".

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

Detached checkouts with multiple tags can report the wrong release tag because Git returns only one preferred match. Option-like SHA overrides are also interpreted as Git flags instead of being rejected.

Open Bits AI session

🤖 Bits Code Review · Commit b55af59

@juan-fernandez

Copy link
Copy Markdown
Contributor Author

/datadog autotest review

@juan-fernandez

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: ee3e64d4c6

ℹ️ About Codex in GitHub

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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

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

Reviewed commit: ee3e64d4c6

View security finding report

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

ℹ️ About Codex security reviews in GitHub

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.

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

Selected-revision history and packfile metadata stay aligned with the session SHA, including old selected commits and deferred unshallow recovery. Explicit Git overrides retain precedence over readable checkout metadata.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit ee3e64d

@juan-fernandez

Copy link
Copy Markdown
Contributor Author

/datadog autotest review

@juan-fernandez

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 2b4e0516e9

ℹ️ About Codex in GitHub

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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

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

Reviewed commit: 2b4e0516e9

View security finding report

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

ℹ️ About Codex security reviews in GitHub

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.

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The completed static review supports consistent use of the selected session SHA across metadata selection, Git history discovery, and packfile uploads, including explicit overrides and older selected commits.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 2b4e051

@juan-fernandez

Copy link
Copy Markdown
Contributor Author

/datadog autotest review

@juan-fernandez

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: f6b959ada3

ℹ️ About Codex in GitHub

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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

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

Reviewed commit: f6b959ada3

View security finding report

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

ℹ️ About Codex security reviews in GitHub

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.

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The revision selected for Git metadata is also used for upload history and packfile metadata, addressing the checkout-versus-CI SHA mismatch. Runtime behavior was not revalidated.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit f6b959a

@juan-fernandez
juan-fernandez marked this pull request as ready for review November 8, 2026 09:04
@juan-fernandez
juan-fernandez requested review from a team as code owners November 8, 2026 09:04
@juan-fernandez
juan-fernandez requested review from jordan-wong and removed request for a team November 8, 2026 09:04

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

Source review and Git fixture checks support consistent SHA selection across metadata and uploads, including explicit overrides and unreadable-checkout fallback. No actionable correctness regression was identified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit f6b959a

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6b959ada3

ℹ️ About Codex in GitHub

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".

Comment on lines +102 to +105
if (latestCommits.isEmpty() && config.isCiVisibilityGitUnshallowDefer()) {
unshallowed = gitRepoUnshallow.unshallow();
if (unshallowed) {
latestCommits = gitClient.getLatestCommits(selectedCommit);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fetch the selected revision before giving up

When an explicit DD_GIT_COMMIT_SHA names a revision absent from a shallow clone—particularly an older commit outside latestCommitsSince or a commit on another branch—this retry still cannot recover it: GitRepoUnshallow.unshallow() fetches only HEAD/upstream, and ShellGitClient.unshallow() applies --shallow-since, so getLatestCommits(selectedCommit) remains empty and the upload is silently skipped. The new empty-history retry fixes the earlier control-flow failure, but the selected revision itself must be fetched before concluding that there is no data to upload.

Useful? React with 👍 / 👎.

Comment on lines +552 to +555
LinkedHashSet<String> outsideWindow = new LinkedHashSet<>(commitsToInclude);
for (String object : objects) {
outsideWindow.remove(object);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not re-add commits excluded by known descendants

When the backend knows a newer commit but not every ancestor returned in latestCommits, the first rev-list correctly excludes that commit's reachable history via ^commitToSkip. However, every included root omitted from that result is classified as outsideWindow and then re-added with --no-walk, even when it was omitted because it is reachable from the skipped descendant rather than because of the age/count window. This defeats commitsToSkip and can package up to the full history limit of commit and tree objects that the exclusion deliberately avoided; only roots actually outside the configured window should be added separately.

Useful? React with 👍 / 👎.

Comment on lines +200 to +201
String ciSha = ciInfo.getCommit().getSha();
if (Strings.isNotBlank(ciSha) && !ciSha.equals(localInfo.getCommit().getSha())) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Compare telemetry SHAs case-insensitively

When a CI provider supplies the same hexadecimal SHA as the local checkout but uses uppercase characters, this comparison records a commit discrepancy and causes GIT_COMMIT_SHA_MATCH to be reported as false. The normal integrity path below was changed to equalsIgnoreCase, so the selected metadata correctly treats these SHAs as identical while the newly added local-versus-CI telemetry reports the opposite; use the same case-insensitive comparison here.

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: ci visibility Continuous Integration Visibility tag: ai generated Largely based on code generated by an AI or LLM type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant