build(test-long-running-transaction): Migrate to uv and pyproject.toml#42
Conversation
Replace pip/requirements.txt with uv/pyproject.toml for dependency management. Update run.sh to use uv run. Refs PY-2469 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 89a8ee7. Configure here.
| fi | ||
|
|
||
| python main.py No newline at end of file | ||
| uv run python main.py |
There was a problem hiding this comment.
uv missing after install
Medium Severity
When uv is not on PATH, the script installs it via the official installer but never loads the installer’s env into the current shell. The next uv run still runs in a session where command -v uv fails, so the first run can exit with “command not found” even though installation succeeded.
Reviewed by Cursor Bugbot for commit 89a8ee7. Configure here.
| if ! command -v uv &> /dev/null; then | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| fi | ||
|
|
||
| python main.py No newline at end of file | ||
| uv run python main.py |
There was a problem hiding this comment.
Bug: The script installs uv but doesn't update the PATH for the current session, causing the uv run command to fail in clean environments.
Severity: MEDIUM
Suggested Fix
After the uv installation command, update the PATH for the current session before calling uv. For example, add export PATH="$HOME/.local/bin:$PATH" to make the uv binary available to the script.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: test-long-running-transaction/run.sh#L5-L9
Potential issue: In a clean environment where `uv` is not pre-installed, the `run.sh`
script attempts to install it. The `uv` installer modifies shell configuration files for
future sessions but does not update the `PATH` for the currently executing script.
Consequently, the subsequent `uv run python main.py` command fails with a "command not
found" error. Because the script has `set -euo pipefail` enabled, this failure will
cause the script to abort, preventing the test from running. This issue will likely only
surface in CI/CD environments or on machines that do not already have `uv` installed.
Did we get this right? 👍 / 👎 to inform future reviews.


Summary
Refs PY-2469
🤖 Generated with Claude Code