fix(ai-agents): honor uv.lock during local run#9237
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: fed9e97b-e79b-4889-ac76-0d9a428599cd
glharper
requested review from
JeffreyCA,
huimiu,
hund030,
therealjohn,
trangevi and
trrwilson
as code owners
July 21, 2026 20:54
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 21 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates local Python agent runs to honor uv.lock.
Changes:
- Uses
uv sync --lockedfor locked projects. - Preserves pip fallback for unlocked projects.
- Adds coverage for command selection and missing
uv.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
internal/cmd/run.go |
Implements lock-aware dependency installation. |
internal/cmd/run_test.go |
Tests locked and fallback behavior. |
jongio
approved these changes
Jul 21, 2026
jongio
left a comment
Member
There was a problem hiding this comment.
Honoring uv.lock via uv sync --locked is the right call, and requiring uv only for locked projects while keeping the pip fallback for unlocked ones is a clean split. Tests cover the lock-authoritative, pyproject-only, requirements-only, and missing-uv paths. CI is green.
trangevi
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
uv sync --lockedwhen a Python agent project contains bothpyproject.tomlanduv.lockrequirements.txtinstalls afterwarduvfor locked projects while preserving the existing pip fallback for unlocked projectsTesting
go test ./internal/cmd -count=1go build ./...golangci-lint run ./internal/cmd/...uv sync --locked --python <venv-python> --quietagainst a temporary uv project and confirmed the lock file was unchangedFixes #9226