chore(antithesis): non-utf8 bytes payloads represent 1% of generation - #2217
Conversation
The essential property we want to determine is whether ADP-on/ADP-off emits payloads to intake API that the intake API rejects. This is especially of interest for inputs that we know are ultimately rejected by intake API -- non-utf8 bytes in the wrong spot -- but are _not_ rejected by the SUT. The old mechanism had a feral/clean 'vibe' which served for a while but was confusing to debug. Is feral malformed? Is feral well-formed but wild? Anyway I got tired of it. There's now a predicate which defines whether a payload is well-formed or not -- that is, accepted by ADP-off Datadog Agent -- independent of whether intake API ultimately accepts the payloads that ingress inspires. Later I will build a generator that only emits malformed ingress but that is only hinted at in this work.
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Binary Size Analysis (Agent Data Plane)Baseline: e34c659 · Comparison: 43cf97d · diff ✅ Binary size difference within thresholdChanges by Module
Detailed Symbol Changes |
There was a problem hiding this comment.
More details
The new injection is bounded to one byte per datagram, preserves the existing size and forwarding invariants, and excludes event and service-check lines from metric-name mutation. No diff-only behavioral regression was identified; runtime confirmation was blocked by unavailable Rust dependencies in the sandbox.
🤖 Datadog Autotest · Commit 43cf97d · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
Regression Detector (Agent Data Plane)Run ID: Optimization Goals: ✅ No significant changes detectedFine details of change detection per experiment (3)Experiments configured
Bounds Checks: ✅ Passed (3)
ExplanationA change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression ( |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 43cf97d287
ℹ️ 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".
| /// Aberrant identifier segments: whitespace, NUL, and exotic but valid UTF-8. Invalid-UTF-8 bytes are | ||
| /// deliberately absent. The per-datagram injection in `write_payload` adds one at a fixed rate rather | ||
| /// than sprinkling them per segment, so their blast radius stays a budgeted fraction of datagrams | ||
| /// instead of compounding across every minted context into a near-certain whole-payload v3 reject. |
There was a problem hiding this comment.
Preserve non-UTF-8 coverage across sampled fields
Removing invalid bytes from ABERRANT_WORD means every shared field builder now produces valid UTF-8, while the replacement injection always inserts at the start of a metric line. Consequently, runs can no longer exercise non-UTF-8 tags, set values, event fields, or service-check fields, even though these fields take different intake paths (for example, v3 tag dictionaries are sanitized while name dictionaries reject the payload). Keep the one-per-datagram budget, but sample the injection target among the eligible fields so this differential harness retains the position-dependent coverage described by the change.
AGENTS.md reference: test/antithesis/AGENTS.md:L86-L90
Useful? React with 👍 / 👎.

Summary
ADP and Datadog Agent deal with non-utf8 bytes differently. The way that
intake accepts non-utf8 bytes varies depending on where in the payload they
appear and for which protocol version. Previously I created payloads that were
too non-utf8 heavy, meaning most payloads could be rejected by intake. This
commit changes the generator to emit non-utf8 bytes into about 1% of payloads.
Change Type
How did you test this PR?
References