temporalio / temporalio/omes

[Feature Request] Make output the same for same RNG seed

Open
#60 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
102
Forks
29
Avg merge
1d 22h
Merged PRs (30d)
22

Description

Ideally this would return the same value, but it doesn't currently (even after https://github.com/temporalio/omes/pull/57):

md5sum <(cargo run -- generate --explicit-seed=12345 2>/dev/null) <(cargo run -- generate --explicit-seed=12345 2>/dev/null)

I believe that this is due to the fact that serializing the WorkflowState HashMap yields keys and values in non-deterministic order. If so, it doesn't impact correctness, but it would still be reassuring to see the same output.

Fix this and add a test for same-seed-same-output.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running cargo run -- generate --explicit-seed=12345 twice and inspect how WorkflowState is serialized, especially its HashMap ordering. Add a same-seed-same-output test and verify that repeated runs produce identical output, such as matching the example's checksums.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.