fix(plugins/uv): Avoid modifying already relocatable venv
Metadata
Current evaluation
Avoids sed-rewriting uv’s already-relocatable activation script while retaining cleanup for Python and Poetry plugins; open with mixed CI and no maintainer review.
Suggested action: needs review
Reason: The narrowly scoped change avoids replacing a relocatable uv activation path and preserves the existing cleanup for other Python plugins; fast and slow tests plus lint pass. Ubuntu snap tests, macOS-13 checks, Trivy, and typecheck-with-ty remain red, and the author stated these appear unrelated but could not rerun them, so maintainer review and CI triage are still required.
Evaluated by: mr-cal-bot
Impact:
30
Quick Win:
14
Complexity:
22
Confidence:
86
Actionability:
60
Issue body
The uv plugin from craft-parts already uses `uv venv --relocatable` to create an activate script that has a portable path instead of an absolute path
https://github.com/canonical/craft-parts/blob/71291d50ec95aed813215e89463866dd09aaaa5e/craft_parts/plugins/uv_plugin.py#L108
Currently, charmcraft is overriding the relocatable path set by uv with its own relocatable path (since it's expecting `activate` to contain a hardcoded absolute path, like it does with `venv`)
This currently doesn't cause any issues, but could break in the future if the format of the activate script created by `uv venv` changes (since charmcraft is using `sed` to update the script)
Use the relocatable option provided by uv's public API instead of patching a private implementation detail
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
30
Quick Win:
14
Complexity:
22
Confidence:
86
Actionability:
60
|
needs review | Avoids sed-rewriting uv’s already-relocatable activation script while retaining cleanup for Python and Poetry plugins; open with mixed CI and no maintainer review. | |
| qwen/qwen3.6-35b-a3b |
Impact:
50
Quick Win:
16
Complexity:
20
Confidence:
65
Actionability:
40
|
needs review | Removes redundant sed manipulation of uv's activate script since uv venv --relocatable already sets portable paths. Small 2-file change (+17/-8). Open 223 days, 0 reviewers, some CI failures author claims are unrelated. | |
| qwen/qwen3.8-27b |
Impact:
30
Quick Win:
26
Staleness:
55
Complexity:
15
Confidence:
75
|
needs review | Avoids sed-patching the activate script for the uv plugin since craft-parts already creates relocatable venvs via uv venv --relocatable. Small 2-file diff, pending review with 0 reviewers; CI has several failing jobs (snap-tests, Trivy, typecheck-with-ty) that the author says are unrelated. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
58
Complexity:
15
Confidence:
65
|
needs review | Replaces fragile sed patching of activate scripts with uv's public relocatable API. Currently pending maintainer review with zero reviewers and several unrelated CI failures. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
80
Complexity:
15
Confidence:
70
|
needs review | Updates charmcraft to use uv's public relocatable API instead of patching the activate script with sed. Currently awaiting maintainer review after author noted unrelated test failures. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
75
Complexity:
15
Confidence:
75
|
needs review | Replaces sed-based path patching in the uv plugin with uv's built-in --relocatable API to prevent future breakage. Currently awaiting maintainer review and CI retrigger. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.