Reproduction and expected behavior
The normal CLI dispatch calls fetch.run without creating dest, unlike the standalone module entry point. open(part) fails for a new destination or a nested remote filename. Create the output parent before HTTP/writing, retaining ordinary errors when a file blocks that directory.
Base: 252e5193902d466726da9af75047dfffff2ae662. The attached PR adds regressions against the actual package/service modules, then applies the correction. Running those final regression files against unchanged production produces:
4 failed, 2 passed in 0.15s
Focused command after placing the regressions in the checkout:
python -m pytest -q tests/test_fetch_destinations.py
Scope
The change repairs fetch and its actual CLI dispatch, not auto's separate basename bookkeeping after nested downloads. Path interpretation is unchanged; no path-containment guarantee is introduced. Failed attempts may leave empty directories.
Synthetic test input only; no reported live outage, security incident, hardware-performance measurement, or P0/P1 label.
Reproduction and expected behavior
The normal CLI dispatch calls fetch.run without creating dest, unlike the standalone module entry point. open(part) fails for a new destination or a nested remote filename. Create the output parent before HTTP/writing, retaining ordinary errors when a file blocks that directory.
Base:
252e5193902d466726da9af75047dfffff2ae662. The attached PR adds regressions against the actual package/service modules, then applies the correction. Running those final regression files against unchanged production produces:Focused command after placing the regressions in the checkout:
Scope
The change repairs fetch and its actual CLI dispatch, not auto's separate basename bookkeeping after nested downloads. Path interpretation is unchanged; no path-containment guarantee is introduced. Failed attempts may leave empty directories.
Synthetic test input only; no reported live outage, security incident, hardware-performance measurement, or P0/P1 label.