> This page is for version 5.1 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 5.1 (Latest) (default): https://docs.nvidia.com/holoscan/sdk-user-guide/5-1-latest/llms.txt
> - ltsb-2.0: https://docs.nvidia.com/holoscan/sdk-user-guide/ltsb-2-0/llms.txt
> - 5.0: https://docs.nvidia.com/holoscan/sdk-user-guide/5-0/llms.txt
> - 4.6: https://docs.nvidia.com/holoscan/sdk-user-guide/4-6/llms.txt
> - 4.5: https://docs.nvidia.com/holoscan/sdk-user-guide/4-5/llms.txt
> - 4.4: https://docs.nvidia.com/holoscan/sdk-user-guide/4-4/llms.txt
> - 4.3: https://docs.nvidia.com/holoscan/sdk-user-guide/4-3/llms.txt
> - Archives: https://docs.nvidia.com/holoscan/sdk-user-guide/archives/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sdk-user-guide/llms.txt.

External device state can make an operator eligible without an input sample. For example, the
camera leg of a sensor-fusion application becomes readable while the IMU leg continues to receive
ordinary samples. Choose eligibility, observation and payload processing independently.

> **You will learn**
>
> * How a native source reaches its consuming Runtime partition
> * How to attach a live resource after compilation and retain it through cleanup
> * When to choose rising or level Condition firing
> * How Python asyncio owns a run while consuming bounded Channel output

The application-facing Core and Essential APIs on this page, including their Python counterparts,
are **Beta**. Native provider registration and extension interfaces are **Prototype**. See
[API stability](/holoscan/sdk-user-guide/introduction/api-stability) for compatibility commitments;
using these features through Stable graph entry points does not change their classification.

The complete Linux examples live in `examples/external_readiness/`. They use pipes and native
status objects, so they need no capture device or RDMA hardware. Their assertions check semantic
behavior; their printed counts and timings are not performance measurements.

## Choose eligibility, observation and progress

| Eligibility        | Observation                                                                    | Sleeping placement                                                                                                           | What compute does                                                                                                 |
| ------------------ | ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| Core `OnReadable`  | Essential `FDReadinessBinding`, non-consuming native FD observation            | Kernel descriptor readiness wakes the owner when observation credit permits; withheld descriptors may require bounded retry. | Read or dequeue application data with nonblocking operations; handle EOF according to the selected hangup policy. |
| Core `OnDoorbell`  | Essential `RDMACompletionBinding`, cumulative native completion-event progress | The nonblocking completion-channel descriptor wakes the owner; observation drains a bounded batch of events.                 | Poll the application's CQEs; Runtime does not consume CQEs.                                                       |
| Core `OnNotified`  | Core `NotificationSender`, acquired from a live forward Arm callback           | Accepted posts wake the owner through native notification.                                                                   | Consume application-owned work after each accepted counted post.                                                  |
| Core `OnNotified`  | Essential `CallbackNotificationBinding`, bounded foreign callback posts        | The backend callback posts to Runtime and wakes the owner; Runtime adds no callback polling thread.                          | Consume the backend's retained event or work item.                                                                |
| Core `OnCondition` | Native operator/resource method or `ConditionFlag`                             | An explicit positive sampling period supplies the next due evaluation; owner maintenance may wake earlier.                   | Consume available work or handle a state transition.                                                              |
| Core `OnPredicate` | Existing input-update or clock-driven data predicate                           | The admitted input or clock driver supplies eligibility.                                                                     | Process the selected input samples.                                                                               |

Explicit busy placement scans on the existing owner lane instead of parking. The table describes
observation policy, not a latency guarantee; available activation credit and pending owner work
also determine when observation can progress.

