Configured devices for scan

The scan command context stores the effective set of devices on which the scan is expected to run.

This set is not rebuilt only from the Scan request. It is derived from the result of the previous Configure command and represents the devices that were successfully configured and are therefore eligible to participate in the scan.

This ensures that command execution and observation state consistency are based on the same runtime view of the system.

Configure completion

When a Configure command is issued, the command execution layer sends the configuration request to the selected controlled devices.

Each controlled device can complete the command successfully or fail. When the Configure command completes, the completion handler evaluates the command outcome and identifies the devices that were effectively configured.

The effective configured device set is built from the configured resources by removing the devices that failed the Configure command.

This can be summarised as follows:

Configure command accepted
    -> configuration request sent to selected devices

Configure command completed
    -> command outcome evaluated
    -> failed devices identified

Effective configured devices updated
    -> configured resources - failed devices

Only the devices that completed Configure successfully are considered effectively configured.

Effective configured device set

The effective configured device set is the runtime list of devices that can be used by a subsequent Scan command.

It represents the result of the configuration phase, not only the static list of devices requested by the configuration payload. This distinction is important because a device can be part of the requested configuration and still fail to complete the Configure command.

By storing the effective configured device set after Configure completion, the component manager keeps track of the devices that are actually available for scan execution.

The effective configured device set is cleared or replaced by subsequent command flows that change the configured resources. A new successful Configure updates the set with the devices that completed the new configuration successfully.

Scan target selection

When a Scan command is requested, the scan target devices are selected from the effective configured device set.

The scan command does not assume that every device mentioned in the original configuration request is available. Instead, it uses the devices that were successfully configured by the last completed Configure command.

This means that the scan execution target set is constrained by the actual configuration outcome.

The scan preparation can be summarised as follows:

Scan command requested
    -> effective configured devices read

Scan targets prepared
    -> only successfully configured devices are considered

Scan CommandContext created
    -> planned_devices populated from the scan target set

Scan command executed
    -> request sent to the selected scan devices

The resulting Scan command context contains the devices that are expected to participate in the scan. These devices are stored in the context as the planned scan devices and are later used by the observation supervisor and by the scan consistency policy.

Consistency contract

The effective configured device set defines the consistency contract between Configure and Scan.

Configure determines which devices are actually configured. Scan uses that result to decide which devices can participate in scan execution. The scan consistency policy then uses the same device set stored in the Scan command context to evaluate observation state transitions.

This avoids inconsistencies where command execution uses one set of devices while observation supervision evaluates another one.

The contract can be summarised as follows:

Configure
    -> determines the effective configured devices

Scan preparation
    -> uses the effective configured devices as scan targets

Scan CommandContext
    -> stores the planned scan devices

Scan consistency policy
    -> evaluates scan state transitions using the planned scan devices

The Scan command context is therefore the link between the devices that were successfully configured and the devices that are expected to move through the scan lifecycle.

Failure handling

If one or more devices fail during Configure, they are not included in the effective configured device set.

A subsequent Scan command is therefore prepared only for the devices that completed Configure successfully. This prevents the system from trying to run a scan on devices that are not in a valid configured state.

If no device is effectively configured, or if the required scan devices are not available, the Scan command must be rejected during validation or preparation. This prevents the creation of a scan command context that would not represent a valid executable scan.

This behaviour keeps the CSP Subarray consistent with the real configuration state of the controlled devices.