Summary
AetherInstallCommand::checkDependencies() probes the SDK with python -c 'import braket; print(braket.__version__)'. braket is a namespace package shared by several Amazon packages and exposes no __version__; the SDK version lives in braket._sdk.__version__ (or importlib.metadata.version("amazon-braket-sdk")). The probe therefore exits 1 on every machine, including ones with a working SDK.
Verified with amazon-braket-sdk 1.127.0:
$ python -c 'import braket; print(braket.__version__)'
AttributeError: module 'braket' has no attribute '__version__'
$ python -c 'import braket._sdk; print(braket._sdk.__version__)'
1.127.0
Where
src/Commands/AetherInstallCommand.php:110-112 (the probe command)
src/Commands/AetherInstallCommand.php:122-124 (the NOT INSTALLED branch that always wins)
tests/Feature/Commands/AetherInstallCommandTest.php (no coverage of the dependency check: the whole command runs against Quantum::fake())
Why it is a problem
Every php artisan aether:install tells the user Braket is missing, then either prompts to create a venv or prints manual install instructions, even when the environment is already correct. A user who follows the prompt ends up with a second, redundant virtualenv. The success path of the command is unreachable in practice.
Suggested fix
Probe with importlib.metadata.version("amazon-braket-sdk"), which works regardless of the package layout and returns the distribution version. While there, compare the detected version against the floor declared in bin/python/requirements.txt (see #29) and print a warning when it is too old, so the command enforces the requirement instead of only displaying a number. Cover both branches in AetherInstallCommandTest with a fake interpreter script, the same technique tests/Unit/Bridge/PythonBridgeTest.php already uses.
Severity: medium
Summary
AetherInstallCommand::checkDependencies()probes the SDK withpython -c 'import braket; print(braket.__version__)'.braketis a namespace package shared by several Amazon packages and exposes no__version__; the SDK version lives inbraket._sdk.__version__(orimportlib.metadata.version("amazon-braket-sdk")). The probe therefore exits 1 on every machine, including ones with a working SDK.Verified with amazon-braket-sdk 1.127.0:
Where
src/Commands/AetherInstallCommand.php:110-112(the probe command)src/Commands/AetherInstallCommand.php:122-124(the NOT INSTALLED branch that always wins)tests/Feature/Commands/AetherInstallCommandTest.php(no coverage of the dependency check: the whole command runs againstQuantum::fake())Why it is a problem
Every
php artisan aether:installtells the user Braket is missing, then either prompts to create a venv or prints manual install instructions, even when the environment is already correct. A user who follows the prompt ends up with a second, redundant virtualenv. The success path of the command is unreachable in practice.Suggested fix
Probe with
importlib.metadata.version("amazon-braket-sdk"), which works regardless of the package layout and returns the distribution version. While there, compare the detected version against the floor declared inbin/python/requirements.txt(see #29) and print a warning when it is too old, so the command enforces the requirement instead of only displaying a number. Cover both branches inAetherInstallCommandTestwith a fake interpreter script, the same techniquetests/Unit/Bridge/PythonBridgeTest.phpalready uses.Severity: medium