An FD is not a Boolean sampling period. Sleeping FD observation normally waits for kernel readiness
and stop when the active descriptor can participate in the waitset; withheld descriptors and pending
owner work use the bounded retry path described below. A sleeping Condition needs an explicit positive
`poll_period`. Explicit busy placement
accepts omission or ignores a valid declared period, so the same Condition declaration can serve
both placements. Invalid periods still reject. Both use the existing partition placement described in
[Configuring applications](/holoscan/sdk-user-guide/configuration/configuring-applications#native-readiness-wait-modes).

```text
One Runtime partition thread:
    wait for FD / evaluate native Condition
        -> admit bounded activation -> compute -> retire activation
        -> observe again when source credit permits

Foreign callback thread:
    bounded post/fail -> Runtime partition -> compute
```

FD observation and native Condition evaluation share the consuming partition's thread with
compute. They do not run a Python evaluator or require an observer helper thread. A foreign SDK
callback still arrives on that SDK's thread and uses the callback binding.

The pipe consumer attempts one nonblocking read per activation. `EAGAIN`, `EWOULDBLOCK` and
`EINTR` mean no work for that activation: no record count advances and Python emits no sample.
The finite eight-record example treats EOF before completion as an explicit truncated-burst
failure; other applications may select their own EOF completion or failure policy. Runtime
observation does not choose that payload policy or consume a byte.

> **Readable does not mean idle-friendly**
>
> An unread readable FD can keep a worker continuously active, including in sleeping placement.
> Retiring an activation permits another level observation; sleeping placement does not throttle a
> perpetually ready source. Keep each compute bounded and arrange application progress or stop.

## Declare cold state, attach live state

Operator headers include `holoscan/essential/fd_readiness.hpp`. Application code that stages
`bind_fd` or `bind_resource_fd` includes `holoscan/essential/fd_run_bindings.hpp`.

The pipe example declares a typed native resource and associates its readable source in `setup`:

```cpp
spec.resource(pipe_, "pipe", BindingSupply::kExternalRequired);
binding_.declare(spec, ready_, "ready", pipe_);
```

This excerpt is inside `PipeReader::setup`; its resource type, members and complete lifecycle are
defined in the built example. Graph and Plan retain declarations, not a live pipe or a device
pointer. After compilation, select the exact authored operator/resource and stage both ownership
and its derived FD atomically:

```cpp
auto owner = std::make_shared<PipeBurst>();
RunBindings bindings;
auto bound = essential::bind_resource_fd(bindings, select_resource<PipeBurst>(op, "pipe"), owner);
if (!bound) throw RuntimeError(bound.error());
auto session = run_async(plan, std::move(bindings));
```

The SDK captures a close-on-exec duplicate immediately. It neither changes the original file
status flags nor reads payload. By default, `FDConsumptionPolicy::kNonblockingDescriptor` requires
`O_NONBLOCK` at capture time; a blocking descriptor rejects before installation. Python names this
default `readiness.FDConsumptionPolicy.NONBLOCKING_DESCRIPTOR`. This admission requirement does not
guarantee that every operation on a regular file or device is bounded; the application must choose
bounded consume operations supported by that descriptor's API.

An application whose **every actual consume operation is independently nonblocking** may explicitly
choose `FDConsumptionPolicy::kNonblockingOperations` through `FDReadinessOptions::consumption`.
Python uses `readiness.FDConsumptionPolicy.NONBLOCKING_OPERATIONS` in
`readiness.FDReadinessOptions(consumption=...)`. This advanced declaration permits a descriptor
without `O_NONBLOCK`. For example, a socket consumer may use `recv(fd, buffer, size, MSG_DONTWAIT)`
on every receive and handle `EAGAIN`/`EWOULDBLOCK` as no work. The declaration does not permit a
blocking read after a readiness check. Readiness can
change before compute, and duplication shares file-status flags with the original descriptor.
Neither policy changes those flags. Keep the declared consumption contract valid throughout the
attachment, including when other code shares the underlying open file description.

`FDHangupPolicy::kReadable` treats hangup as readable EOF; the application handles the resulting
read. `kFail` treats hangup as fatal. `POLLERR` and `POLLNVAL` are fatal under both policies, including
when observed together with readability. When activation credit suppresses ordinary observation,
the owner still checks native failure status during its scans without publishing extra data credit.
This check does not consume payload, add an observer thread, or turn a failed source into work.
With the opt-in `FDHangupPolicy::kFail`, an observed hangup can cancel an already admitted
activation before its `compute()` runs, even when unread data remains. A compute that finished
before the hangup is observed remains finished. Use the default `kReadable` policy when a finite
stream must drain its last data and EOF; `kFail` gives failure precedence over pending work.

Admission acquires the resource's exclusive use before Configure;
the operator resolves that same owner through `context.resource(slot)`. Invalid types and duplicate
entries reject during staging without consuming the staging set. Admission checks the compiled
selector identity, complete resource/source groups and selected worker process group before
lifecycle entry. A failed run remains inspectable through its session diagnostics. Serialize calls
that stage, move, close or consume the same `RunBindings`; independent sets have independent state.

`BindingSupply::kExternalOrOperatorDefault` permits a pre-run override of an operator-owned
default. `kOperator` restricts attachment to the operator itself. With a manual default, the operator
resolves any external override during Configure; when none is supplied, it creates its resource
there and attaches its FD in Arm. The associated resource and FD must always describe the same owner.
Query `context.binding_origin(source)` before constructing or opening a manual default resource;
return from that creation path when the selected origin is `BindingOrigin::kExternal`, and skip
the corresponding manual Arm attachment. An Arm bind under external origin is rejected.
An active `kExternalOrOperatorDefault` source must declare an Arm provider or a matching grouped
FD factory; compilation rejects a missing default provider even when an application intends to override it.
`kExternalRequired` instead makes a missing attachment an admission failure. Do not independently
bind a source belonging to a declared resource/source group.

Native C++ providers can declare a default with
`spec.resource(slot, name, supply, ResourceFactory<T>{create, release, stage})`.
All three recipe inputs are required. Creation returns `expected<std::shared_ptr<T>, Error>` and
receives the live `LifecycleContext` at its explicit Configure-through-Arm stage. Runtime acquires
and validates that owner before user code can use it; `context.resource(slot)` then returns the
selected owner. A selected external override suppresses both factory functions, including when its
admission fails. Registered resource Conditions and grouped FDs are prepared before observation,
even when the operator has no user Start callback.

The native release function returns `expected<void, Error>`, is `noexcept`, and runs while Runtime
still holds exclusive use. It must use the provider's authorized teardown path without reacquiring
that lease. Configure-through-Allocate defaults release after applicable Release; WarmUp/Arm defaults
release after applicable Stop. Cleanup first retires observation and previously submitted Runtime
work. A successful release leaves retained wrappers closed or idle and keeps retained backing safe
through independent ownership. If that cannot be guaranteed, it returns an error; uncertain
resources and leases remain retained, and release is not retried automatically. Synchronizing
Runtime streams does not retire arbitrary external holders or external streams.

A Start-only restart retains the resource and its observation attachment. An Arm restart releases
an Arm-created default after Stop and the retirement barrier, then creates its replacement; a
Configure-created default remains selected through that Arm-only restart. If a replacement attempt
fails, Runtime cleans every acquired candidate before restoring any old configuration. Cleanup
failure stops restoration and retains the uncertain ownership. Successful restoration creates or
reacquires the old configuration instead of reviving an already closed owner.

Every run consumes a fresh `RunBindings`. Ordinary completion, stop/join and context exit preserve
Plan reuse with fresh Operators. Stop fences old source authority before operator cleanup;
restarts create new observation generations. Retained stale callback emitters cannot post into a
later run. A module must protect managed close/reconfigure with the same exclusive resource lease;
retaining an owner cannot make arbitrary raw descriptor mutation safe.

Python uses `hs.ResourceSlot`, `hs.select_resource` and
`holoscan.readiness.bind_resource_fd`. A native provider registers the concrete resource type with
`holoscan::python::register_resource_type`. The separately built example provider demonstrates this
installed header contract. For an independently declared FD source, `readiness.bind_fd(..., fd=...)`
accepts an integer or a `fileno()` object: Boolean inputs are rejected, `fileno()` is called once,
and an object owner is retained through joining. An integer carries no application owner.

### A coherent resource in Python

The built `readiness_demo.py` uses the registered `PipeBurst` type from its native provider,
`readiness_demo_native`. This is its complete FD flow; `compile_graph` is the same file's CLI
placement helper, and `native` names that provider. Run it with `python3 readiness_demo.py --wait-mode sleeping` from the
configured examples environment. A coherent native-resource flow requires that provider; a plain
Python FD application can instead stage an integer or `fileno()` owner with `bind_fd`.

```python
def fd_demo(args):
    class Reader(hs.Operator):
        pipe = hs.ResourceSlot[native.PipeBurst]("pipe", resource_type=native.PipeBurst)
        ready = hs.ReadableSource("ready")

        def __init__(self):
            self.binding = readiness.FDReadinessBinding()

        def setup(self, spec):
            spec.resource(self.pipe)
            spec.readable_source(self.ready, capacity=1)
            self.binding.declare(spec, self.ready, supply=hs.BindingSupply.EXTERNAL_REQUIRED)
            spec.resource_source(self.pipe, self.ready)
            spec.lifecycle().stage(hs.lifecycle.LifecycleStage.CONFIGURE, "configure")

        def configure(self, ctx):
            self.owner = ctx.resource(self.pipe)
            assert self.owner is not None

        def contract(self):
            return hs.Contract().trigger(hs.OnReadable(self.ready))

        def compute(self, ctx):
            record = self.owner.consume()
            if record is not None and record == 8:
                ctx.request_completion()

    graph = hs.Graph("python-fd-modes")
    op = graph.op(Reader, "reader")
    plan = compile_graph(graph, op, args)
    owner = native.PipeBurst()
    with hs.RunBindings() as bindings:
        readiness.bind_resource_fd(
            bindings, hs.select_resource(op, "pipe", resource_type=native.PipeBurst), owner
        )
        with hs.run_async(plan, bindings=bindings) as session:
            assert session.wait(5), session.summary()
            session.wait()
        assert session.termination is hs.RunTermination.REQUESTED_COMPLETED, session.summary()
    assert owner.consumed == 8
    assert not owner.in_use
    print("fd_wait_modes: records=8 ordered=1 observer=partition-owner")
```

`ResourceSlot[T]` and `ResourceSelector[T]` support Python's evaluated generic annotations and
preserve the selected owner's type in static checking. The explicit `resource_type` and matched
native descriptor remain authoritative at runtime; subscription does not register a Python class
as a native resource. `context.resource(slot)` can return `None` for a manual default or before a
selected factory stage. Resource selectors are created by `select_resource`, not their constructor.

### Query the selected adapter origin

In C++ and Python, `context.binding_origin(source)` accepts a `ReadableSource`,
`NotificationSource` or `DoorbellSource` with an actual FD, callback or RDMA adapter declaration.
C++ also accepts the corresponding typed source reference. Query only from the owning Operator's
active lifecycle callback. FD adapters report the selected external/default origin; callback and
RDMA adapters currently report `Operator` (`hs.BindingOrigin.OPERATOR`).

A bare `NotificationSender` source has no adapter origin and rejects the query. Conditions,
Condition selectors and resource slots do not expose adapter origins; external resource ownership
is a separate fact. Python reports unsupported argument families directly, while valid source
families retain their normal context, ownership and lifetime errors. A cold notification or
Doorbell selector remains a valid typed identity, but does not grant external attachment authority:
`bind_fd` accepts only the FD family.

Select a Condition after its final Params are set. Selection preserves its normalized contract;
changing those Params requires a fresh selection. Invalid Condition options retain their original
error code and cause, with bounded operator/Condition context. A valid but absent Condition reports
`NotFound`; an old selection whose contract changed rejects at admission.

### Native defaults from Python

A native extension registers `ResourceFactory<T>{create, release, stage}` together with its
concrete resource type and exporting module through `holoscan::python::register_resource_type`.
The application selects that registered recipe explicitly by passing
`factory=hs.ResourceFactory(resource_type=provider.ResourceType)` to `spec.resource`.
Here `provider.ResourceType` must be the actual class exported by that native provider; this is a
signature sketch, not a built-in Camera type or an independently runnable Python factory.

The shipped `configured_capture` example demonstrates the supported manual-default lifecycle;
it does not register a factory recipe. Native factories and manual defaults share the external
override and ownership rules described above.

Registering the type does not change existing declarations without `factory`. A selected external
owner still suppresses default creation and release. Python supplies a typed descriptor; creation
and release remain native lifecycle functions and do not invoke Python factories.

Providers read declared Python Params through `holoscan::python::resource_factory_params(context)`.
NoParams returns null success; a schema-null hosted snapshot is a different case. Resolve field
descriptors from the current snapshot each time, and validate presence, shape, width and range
before device work. Validate a sequence field's shape before accepting an empty sequence. Current
Python Params remain compile-time or recompile-required; this helper does not enable live updates.

Build the extension against the same installed SDK and binding identity as Core. The supported
provider lifetime is ordinary CPython extension import. Graphs, Plans and active runs retain their
required supplier and type references; uncertain cleanup keeps the provider with the quarantined
native owner and lease. Successful cleanup may release Python references through the existing
retirement worker after joining. A retained native wrapper stays closed or idle after successful
release. Reference collection is not evidence that an extension image was unloaded.

## Configured capture ownership

The `configured_capture` C++ executable and `configured_capture.py` use a synthetic native capture
session. Each runs the same Plan twice with an operator-owned default, then twice with one external
configured owner. Both sleeping and busy placement retain the same capture semantics. Their output
shows three ordered host frames per run, including geometry, format, stride, timestamp and stream
epoch. The synthetic timestamp is deterministic; it is not a hardware or wall-clock measurement.

| Stage            | Operator responsibility                                                                                                  |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------ |
| Configure        | Resolve the supplied resource. Validate its negotiated configuration. Only create a default when the override is absent. |
| Arm              | Use the already staged external owner/FD, or bind the default owner's FD.                                                |
| Start            | Begin this attempt's stream while holding exclusive use. Roll back any partial start locally.                            |
| Compute          | Dequeue from that same owner, validate metadata and publish the frame through the ordinary output contract.              |
| Stop and Release | Stop only the stream started by this attempt. Retire observation before releasing native state and the exclusive lease.  |

The example checks host frame bytes instead of publishing camera tensors. A real Camera module
also owns negotiation, buffer queueing/return, host or CUDA memory, timestamps, loss and device-error
policy. Those responsibilities do not move into the readiness observer. A configured external
capture must be idle before admission: retention alone does not authorize stealing a caller's active
stream, silently changing its format/FPS, or closing its device. On normal cleanup it remains idle
and reusable; a fatal device error stays diagnosed.

SDK tests cover incompatible geometry/format/stride/FPS/buffer count, active capture, close after
staging, failed Start, embedded selectors and Start-only restart. These synthetic checks do not
qualify real V4L2 capture, unplug, physical FPS or CUDA output, and do not port the separate Camera
repository. See `examples/external_readiness/README.md` in the SDK for installed-source build
commands.

## Rising and level Conditions

Firing mode is mandatory: C++ `ConditionFiring::kRisingEdge` or `kLevelTriggered`, Python
`hs.ConditionFiring.RISING_EDGE` or `LEVEL_TRIGGERED`. This choice is independent of wait mode.

| Demonstration                             | Rising                                                       | Level                                                      |
| ----------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------- |
| Status initially true, then held true     | One activation until an observed false rearms it             | True can produce another activation after full retirement. |
| Three pending items; compute consumes one | One activation leaves two items while readiness remains true | Three activations drain the backlog.                       |
| A later observed false, then true         | A second state entry produces one more activation            | The next true observation is eligible.                     |

`condition_modes` runs all four status/backlog and firing combinations. Its native resource
records evaluation and activation counts and checks that evaluation and compute have the same
thread identity. Controller semaphores confirm a held-true observation and an observed false
before changing the next phase. No scheduler sleep is used as evidence that a phase was observed.
The Python consumer calls the same native evaluator through the provider's cold Condition factory.

A resource-member Condition uses the registered owner selected by `RunBindings` or materialized
by its native `ResourceFactory`. Runtime resolves the member after materialization and prepares
it before observation, including operators without a user Start callback. For manually managed
operator-owned state, bind an exact operator member and let it consult that state after startup.

> **Evaluator budgets do not interrupt native code**
>
> Keep evaluators bounded, native and nonblocking. `invocation_budget` measures wall time, including
> preemption, and is checked after return; it cannot preempt a stuck native method. Put bounded
> payload processing in compute and use a native readiness adapter for waitable devices; an adapter does not make blocking compute safe.

`max_consecutive_overruns` defaults to three and must be positive. An in-budget return resets the
count. A threshold failure reports the Condition and owner together with elapsed time, budget,
count and limit in the joined session diagnostics.

Sleeping sampling follows a grid anchored at the first actual evaluation start of each source
generation. After each evaluation, the next deadline is the first grid point after its end; missed
slots coalesce without catch-up evaluations. Holding activation credit hides the timed wake in
both modes. Level also waits for full retirement before evaluating again; rising can observe
false and rearm during other owner scans, only when its sample is due. Held rising credit does
not schedule a wake solely to seek a false sample. Retirement retains the grid phase, while a new
source generation resets it. Neither firing mode guarantees application cadence: short pulses may be
missed and finite pending edges may coalesce under pressure. Use counted events when every event
matters. `ConditionFlag` exposes only native `get()`/`set()` state.

Sleeping owner waits are capped by a 100 ms maintenance watchdog even when a Condition has a much
longer sampling period. A watchdog wake does not force an early Condition evaluation: sampling
still follows the steady-clock due time. An active descriptor withheld by credit, an incomplete
poll, or pending owner work retains the 1 ms retry path. Closed native sources alone do not force
that retry. These are current Runtime wait bounds, not a promise of one uninterrupted long sleep
or a substitute for application-level cadence.

Supported HSDK 5.0 C++ applications using `SpinSource`, `OperatorSpec::spin_source()`, and
`OnSpin` remain supported in HSDK 5.1. Spin retains its distinct false-to-true trigger and
requires busy-poll placement for its owner. `OnCondition` is a separate HSDK 5.1 contract
with explicit firing and sampling options; it does not alias Spin. Choosing Condition is
an explicit application change, not a requirement for upgrading a supported Spin application.

A Spin declaration identifies a logical source; it does not supply an executable backend.
A referenced Spin source without an admitted backend fails before Configure, Start, or Compute.
These C++ compatibility guarantees do not add a Python Spin API or promise compatibility for
old private provider ABIs or serialized plans. Rebuild plugins and regenerate plans for the
SDK version in use. `OnPredicate` keeps its existing data-driven semantics and default firing; see
[Temporal contracts](/holoscan/sdk-user-guide/building-operators/temporal-contracts#native-boolean-conditions).

## Manual Core notifications

Applications that own producer lifetime can acquire a Core `NotificationSender` in C++ or Python.
Declare the `NotificationSource` with finite notification `capacity` and
`sender_reference_capacity`, use it in `OnNotified`, and acquire its sender from the owning
operator's live forward Arm callback. In Python, call
`context.notification_sender(self.ready)` and retain the returned `holoscan.NotificationSender`;
the class has no public constructor. StartupForward and RestartForward Arm are admitted.
RestoreOld Arm cannot acquire a new authority. `StartupForward` is initial startup;
`RestartForward` re-enters the requested forward stages for the candidate restart;
`RestoreOld` restores the previously published configuration after a failed candidate.
Python Start and Stop remain zero-argument methods;
a saved Arm context expires when that callback returns.

Acquisition does not open posting. A sender reports `NotReady` until the run's complete startup
barrier succeeds. Returning from `run_async()` or signaling an application event inside Arm does
not establish that barrier. Applications coordinate their producer with completed startup and
handle `NotReady` explicitly; posting from Arm or Start cannot seed startup. Sender access alone
supplies neither an automatic startup seed nor capacity-driven continuation or ordered output drain;
those are separate follow-up behavior.

Python `sender.post()` returns `None` for exactly one accepted notification. Each success consumes
finite source credit through activation retirement, including time spent in compute. `Backpressured`
accepts no notification; the application chooses its retry or loss policy. Runtime does not retain
an application payload in the sender. Native posting is bounded and nonblocking; the Python call
uses ordinary GIL entry, and translating a typed error may allocate Python objects.

The retirement barrier waits until old observation and admitted work can no longer use the
retiring resource or generation. Restart publication is the successful commit point that makes
the successor generation and its ingress authority current; entering an Arm callback does not
establish either boundary.

A candidate sender remains inactive until restart publication. A successful restart replaces the
source generation and makes old senders `StaleEndpoint`.
Replacing a manual sender therefore requires a restart that reaches Arm. A successful Start-only
restart does not replay Arm or provide replacement authority. A failed Arm/Start candidate that
rolls back preserves the old authority and invalidates the candidate; its initiating warning remains
in session diagnostics. Normal shutdown closes retained senders with `Closed`.

Notification witness capacity and sender-reference capacity bound different resources. Copies share
one generation authority. Retaining an old authority while acquiring a replacement consumes another
record, so size `sender_reference_capacity` deliberately or release unused authorities. The default
one-record pool is not sufficient for replacement while retaining an old authority; exhaustion
remains `ResourceExhausted`.

The sender retains independent native capability metadata without retaining a Python source,
operator, callback or RunSession. An undeclared source and an expired callback view remain distinct
typed errors. Live Configure/WarmUp acquisition is rejected by the native stage policy; shutdown
Release observes `Closed` after registry closure. In a fork child, inherited context acquisition and
sender posting reject before native synchronization with `InvalidArgument` and
`PYTHON_NOTIFICATION_SENDER_FORKED_PROCESS`. Use capabilities created in the current process.

## Foreign callbacks and RDMA

A callback backend must retain events until registration. `CallbackNotificationBinding::bind`
stages a native installer during Arm; the SDK installs it after Start and before publishing
ingress. `CallbackRegistration::own` requires native `noexcept` disconnect and drain methods.
Teardown closes posting, disconnects the subscription and drains entered callbacks before releasing
the native owner. Python registrations must come from a supported native provider; an arbitrary
Python cleanup closure cannot establish this contract.

`callback_notifications` and `callback_notifications.py` demonstrate two finite events from a
native backend thread. The latter builds its provider through the installed
`holoscan/python/callback_binding.hpp` bridge. Compute runs on the Runtime partition; Stop verifies
both events retired, the native producer joined, and a post from the retained old emitter was
rejected. The thread belongs to this simulated vendor backend, not to Runtime polling.

Native Python providers compile the installed `holoscan/python/callback_binding.hpp`,
`rdma_binding.hpp` and `resource_binding.hpp` helpers against the matching SDK and Python
binding build. Their private capsule exchange checks its family, numeric ABI version, exact
size, SDK/build identity and required callbacks before calling native code. An incompatible
extension receives a family-specific `TypeError` with matching-build guidance; rebuild it
against the selected installation. This conservative match includes the binding-library ABI,
domain and backend configuration. It does not establish a general C++ plugin ABI or support
manual extension-image unloading. Ordinary Python import errors remain ordinary import errors.

Each cold helper call retains the exporter and exact capsule through callback use and failed
native-transfer cleanup. Provider-native ownership remains separate: providers must still retain
their own native dependencies through owner destruction. The reverse resource-Condition helper
checks the calling helper's build as well as the separately validated resource provider. These
checks use the existing lazy Core/adapter imports and add no Runtime polling callback.

`CallbackEmitter.post()` accepts one event only when finite credit exists. Handle backpressure
according to the backend's explicit policy. `fail()` closes posting and preserves the first bounded
failure per source generation without fabricating a data event or retaining a Python traceback.
Each source cause identifies its owning operator and source in session diagnostics, subject to the
bounded diagnostic capacity. A restored emitter cannot accept another fatal report after that
source has failed. Python surrogateescaped path characters are escaped in the bounded UTF-8
snapshot; available SDK error codes are retained. A stale emitter is a
bounded tombstone, not a reference that keeps a run alive. Applications that own producer lifetime
can instead use the manual Core notification capability described above.

RDMA is an optional separate component: `find_package(holoscan REQUIRED COMPONENTS rdma_readiness)`
and `holoscan::rdma_readiness`. Linux builds automatically include the native backend when verbs
headers are available. The backend loads `libibverbs.so.1` at bind time; missing runtime libraries
or symbols report a typed unsupported outcome before observation. Builds without verbs headers
report `RDMA_BACKEND_NOT_BUILT`. Core and adapter imports do not load verbs, and native Core and
FD/callback consumers do not require the RDMA component. The optional `rdma_admission` executable
checks the typed missing-backend or invalid-pair outcome using an absent native pair; it does not
create a channel/CQ or process hardware completions. The standalone example project automatically
includes it when the installed `holoscan::rdma_readiness` target is available.

Use `borrow_rdma_completion(channel, cq)` and an explicit positive
`RDMACompletionOptions::acknowledgement_batch_size`. The borrowed channel must remain nonblocking,
its native owner must outlive attachment, and no other consumer may retrieve its completion events.
Runtime acknowledges obtained events and rearms notification before publishing progress, including
failure cleanup. Successful restart publishes a fresh progress generation; failed Start restoration
retains the prior progress even when Arm replaces the attachment. An empty/spurious observation
never fabricates progress. Operator compute retains CQE ownership. Python exposes
`holoscan.rdma_readiness.RDMACompletionBinding` and provider-produced `RDMACompletionResource`;
integer addresses, ctypes objects and arbitrary Python evaluation are not supported. Fake backend
tests and successful verbs compilation do not qualify a physical NIC.

A finite CQE drain needs an application bound that covers **every producer sharing the CQ**.
For example, admit at most N completion-producing operations under an explicit one-CQE-per-operation
rule, close admission before draining, and never replenish that budget during the drain. Keep
separate pending, queued and processed counts with
`admitted = pending + queued + processed`, and reject duplicate or unknown completion identities.
Each compute can then poll at most the remaining admitted bound, perform bounded work per result,
and stop at empty. An empty CQ does not mean the pending operations have completed; finish only
when the ledger accounts for every admitted CQE. A later completion of already admitted work may
be handled after a subsequent real event.

CQ capacity, `acknowledgement_batch_size`, an event counter, or an arbitrary per-activation poll
limit is not that all-producer work bound. One completion event may cover several CQEs. Unread
CQEs alone guarantee neither a new event nor another compute call.

> **A completion event does not promise another drain**
>
> Do not leave an already nonempty CQ partially drained and assume another event will rescue the
> remainder. Use the all-producer admitted-work bound above, or an explicitly supported continuation
> mechanism. A finite event batch bounds Runtime observation; it does not bound application CQEs
> or establish a physical provider's event races, teardown, or hardware performance.

## Own a run from asyncio

`run_async` starts a regular native run; it is not a coroutine. Use `async with hs.run_async(...)`
when the event loop owns cleanup. Passive `wait_async` cancellation or timeout leaves the run
active. A `True` async result guarantees cleanup and joining, including for failed runs; inspect
`termination` and `diagnostics` separately.

`async_readiness.py` exports the FD consumer's eight scalar records through a catalog endpoint
with queue depth eight and one borrowed sample. It uses existing `hs.channel.aio.Subscriber`,
releases each borrowed sample, cancels a passive waiter, then reuses the Plan with fresh bindings.
During cancellation of the owning context, an event-loop heartbeat releases a bounded cleanup
checkpoint and verifies that owning exit finishes joining before cancellation escapes. Channel
readiness consumes output samples; it is separate from native device observation.

See [Python running and signals](/holoscan/sdk-user-guide/python/running-and-signals)
for terminal observation versus joining and interpreter shutdown.

## Recap

* Declare sources and resource types before compile; attach live owners before each run.
* Select wait mode through partition placement and Condition firing explicitly.
* Leave payload reads and CQE processing in compute.
* Keep ownership through observer teardown and joining; reuse Plans with fresh bindings.
* Run the hardware-free examples before qualifying your actual camera or RDMA device.