Skip to content

[DRAFT] loadgen: add probabilistic memo distribution across the workflow tree#420

Draft
tdeebswihart wants to merge 5 commits into
mainfrom
tim/memo-payloadsize
Draft

[DRAFT] loadgen: add probabilistic memo distribution across the workflow tree#420
tdeebswihart wants to merge 5 commits into
mainfrom
tim/memo-payloadsize

Conversation

@tdeebswihart

Copy link
Copy Markdown
Contributor

What was changed

Stacked on #419.

Adds a --option memo-distribution-json knob (probability + size distribution, capped at 40 KB) that attaches an incompressible memo blob (MemoBlob) to throughput_stress workflows throughout the tree: the root, child workflows, and continue-as-new runs.

  • Probability is rolled independently per node from a memo-dedicated rng, so enabling memo does not perturb payload-size sampling.
  • Along a continue-as-new chain the memo is sticky/additive: once present it is carried forward client-side, so behavior is identical across all worker SDK languages regardless of their native continue-as-new memo carry-forward defaults.
  • All six language workers (go, python, typescript, java, dotnet, ruby) now honor the child-workflow and continue-as-new Memo proto fields, passing the pre-encoded payload through each SDK's raw/passthrough path to avoid double-encoding.

Why?

Production workflow records carry memos that grow mutable state. Attaching probabilistic, distribution-sized memos across the tree makes throughput_stress records more production-like.

How was this tested

  • Unit tests for config parsing/validation (probability bounds, size-required, clamping) and per-node sampling.
  • Tree tests: memo present at root/child/CAN at probability 1; deterministic sticky-carry across the CAN chain at probability 0 with a carried blob; no memo by default.
  • All six worker builds verified (go build, py_compile, gradlew compileJava, tsc, dotnet build, ruby -c).
  • End-to-end against an embedded dev server: memos land on root + child + CAN'd workflows, encoded as binary/plain uniformly (no double-encoding), with no non-determinism.

…ghput_stress

Adds a --option payload-distribution-json knob (with @file support) that drives
activity payload sizes from the existing DistributionField framework (discrete,
zipf, uniform, normal, fixed), replacing hardcoded 256-byte payloads in
throughput_stress. Payload activity input bytes are now incompressible
pseudo-random (deterministic per size, replay-safe) so payloads occupy their
full configured size in history. Also fixes a latent data race in
discreteDistribution's lazy cache init (sync.Once).
@tdeebswihart tdeebswihart changed the title loadgen: add probabilistic memo distribution across the workflow tree [DRAFT] loadgen: add probabilistic memo distribution across the workflow tree Jul 14, 2026
@tdeebswihart
tdeebswihart force-pushed the tim/memo-payloadsize branch from 6d3d765 to 070b0e1 Compare July 14, 2026 14:27
Adds a --option memo-distribution-json knob (probability + size distribution,
capped at 40 KB) that attaches an incompressible memo blob ("MemoBlob") to
throughput_stress workflows: the root, child workflows, and continue-as-new
runs. Probability is rolled independently per node from a memo-dedicated rng
(does not perturb payload sampling); along a continue-as-new chain the memo is
sticky/additive, carried forward client-side so behavior is identical across
all worker SDK languages. Updates all six language workers (go, python,
typescript, java, dotnet, ruby) to honor the child-workflow and
continue-as-new Memo proto fields, passing the pre-encoded payload through each
SDK's raw/passthrough path to avoid double-encoding.
@tdeebswihart
tdeebswihart force-pushed the tim/memo-payloadsize branch from 1f72dba to 80165ec Compare July 14, 2026 16:19
@tdeebswihart
tdeebswihart force-pushed the tim/tputstress-payloadsize branch 5 times, most recently from f64e55d to b94b83d Compare July 14, 2026 19:30
Base automatically changed from tim/tputstress-payloadsize to main July 14, 2026 19:56
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