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 Hatch-derived pylock.toml lock-only rewrite (#479) by mikolalysenko · Pull Request #1336 · SocketDev/socket-patch Conversation
|
| Case | Test | Before | After |
|---|---|---|---|
hosted rewrite: locked = true + uv installer, lock-envs = true, named env pylock.test.toml: pyproject wired + warning; control without locked envs keeps the lock-only lane |
patch::redirect::hatch_tests::hatch_locked_env_pylock_also_wires_pyproject |
FAILED | ok |
vendored routing: locked envs → PypiFlavor::Hatch; without → PythonLocks |
vendor::pypi::tests::hatch_locked_env_pylock_routes_to_hatch |
FAILED | ok |
| CLI: hosted scan wires pyproject + lock, warns; vendored refuses (pip installer) and writes nothing | mode_migration_pypi::hatch_locked_env_pylock_wires_pyproject |
FAILED | ok |
Red was verified by short-circuiting is_hatch_lock to false. Hatch isn't installed locally, so the real-Hatch matrix from the issue wasn't re-run here.
cargo test -p socket-patch-core --lib: 6111 passedcargo test -p socket-patch-cli --test mode_migration_pypi --test in_process_get_hosted_ecosystems --test e2e_vendor_pypi_build --test in_process_rollback_hosted: 47 + 10 + 44 + 35 passedcargo clippy --workspace --all-features -- -D warnings: clean. cargo fmt --all -- --check: my files clean (the upstream/mod.rs diff is pre-existing on main)🤖 Generated with Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Empty commit to open the draft PR. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Hatch 1.17+ locked environments write a pylock.toml that Hatch derives from pyproject and regenerates whenever the dependency hash changes. Both modes treated it as a standalone lock and rewrote only it, with `success` and no warning. Existing Hatch envs stayed unpatched, the next fresh env regenerated the lock from pyproject and dropped the patch, and vendored mode skipped the documented "Vendored Hatch requires the pip installer" refusal. A pylock in a Hatch project whose environments are locked (`lock-envs`, `locked`, `lock-filename`) is now Hatch's own: hosted mode wires the Hatch declarations in pyproject / hatch.toml as well as the lock, and warns `redirect_hatch_lock_regenerated` to run `hatch dep lock`. Vendored mode routes the project to the Hatch lane, so its guards (including the pip-installer refusal) apply. A pylock in a Hatch project without locked environments is still wired as a standalone lock. Fixes #479 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
BugBot review |
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.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 7e64816. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Hatch merges hatch.toml over pyproject's [tool.hatch] by top-level key: a hatch.toml `envs` table replaces every pyproject environment, and a hatch.toml `lock-envs` overrides pyproject's. The locked-env check ORed both documents, so a shadowed `locked = true` marked an independent pylock as Hatch-derived. It now reads each key from hatch.toml first, then from [tool.hatch]. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Resolve conflicts with #1334/#1335 in mode_migration_pypi.rs (keep the hatch pylock test alongside the PEP 440 lock-only and uv workspace member tests) and with main's CLI_CONTRACT.md edits (keep both the redirect_hatch_lock_regenerated and redirect_requirements_direct_reference rows). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was an error while loading. Please reload this page.
Pick up #1336 (Hatch-derived pylock.toml lock-only rewrite); merges cleanly. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Picks up #1336 (Hatch pylock.toml lock-only rewrite); no conflicts. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Hatch 1.17+ projects with a hatch-generated pylock.toml get only the lock rewritten, and Hatch regenerates it from pyproject, so hosted and vendored patches are silently dropped
There was an error while loading. Please reload this page.