You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Avoid repeated full copies when staging hook-prebuilt wheels #1395
Avoid copying an unchanged hook-prebuilt wheel in full on every run while keeping fresh hook results authoritative.
Context
In PR #1393, a wheel returned by a download hook is copied into wheels_prebuilt through a temporary file and atomically replaces the staged file. This correctly handles a fresh wheel with the same filename, but repeated runs can copy a multi-GB wheel again. The hook owns its returned file, so the current code leaves that original in place. See the review discussion.
Acceptance Criteria
An unchanged hook result can be reused without another full copy when its identity can be established safely.
Changed contents with the same filename replace the staged wheel atomically; the mirror and later build use the new contents.
Filename existence alone is not treated as proof that contents match. The optimization does not expose the mirror to later changes to the hook-owned file.
The ownership and cleanup policy for the hook-returned file is documented.
Focused tests cover unchanged and changed hook results, including replacement failure.
Definition of Done
Code and focused tests are complete.
File-scoped quality checks and CI pass.
Documentation is updated if the hook contract changes.
A PR is reviewed and merged.
Agent Notes
Preserve the current configured resolver download behavior and local mirror URL handling. Measure or demonstrate the avoided copy; leave the exact optimization method open for design.
Activity