Command context =============== The command context is the runtime object used by the observation supervision layer to associate command execution metadata with observation state evaluation. It allows the supervisor and the consistency policies to reason about the observation state not only from the current device states, but also from the command that produced, or is expected to produce, those states. A command context is created when a long-running command is accepted and is registered in the command context registry. The context records the command name, the command identifier, the devices involved in the command, the command outcome when available, and any command-specific metadata required by the observation state consistency logic. The command context is especially important for scan handling. A scan command may complete before the observation state has fully converged across all controlled devices. For this reason, the scan context can be retained after the command is no longer active. The retained scan context allows the supervisor to keep applying scan-specific consistency rules until the scan lifecycle is complete. .. toctree:: :maxdepth: 2 :caption: Command context lifecycle semantics scan/index