Skip to content

feat: batch options and shared item seeds (4.1.0) - #7

Merged
dasmig merged 2 commits into
mainfrom
batch
Oct 16, 2026
Merged

dasmig merged 2 commits into
mainfrom
batch

Conversation

@dasmig

@dasmig dasmig commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Phase 3 step 3 of PLAN.md, for entity-generator: batches move to the shared item seeds and take core::batch_options.

  • generate_batch and generate_batch_async with a seed now use core::item_seed(call_seed, i) for entity i, the same derivation as every other library (before: the i-th value of rng{call_seed}.split("batch")). Their output for a given seed changes (minor version, as agreed in the plan: nothing else consumes it). Each entity still replays with generate(request, e.seed()). The one known-answer hash of a seeded batch is updated.
  • New overloads generate_batch(request, options[, batch_seed]) and for_each_entity(request, options[, batch_seed], sink) over core::run_batch / core::for_each_batch; request.count keeps working until the next major version.
  • Vendored core updated to 1.1.0 (DASMIG_CORE_REQUIRE(1, 1)).
  • Tests: entities equal the single calls (1, 2, 4, 7 and hardware threads), ranges via first, request.count, options.count and the async batch give the same entities, streaming equals the batch, and a known-answer hash of 10,000 entities. All 293 cases pass with clang 22.
  • CI: a ThreadSanitizer job runs the batch tests with four threads. Per-entity contexts own their random engine, so there is no shared mutable state (the mutable engine in component_context is per entity).
  • Docs: a "Batch Generation" section in doc/usage.md, a README bullet, Doxyfile at 4.1.0.

🤖 Generated with Claude Code

dasmig and others added 2 commits October 16, 2026 19:15
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Cn4xFiHhbCHDhom8w2Ghq
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Cn4xFiHhbCHDhom8w2Ghq
@dasmig
dasmig merged commit b2c1881 into main Oct 16, 2026
20 checks passed
@dasmig
dasmig deleted the batch branch October 18, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant