Skip to content

chore(antithesis): dogstatsd generation with byte limit#1974

Open
blt wants to merge 1 commit into
blt/chore_antithesis_add_pyld25_series_are_not_emptyfrom
blt/chore_antithesis_dogstatsd_line_and_payload_generators
Open

chore(antithesis): dogstatsd generation with byte limit#1974
blt wants to merge 1 commit into
blt/chore_antithesis_add_pyld25_series_are_not_emptyfrom
blt/chore_antithesis_dogstatsd_line_and_payload_generators

Conversation

@blt

@blt blt commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

This commit updates the harness driver to build dogstatsd to a byte
limit, in the manner of datadog/lading. I have been unable to
investigate SMPTNG-7611 well owing to the error log emission by Datadog
Agent. I've added property tests to assert the payload limit is obeyed,
accepting that this means making the dogstatsd generator pure with
regard to Rng and may not use antithesis SDK's random_* directly.

I have tweaked also how 'feral' load is produced, making payloads more
compact but also avoiding producing feral load that Datadog Agent will
not outright reject.

Change Type

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

How did you test this PR?

References

Discovered the following debugging this work:

DataDog/datadog-agent#53170
SMPTNG-761

@pr-commenter

pr-commenter Bot commented Jul 2, 2026

Copy link
Copy Markdown

Binary Size Analysis (Agent Data Plane)

Baseline: 92cb9bd · Comparison: f116dac · diff
Analysis Configuration: stripped binaries · Pass/Fail Threshold: +5%
Sizes: 41.68 MiB (baseline) vs 41.68 MiB (comparison)
Size Change: -1.34 KiB (-0.00%)

✅ Binary size difference within threshold

