← Back to Pull requests

chore: List every UUID backend in the types module #459

Closed
unknown closed this pull request without merging on Nov 20, 2026 21:33 UTC
View on GitHub
unknown unknown commented on Nov 20, 2026 18:23 UTC
Author

refs: RUM-20300

## Context

We want the code in types to be portable to other platforms and build toolchains, even those where dd-sdk-cpp is not supported in full. This is one in a series of PRs addressing minor portability issues.

## Problem

We currently have three separate UUID implementations:

  • uuid_linux.cpp

  • uuid_macos.cpp

  • uuid_windows.cpp
  • Our CMake configuration branches on CMake platform variables (WIN32|APPLE|UNIX) to select one of these files to compile.

    We want to be able to compile types in other build systems, without having to specially configure a platform-dependent set of source files: we should be able to throw a pile of source files at a build system, such that it will compile _all_ of them, and we'll get a working build.

    ## Solution

    As of this PR, we no longer rely on the build system to conditionally include the appropriate source file in the set of input files for the compiler.

    Instead, we now just compile all three files. Each implementation file is guarded with preprocessor checks to ensure that only one of them will produce any code:

  • #if defined(__linux__) _(covers Desktop Linux, Android)_

  • #if defined(__APPLE__) _(covers macOS, iOS)_

  • #if defined(_WIN32) _(covers Windows)_
  • If compilation is attempted on any other platform, UUID functions will be missing symbols, resulting in linker errors.

    On macOS, static builds without sanitizers now print a harmless ranlib warning that the unused implementations' object files have no symbols. This warning only appears when building the SDK, not when linking it into an application.

    ### BYO UUID

    When building the SDK from source in CMake, we also support a bring-your-own-random-UUID-generator option, via DD_UUID_USE_DEFAULT and DD_UUID_SRC. These options continue to work as before.

    Diff: 228 lines (+171 / -57) across 2 files Reviewer: fuzzybinary Review duration: 190m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 228 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    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.325
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #459"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 37.0% (MEDIUM) · Higher = larger blast radius
    37.0%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 14.6% · Safe to merge
    14.6%