GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix Python crawler missing .egg-info installs (#447) by mikolalysenko · Pull Request #452 · SocketDev/socket-patch Conversation
|
| Issue item | Test | Before fix | After |
|---|---|---|---|
| agent mode patches an egg-info install (dir + bare file) | in_process_pypi_apply::pypi_scan_sync_patches_egg_info_install |
FAIL (file left unpatched) | pass |
| hosted stale-install warning fires | scan::hosted::python::tests::egg_info_install_gets_the_stale_install_warning |
FAIL (no warning) | pass |
discovery / -g / --global-prefix reports egg-info packages |
in_process_python_envs::pypi_egg_info_layout_handled (flipped from the pinned "not discovered" contract) |
FAIL | pass |
reader edge cases (-pyX.Y, headerless dir, bare file, headerless stray file) |
python_crawler::tests::egg_info_entries_are_listed, test_parse_egg_info_dir_name |
n/a | pass |
| parallel scan == async oracle (its generator already plants egg-info dirs) | python_crawler::tests::equivalence::randomized_site_packages_match_the_async_oracle |
— | pass |
Real-world check: pip 23.0.1 in a fresh CPython 3.11 venv without wheel (pip install --no-binary six six==1.16.0) writes exactly six-1.16.0-py3.11.egg-info/ + six.py, the layout the new agent test plants (Windows: Lib\site-packages).
Local runs:
cargo clippy --workspace --all-features -- -D warnings: clean.cargo test --workspace --all-features, batched with --no-fail-fast to fit the sandbox disk: 8324 passed, 10 failed. All 10 are write-failure/permission tests that fail identically on main here because the sandbox runs as root.cargo fmt --check: main itself isn't fmt-clean and CI doesn't run it, so I didn't reformat unrelated files. The touched files are rustfmt-clean.CI on 4cb6673: all 481 check runs green (475 success, 6 conditional skips). Earlier single-cell failures on older heads (Bun 1.1.39, Pipenv 2018.11.26 vendored, PDM 0.12.3 space-unicode agent) didn't recur, which fits the live-API transport flakes noted in the comments. Bugbot reviewed 4cb6673: no issues.
🤖 Generated with Claude Code
https://claude.ai/code/session_01MQdCDEbnNPApU1yUukp19S
Note
Medium Risk
Changes shared Python install discovery used by scan, apply, hosted redirects, and VEX; apt/global egg-info packages become visible by design, with broad test coverage but real-environment layout variance.
Overview
Fixes #447 by teaching the Python site-packages scan to treat legacy .egg-info installs like .dist-info, so scan/apply, hosted stale-install checks, and global discovery no longer skip older pip sdist installs, distutils layouts, and distro packages (e.g. Debian python3-*).
Crawler: list_dist_info_packages now reads .egg-info directories via PKG-INFO (with a <name>-<version>[-pyX.Y].egg-info filename fallback) and bare .egg-info files when headers parse; the test oracle matches the blocking scan.
Tests: Discovery expectations flip from “egg-info ignored” to reported PURLs; new coverage for scan --sync patching egg-info layouts, hosted redirect_pypi_stale_install on egg-info, and reader edge cases. Two e2e/vendor tests set VIRTUAL_ENV to an empty venv so Ubuntu’s apt python3-six egg-info does not masquerade as “nothing installed.”
Reviewed by Cursor Bugbot for commit 4cb6673. Configure here.
Generated by Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Assisted-by: Claude Code:claude-opus-5-5
pip before 23.1 installs an sdist without the wheel package via setup.py install, which records the install as <name>-<version>-pyX.Y.egg-info rather than .dist-info. That is the default state of a fresh venv on CPython 3.11 and older, and distro packages (Debian's python3-*) and distutils ship bare .egg-info files. The crawler only listed .dist-info, so these real, importable installs were reported "not installed" in agent mode, never got the hosted stale-install warning, and were missing from scan -g. The site-packages listing now also reads .egg-info directories (PKG-INFO, falling back to the directory name) and bare .egg-info files that carry metadata headers. Every consumer (scan, apply, rollback, the stale-install guards, -g) shares that listing. Fixes #447 Assisted-by: Claude Code:claude-opus-5-5
The step asserts vex attests from the lock pin when nothing is installed, but it ran with no venv, so the Hatch project fell back to the global interpreters. On Ubuntu runners those carry apt's python3-six 1.16.0, the fixture's exact release, as an .egg-info install. Now that the crawler sees .egg-info, vex correctly refused to attest over that unpatched copy. Point VIRTUAL_ENV at an empty venv so the step tests what it says: a package that is not installed. Assisted-by: Claude Code:claude-opus-5-5
|
[agent]
No fix to port. I'll re-run the failed jobs once when the workflow run finishes; a second failure gets treated as real. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The test vendors a hosted six 1.16.0 from a fresh checkout with nothing installed, but it ran with no venv, so the project fell back to the global interpreters. On Ubuntu those carry apt's python3-six 1.16.0 as an .egg-info install. Now that the crawler sees it, the variant probe compared it with the fixture's bytes and skipped it. Point VIRTUAL_ENV at an empty venv so nothing is installed. Assisted-by: Claude Code:claude-opus-5-5
|
[agent] On 35394a9, the Pipenv compatibility leg I don't think this PR caused it:
No fix to port. I'm re-running the failed job once; a second failure gets treated as real. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent] On 35394a9, the PDM compatibility leg I can't yet rule this PR in or out. Agent mode does read the listing this PR changes, but nothing in this change depends on the project path, and the space/unicode path is the only thing different about that cell. The cell's envelope is in the run artifact, and this sandbox can't download artifacts. The harness also drives the live I've re-run the failed job once as the diagnostic. If it fails again, I'll treat it as real and dig into PDM 0.12's install layout for that shape. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The new agent-mode egg-info test planted its site-packages at lib/python3.11/site-packages, which is where a venv keeps them on Unix. On Windows a venv uses Lib\site-packages, so the crawler never found the package and the Windows test job failed. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4cb6673. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[burn-down agent] Ready for review on
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Python crawler ignores.egg-info installs, so packages pip ≤ 23.0 installed from sdists are never patched, never get a stale-install warning, and are invisible to scan -g
There was an error while loading. Please reload this page.