EnvelopeFlow.Experiments
0.1.0-alpha.3.1
dotnet add package EnvelopeFlow.Experiments --version 0.1.0-alpha.3.1
NuGet\Install-Package EnvelopeFlow.Experiments -Version 0.1.0-alpha.3.1
<PackageReference Include="EnvelopeFlow.Experiments" Version="0.1.0-alpha.3.1" />
<PackageVersion Include="EnvelopeFlow.Experiments" Version="0.1.0-alpha.3.1" />
<PackageReference Include="EnvelopeFlow.Experiments" />
paket add EnvelopeFlow.Experiments --version 0.1.0-alpha.3.1
#r "nuget: EnvelopeFlow.Experiments, 0.1.0-alpha.3.1"
#:package EnvelopeFlow.Experiments@0.1.0-alpha.3.1
#addin nuget:?package=EnvelopeFlow.Experiments&version=0.1.0-alpha.3.1&prerelease
#tool nuget:?package=EnvelopeFlow.Experiments&version=0.1.0-alpha.3.1&prerelease
EnvelopeFlow.Experiments
Optional scoped experiment definitions, sticky randomization-unit assignments and campaign exposure persistence. Applications authorize publication/assignment requests and select trusted stable unit namespace/ID values independently of authentication identities, recipients and installations. Never forward a caller-selected variant or a freely rotatable unit ID. Raw unit identifiers are hashed before persistence; hashes are pseudonymous operational identifiers, not anonymization.
Definitions use positive consecutive revision CAS, 1–16 distinct weighted variants, an optional integer holdout weight, an explicit 16–256-character seed and exact template name/version references. Total weight is at most 1,000,000. sha256-rejection-v1 sorts variants by ordinal ID, hashes the declared scope/experiment/revision/seed/unit digest and bounded counter, rejects the incomplete 64-bit range, then uses cumulative integer weights. The seed is reproducibility input, not a secret. Changing weights, seed or template versions requires a new immutable revision. Only previously unassigned units use that revision; existing assignments retain their original revision and template forever. Concurrent clients atomically persist the same first assignment.
Each exposure identity binds one campaign and one experiment unit, independent of revision changes. First context/payload wins and conflicting authority refuses. Exposure means inclusion in a campaign decision, including holdout; it never means a human saw a notification. Exact payload hashes protect frozen content. The separate delivery integration performs template preparation, reporting and stable delivery handoffs. A holdout has no payload or delivery.
Raw exposure payload text supplied through SaveExposureAsync must contain valid Unicode so storage cannot silently replace an unpaired surrogate while retaining an apparently valid hash. This also protects custom exposure producers; the normal ExperimentAdmission path already validates its template and delivery payload. Valid Unicode, including U+FFFD and supplementary characters, remains unchanged. Payloads are stored in a JSON text document, which escapes embedded NUL without losing it. A holdout still has a null payload. This boundary does not change the generic ExperimentEncoding.Hash helper's serialization semantics.
Defaults retain at most 1,000 experiments globally, 128 revisions and 10,000 assignments/10,000 exposures per experiment, with a 16 MiB document bound. Configured assignment/exposure limits range from 1–100,000; the byte limit may be reached first. Redaction explicitly removes at most 1–1000 expired payloads while retaining hashes, assignments, attribution and identity tombstones. It does not free identity capacity or permit reassignment/replay. Plan capacity and whole-namespace retirement externally; deleting and reusing an experiment identity breaks guarantees. No implicit cleanup, endpoint, auth framework, scheduler or UI is required.
InMemoryExperimentStore is a process-local development reference. Custom stores must clone/freeze results, serialize every full-scope/experiment mutation, enforce all bounds before commit, fail closed on incompatible/corrupt state and atomically persist definition head, assignment and exposure changes. Selecting PostgreSQL for experiments alone does not make ephemeral templates, delivery or reporting durable.
ExperimentStatistics.ConversionRate(convertedUnits, exposedUnits, confidence) returns a two-sided Wilson score interval without continuity correction. Difference(candidateConverted, candidateExposed, referenceConverted, referenceExposed, confidence) returns the candidate-minus-reference Newcombe hybrid-score interval from the two Wilson intervals. Confidence levels are explicit 90%, 95% (default), or 99%. A zero denominator produces no rate/interval; missing data in either arm produces no difference estimate. Impossible counts and counts above 2^53 are rejected. Helpers are pure calculations and do not mutate definitions, assignments, exposures, or reporting. A queried ExperimentComparisonArm offers EstimateConversionRate using its deduplicated converted/exposed unit counts.
Choose one campaign, immutable experiment revision, common conversion policy and completed observation horizon before comparing independent randomization units. Repeated observations of one unit are not independent trials; conversion-event counts are not the numerator. These intervals do not adjust for repeated peeking, multiple comparisons, censoring or confounding and do not establish causal lift or choose/promote a winner. Applications own experimental design and any reviewed product decision.
The Wilson formula and published 20-of-25 reference interval come from NIST's interval documentation, with terminology clarified in the NIST handbook. The independent-arm method follows Newcombe's original comparison of interval methods. Tests check the published Wilson bounds, independent high-precision Newcombe references, no-data/boundary cases, confidence-level nesting and actual deduplicated memory/PostgreSQL reporting counts.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- EnvelopeFlow.Core (>= 0.1.0-alpha.3.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on EnvelopeFlow.Experiments:
| Package | Downloads |
|---|---|
|
EnvelopeFlow.Experiments.Stores.Postgres
Explicitly migrated PostgreSQL experiment assignments and exposure persistence. |
|
|
EnvelopeFlow.Experiments.Delivery
Frozen campaign experiment admission, delivery-free holdouts and reporting comparisons. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-alpha.3.1 | 47 | 11/22/2026 |
| 0.1.0-alpha.2.1 | 73 | 11/9/2026 |