EnvelopeFlow.Reporting 0.1.0-alpha.3.1

This is a prerelease version of EnvelopeFlow.Reporting.
dotnet add package EnvelopeFlow.Reporting --version 0.1.0-alpha.3.1
                    
NuGet\Install-Package EnvelopeFlow.Reporting -Version 0.1.0-alpha.3.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EnvelopeFlow.Reporting" Version="0.1.0-alpha.3.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EnvelopeFlow.Reporting" Version="0.1.0-alpha.3.1" />
                    
Directory.Packages.props
<PackageReference Include="EnvelopeFlow.Reporting" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EnvelopeFlow.Reporting --version 0.1.0-alpha.3.1
                    
#r "nuget: EnvelopeFlow.Reporting, 0.1.0-alpha.3.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EnvelopeFlow.Reporting@0.1.0-alpha.3.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EnvelopeFlow.Reporting&version=0.1.0-alpha.3.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=EnvelopeFlow.Reporting&version=0.1.0-alpha.3.1&prerelease
                    
Install as a Cake Tool

Campaign reporting

Optional campaign/experiment reporting, independent of telemetry and optional conversation history. Applications authorize every full tenant/project/environment/app scope, verify inbound signatures before intake, and supply immutable attribution before stable admission. No HTTP endpoint, user schema, native SDK, address, recipient identity, content, token or credential is stored by reporting.

ReportingAttribution contains campaign ID and optional complete experiment ID/revision/variant or holdout. ReportingBinding freezes the original UTC cohort day. ReportingAdmission first commits the request fingerprint and attribution, admits the same stable delivery request, then registers all returned delivery IDs. Repeat this same handoff after a lost acknowledgment. A new admission older than the retention floor is refused before delivery admission; an already frozen handoff remains recoverable. Existing delivery mappings cannot be reassigned. Keep the application request available for recovery; reporting deliberately retains its fingerprint, rather than its body. Validate transport payloads with the application's dispatcher/transport before calling this helper.

Optional ReportingBinding.Provider and Channel freeze application-selected routing labels of at most 64 characters. Query filters select either or both dimensions; every cursor binds those filters. Labels come from trusted routing decisions, never callback fields. They describe the frozen selected route; they do not infer a provider from a remote message ID. Absent dimensions retain the original serialized binding/query bytes and fingerprints. Exposure counts remain on the explicitly selected exposure binding; delivery dimensions do not clone exposures into multiple routes.

Optional IReportingTimingStore.RegisterTimedDeliveryAsync records a trusted original UTC admission baseline with the immutable delivery mapping. Repeated calls must reuse that timestamp; an older mapping with unknown timing cannot be retroactively assigned a guessed baseline. ReportingTimedAdmission validates per-target provider/channel labels and freezes a versioned intent hash covering the delivery-request fingerprint, exact UTC baseline and ordered target-binding identities before queue admission. A lost acknowledgment or interruption before any registration, or after a partial registration, cannot authorize changed retry times or unwritten routes. Persist and reuse the baseline and label selector's result when recovering; the store retains the authority hash rather than the original application request. The original ReportingAdmission keeps its existing request fingerprint; callers must not switch between ordinary and timed admission under one stable key.

ReportingAggregate.DeliveryLatency describes time from that explicit baseline to the earliest observed delivered/read evidence. It includes queue/scheduling delay and receipt latency; it is not provider execution time or an exact device-delivery timestamp. Missing baselines and evidence before the baseline contribute no timing sample. Later-arriving earlier eligible evidence moves the existing sample between buckets atomically, without increasing its count. FirstConversionTime similarly records one earliest known conversion delay per exposure; multiple conversion IDs retain their existing event counters but do not add samples. Legacy already-converted exposures with unknown first time remain unknown. Identity replay, corrections, capacity checks and histogram deltas commit together.

Distributions retain fixed exclusive upper buckets at 10/50/100/500 ms, 1/5/30 seconds, 1/5 minutes, 1 hour, 1/7/30/365 days, plus an unbounded bucket. Buckets expose sample counts and exact decimal total ticks; Mean rounds down to a representable tick. PercentileUpperBound reports a bucket bound, with null for no data or the unbounded bucket, rather than fabricating an exact percentile. Public snapshots are detached read-only collections. Histograms are constant-size and contain no recipient, address or payload.

ReportingDeliveryEventHandler connects to DeliveryDispatcher.DispatchEventsOnceAsync; completion follows committed idempotent reporting. Unknown correlation throws so the durable outbox retries after mapping recovery. It consumes immutable event state/evidence/reason and hashes the original envelope; it never samples a later snapshot to infer an earlier attempt. An event's related facts commit together. ReportingInboundEventHandler connects to InboundProcessor; its trusted resolver must match the exact full scope, authenticated provider account, provider message and exact candidate to the original delivery. It must not select a campaign/variant from provider or client fields. Compose it after FeedbackPolicyHandler when also applying destination policy: retries of both stores are idempotent. Open, click, complaint, unsubscribe and hard/soft/undetermined bounce observations remain distinct from accepted/delivered/read delivery evidence. These are provider observations, not evidence of human reading or engagement.

