Skip to content

chore(antithesis): non-utf8 bytes payloads represent 1% of generation - #2217

Open
blt wants to merge 1 commit into
blt/chore_antithesis_bound_contexts_in_runsfrom
blt/chore_antithesis_is_malformed_based_load_generation
Open

chore(antithesis): non-utf8 bytes payloads represent 1% of generation#2217
blt wants to merge 1 commit into
blt/chore_antithesis_bound_contexts_in_runsfrom
blt/chore_antithesis_is_malformed_based_load_generation

Conversation

@blt

@blt blt commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

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

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

How did you test this PR?

References

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.

blt commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

@dd-octo-sts dd-octo-sts Bot added the area/test All things testing: unit/integration, correctness, SMP regression, etc. label Jul 27, 2026
@datadog-prod-us1-6

Copy link
Copy Markdown

Pipelines

Unblock PR with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

DataDog/saluki | check-fmt   View in Datadog   GitLab

Useful? React with 👍 / 👎

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

@pr-commenter

pr-commenter Bot commented Jul 27, 2026

Copy link
Copy Markdown

Binary Size Analysis (Agent Data Plane)

Baseline: e34c659 · Comparison: 43cf97d · diff
Analysis Configuration: stripped binaries · Pass/Fail Threshold: +5%
Sizes: 41.09 MiB (baseline) vs 41.09 MiB (comparison)
Size Change: +0 B (+0.00%)

✅ Binary size difference within threshold

Changes by Module
Module File Size Symbols
anon.44a0faa3240fa409baa379409d152aec.1.llvm.2649486637407723024 +129 B 1
anon.44a0faa3240fa409baa379409d152aec.1.llvm.4920541009509882327 -129 B 1
anon.44a0faa3240fa409baa379409d152aec.4.llvm.2649486637407723024 +113 B 1
anon.44a0faa3240fa409baa379409d152aec.4.llvm.4920541009509882327 -113 B 1
anon.44a0faa3240fa409baa379409d152aec.3.llvm.2649486637407723024 +108 B 1
anon.44a0faa3240fa409baa379409d152aec.3.llvm.4920541009509882327 -108 B 1
anon.44a0faa3240fa409baa379409d152aec.0.llvm.2649486637407723024 +96 B 1
anon.44a0faa3240fa409baa379409d152aec.0.llvm.4920541009509882327 -96 B 1
anon.44a0faa3240fa409baa379409d152aec.2.llvm.2649486637407723024 +94 B 1
anon.44a0faa3240fa409baa379409d152aec.2.llvm.4920541009509882327 -94 B 1
Detailed Symbol Changes
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [NEW]    +129  [NEW]     +40    anon.44a0faa3240fa409baa379409d152aec.1.llvm.2649486637407723024
  [NEW]    +113  [NEW]     +24    anon.44a0faa3240fa409baa379409d152aec.4.llvm.2649486637407723024
  [NEW]    +108  [NEW]     +19    anon.44a0faa3240fa409baa379409d152aec.3.llvm.2649486637407723024
  [NEW]     +96  [NEW]      +7    anon.44a0faa3240fa409baa379409d152aec.0.llvm.2649486637407723024
  [NEW]     +94  [NEW]      +5    anon.44a0faa3240fa409baa379409d152aec.2.llvm.2649486637407723024
  [DEL]     -94  [DEL]      -5    anon.44a0faa3240fa409baa379409d152aec.2.llvm.4920541009509882327
  [DEL]     -96  [DEL]      -7    anon.44a0faa3240fa409baa379409d152aec.0.llvm.4920541009509882327
  [DEL]    -108  [DEL]     -19    anon.44a0faa3240fa409baa379409d152aec.3.llvm.4920541009509882327
  [DEL]    -113  [DEL]     -24    anon.44a0faa3240fa409baa379409d152aec.4.llvm.4920541009509882327
  [DEL]    -129  [DEL]     -40    anon.44a0faa3240fa409baa379409d152aec.1.llvm.4920541009509882327
  [ = ]       0  [ = ]       0    TOTAL

@blt blt changed the title chore(antithesis): is_malformed based load generation chore(antithesis): non-utf8 bytes payloads represent 1% of generation Jul 27, 2026
@blt
blt marked this pull request as ready for review July 27, 2026 23:24
@blt
blt requested review from a team as code owners July 27, 2026 23:24

@datadog-prod-us1-6 datadog-prod-us1-6 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.

Datadog Autotest: PASS

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.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 43cf97d · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@pr-commenter

pr-commenter Bot commented Jul 27, 2026

Copy link
Copy Markdown

Regression Detector (Agent Data Plane)

Run ID: 516332f6-3eb1-4379-a670-deeecef04134
Baseline: e34c659f · Comparison: 43cf97d2 · diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment (3)

Experiments configured erratic: true are tagged (ignored) and skipped when determining which experiments regressed or improved. Experiments which are detected as erratic at runtime are tagged (erratic) to flag that the run's sample dispersion was high, but their regression / improvement signal still counts.

experiment goal Δ mean % links
quality_gates_rss_idle memory ⚪ +0.30 metrics profiles logs
quality_gates_rss_dsd_low memory ⚪ +0.29 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ +0.21 metrics profiles logs
Bounds Checks: ✅ Passed (3)
experiment check replicates observed links
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 45.4 MiB ≤ 50 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 67.1 MiB ≤ 75 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 31.2 MiB ≤ 40 MiB metrics profiles logs
Explanation

A 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 (is_regression: true). Improvements use the matching criteria for the improving direction. Experiments configured erratic: true (tagged (ignored)) are skipped outright; experiments detected as erratic at runtime (tagged (erratic)) still count, since that flag describes sample dispersion rather than directional certainty. The Δ mean % cell is colored accordingly: 🟢 = improvement, 🔴 = regression, ⚪ = neutral. Reduction in CPU or memory is an improvement; reduction in ingress throughput is a regression.

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

Comment on lines +31 to +34
/// 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.

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 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 👍 / 👎.

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

Labels

area/test All things testing: unit/integration, correctness, SMP regression, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant