Summary
synchronous_safe is a manual boolean in config/aether.php that ships as true for the aws driver. Nothing ties it to the device_arn. A user who switches AETHER_DEVICE_ARN from the SV1 simulator to a QPU (arn:aws:braket:us-east-1::device/qpu/ionq/Aria-1) keeps a configuration that allows ->run() to block an HTTP request on a hardware queue. The Braket SDK itself distinguishes the two classes by ARN: aws_device.py checks "qpu" in self._arn when resolving a device, and QPU ARNs are always of the form .../device/qpu/<provider>/<name>.
Where
src/Drivers/AwsBraketDriver.php:34-39 (beforeExecution() reads only synchronous_safe)
config/aether.php:130-135 ('device_arn' and 'synchronous_safe' => true are independent)
README.md, "Synchronous Safety" (asks the user to remember to flip the flag)
Related: #31 describes the consequence (a billed QPU task left running with no ARN after the bridge timeout). This issue is the preventive half.
Why it is a problem
Laravel's philosophy is safe defaults with explicit opt-out, not unsafe defaults with an opt-in the user must remember. The cost of the mistake here is real money and a blocked worker for minutes or hours, so the framework should catch it. Deriving the default from the ARN removes an entire class of misconfiguration while keeping the escape hatch.
Suggested fix
Make synchronous_safe tri-state: null (default, shipped in config) means "derive from device_arn", where an ARN containing /device/qpu/ is treated as unsafe and anything else as safe; true/false keep forcing the behaviour. Implement the check in AwsBraketDriver::beforeExecution() (or a small isQpu(string $arn): bool helper on the driver), keep QuantumExecutionException::synchronousUnsafe() as the error, and mention in its message that synchronous_safe => true overrides the detection. Update the config comment and the README section, and add unit tests for the three states with both a QPU and a simulator ARN.
Severity: medium
Summary
synchronous_safeis a manual boolean inconfig/aether.phpthat ships astruefor theawsdriver. Nothing ties it to thedevice_arn. A user who switchesAETHER_DEVICE_ARNfrom the SV1 simulator to a QPU (arn:aws:braket:us-east-1::device/qpu/ionq/Aria-1) keeps a configuration that allows->run()to block an HTTP request on a hardware queue. The Braket SDK itself distinguishes the two classes by ARN:aws_device.pychecks"qpu" in self._arnwhen resolving a device, and QPU ARNs are always of the form.../device/qpu/<provider>/<name>.Where
src/Drivers/AwsBraketDriver.php:34-39(beforeExecution()reads onlysynchronous_safe)config/aether.php:130-135('device_arn'and'synchronous_safe' => trueare independent)README.md, "Synchronous Safety" (asks the user to remember to flip the flag)Related: #31 describes the consequence (a billed QPU task left running with no ARN after the bridge timeout). This issue is the preventive half.
Why it is a problem
Laravel's philosophy is safe defaults with explicit opt-out, not unsafe defaults with an opt-in the user must remember. The cost of the mistake here is real money and a blocked worker for minutes or hours, so the framework should catch it. Deriving the default from the ARN removes an entire class of misconfiguration while keeping the escape hatch.
Suggested fix
Make
synchronous_safetri-state:null(default, shipped in config) means "derive fromdevice_arn", where an ARN containing/device/qpu/is treated as unsafe and anything else as safe;true/falsekeep forcing the behaviour. Implement the check inAwsBraketDriver::beforeExecution()(or a smallisQpu(string $arn): boolhelper on the driver), keepQuantumExecutionException::synchronousUnsafe()as the error, and mention in its message thatsynchronous_safe => trueoverrides the detection. Update the config comment and the README section, and add unit tests for the three states with both a QPU and a simulator ARN.Severity: medium