Admitted, Accepted, Delivered, Read, Unknown, Rejected, Expired and Cancelled count distinct registered deliveries that ever reached the observation. Read implies delivered and accepted; delivered implies accepted even when receipts arrive first. A delivery can appear in both Unknown and later Accepted, so these are cumulative facts rather than a mutually exclusive current-state distribution. Submission*Event counters count immutable outbox outcome events, without an exact attempt ordinal or a claim to cover every provider submission. Other counters count idempotent source events. All facts accrue to the frozen cohort; late arrival cannot change attribution.

A retryable rejected submission increments SubmissionRejectedEvent while the delivery remains Pending; it does not create a permanent Rejected delivery fact. The handler accepts both the memory store's retry-scheduled reason and PostgreSQL's existing Pending/submission-result envelope with None evidence, preserving event identities and replay deduplication. Custom Pending/submission-result envelopes that already carry acceptance/delivery/read evidence retain their previous evidence-only classification and fingerprints; the supplied delivery state machines do not emit that combination.

Normalized remote Failed, Undelivered and Deferred receipts without a specific bounce classification increment separate RemoteFailedEvent, RemoteUndeliveredEvent and RemoteDeferredEvent counters. They use the same trusted exact delivery correlation and source-envelope conflict/deduplication boundary. These are provider observation event counts, distinct from a locally rejected submission or unique delivery Rejected fact. A later remote failure preserves earlier acceptance and cannot create delivered/read evidence; an older accepted receipt cannot erase a recorded failure observation. Reporting does not automatically resend, change consent or disable a destination from these generic receipts. A classified bounce remains in its explicit hard/soft/undetermined counter instead.

RecordExposureAsync records a stable logical exposure ID, original observation time and explicit conversion deadline (positive, at most 365 days). Holdouts need no fake delivery. RecordConversionAsync requires that exact exposure/binding and a trusted application outcome time inside its window. Missing exposures are retryable and consume no conversion identity. ConvertedExposures counts each exposure once; Conversions counts distinct outcome event IDs. Exposures are distinct units only when the application enforces one immutable exposure ID per campaign/unit, as the optional experiments integration does. Compare one exact campaign/experiment revision/cohort and common window policy. These descriptive rates do not establish causal business lift.

Every identity has immutable exact-content conflict detection. Full scope is part of isolation. Retention monotonically rejects new observations before its UTC floor and redacts bounded receipt detail; it permanently preserves compact fingerprint tombstones, delivery flags, frozen admissions, exposures/windows and aggregate counters. Changing the timestamp cannot recycle an old event. Capacity is explicit: the reference stores allow at most 10,000 records in each admission/delivery/exposure/receipt/aggregate family and a 16 MiB document per scope; configure smaller limits at construction consistently across clients. Refusal consumes no identity. Cleanup does not recover identity capacity; retire a complete scope only under an application-owned archival/replay policy. Memory also bounds scopes to 1,024 by default and is development-only, with no restart guarantees.

QueryAsync returns at most 1,000 key-ordered rows; cursors are bound to the complete query. Each page is a live, internally atomic read; concurrent ingestion can change subsequent pages. ReportingCsv.ExportAsync streams aggregate rows with a 10,000-row ceiling, cancellation and CSV formula escaping. IDs are absent by default; only an explicitly trusted caller can select internal campaign/experiment/variant IDs. The export throws on exceeding its row bound, so discard a partial file on failure. Pause ingestion or export an application snapshot for a single point-in-time result. No recipient-level export is supplied.

Custom implementations must atomically serialize identity/capacity checks, immutable mapping, watermark, all related facts, exposure flags and aggregate deltas. Failed/cancelled writes publish none of them; duplicate/conflicting/uncorrelated input must not partially update counters. ReportingStore supplies shared workflows with a bounded row-access transaction hook; the default adapter preserves the existing TransactAsync document boundary for custom stores. PostgreSQL supplies indexed rows and retained capacity metadata behind that same workflow. The reusable test contract in ReportingStoreContract.cs runs against memory, a separate custom backend and independent PostgreSQL clients.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on EnvelopeFlow.Reporting:

Package Downloads
EnvelopeFlow.Experiments.Delivery

Frozen campaign experiment admission, delivery-free holdouts and reporting comparisons.

EnvelopeFlow.Reporting.Stores.Postgres

Optional atomic PostgreSQL campaign reporting aggregates and retained observation identities.

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 72 11/9/2026