You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of the post-v0.4.0 development plan (development/post-v040-development-plan.md, Phase 2, Task 5). Design doc first; implementation gated on ADR approval.
Problem
Three seed regimes coexist:
Legacy path: global set.seed(seed) at R/create_mock_data.R:325-327, generators receive seed = NULL.
v0.4 path: seed for baseline, seed + 1L for post-processing at R/create_mock_data.R:88-90 — the comment itself calls it a pragmatic split.
simstudy backend: its own seed handling.
Plus: the v0.4→legacy fallback switches RNG streams for the same seed with only a verbose-gated message (#33 item 11).
Practical collision risk of seed/seed + 1 is low (Mersenne-Twister seed scrambling), but the contract is undefined: what exactly does a user's seed guarantee, across paths and versions?
ADR must decide
Stream-derivation scheme — candidates: (a) status quo documented; (b) L'Ecuyer-CMRG sub-streams via parallel::nextRNGStream() per stage (and per variable?); (c) hash-derived per-stage seeds. Recommendation in plan: (b), stage-level.
Scope of the guarantee — same seed + same spec + same version ⇒ identical output; explicitly not stable across minor versions when NEWS says so.
Migration policy — any change breaks seeded output. Coordinate with the formula evaluator (see companion v0.5 issue) so v0.5 contains exactly one seeded-output break, with one NEWS migration note (precedent: v0.3→v0.4 divergence already documented).
Part of the post-v0.4.0 development plan (
development/post-v040-development-plan.md, Phase 2, Task 5). Design doc first; implementation gated on ADR approval.Problem
Three seed regimes coexist:
set.seed(seed)atR/create_mock_data.R:325-327, generators receiveseed = NULL.seedfor baseline,seed + 1Lfor post-processing atR/create_mock_data.R:88-90— the comment itself calls it a pragmatic split.Plus: the v0.4→legacy fallback switches RNG streams for the same seed with only a verbose-gated message (#33 item 11).
Practical collision risk of
seed/seed + 1is low (Mersenne-Twister seed scrambling), but the contract is undefined: what exactly does a user'sseedguarantee, across paths and versions?ADR must decide
parallel::nextRNGStream()per stage (and per variable?); (c) hash-derived per-stage seeds. Recommendation in plan: (b), stage-level.Acceptance
development/adr/v05-seed-contract.mdmerged after maintainer review.Relates to #22, #33.