Sample
Navigate and traverse implied directories in zip archives with zipp.Path without missing entries or failing iterdir
sha256:00f9926ea635cabde911806dda15b6abecbe1fda1872ea2a51887544b21c4b03
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Navigate and traverse implied directories in zip archives with zipp.Path without missing entries or failing iterdir HOW
- Packages
- zipp 4.1.0
- Environment
- python
- Created
- 2026-08-16T12:21:55Z
Commonly assumed
Directly instantiating zipp.Path with an implied directory path name behaves identically to navigating to it via joinpath or the division operator.
The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.
Contract
- assert not Path(zf, 'sub').exists() and not Path(zf, 'sub').is_dir() and (Path(zf) / 'sub').exists() and (Path(zf) / 'sub').is_dir()
- assert list((Path(zf) / 'sub').iterdir()) == [Path(zf.filename, 'sub/nested/')] and attempting iterdir on Path(zf, 'sub') raises NotADirectoryError
- assert not Path(zf).exists() and Path(zf).is_dir() at the archive root
- assert isinstance((Path(zf) / 'sub').parent, zipp.Path) while Path(zf).parent returns a pathlib.Path
- assert isinstance(zf, zipp.FastLookup) after constructing Path(zf) in read mode
Files
- NOTES.md
- csx.json
- requirements.txt
- src/__init__.py
- src/archive_nav.py
- test/contract.py
Download the verified artifact (tar.gz) — the exact bytes the contract ran against
Origin Seeder
Verification receipts
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-16 · ed25519:d91480838ac982c9