Fix hosted scan not reading the Pipfile (#333) - #425
Merged
Mikola Lysenko (mikolalysenko) merged 4 commits intoOct 1, 2026
Merged
Mikola Lysenko (mikolalysenko) merged 4 commits into
Mikola Lysenko (mikolalysenko) merged 4 commits into
Conversation
Assisted-by: Claude Code:claude-opus-5-5
A hosted scan never read the project's Pipfile, so every Pipenv project looked like it had an abandoned Pipfile.lock. When that lock pinned the package to the user's own wheel, another version or a VCS source, the scan still redirected a sibling requirements.txt, reported success, and warned that there was no Pipfile. Pipenv kept installing the unpatched package. The format registry now lists Pipfile as a hosted, presence-only file. Both the disk and the in-memory hosted engines read it, and the in-memory engine still counts it as present when the host has no usable content for it (a symlink or an oversize file). A conflict in a live Pipfile.lock now refuses the patch for the whole project. Fixes #333 Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Claude Code:claude-opus-5-5
Mikola Lysenko (mikolalysenko)
marked this pull request as ready for review
October 1, 2026 05:50
Collaborator
Author
|
BugBot review Generated by Claude Code |
Assisted-by: Claude Code:claude-opus-5-5
Collaborator
Author
|
BugBot review Generated by Claude Code |
There was a problem hiding this comment.
✅ 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 6565fac. Configure here.
Collaborator
Author
|
[burn-down agent] Ready for review on
Generated by Claude Code |
Wenxin Jiang (Wenxin-Jiang)
approved these changes
Oct 1, 2026
Mikola Lysenko (mikolalysenko)
deleted the
agent/fix-pipenv-hosted-pipfile-candidate
branch
October 1, 2026 16:48
Mikola Lysenko (mikolalysenko)
pushed a commit
that referenced
this pull request
Oct 1, 2026
Keeps both new hosted-engine tests: the BUNDLE_GEMFILE cases from this branch and the Pipfile presence test from #425. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6i4cQ51yarBFnFs2b8HRx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LLM Description written by Claude Code:claude-opus-5-5
Fixes #333
Summary
A hosted scan never read the project's
Pipfile, so every Pipenv project looked like it had an abandonedPipfile.lock. When that lock pinned the package to the user's own wheel, another version or a VCS source, the scan still redirected a siblingrequirements.txt, reported success, and warned that there was no Pipfile. Pipenv kept installing the unpatched package. A conflicting entry in a livePipfile.locknow refuses the patch for the whole project, which is what the Pipenv rewriter already intended.Root cause
The hosted planners read the files listed in
REDIRECT_CANDIDATE_FILES, which come from theHOSTEDrows offormats/registry.rs.Pipfile.lockhas a row there, butPipfiledoesn't. The Pipenv rewriter (patch/redirect/pipenv.rs) tells a live lock from an abandoned one withfiles.contains_key("Pipfile"), and that check was never true in the disk flow or the in-memory flow.Fix
Pipfileis now apypiHOSTED | PRESENCE_ONLYrow in the format registry. It's read, never edited, and names no ecosystem for the symlink and unreadable refusals. Both the disk and in-memory hosted engines read it.read_candidate_files: a presence-only row that the in-memory host lists without usable content (a symlink, or an oversize or presence-only entry) is recorded as present (empty) instead of dropped. Without this, the in-memory engine would still treat a live lock as abandoned.Pipfile, and there's a CHANGELOG entry.Tests (per issue)
in_process_redirect_pipenv::live_pipfile_lock_conflict_vetoes_the_requirements_redirect. Before the fix it fails:requirements.txtis rewritten to the hosted URL (left: "urllib3 @ https://patch.socket.dev/...", right: "urllib3==1.26.18\n..."). With the fix it passes, andrequirements.txt,Pipfile.lockandPipfileare left unchanged.abandoned_pipfile_lock_conflict_does_not_veto_the_requirements_redirect. With noPipfile, the same conflict still letsrequirements.txtbe redirected. This was the intended behavior before and is unchanged.hosted::engine::tests::the_pipfile_is_read_for_its_presencecovers a disk read, a symlinked or content-less memory entry recorded as present, and an absentPipfilethat stays absent.formats::registry/engine::file_ecosystem:Pipfilenames no ecosystem, so it never triggers a symlink or unreadable refusal.Evidence
cargo clippy --workspace --all-features -- -D warningsis clean.in_process_redirect_pipenvpasses 6/6. The real-Pipenv 2026.8.0e2e_vex_build pipenv:: --ignoredpasses.cargo test --workspace --all-features --no-fail-fast: only 14 chmod-based write-failure tests fail. They can't fail as intended in this sandbox, which runs as uid 0, and all pass in CI.cargo fmt --checkalready fails onmain(CI doesn't run it). The new hunks are rustfmt-clean, and I didn't reformat any unrelated code.Follow-ups
🤖 Generated with Claude Code
Generated by Claude Code