fix: preserve local projects in locked uv environments #2379
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.43) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 193 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.315
Real PR Conversation Timeline
1 comments
"Review active on #2379"
general
weight: 0.35
cjames23
Closes #2372
Summary
--no-depsso the lock remains authoritativeWhy
uv pip syncremoves packages that are not represented in the lockfile. Hatch currently installs the editable project first and then syncs the lock, so the project disappears from the environment. Restoring local packages after the exact sync preserves both the editable install and locked third-party versions.Validation
install -> lock) and passes with this patch (lock -> install --no-deps)hatch test tests/env/test_virtual.pyhatch test tests/cli/env/test_create.py -k test_sync_dependencies_uvhatch run types:check src/hatch/env/virtual.py tests/env/test_virtual.pyhatch checkcurrently reports 545 pre-existing latest-Ruff/docstring violations; neither changed file reports a violationAI assistance
I used OpenAI Codex to inspect the implementation, draft the focused patch and regression test, and run validation. I reviewed the final diff and understand how the post-lock
--no-depsinstall preserves local packages without changing locked dependencies.