Dispatch assessment read: internal building block
Channels::DispatchAssessmentRead resolves a configured channel assessor in
trusted application code and delegates to Core::DispatchAssessmentRead. Core
combines DispatchSelection, DestinationSelection and ChannelAssessment
without depending on Visitor or a particular channel. Only email is currently
configured. Unsupported channels fail even if no selected recipient has a
destination. Neither API performs authentication or authorization: the product
must authorize tenant, operation, recipients, resources and channel first.
The caller resolves inputs and invokes this read inside the same tenant-scoped
REPEATABLE READ transaction. The snapshot can begin before the first selection
query, when the tenant context is established. Results must be used within that
transaction; this API does not write or freeze a dispatch, group deliveries,
perform external calls or send anything.
For every selected recipient, the result preserves its Core resource-link reasons and returns one assessment for each active linked destination in the selected channel. It reassesses the stored original value, rather than treating the stored normalization as a new assessment. Distinct recipients sharing a destination retain separate entries. An empty destination array means no active destination for that channel; it does not distinguish absent from inactive. An excluded assessment is a distinct outcome, not a missing destination or a successful delivery. Unknown channels, invalid results and unexpected assessor errors abort the read; they must not be reclassified as invalid contacts.
Core accepts an assessor supplied by trusted code and does not prove that the
assessor matches a channel; normal application composition must use the
Channels entry point. User input must never choose a Ruby class or callback.
The existing limits of 1,000 supplied recipient IDs and 5,000 reasons apply;
future batch limits and resource behavior require design. Assessment results
contain personal contact values: restrict access and do not log them. This is
not a provider adapter or a production dispatch contract.