ADL 0.6.0 reference · Review draft 1 · November 14, 2026.
Contents · Source map · Evidence
The 0.6 edition note
This chapter retains the detailed language contract and its source-specific observations. Its chapter number and numbered sections remain stable. The 0.6 additions do not by themselves change this subject’s defaults or supply fresh execution evidence for it.
Reverification should cover delivery, retry, templates, and handling at notification boundaries. Use the original examples and evidence links below to recover the earlier test context. The new edition’s source map records this chapter as inherited detail; the current draft does not claim those historical tests were rerun.
Retained reference detail
The numbered sections below are carried from 35-notifications.md. Their original baseline and evidence remain attached to the source. Statements about “current” or “checked” behavior in this retained text refer to those original observations unless the edition note explicitly updates them. This is a consolidated draft, not a claim of complete re-verification.
35.1 Scope and governing changes
Notifications turn a declared history event into one or more channel dispatches. This chapter owns notification declarations, recipient resolution, interpolation, provider selection, throttling, and delivery observations. ADL 24 owns the history event and its captured data; ADL 36 owns scheduling; ADL 39 owns generated documents.
The inherited notification chapter (v0.3.1, retired)
is amended by delta §18 item 32:
type: digest is retired in favor of type: summary, with
VALUE_RENAMED for the old value. The current source selector is
source: history; the former notification on key receives KEY_RENAMED.
A history event itself uses trigger, as ADL 24 explains. These are different
keys at different declaration locations.
Renaming a type does not implement its delivery mode. The checked runtime still
sends a history-triggered summary notification immediately. The chapter keeps
that behavior separate from the name change’s governing requirement.
35.2 Declaration, defaults, and placement
Declare a notification under resource.notifications, or under
domain.notifications with an explicit resource. Both forms reach the same
notification engine. The checked domain-level fragment is:
# Domain fragment; domain.yaml contains the complete resources and history.
notifications:
createdMessage:
resource: Ticket
source: history
event: created
channels: [log]
template:
subject: Created {title}
body: To {recipient}; missing {missing}; actor {$actor.name}
The resource declares a history event named created, with trigger: create
and captures for title and recipient. The built-in log channel in this
example records a local dispatch; it is not email delivery.
| Key | Accepted representation and current default |
|---|---|
resource | Domain-level target resource name; when omitted, the one resource that declares the history event |
source | String, history; schedule has no subscription path here |
event | History event name, empty |
type | String, instant; summary retains additional fields |
channels | Array of channel names, empty |
recipients | Mapping described in §35.3 |
template.subject, template.body | Strings with placeholders, empty |
priority | String, normal; passed to the channel |
condition | AEL expression, empty means eligible |
throttle | Duration string or none, default none |
escalation | Array of delayed tiers; retained but not executed |
schedule, query, emptyBehavior | Summary metadata; empty behavior defaults to skip |
The inherited text requires a usable event, channels, recipients, and template.
The native builder does not enforce every completeness or value restriction.
A missing event prevents subscription; an empty channel array has no
work to dispatch. A domain-level history notification that names no resource
takes the one resource that declares its history event. When no resource
declares the event the document is refused with
NOTIFICATION_RESOURCE_UNKNOWN, and when several do it is refused with
NOTIFICATION_RESOURCE_AMBIGUOUS, naming them; add resource: to say which
(#1855). Before, such a notification loaded and never fired. Native acceptance of an incomplete declaration is not a new
permission to omit what an actual contact channel needs. The addressless log
and webhook paths are a specific implementation case.
35.3 Captures, recipients, and interpolation
The subscriber reads the history message’s data object as its record. It does
not fetch the current resource row for ordinary notification delivery. Fields
needed for recipients or message text must therefore be available in that
captured payload. Automatic notifications created from a rule are governed by
ADL 23; their desugaring can derive captures from message
placeholders, but that does not repair an arbitrary hand-written history pair.
| Recipient member | Current execution |
|---|---|
field | Reads a captured value as a user ID |
additional | Reads further named captured fields |
roles | Parsed; the engine does not perform an auth-plugin role lookup |
static | Appends literal addresses |
exclude.field | Removes matching nonstatic user IDs |
Nonstatic recipients are deduplicated by user ID. Static entries are appended without that deduplication and survive user-ID exclusion. The checked recipient fixture has duplicate static addresses and records both dispatch attempts.
The inherited promise of contact-profile resolution exceeds this engine’s
implementation. It uses a nonstatic user ID as an email address and does not
populate that recipient’s phone or Slack identity. A channel named email
selects the email field; sms selects phone; slack selects Slack identity.
Static addresses pass through as supplied. Consequently, a UUID user ID does
not prove a usable email destination, and selecting a provider under a custom
channel name does not automatically select the right contact field.
log and webhook are special channel names: they dispatch once per channel,
without iterating recipients. Other names dispatch once per resolved recipient.
The channel name and provider implementation therefore have distinct effects.
Message placeholders include {field}, {$record.field}, {$actor.id},
{$actor.name}, {$now}, and {$date}. Missing values collapse to empty text.
The actor is assembled from available history metadata, including actor captures.
The engine also exposes history label/detail/event/severity to interpolation.
It does not run arbitrary AEL inside each pair of braces.
A nonempty notification condition is evaluated against the captured record.
False or evaluation failure suppresses the notification before recipient
resolution and produces no ordinary dispatch row. This differs from a delivery
attempt that fails and is recorded.
35.4 Channels and observed provider results
domain.channels maps channel names to provider/settings mappings. Settings
other than provider are retained as strings or serialized JSON. Credentials
and service deployment belong to the platform configuration discussion; this
chapter describes which declarations select an available implementation.
| Provider/name | Current native selection |
|---|---|
Built-in log | Always registered; dispatch logging is its only effect |
provider: ses | Constructs the AWS email channel when required settings are present |
provider: sns | Constructs the AWS SMS channel when required settings are present |
provider: http | Constructs a webhook channel when url is nonempty |
Channel named webhook | Uses webhook construction when url is supplied, regardless of provider label |
| Unknown provider or incomplete supported provider | No adapter registered for that name |
SMTP, Slack, and Twilio provider labels do not construct corresponding adapters
in this source. Naming a channel email does not provide SMTP implementation.
No SES/SNS service, credentials, real mailbox, or real phone is exercised by the
chapter’s tests; those constructors are source-inspected boundaries.
The HTTP channel does send a POST in the current build, despite an obsolete
header comment describing a placeholder. It sends JSON with subject, body,
and priority, adding address when nonempty. Configured headers are forwarded.
A 2xx response is success; a non-2xx response or network error fails the send.
The send passes the outbound address policy of
ADL 44.6.1 first: a
loopback or private receiver must be listed in adl.outbound.allowedOrigins, a
link-local or metadata address is always refused, and a redirect is not
followed (#1399).
Connection/read timeouts are configured in the channel code. The examples use
a disposable receiver bound to loopback and record both 202 and 503 responses,
request payloads, and the notification log. No external recipient is contacted.
Ordinary dispatch falls back to log if its requested adapter is absent. It
records skipped, not sent delivery. A registered adapter returning failure
records failed. The local log channel can record sent even though it performs
no external transport. Interpret status together with channel/provider evidence.
35.5 Timing, throttling, and summary limitations
Notification processing is synchronous in the history subscriber. A slow HTTP provider can delay the request that publishes the event, even though the notification failure does not turn an already-successful write into a failed resource response. The runtime has no notification retry queue in this path.
Throttle state is keyed by notification name and record ID in the domain’s
throttle table. The engine can recover the record ID from the history envelope
when it is not a captured field. A repeated eligible notification inside the
window records throttled and avoids its channel work.
The state is updated after any attempted dispatch, including a skipped fallback
or a failed provider send. The failed-channel-throttle case records an absent
SMTP adapter as skipped, then suppresses the next notification. Throttle means
a window over attempts, not confirmed successful delivery. Invalid/nonpositive
durations do not create a usable suppression window.
summary retains a schedule, query, and empty-result preference, but the engine
does not consume them as a batching mechanism. The history subscription also
does not filter by notification type. The checked summary fixture dispatches
immediately. source: schedule creates no notification subscription. Escalation
tiers do not create timers or follow-up attempts. These settings must not be
used as evidence of aggregation, escalation, or eventual delivery.
35.6 Management API and diagnostics
The generated domain endpoints are:
| Method | Path | Result |
|---|---|---|
| GET | /api/v1/{domain}/notifications/log | Bounded dispatch records |
| POST | /api/v1/{domain}/notifications/test | Direct channel test |
Both require admin or administrator; other callers receive FORBIDDEN.
The log supports channel/status/notification/time filters and a bounded limit.
It returns the selected records and their count, not an independent total over
all stored dispatches. Consult ADL 31 for envelopes.
The direct test body uses to, not address:
{"channel":"log","to":"local-probe","subject":"Probe","body":"Local log only"}
This operation bypasses conditions, recipient lookup, and throttling. It returns
MALFORMED_REQUEST for a missing channel/destination, CHANNEL_NOT_FOUND for an
unregistered adapter, and SEND_FAILED with HTTP 502 for a failed send. Successful
adapter invocation returns data.status: sent and logs under _test. Unlike
ordinary notification dispatch, the test endpoint does not hide a missing
adapter behind a fallback.
35.7 Identity migration, export, and evidence limits
Delta §13 changes the bus namespace. Current history publication can emit both legacy and canonical site/major topics, but the notification subscriber still constructs the legacy history topic. With legacy publication disabled, the canonical-only example creates a ticket and observes no notification dispatch. A canonical management route is not evidence that its event consumer migrated.
Model recovery has two distinct gaps. The exporter refuses a domain with channel configuration or domain notifications as a lossy unsupported projection. A resource-only notification can instead pass export and lose its notification configuration. The checked source-backed registry reload retains it; forced source-free restoration follows the lossy model representation. Keep the actual source document with recovery records.
The independent modeller still validates instant|digest and rejects the new
summary value. It also requires recipient sources for the native addressless
channel examples. Those findings are recorded separately from production
parser/runtime behavior. The evidence record
identifies exact source hashes, complete inputs, local HTTP results, assertions,
and the limits of the provider checks.