Changes by Module
Module File Size Symbols
anon.bc27ec12f8abfd741d2cc888c8b01dc7.6.llvm.4158422603915796461 -1.87 KiB 1
anon.2c42b77b551de5ce0eb4683a5f3348ef.394.llvm.6471492298253374226 +1.87 KiB 1
anon.d851f2884fec383d59770b6e1053557d.496.llvm.14733898691217894837 -1.77 KiB 1
anon.d851f2884fec383d59770b6e1053557d.496.llvm.2729676012635161149 +1.77 KiB 1
anon.9af47ef3bc1f734053efc1a81f309c81.30.llvm.17299067839495397339 -1.69 KiB 1
anon.d851f2884fec383d59770b6e1053557d.181.llvm.2729676012635161149 +1.69 KiB 1
anon.1ae064f8f7c88592968577f5572fe6a1.81.llvm.10427259948598879219 -1.45 KiB 1
anon.84c2a157bbf679719fc5fed5de7b9895.104.llvm.17643131471645320202 +1.45 KiB 1
anon.1ae064f8f7c88592968577f5572fe6a1.76.llvm.10427259948598879219 -1.45 KiB 1
anon.b91e3af34c069ae48e7bbe7df595d981.128.llvm.10130343606843929883 +1.44 KiB 1
anon.1ae064f8f7c88592968577f5572fe6a1.78.llvm.10427259948598879219 -1.43 KiB 1
anon.105ca0d0b09b38782024af0b4190a881.82.llvm.10103066070350205741 +1.43 KiB 1
anon.168fdbdcbd293237ddac692d5d37499c.1219.llvm.13116985673205370977 -1.33 KiB 1
anon.1ae064f8f7c88592968577f5572fe6a1.597.llvm.12508115777240049810 +1.33 KiB 1
anon.d851f2884fec383d59770b6e1053557d.1940.llvm.14733898691217894837 -1.07 KiB 1
anon.19577c0eeee3802814ec8984397e7805.38.llvm.4244394631308212861 +1.07 KiB 1
anon.d851f2884fec383d59770b6e1053557d.1582.llvm.14733898691217894837 -1000 B 1
anon.56afeeebbb405e88722c851be8501b5f.28.llvm.9557380210322302320 +999 B 1
_RNvMs5_NtNtCsebJFismJkYh_3std2io5errorNtB5_5Error4kind.llvm.13116985673205370977 -971 B 1
_RNvMs5_NtNtCsebJFismJkYh_3std2io5errorNtB5_5Error4kind.llvm.3824531816487215769 +970 B 1
Detailed Symbol Changes
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [NEW] +4.72Ki  [NEW]     +49    core::ptr::drop_in_place<tower::util::map_future::MapFuture<axum::util::MapIntoResponse<tower::util::map_request::MapRequest<otlp_protos::otlp_include::opentelemetry::proto::collector::metrics::v1::metrics_service_server::MetricsServiceServer<saluki_components::common::otlp::GrpcServiceImpl<saluki_components::relays::otlp::RelayHandler>>,tonic::service::router::Routes::add_service<otlp_protos::otlp_include::opentelemetry::proto::collector::metrics::v1::metrics_service_server::MetricsServiceServer<saluki_components::common::otlp::GrpcServiceImpl<saluki_components::relays::otlp::RelayHandler>>>::{{closure}}>>,tower::util::boxed_clone_sync::BoxCloneSyncService<http::request::Request<axum_core::body::Body>,http::response::Response<axum_core::body::Body>,core::convert::Infallible>::new<axum::util::MapIntoResponse<tower::util::map_request::MapRequest<otlp_protos::otlp_include::opentelemetry::proto::collector::metrics
  [NEW] +2.49Ki  [NEW]    +422    core::ptr::drop_in_place<tokio::sync::mpsc::bounded::Permit<saluki_components::common::datadog::validation::ValidationReadiness>>::hca0a8333f13b4a04
  [NEW] +1.87Ki  [NEW]     +97    anon.2c42b77b551de5ce0eb4683a5f3348ef.394.llvm.6471492298253374226
  [NEW] +1.77Ki  [NEW] +1.68Ki    anon.d851f2884fec383d59770b6e1053557d.496.llvm.2729676012635161149
  [NEW] +1.75Ki  [NEW]     +33    core::ptr::drop_in_place<http_body_util::combinators::map_err::MapErr<tonic::codec::encode::EncodeBody<tonic_prost::codec::ProstEncoder<otlp_protos::otlp_include::opentelemetry::proto::collector::metrics::v1::ExportMetricsServiceResponse>,tokio_stream::once::Once<core::result::Result<otlp_protos::otlp_include::opentelemetry::proto::collector::metrics::v1::ExportMetricsServiceResponse,tonic::status::Status>>>,tonic::status::Status::map_error<tonic::status::Status>>>::hc7bb46af7020a455
  [NEW] +1.69Ki  [NEW]     +90    anon.d851f2884fec383d59770b6e1053557d.181.llvm.2729676012635161149
  [NEW] +1.45Ki  [NEW]     +22    anon.84c2a157bbf679719fc5fed5de7b9895.104.llvm.17643131471645320202
  [NEW] +1.44Ki  [NEW]     +22    anon.b91e3af34c069ae48e7bbe7df595d981.128.llvm.10130343606843929883
  [NEW] +1.43Ki  [NEW]     +92    anon.105ca0d0b09b38782024af0b4190a881.82.llvm.10103066070350205741
  [NEW] +1.33Ki  [NEW]     +91    anon.1ae064f8f7c88592968577f5572fe6a1.597.llvm.12508115777240049810
  -0.1% -1.32Ki  [ = ]       0    [2750 Others]
  [DEL] -1.33Ki  [DEL]     -91    anon.168fdbdcbd293237ddac692d5d37499c.1219.llvm.13116985673205370977
  [DEL] -1.43Ki  [DEL]     -92    anon.1ae064f8f7c88592968577f5572fe6a1.78.llvm.10427259948598879219
  [DEL] -1.45Ki  [DEL]     -22    anon.1ae064f8f7c88592968577f5572fe6a1.76.llvm.10427259948598879219
  [DEL] -1.45Ki  [DEL]     -22    anon.1ae064f8f7c88592968577f5572fe6a1.81.llvm.10427259948598879219
  [DEL] -1.69Ki  [DEL]     -90    anon.9af47ef3bc1f734053efc1a81f309c81.30.llvm.17299067839495397339
  [DEL] -1.75Ki  [DEL]     -33    core::ptr::drop_in_place<http_body_util::combinators::map_err::MapErr<tonic::codec::encode::EncodeBody<tonic_prost::codec::ProstEncoder<otlp_protos::otlp_include::opentelemetry::proto::collector::logs::v1::ExportLogsServiceResponse>,tokio_stream::once::Once<core::result::Result<otlp_protos::otlp_include::opentelemetry::proto::collector::logs::v1::ExportLogsServiceResponse,tonic::status::Status>>>,tonic::status::Status::map_error<tonic::status::Status>>>::h1fa0da3cd6bc290b
  [DEL] -1.77Ki  [DEL] -1.68Ki    anon.d851f2884fec383d59770b6e1053557d.496.llvm.14733898691217894837
  [DEL] -1.87Ki  [DEL]     -97    anon.bc27ec12f8abfd741d2cc888c8b01dc7.6.llvm.4158422603915796461
  [DEL] -2.50Ki  [DEL]    -422    core::ptr::drop_in_place<tokio::sync::mpsc::bounded::Permit<saluki_components::common::datadog::transaction::Transaction<saluki_common::buf::chunked::FrozenChunkedBytesBuffer>>>::h352480850e3af1cc
  [DEL] -4.72Ki  [DEL]     -49    core::ptr::drop_in_place<tower::util::map_future::MapFuture<axum::util::MapIntoResponse<tower::util::map_request::MapRequest<otlp_protos::otlp_include::opentelemetry::proto::collector::trace::v1::trace_service_server::TraceServiceServer<saluki_components::common::otlp::GrpcServiceImpl<saluki_components::relays::otlp::RelayHandler>>,tonic::service::router::Routes::add_service<otlp_protos::otlp_include::opentelemetry::proto::collector::trace::v1::trace_service_server::TraceServiceServer<saluki_components::common::otlp::GrpcServiceImpl<saluki_components::relays::otlp::RelayHandler>>>::{{closure}}>>,tower::util::boxed_clone_sync::BoxCloneSyncService<http::request::Request<axum_core::body::Body>,http::response::Response<axum_core::body::Body>,core::convert::Infallible>::new<axum::util::MapIntoResponse<tower::util::map_request::MapRequest<otlp_protos::otlp_include::opentelemetry::proto::collector::trace::v1::trace_se
  -0.0% -1.34Ki  [ = ]       0    TOTAL

