EnvelopeFlow.Delivery.Abstractions
0.1.0-alpha.3.1
dotnet add package EnvelopeFlow.Delivery.Abstractions --version 0.1.0-alpha.3.1
NuGet\Install-Package EnvelopeFlow.Delivery.Abstractions -Version 0.1.0-alpha.3.1
<PackageReference Include="EnvelopeFlow.Delivery.Abstractions" Version="0.1.0-alpha.3.1" />
<PackageVersion Include="EnvelopeFlow.Delivery.Abstractions" Version="0.1.0-alpha.3.1" />
<PackageReference Include="EnvelopeFlow.Delivery.Abstractions" />
paket add EnvelopeFlow.Delivery.Abstractions --version 0.1.0-alpha.3.1
#r "nuget: EnvelopeFlow.Delivery.Abstractions, 0.1.0-alpha.3.1"
#:package EnvelopeFlow.Delivery.Abstractions@0.1.0-alpha.3.1
#addin nuget:?package=EnvelopeFlow.Delivery.Abstractions&version=0.1.0-alpha.3.1&prerelease
#tool nuget:?package=EnvelopeFlow.Delivery.Abstractions&version=0.1.0-alpha.3.1&prerelease
Delivery abstractions
Application-replaceable atomic message admission and bounded fenced work contracts. Provider acceptance, delivery and read evidence are distinct. Unknown submissions are quarantined until an explicit audited replay accepts duplicate risk. This package has no database, provider, HTTP endpoint or conversation dependency.
Application-defined delivery payload text must be well-formed Unicode and at most 262,144 UTF-8 bytes. Request admission validates it before fingerprinting; the public PostgreSQL writer/reader enforce the same rule. Invalid UTF-16 is rejected with sanitized errors rather than substituted, preserving exact payloads and idempotency distinctions across memory and durable storage. Valid surrogate pairs and literal replacement characters remain distinct inputs.
Explicit submission decisions
The ordinary DeliveryDispatcher constructor continues to run every ISubmissionGuard in order, cancel on any false, and propagate guard exceptions/cancellation as before. Richer decisions are selected explicitly with DeliveryDispatcher.WithSubmissionDecisions(store, transports, pipeline, ...); registering an evaluator does not alter existing constructor/DI behavior.
SubmissionDecisionPipeline contains at most 64 non-reserving ISubmissionDecisionEvaluator preflights and one optional ISubmissionReservation. All preflights run in order. Any suppress outcome dominates allow/defer; the first suppress reason is retained. Multiple valid deferrals keep the latest RetryAt minimum, normalized to UTC. A final reservation runs only if all preflights allow and the target remains unexpired with an available transport. It must atomically combine all reserving constraints, spend no slot for defer/suppress, and make allow idempotent per full scoped delivery. Accepted/unknown attempts keep conservative reservations; this contract does not refund uncertain work.
BooleanSubmissionDecisionEvaluator explicitly maps a side-effect-free Boolean guard to allow/suppress. Do not wrap the existing RecipientPolicyGuard as a preflight: it calls TryAdmitAsync and spends frequency reservations. Keep that guard on the legacy path or replace it deliberately with a non-reserving preflight and one final atomic reservation adapter. No arbitrary sequence of independently spending reservations is supported.
Reason diagnostics are fixed SubmissionDecisionReason enum codes, never free-form user/provider text. Allow requires Allowed and no retry instant. Suppress requires a non-allow reason and no retry instant. Defer requires a QuietHours, FrequencyLimit or ApplicationDeferred reason and a finite instant strictly after evaluation time and before the original expiry. Missing consent/suppression cannot become deferral by adding a future date. Invalid/null/unknown enum combinations or evaluator exceptions fail closed with a terminal revision-CAS cancellation and no provider call. Host cancellation propagates without policy cancellation; it may leave a lease to be recovered normally. Exceptions carrying private details are not propagated from the rich policy path or attached to events.
Deferral requires optional IDeliveryDeferralStore, not a new mandatory IDeliveryStore member. Set requireDeferralSupport: true on the pipeline to reject an unsupported store during composition before any claim. Otherwise an unexpected defer with no capability terminal-cancels instead of submitting or creating an immediate retry loop. Scheduling exceptions also fail closed; host cancellation remains cancellation. DeferAsync receives the trusted scope/ID, expected revision, claim fence, UTC minimum and fixed reason. It must atomically verify the active eligible claim, release it, preserve expiry/attempts, enforce bounds and record evidence. false indicates stale ownership or a store-owned terminal bound, so the dispatcher stops without cancelling a potentially newer claim.
T01 tests use a small custom scheduling probe to verify composition and ordering. The interface itself promises no concrete durable implementation; memory/PostgreSQL transitions, schema, scheduling limits and restart guarantees belong to E10 T02. Registration/install freshness remains the host's live preflight/provider binding guard responsibility, using the original queued trusted recipient and payload rather than client-selected authority.
Bounded policy scheduling
IDeliveryDeferralStore is an optional capability. DeliverySnapshot.Deferrals counts successful policy waits separately from provider Attempts; the original positional constructor and deconstruction are unchanged. Supplied stores accept DeliveryDeferralOptions with defaults of 32 waits, a 30-day horizon from the store clock, and one second of minimum forward progress. Valid settings allow 1–10,000 waits, a positive horizon of at most 365 days, and progress of 1 millisecond–1 hour within that horizon.
DeliveryDeferralRules shares the scheduling rules with application-owned adapters. A future RetryAt is a minimum: a short positive wait is raised to the progress bound, and storage precision must round it later. A time at or before the store clock, unsupported reason, exhausted count or horizon stops owned work with fixed-reason Cancelled evidence. A requested/raised minimum at or beyond the original expiry stops it as Expired. The due time and expiry of terminal refusals stay unchanged. Only quiet hours, frequency limits and application deferral are scheduling reasons; missing consent and suppression cannot be made into waits.
The adapter must verify full scope, active Pending claim, fence and expected revision atomically. Successful scheduling persists due time, increments Deferrals and revision, releases/fences the claim and writes exactly one application-outbox event in the same transition. It never increments provider attempts or extends expiry. Stale/expired leases, cancellation, Submitting, Accepted and Unknown work cannot be deferred. False may mean stale ownership or an owned terminal transition; callers must not cancel a newer claim. On resumption, the dispatcher re-evaluates live preflights before its single final reservation. Scheduling remains operational data even when conversations and history are disabled.
| 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 (13)
Showing the top 5 NuGet packages that depend on EnvelopeFlow.Delivery.Abstractions:
| Package | Downloads |
|---|---|
|
EnvelopeFlow.Delivery
Optional delivery orchestration and development state machine. |
|
|
EnvelopeFlow.Stores.Postgres
Explicitly initialized PostgreSQL delivery and device persistence with fenced updates. |
|
|
EnvelopeFlow.Campaigns
Bounded campaign scheduling with replaceable durable state and admission callbacks. |
|
|
EnvelopeFlow.Digests.Abstractions
Optional bounded digest grouping, frozen preparation and replaceable store contracts. |
|
|
EnvelopeFlow.Routing.Abstractions
Application-owned channel routing and optional atomic fallback contracts. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-alpha.3.1 | 98 | 11/22/2026 |
| 0.1.0-alpha.2.1 | 189 | 11/9/2026 |