Skip to content

feat(test optimization) Add Test Optimization HTTP cache reader#8860

Merged
cbasitodx merged 9 commits into
masterfrom
sebas_conde/test_optimization_cache_reading
Jun 29, 2026
Merged

feat(test optimization) Add Test Optimization HTTP cache reader#8860
cbasitodx merged 9 commits into
masterfrom
sebas_conde/test_optimization_cache_reading

Conversation

@cbasitodx

Copy link
Copy Markdown
Contributor

What does this PR do?

Add dd-trace-js support for reading a manifest-based HTTP cache and use it as a cache-first source for the existing Test Optimization request flows.

Motivation

During the planning phase, ddtest performs the Test Optimization backend calls that language tracers would normally perform during initialization, such as fetching settings, known tests, skippable tests, and test-management data. ddtest caches the raw HTTP responses under .testoptimization/cache/http (even though env var path specification is supported) and passes the manifest path to worker processes. When those workers launch test processes and the tracer initializes, the tracer can read the cached responses instead of repeating the same backend calls.

Additional Notes

This PR only implements the language-side reader. dd-trace-js does not write the .testoptimization/cache/http files. This is responsibility of ddtest

Cache discovery currently requires a supported manifest and settings.json to be present. If the cache is unavailable, the tracer keeps the existing live HTTP behavior.

Cached files contain raw backend JSON responses. The implementation refactors the existing request modules so cached responses and live HTTP responses use the same parsing/normalization logic.

On a cache hit, the exporter skips the corresponding live Test Optimization backend request:
- settings.json replaces /api/v2/libraries/tests/services/setting
- known_tests.json replaces /api/v2/ci/libraries/tests
- skippable_tests.json replaces /api/v2/ci/tests/skippable
- test_management.json replaces /api/v2/test/libraries/test-management/tests

Cached settings are also written to the existing Test Optimization settings handoff cache, so downstream consumers such as nyc can observe the same normalized settings as they do after a live settings request.

When the manifest-backed cache is active, git metadata upload is skipped because the cached planning responses were already produced by ddtest.

Existing event, span, coverage, log, and telemetry export paths are unchanged; this only changes how Test Optimization configuration inputs are loaded.

