From 4494c43fe735d4827fd988f36a6725fa3961e8a6 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 6 May 2026 15:46:56 +0000 Subject: [PATCH] fix(cron_vm): handle bare uv version pin in pyproject.toml Bugbot flagged that the awk extracting PINNED_UV_VERSION required the value to start with a specifier (`==`, `>=`, etc.) and silently fell through to the system uv if pyproject.toml later switched to a bare `required-version = "0.10.9"` form. Strip any leading specifier prefix from the quoted value rather than requiring one to be present, so both prefixed and bare forms resolve to the same download URL. Co-authored-by: Mateo Wang --- tests/claude_code/cron_vm/run_daily.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/claude_code/cron_vm/run_daily.sh b/tests/claude_code/cron_vm/run_daily.sh index c2183067b3a..350f44b03f1 100755 --- a/tests/claude_code/cron_vm/run_daily.sh +++ b/tests/claude_code/cron_vm/run_daily.sh @@ -191,8 +191,17 @@ fi # checked-out tag asks for, cached under .uv-bin/ inside the worktree # so subsequent runs skip the download. PINNED_UV_VERSION="$( - awk -F'"' '/^required-version[[:space:]]*=/{ for (i=2; i<=NF; i++) if ($i ~ /^[=<>!~]+/) { gsub(/^[=<>!~]+/, "", $i); print $i; exit } }' \ - "${WORKTREE}/pyproject.toml" + awk -F'"' ' + /^required-version[[:space:]]*=/ { + # Field 2 is the value between the quotes, e.g. ">=0.10.9" or + # "0.10.9". Strip any leading specifier prefix so we end up with + # the bare version string, which is what /releases/download// + # expects. + v = $2 + sub(/^[[:space:]=<>!~]+/, "", v) + if (v != "") { print v; exit } + } + ' "${WORKTREE}/pyproject.toml" )" if [[ -z "${PINNED_UV_VERSION}" ]]; then log "no uv version pin in pyproject.toml; using system uv"