Vary lading.yaml configs under Antithesis - #1922
Conversation
|
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. |
82f962d to
f02e786
Compare
a40ac9d to
8f90f69
Compare
f02e786 to
ec3c3ba
Compare
8f90f69 to
d4214e0
Compare
ec3c3ba to
bd9cd93
Compare
This commit updates the Antithesis rig to vary lading configs based on the work done in Datadog/saluki. We keep the variation simpler than what we do in saluki, consistent with the the goal of only adding complexity as we need it. For instance, we do not have variation in the sink destination yet. That will come in a later line of work.
bd9cd93 to
4132c2e
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4132c2ee9e
ℹ️ 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".
| // content opaque to Antithesis and effectively fixed across timelines, which | ||
| // is fine: the sink asserts on bytes received, not on content. | ||
| let mut seed = [0u8; 32]; | ||
| rand::rng().fill_bytes(&mut seed); |
There was a problem hiding this comment.
Use an explicit deterministic payload seed
When sample is called with the same deterministic RNG state, this independent rand::rng() draw produces a different tcp::Config, YAML file, and payload stream, preventing byte-identical reproduction of a sampled Antithesis timeline. Use a fixed explicit seed or derive it through the supplied deterministic configuration mechanism rather than thread-local entropy.
AGENTS.md reference: AGENTS.md:L86-L92
Useful? React with 👍 / 👎.
| //! Per-timeline lading config sampling. | ||
| //! | ||
| //! The sampler builds lading's real [`tcp::Config`] so the value menu is exactly | ||
| //! the config schema, then serializes it under the `generator: [{ tcp: … }]` |
There was a problem hiding this comment.
Replace the non-ASCII punctuation
This ellipsis, the second ellipsis in the to_yaml documentation, and the em dash in helper_README.md violate the repository's US-ASCII-only requirement for code and documentation; replace them with ASCII punctuation.
AGENTS.md reference: AGENTS.md:L151-L158
Useful? React with 👍 / 👎.
| #[test] | ||
| fn sampled_config_deserializes_as_valid_lading_config() { |
There was a problem hiding this comment.
Convert the randomized sweeps to property tests
These three randomized-invariant checks are ordinary unit tests over a hard-coded set of 256 seeds, so they neither use the repository's required property-test strategy nor provide shrinking when serialization or block-capacity invariants fail. Express the sampled-config invariants as proptest properties and document them formally rather than relying on fixed seed loops.
AGENTS.md reference: AGENTS.md:L121-L132
Useful? React with 👍 / 👎.
| std::fs::create_dir_all(&dir) | ||
| .with_context(|| format!("create config dir {}", dir.display()))?; |
There was a problem hiding this comment.
Use named arguments in the error contexts
This context string and the two later write-error contexts use anonymous {} placeholders, contrary to the repository's named-format-argument convention. Give each displayed path a named argument so these newly added diagnostics follow the required formatting style.
AGENTS.md reference: AGENTS.md:L111-L116
Useful? React with 👍 / 👎.

What does this PR do?
This commit updates the Antithesis rig to vary lading configs based
on the work done in Datadog/saluki. We keep the variation simpler
than what we do in saluki, consistent with the the goal of only
adding complexity as we need it. For instance, we do not have variation
in the sink destination yet. That will come in a later line of work.