@pr-commenter

pr-commenter Bot commented Jul 2, 2026

Copy link
Copy Markdown

Regression Detector (Agent Data Plane)

Run ID: 64df7a07-1c80-49e6-aa78-207e4e6b7082
Baseline: 92cb9bda · Comparison: f116dac1 · diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment (5)

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_dsd_low memory ⚪ +0.40 metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory ⚪ +0.31 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ +0.17 metrics profiles logs
quality_gates_rss_idle memory ⚪ -0.00 metrics profiles logs
quality_gates_rss_dsd_heavy memory ⚪ -0.28 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 133 MiB ≤ 140 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 43.2 MiB ≤ 50 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 64.8 MiB ≤ 75 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 192 MiB ≤ 200 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 28.9 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.

Copilot AI 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.

Pull request overview

This PR updates the Antithesis DogStatsD harness to generate byte-limited, newline-packed payloads (instead of single lines) and refactors payload sampling to use rand’s slice/array selection APIs with an explicit RNG, adding property tests to lock in the new size/invariant behavior.

Changes:

  • Introduce PAYLOAD_BYTE_LIMIT, Payload, write_line, and write_payload to generate \n-terminated lines packed into datagrams without exceeding a byte limit.
  • Update the load driver to send payload datagrams and report sent line counts / max packed counts across payloads.
  • Add proptest-based invariants (and a regression seed file) for payload/line size and newline-count properties.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
test/antithesis/scenarios/general/src/bin/parallel_driver_send_dogstatsd.rs Switch scenario to use driver::sample() after driver API refactor.
test/antithesis/scenarios/differential/src/bin/parallel_driver_send_dogstatsd_differential.rs Update imports and batch sampling call site for the refactored driver API.
test/antithesis/harness/src/payload/dogstatsd/service_checks.rs Replace random_choice usage with rand selection APIs and thread RNG through helpers.
test/antithesis/harness/src/payload/dogstatsd/metrics.rs Same as above; also refactors metric extension selection and value-kind selection.
test/antithesis/harness/src/payload/dogstatsd/events.rs Same as above for event option selection and field writing.
test/antithesis/harness/src/payload/dogstatsd/common.rs Make vibe/choice/field helpers RNG-driven and switch selection to rand APIs.
test/antithesis/harness/src/payload/dogstatsd.rs Add byte-limited line/payload writers and proptest invariants for size/newline properties.
test/antithesis/harness/src/driver.rs Change driver from per-line sends to byte-limited payload datagrams, updating stats semantics.
test/antithesis/harness/proptest-regressions/payload/dogstatsd.txt Check in proptest regression seed(s) for reproducibility.
test/antithesis/harness/Cargo.toml Add proptest dev-dependency for the new property tests.
Cargo.lock Record proptest being pulled in (via harness dev-deps).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/antithesis/harness/src/driver.rs
Comment thread test/antithesis/harness/src/driver.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/common.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/common.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/metrics.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/metrics.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/service_checks.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/events.rs
@blt blt force-pushed the blt/chore_antithesis_add_pyld25_series_are_not_empty branch from 4b011df to 67ce101 Compare July 2, 2026 13:44
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 51945fe to 30e11dd Compare July 2, 2026 13:44
@blt blt force-pushed the blt/chore_antithesis_add_pyld25_series_are_not_empty branch from 67ce101 to 7024db6 Compare July 2, 2026 16:57
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 30e11dd to 7ac69cc Compare July 2, 2026 16:58
@blt blt force-pushed the blt/chore_antithesis_add_pyld25_series_are_not_empty branch from 7024db6 to 9d89983 Compare July 2, 2026 21:11
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 7ac69cc to 3fe9725 Compare July 2, 2026 21:11
@blt blt force-pushed the blt/chore_antithesis_add_pyld25_series_are_not_empty branch from 9d89983 to d652f5f Compare July 2, 2026 21:40
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch 2 times, most recently from 5b84354 to 7d5c1d2 Compare July 2, 2026 22:08
@blt blt force-pushed the blt/chore_antithesis_add_pyld25_series_are_not_empty branch from d652f5f to f924078 Compare July 2, 2026 22:08
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 7d5c1d2 to 0984845 Compare July 2, 2026 22:17
@blt blt force-pushed the blt/chore_antithesis_add_pyld25_series_are_not_empty branch 2 times, most recently from 3436479 to f08152f Compare July 2, 2026 22:41
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 0984845 to 2452073 Compare July 2, 2026 22:41
@blt blt marked this pull request as ready for review July 2, 2026 22:53
@blt blt requested a review from a team as a code owner July 2, 2026 22:53
Copilot AI review requested due to automatic review settings July 2, 2026 22:53
@blt blt requested a review from a team as a code owner July 2, 2026 22:53

Copilot AI 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.

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.

Comment on lines 54 to 60
};