@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Jun 10, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 92.49%
Overall Coverage: 88.01% (+0.03%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: c08f345 | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 6.42 MB
Deduped: 7.48 MB
No deduping: 7.48 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.2.0 | 104.26 kB | 843.44 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |

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

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.59760% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.10%. Comparing base (d1aa54a) to head (c08f345).

Files with missing lines Patch % Lines
...-visibility/test-optimization-http-cache-schema.js 94.20% 4 Missing ⚠️
.../src/ci-visibility/test-optimization-http-cache.js 97.56% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8860      +/-   ##
==========================================
- Coverage   93.69%   92.10%   -1.59%     
==========================================
  Files         889      891       +2     
  Lines       50864    51161     +297     
  Branches    11834    11900      +66     
==========================================
- Hits        47657    47122     -535     
- Misses       3207     4039     +832     
Flag Coverage Δ
aiguard 34.88% <ø> (-0.08%) ⬇️
aiguard-integration 41.79% <ø> (ø)
apm-bucket-0 34.85% <ø> (-0.08%) ⬇️
apm-bucket-1 40.34% <ø> (-0.07%) ⬇️
apm-bucket-2 37.35% <ø> (-0.07%) ⬇️
apm-capabilities-tracing 48.75% <97.59%> (+0.44%) ⬆️
apm-integrations-aerospike 33.13% <ø> (-0.08%) ⬇️
apm-integrations-confluentinc-kafka-javascript 40.04% <ø> (-0.08%) ⬇️
apm-integrations-couchbase 33.41% <ø> (-0.08%) ⬇️
apm-integrations-http 42.04% <ø> (-0.07%) ⬇️
apm-integrations-kafkajs 40.27% <ø> (-0.08%) ⬇️
apm-integrations-next 29.47% <ø> (-0.11%) ⬇️
apm-integrations-prisma 35.04% <ø> (-0.07%) ⬇️
apm-integrations-tedious 33.90% <ø> (-0.08%) ⬇️
appsec 57.33% <ø> (-0.05%) ⬇️
appsec-express_fastify_graphql 53.76% <ø> (-0.09%) ⬇️
appsec-integration 36.25% <ø> (ø)
appsec-kafka_ldapjs_lodash 43.60% <ø> (-0.07%) ⬇️
appsec-mongodb-core_mongoose_mysql 48.82% <ø> (-0.06%) ⬇️
appsec-next 28.01% <ø> (-0.07%) ⬇️
appsec-node-serialize_passport_postgres 48.01% <ø> (-0.06%) ⬇️
appsec-sourcing_stripe_template 45.56% <ø> (-0.06%) ⬇️
debugger 44.42% <ø> (+0.04%) ⬆️
instrumentations-bucket-0 28.16% <ø> (-0.08%) ⬇️
instrumentations-bucket-1 37.41% <ø> (-0.07%) ⬇️
instrumentations-bucket-10 40.44% <ø> (-0.07%) ⬇️
instrumentations-bucket-11 27.96% <ø> (-0.08%) ⬇️
instrumentations-bucket-12 28.67% <ø> (-0.08%) ⬇️
instrumentations-bucket-13 27.79% <ø> (-0.08%) ⬇️
instrumentations-bucket-2 30.24% <ø> (-0.07%) ⬇️
instrumentations-bucket-3 35.91% <ø> (-0.07%) ⬇️
instrumentations-bucket-4 28.07% <ø> (-0.08%) ⬇️
instrumentations-bucket-5 36.28% <ø> (-0.07%) ⬇️
instrumentations-bucket-6 38.26% <ø> (-0.08%) ⬇️
instrumentations-bucket-7 36.01% <ø> (-0.07%) ⬇️
instrumentations-bucket-8 36.96% <ø> (-0.07%) ⬇️
instrumentations-bucket-9 39.53% <ø> (-0.07%) ⬇️
instrumentations-instrumentation-couchbase 46.54% <ø> (ø)
instrumentations-integration-esbuild ?
llmobs-ai_anthropic_bedrock ?
llmobs-google-genai_langchain_vertex-ai 36.98% <ø> (-0.06%) ⬇️
llmobs-openai 39.59% <ø> (-0.07%) ⬇️
llmobs-sdk 43.60% <ø> (-0.08%) ⬇️
master-coverage 92.10% <97.59%> (?)
openfeature 37.76% <ø> (-0.01%) ⬇️
openfeature-unit ?
platform-core_esbuild_instrumentations-misc 23.36% <ø> (ø)
platform-integration 47.43% <ø> (ø)
platform-shimmer_unit-guardrails_webpack 18.89% <ø> (ø)
plugins-bucket-0 36.34% <ø> (-0.07%) ⬇️
plugins-bucket-1 39.61% <ø> (ø)
plugins-bucket-11 38.47% <ø> (-0.08%) ⬇️
plugins-bucket-17 39.16% <ø> (+0.08%) ⬆️
plugins-bucket-18 42.01% <ø> (-0.07%) ⬇️
plugins-bucket-19 39.57% <ø> (-0.07%) ⬇️
plugins-bucket-20 43.21% <ø> (-0.13%) ⬇️
plugins-bucket-4 37.72% <ø> (-0.07%) ⬇️
plugins-bullmq_cassandra_cookie 39.77% <ø> (-0.07%) ⬇️
plugins-cookie-parser_crypto_dd-trace-api 33.23% <ø> (-0.08%) ⬇️
plugins-fetch_fs_generic-pool 36.05% <ø> (-0.08%) ⬇️
plugins-google-cloud-pubsub_grpc_handlebars 43.11% <ø> (-0.07%) ⬇️
plugins-hapi_hono_ioredis 37.79% <ø> (-0.07%) ⬇️
plugins-jest_knex_langgraph 32.61% <ø> (-0.08%) ⬇️
plugins-ldapjs_light-my-request_limitd-client 27.92% <ø> (-0.08%) ⬇️
plugins-lodash_mariadb_memcached 35.18% <ø> (-0.08%) ⬇️
plugins-mongodb_mongodb-core_mongoose 36.32% <ø> (-0.07%) ⬇️
plugins-multer_mysql_mysql2 35.15% <ø> (-0.08%) ⬇️
plugins-nats_node-serialize_opensearch 37.16% <ø> (-0.08%) ⬇️
plugins-passport-http_pino_postgres 35.54% <ø> (-0.08%) ⬇️
plugins-process_pug_redis 34.27% <ø> (+0.14%) ⬆️
plugins-undici_url_valkey 35.88% <ø> (-0.07%) ⬇️
plugins-vm_winston_ws 37.56% <ø> (-0.08%) ⬇️
profiling 43.62% <ø> (-0.07%) ⬇️
serverless-aws-sdk-aws-sdk 33.30% <ø> (-0.07%) ⬇️
serverless-aws-sdk-bedrockruntime 32.17% <ø> (-0.07%) ⬇️
serverless-aws-sdk-client 37.21% <ø> (ø)
serverless-aws-sdk-dynamodb 34.10% <ø> (-0.07%) ⬇️
serverless-aws-sdk-eventbridge 27.25% <ø> (-0.07%) ⬇️
serverless-aws-sdk-kinesis 37.41% <ø> (-0.07%) ⬇️
serverless-aws-sdk-lambda 34.60% <ø> (-0.07%) ⬇️
serverless-aws-sdk-s3 32.60% <ø> (-0.07%) ⬇️
serverless-aws-sdk-serverless-peer-service 39.47% <ø> (-0.08%) ⬇️
serverless-aws-sdk-sns 38.26% <ø> (-0.07%) ⬇️
serverless-aws-sdk-sqs 38.01% <ø> (-0.07%) ⬇️
serverless-aws-sdk-stepfunctions 33.19% <ø> (-0.07%) ⬇️
serverless-aws-sdk-util 47.95% <ø> (ø)
serverless-bucket-0 39.47% <ø> (ø)
serverless-lambda 34.33% <ø> (-0.09%) ⬇️
test-optimization-cucumber 52.32% <42.94%> (-0.15%) ⬇️
test-optimization-cypress 49.43% <42.94%> (-0.15%) ⬇️
test-optimization-jest 55.36% <42.94%> (-0.21%) ⬇️
test-optimization-mocha 53.40% <42.94%> (-0.19%) ⬇️
test-optimization-playwright-playwright-atr 43.33% <31.23%> (-0.17%) ⬇️
test-optimization-playwright-playwright-efd 43.62% <31.23%> (-0.18%) ⬇️
test-optimization-playwright-playwright-final-status 43.74% <35.13%> (-0.11%) ⬇️
test-optimization-playwright-playwright-impacted-tests 43.16% <31.23%> (-0.26%) ⬇️
test-optimization-playwright-playwright-reporting 43.27% <32.13%> (-0.15%) ⬇️
test-optimization-playwright-playwright-test-management 44.73% <35.13%> (-0.13%) ⬇️
test-optimization-playwright-playwright-test-span 44.52% <31.23%> (-0.19%) ⬇️
test-optimization-selenium 45.29% <33.63%> (-0.17%) ⬇️
test-optimization-testopt 48.04% <34.53%> (-0.16%) ⬇️
test-optimization-vitest 50.64% <35.13%> (-0.21%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cbasitodx

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

ℹ️ About Codex in GitHub

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

@pr-commenter

pr-commenter Bot commented Jun 16, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-06-29 13:22:36

Comparing candidate commit c08f345 in PR branch sebas_conde/test_optimization_cache_reading with baseline commit d1aa54a in branch master.

📊 Benchmarking dashboard

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

Explanation

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.

More details about the CI and significant changes

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 ----------------------------------'

Unstable benchmarks

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

scenario:appsec-appsec-enabled-24

  • unstable execution_time [-181.327ms; +178.137ms] or [-6.875%; +6.754%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-205495.763µs; +203682.496µs] or [-8.197%; +8.125%]

scenario:appsec-appsec-enabled-with-attacks-26

  • unstable execution_time [-159.796ms; +154.514ms] or [-5.550%; +5.367%]

scenario:appsec-control-20

  • unstable execution_time [-156.976ms; +153.471ms] or [-8.992%; +8.791%]

scenario:appsec-control-24

  • unstable execution_time [-101196.150µs; +99957.984µs] or [-8.328%; +8.226%]

scenario:appsec-control-26

  • unstable execution_time [-109.242ms; +111.583ms] or [-9.033%; +9.226%]

scenario:debugger-line-probe-with-snapshot-default-26

  • unstable cpu_user_time [-3467.819ms; +3819.699ms] or [-34.253%; +37.728%]
  • unstable execution_time [-3565.160ms; +3873.751ms] or [-32.917%; +35.766%]
  • unstable instructions [-30.3G instructions; +33.2G instructions] or [-35.906%; +39.347%]
  • unstable max_rss_usage [-10447.002KB; +11433.402KB] or [-6.459%; +7.068%]
  • unstable throughput [-748.042op/s; +730.371op/s] or [-23.956%; +23.390%]

scenario:debugger-line-probe-with-snapshot-minimal-24

  • unstable cpu_user_time [-1938.724ms; +3080.706ms] or [-24.463%; +38.873%]
  • unstable execution_time [-1933.132ms; +3085.406ms] or [-22.495%; +35.904%]
  • unstable instructions [-16.2G instructions; +25.8G instructions] or [-25.210%; +40.105%]
  • unstable max_rss_usage [-6.698MB; +10.886MB] or [-4.232%; +6.879%]
  • unstable throughput [-905.620op/s; +567.566op/s] or [-23.560%; +14.766%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-442.863ms; +221.429ms] or [-9.134%; +4.567%]
  • unstable execution_time [-440.133ms; +217.146ms] or [-8.936%; +4.409%]
  • unstable throughput [-74264.342op/s; +149378.407op/s] or [-4.358%; +8.766%]

scenario:plugin-graphql-long-with-depth-on-max-20

  • unstable max_rss_usage [-72.832MB; -3.020MB] or [-34.417%; -1.427%]

@cbasitodx
cbasitodx marked this pull request as ready for review June 22, 2026 17:20
@cbasitodx
cbasitodx requested a review from a team as a code owner June 22, 2026 17:20

@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: 37ac880dfd

ℹ️ About Codex in GitHub

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

Comment thread packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js Outdated
@cbasitodx
cbasitodx requested review from a team as code owners June 24, 2026 10:45
@cbasitodx
cbasitodx requested review from crysmags, leoromanovsky, litianningdatadog and typotter and removed request for a team June 24, 2026 10:45
@cbasitodx

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 5ac44dd7a6

ℹ️ About Codex in GitHub

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

@cbasitodx
cbasitodx marked this pull request as ready for review June 24, 2026 12:19

@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: 77f0ecc926

ℹ️ About Codex in GitHub

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

gnufede
gnufede previously approved these changes Jun 24, 2026
@cbasitodx

Copy link
Copy Markdown
Contributor Author

@codex review

@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: fbdd212cfc

ℹ️ About Codex in GitHub

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

Comment thread packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js Outdated
@juan-fernandez

Copy link
Copy Markdown
Collaborator

P2: Do not mark git upload complete when only settings are cached

When .testoptimization/cache/http/settings.json is read successfully, getLibraryConfiguration() calls _resolveGit() and treats git metadata as already uploaded:

const cachedLibraryConfig = this._testOptimizationHttpCache.readSettings()
if (cachedLibraryConfig !== CACHE_MISS) {
log.debug('Test Optimization HTTP cache settings found, git upload already done, skipping git upload')
this._resolveGit()
writeSettingsToCache(cachedLibraryConfig)
. That is only safe if all git-dependent planning responses also come from cache. If skippable_tests.json is absent or malformed, getSkippableSuites() falls back to the live skippable endpoint after waiting on the already-resolved _gitUploadPromise, so no actual git upload happens first:
this._gitUploadPromise.then(gitUploadError => {
if (gitUploadError) {
return callback(gitUploadError, [])
}
getSkippableSuitesRequest(requestConfiguration, callback)
})
. For repositories where settings require git metadata, this can produce missing or incorrect skips.

Consider either not resolving _gitUploadPromise from the settings cache hit, or triggering the real git upload before any live skippable fallback. It would also be good to add a test for cached settings plus missing or malformed skippable cache that asserts git metadata is uploaded before the live skippable request.

…timization_cache_reading

# Conflicts:
#	packages/dd-trace/src/ci-visibility/requests/get-library-configuration.js
Comment thread packages/dd-trace/test/ci-visibility/exporters/ci-visibility-http-cache.spec.js Outdated
@juan-fernandez

Copy link
Copy Markdown
Collaborator

@codex review

@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: c08f34586f

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

@juan-fernandez

juan-fernandez commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

E2E Test Report: SUCCESS

Tested by: Shepherd Agent (autonomous QA for Datadog Test Optimization)

Test Environment

  • Method: Local Shepherd/crook testing with the express JavaScript playground, Mocha, mockdog, and --debug
  • Dependency under test: dd-trace-js=sebas_conde/test_optimization_cache_reading
  • Revision tested: c08f34586f4f0c87b3e60c9550ec9ac0a5659205
  • Playground command: ./bin/crook run express --command single --file test/app.listen.js --dep dd-trace-js=sebas_conde/test_optimization_cache_reading --debug --no-clean --scenario default

Results

Check Status Evidence
Manifest-backed HTTP cache discovered Passed Log showed cache found under playgrounds/express/.testoptimization/cache/http
Cached settings.json used instead of live settings request Passed Test Optimization HTTP cache settings found, skipping settings request; mockdog settings request count 0
Cached known_tests.json used for EFD Passed 5 unique Mocha tests treated as new; 55 test spans total, 50 EFD retry spans
Cached skippable_tests.json used for TIA Passed Cached correlation id propagated; skippable endpoint request count 0; TIA session tags emitted
Cached test_management.json used Passed Test Management session tag emitted; test-management endpoint request count 0
Git upload skipped when cached responses are valid Passed Git search/packfile counts were 0
require_git: true with valid cached skippable data skips git upload Passed Separate cache-hit run with require_git: true had settings/skippable/git request counts all 0
Test-cycle and telemetry export paths unaffected Passed mockdog received valid test-cycle and telemetry payloads

Mockdog Runs

  • 20260629-161305: cache-backed TIA/EFD/Test Management run

    • 55 passing
    • CI Test Cycle: 69 events, 55 tests, 1 suite, 1 module, 1 session
    • Telemetry: valid, 55 test starts/ends
    • Settings requests: 0
    • Skippable requests: 0
    • Git search/packfile requests: 0
    • EFD retries: 50
  • 20260629-161658: require_git: true cache-hit run

    • 5 passing
    • CI Test Cycle: 9 events, 5 tests, 1 suite, 1 module, 1 session
    • Settings requests: 0
    • Skippable requests: 0
    • Git search/packfile requests: 0

Issues Found

No PR behavior issues found in the local E2E coverage.

Test Methodology

  1. Reviewed the PR metadata and changed files.
  2. Checked Shepherd feature docs for Test Parallelization, TIA, EFD, and Flaky Test Management.
  3. Refreshed local tracer clones and compared the cache contract against ddtest and Ruby cache-reader behavior.
  4. Ran Express/Mocha with the PR branch injected by crook.
  5. Seeded/used manifest v1 cache files for settings, known tests, skippable tests, and test management.
  6. Verified cache-hit logs, zero backend request counts for cached endpoints, zero git upload calls, emitted session/test tags, mockdog parsed spans, and telemetry counts.

This E2E test was performed by Shepherd - autonomous QA agent for Datadog Test Optimization.

@cbasitodx
cbasitodx merged commit 988181f into master Jun 29, 2026
1076 of 1077 checks passed
@cbasitodx
cbasitodx deleted the sebas_conde/test_optimization_cache_reading branch June 29, 2026 14:24
This was referenced Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants