Skip to content

Add typing for Base64, TagBuilder, and Workers::Polling#stop#5455

Draft
marcotc wants to merge 1 commit intomasterfrom
marcotc/type-core-misc-utils
Draft

Add typing for Base64, TagBuilder, and Workers::Polling#stop#5455
marcotc wants to merge 1 commit intomasterfrom
marcotc/type-core-misc-utils

Conversation

@marcotc
Copy link
Copy Markdown
Member

@marcotc marcotc commented Mar 13, 2026

What does this PR do?

Small type improvements:

  • Utils::Base64: :: prefixes added to all String types; strict_decode64 arg typed as ::String (return remains untypedunpack1 return type is format-dependent and Steep can't narrow it)
  • TagBuilder: :: prefixes on all types; tags() accepts any settings (DSL settings object is intentionally open)
  • Workers::Polling#stop: untypedbool (always returns true/false from join/terminate)

How to test the change?

bundle exec steep check \
  lib/datadog/core/utils/base64.rb \
  lib/datadog/core/tag_builder.rb \
  lib/datadog/core/workers/polling.rb

Changelog

None.

- Base64: add :: prefixes to all String types; strict_decode64 arg typed
  as ::String (decode is format-dependent; return remains untyped)
- TagBuilder: add :: prefixes; tags() accepts any settings (DSL object)
- Polling#stop: untyped -> bool (always returns true/false from join/terminate)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@marcotc marcotc added the AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos label Mar 13, 2026
@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 13, 2026

Benchmarks

Benchmark execution time: 2026-03-13 21:02:42

Comparing candidate commit 3e1d1b0 in PR branch marcotc/type-core-misc-utils with baseline commit 6b340a0 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 0 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 ----------------------------------'

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

Labels

AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant