Summary
The package exposes sampling defaults in config and docs, but the builder does not consume them. In addition, samples(1) currently behaves like a non-sampled run and returns EvalResult instead of SampleResults.
Why this matters
This creates an API and documentation mismatch that can confuse users and make sampling behavior harder to reason about.
Evidence
config/evals.php:38-40 defines sampling.default_samples and sampling.default_minimum.
README.md:1044-1045 documents those config keys as effective settings.
src/EvalBuilder.php:173-177 requires explicit values in samples() and never reads sampling config.
src/EvalBuilder.php:353-356 only treats counts greater than 1 as sampled.
Current behavior
->samples() always depends entirely on explicit arguments.
sampling.default_samples and sampling.default_minimum appear to be dead config.
->samples(1) returns a plain EvalResult, not SampleResults.
Why this may hurt DX
A user reading the README/config may reasonably expect:
- sampling defaults to influence runtime behavior, or
samples(1) to still produce sampling semantics consistently.
Today neither expectation is clearly satisfied.
Suggested fix
This is only a suggestion; the actual fix should be planned carefully.
Possible directions:
- Either wire
sampling.default_samples / sampling.default_minimum into actual runtime behavior, or remove them from config/docs if they are not intended to be supported.
- Decide and document whether
samples(1) should:
- return
SampleResults for consistency, or
- be rejected / normalized differently.
- Add tests for configured defaults and one-sample semantics.
Notes
This looks more like an incomplete feature or API contract mismatch than a one-line bug, so the final fix probably needs a small design decision first.
Summary
The package exposes sampling defaults in config and docs, but the builder does not consume them. In addition,
samples(1)currently behaves like a non-sampled run and returnsEvalResultinstead ofSampleResults.Why this matters
This creates an API and documentation mismatch that can confuse users and make sampling behavior harder to reason about.
Evidence
config/evals.php:38-40definessampling.default_samplesandsampling.default_minimum.README.md:1044-1045documents those config keys as effective settings.src/EvalBuilder.php:173-177requires explicit values insamples()and never reads sampling config.src/EvalBuilder.php:353-356only treats counts greater than1as sampled.Current behavior
->samples()always depends entirely on explicit arguments.sampling.default_samplesandsampling.default_minimumappear to be dead config.->samples(1)returns a plainEvalResult, notSampleResults.Why this may hurt DX
A user reading the README/config may reasonably expect:
samples(1)to still produce sampling semantics consistently.Today neither expectation is clearly satisfied.
Suggested fix
This is only a suggestion; the actual fix should be planned carefully.
Possible directions:
sampling.default_samples/sampling.default_minimuminto actual runtime behavior, or remove them from config/docs if they are not intended to be supported.samples(1)should:SampleResultsfor consistency, orNotes
This looks more like an incomplete feature or API contract mismatch than a one-line bug, so the final fix probably needs a small design decision first.