// Agent first, ADP second: `stats.sent` and `stats.max_packed` are indexed in this order.
let batch = Batch::sample();
let batch = driver::sample();
let stats = driver::run(batch, vec![agent_socket, adp_socket])?;
let received = stats.received;
let agent_sent = stats.sent[0];
Comment on lines +67 to +71
/// Strange-but-`ParseFloat`-valid metric values: signed zeros, infinities, NaN,
/// hex-float, underscore, bare-dot forms, a `:`-packed run, and cursed-long but
/// exact encodings. Anything that fails `ParseFloat` stays out so a whole feral
/// line reads clean. The unparseable curses live in name-like fields instead.
pub(crate) const ABERRANT_VALUE: &[&[u8]] = &[
Comment on lines +82 to 87
let mut rng = AntithesisRng;
for _ in 0..count {
let mut bytes = Vec::new();
let line = match dogstatsd::send(&mut rng, &mut bytes, batch.vibe()) {
None => Line::Single { bytes },
Some(count) => Line::Multi { bytes, count },
};
if tx.send(line).is_err() {
let payload = dogstatsd::write_payload(&mut rng, &mut bytes, batch, dogstatsd::PAYLOAD_BYTE_LIMIT);
if tx.send(Datagram { bytes, payload }).is_err() {
break;

@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: 24520735bc

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


/// Write one `DogStatsD` message of a sampled type to `buf` at the given vibe.
/// The `dogstatsd_buffer_size` default, via Datadog Agent.
pub const PAYLOAD_BYTE_LIMIT: usize = 8_192;

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 Respect the sampled DogStatsD buffer size

This hard-codes the payload cap to the Agent default even though Antithesis writes a per-run dogstatsd_buffer_size that can be much smaller (sample_buffer_size returns 128..=65_536 in test/antithesis/harness/src/config.rs:243-248). When a differential run samples, for example, a 512-byte buffer, write_payload can still pack and send up to 8 KiB in one UDS datagram, so the targets are exercising truncation/drop behavior instead of the intended DogStatsD payload and stats.sent counts lines that were never readable by the SUT. The payload limit needs to come from the sampled config, or the sampler must not choose values below this cap.

Useful? React with 👍 / 👎.

const COMPLIANT_RATE: &[&[u8]] = &[b"1", b"0.5", b"0.25", b"0.1", b"0.001"];

const ABERRANT_RATE: &[&[u8]] = &[
b"+0.5", b"1.", b".5", b"0x1p-1", b"1_000", b"2", b"inf", b"+inf", b"-inf", b"nan",

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 Keep sample-rate fuzz values accepted by ADP

When a feral metric extension chooses 0x1p-1 or one of the non-finite/out-of-range entries here, ADP rejects the whole metric in parse_dogstatsd_metric: sample-rate chunks are parsed with all_consuming(double) and then SampleRate::try_from, so parse/range failures bubble out instead of ignoring only the extension. In differential runs this can make generated metrics disappear before the context comparison; keep this pool to decimal 0..=1 values both targets accept, or make these forms scenario-specific.

Useful? React with 👍 / 👎.

/// Strange-but-parseable unix timestamps: leading plus, leading zeros, and the
/// `i64::MAX` boundary. Base-10 `ParseInt`, always `> 0`, so safe even at the
/// strict metric `T` site.
pub(crate) const ABERRANT_TS: &[&[u8]] = &[b"+1700000000", b"0000001700000000", b"9223372036854775807"];

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 Drop the leading-plus timestamp from shared fuzzing

When a feral metric/event/service-check timestamp chooses +1700000000, ADP rejects the frame because its shared unix_timestamp parser is nom's unsigned parse_u64 (lib/saluki-io/src/deser/codec/dogstatsd/helpers.rs:127-128), which does not accept a leading plus. This pool is now used by the metric T path as well as d: fields, so differential DogStatsD load can drop otherwise valid metric contexts on ADP; remove the plus form or update the parser before generating it.

Useful? React with 👍 / 👎.

Comment on lines +57 to +60
"café".as_bytes(), // non-conforming but valid UTF-8
"Ωμέγα".as_bytes(), // Greek
"日本語".as_bytes(), // CJK
"🦆".as_bytes(), // emoji, non-ASCII multi-byte

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 Avoid Unicode metric-name segments in differential load

When these new non-ASCII segments are selected for a metric name, ADP drops the frame before it can produce a context: even with permissive decoding, permissive_metric_name only consumes printable ASCII bytes (lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:197-205). In differential runs where the Agent accepts the same valid UTF-8 name, this creates artificial missing contexts rather than testing ADP/Agent equivalence; keep shared metric-name fuzzing to the ASCII subset ADP can parse or gate these entries out of differential payloads.

Useful? React with 👍 / 👎.

@blt blt force-pushed the blt/chore_antithesis_add_pyld25_series_are_not_empty branch from f08152f to 55effb5 Compare July 6, 2026 14:19
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 2452073 to f60e8c1 Compare July 6, 2026 14: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: f60e8c1ebe

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

#[must_use]
pub fn sample() -> Batch {
let mut rng = AntithesisRng;
match [Batch::Clean, Batch::Clean, Batch::Feral, Batch::Mixed].choose(&mut rng) {

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 Use structured choices for batch mode

In Antithesis runs this high-level Clean/Feral/Mixed branch is now selected through rand::choose instead of antithesis_sdk::random::random_choice. The SDK documents random_choice as the way to signal structured choices to the Antithesis platform, so hiding this branch behind raw RNG makes experiments less steerable toward the specific batch modes that the later assert_sometimes! anchors require; keep random_choice here or wrap it for runtime categorical choices.

Useful? React with 👍 / 👎.

@datadog-datadog-prod-us1

This comment has been minimized.

This commit updates the harness driver to build dogstatsd to a byte
limit, in the manner of datadog/lading. I have been unable to
investigate SMPTNG-7611 well owing to the error log emission by Datadog
Agent. I've added property tests to assert the payload limit is obeyed,
accepting that this means making the dogstatsd generator pure with
regard to Rng and may not use antithesis SDK's random_* directly.
Copilot AI review requested due to automatic review settings July 6, 2026 17:50
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from f60e8c1 to f116dac Compare July 6, 2026 17:50
@blt blt force-pushed the blt/chore_antithesis_add_pyld25_series_are_not_empty branch from 55effb5 to 5d2184d Compare July 6, 2026 17:50

Copilot AI 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.

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.

/// Sample a line composition: half clean, a quarter feral, a quarter mixed.
#[must_use]
pub fn sample() -> Batch {
let mut rng = AntithesisRng;
Comment on lines +75 to 76
let mut rng = AntithesisRng;
rng.random_range(0..=10_000u64)

let producer = thread::spawn(move || {
let mut rng = UnwrapErr(AntithesisRng);
let mut rng = AntithesisRng;
Comment on lines +104 to +105
/// The `dogstatsd_buffer_size` default, via Datadog Agent.
pub const PAYLOAD_BYTE_LIMIT: usize = 8_192;

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

ℹ️ 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 +67 to +70
/// Strange-but-`ParseFloat`-valid metric values: signed zeros, infinities, NaN,
/// hex-float, underscore, bare-dot forms, a `:`-packed run, and cursed-long but
/// exact encodings. Anything that fails `ParseFloat` stays out so a whole feral
/// line reads clean. The unparseable curses live in name-like fields instead.

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 Keep feral metric values parseable by ADP

When this value pool selects 0x1p4 or 1_000 for the metric value field, ADP rejects the metric because FloatIter parses values with Rust str::parse::<f64>(), which does not accept Go-style hex floats or underscores, even though the Agent's strconv.ParseFloat does. In differential runs that means otherwise valid metric contexts disappear only on the ADP side; remove those two forms from the shared metric-value pool or gate them to an Agent-only/parser-compatibility scenario.

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.

2 participants