Skip to content

Fix uv fallback in the shared runtime setup - #2016

Draft
v1v with Copilot wants to merge 2 commits into
mainfrom
copilot/aw-failed-jobs-code-complexity-detector
Draft

Fix uv fallback in the shared runtime setup#2016
v1v with Copilot wants to merge 2 commits into
mainfrom
copilot/aw-failed-jobs-code-complexity-detector

Conversation

Copilot AI commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

The Code Complexity Detector workflow was failing before the agent actually started because the shared runtime setup assumed setup-uv always exposed a usable uv-path. In practice, that output can be empty, causing the workflow to fail during the Expose uv in workspace step.

  • Root cause

    • The shared runtime setup fragment in .github/workflows/gh-aw-fragments/runtime-setup.md hard-linked the uv symlink to ${{ steps.setup-uv.outputs.uv-path }}.
    • When that output is missing or blank, the step exits early and the agent never begins.
  • Fix

    • Added a defensive fallback to the active uv binary discovered via command -v uv when UV_PATH is unset.
    • Kept the failure explicit and actionable if uv is truly absent, instead of failing silently with a broken symlink path.
    • Regenerated the compiled Code Complexity Detector workflow so the fix is reflected in the lock file used by the workflow run.
uv_bin="${UV_PATH:-$(command -v uv || true)}"
if [ -z "$uv_bin" ]; then
  echo "::error::uv was not installed or not discoverable after setup-uv" >&2
  exit 1
fi
sudo ln -sf "$uv_bin" "$toolcache_bin/uv"
  • Impact

    • The workflow now survives the setup-uv edge case and continues into the agent runtime instead of dying during environment setup.
    • The fix is centralized in the shared fragment, so all workflows that rely on the same uv exposure pattern inherit the safeguard.

Copilot AI assigned Copilot and v1v Sep 4, 2026
Copilot AI linked an issue Sep 4, 2026 that may be closed by this pull request
… lockfile

Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failed jobs in Code Complexity Detector workflow Fix uv fallback in the shared runtime setup Sep 4, 2026
Copilot AI requested a review from v1v September 4, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw] Failed jobs: Code Complexity Detector

2 participants