Bug hunt ledger: Hatch #314
Replies: 5 comments
|
[agent] 2026-09-30: Hatch bug-hunt run First run. The ledger was empty and there were no earlier Tested: main Filed
Cells covered (Linux, Hatch 1.18.1 unless noted)
Ruled out / not filed
Housekeeping
Next
|
|
[agent] 2026-09-30: Hatch bug-hunt run Tested: main Filed
Commented
Re-triage
Cells covered (Linux)
Ruled out / not filed
Housekeeping
Next
|
|
[agent] 2026-10-01: maintainer note: test global ( This is a maintainer request, not a run report. Add it to the top of the backlog and keep it there until the cells below are covered. Ask: make sure we correctly scan global installs when Where Hatch puts global installs: Hatch has no global install. Check What to check (prove each with a real global install, not by reading source):
Add OS × Hatch version cells for |
|
[agent] 2026-10-01: Hatch bug-hunt run Tested: main Filed
Re-triage
Global (
|
| Check | Linux (sandbox + ubuntu) | macOS | Windows |
|---|---|---|---|
scan -g report-only, inside a Hatch project; pyproject untouched, Hatch env dir not crawled |
pass | pass | pass |
scan -g --mode hosted / --global-prefix … --mode hosted / SOCKET_GLOBAL=1 … --mode hosted: exit 2, nothing written |
pass | pass (-g) |
pass (-g) |
pipx-installed Hatch dependency, scan -g --mode agent |
fail #415 | fail #415 | fail #415 |
uv-tool-installed Hatch dependency, -g agent apply + rollback byte-exact |
pass | untested | untested |
--global-prefix "<space>/ünï/site-packages" agent apply / vex not_affected / rollback byte-exact / vex after rollback refuses |
pass | pass | pass |
Agent scan without -g in a Hatch project: falls back to the global interpreter, applied 0, exit 1 |
as #335 (system copy not modified) | ||
| Read-only global prefix | blocked (sandbox runs as root) | untested | untested |
Ruled out / not filed
scan -g"finding" six in every run: an artifact of the mock, whose/patches/batchanswers six for any purl.scannedPackagesand the apply result are the real signal.- Debian's apt
python3-six(six-1.16.0.egg-infoin/usr/lib/python3/dist-packages) is not crawled at all: egg-info-only packages are invisible. This isn't Hatch-specific, it's generic to pip/distro packages, and I didn't verify whether it's intended, so it's noted here for the pip routine rather than filed. apply -gprinting "The targeted manifest patch matched no installed package" with exit 0: this happens after a prior agent run recorded the patch. Not investigated further.
Housekeeping
- The probe branches
bughunt/hatch/20261001-global-pipxandbughunt/hatch/20260930-stale-envstill can't be deleted (the git proxy hangs up on ref deletes). A maintainer should delete them.
Next
-gon macOS / Windows with a uv-tool Hatch, and a read-only prefix (probe, non-root runner).- The vendored Hatch rollback and remove refuse with "configuration drifted" after the project version is bumped or a dependency is added, in both hosted and vendored mode #385 / Hosted Hatch rewrite leaves an existing Hatch environment unpatched with no stale-install warning, and vex still attests not_affected #335 cells on Hatch 1.7.0 and with
installer = "uv"envs. - Refusal correctness:
overrides,template,[env]collectors, hatch-pip-compile env type, hatch.tomlenvsnon-table. - Multi-patch
rollback <purl>/--preserve-stateandallow-direct-referencesownership (the mock needs a second package). - Hatch 1.0 / 1.1 / 1.2 vendored-env boundary; 1.14.x with a pinned virtualenv.
|
[agent] 2026-10-01: Hatch bug-hunt run Tested: main Filed
Commented
Re-triage
Global (
|
| Check | Linux | macOS | Windows |
|---|---|---|---|
uv-tool Hatch (1.9.7 / 1.16.5 / 1.18.1): scan -g report-only, pyproject untouched |
pass | pass (job green) | pass (report) |
uv-tool Hatch -g agent apply / vex / rollback byte-exact |
pass | pass (job green; the log wasn't retrievable, 404) | fail #449 |
UV_TOOL_DIR custom tool dir |
fail #449 | untested | untested |
Read-only prefix, root-owned, non-root user (runuser -u nobody) |
scan exits 1, but the JSON has failed: 0 and no error (#424); apply exits 1 apply_failed "Permission denied"; the re-run exits 0 (#454) |
||
| Read-only prefix the user owns (chmod 0444/0555) | patched (the owner can write; not a bug) | attrib +R: exit 1, unpatched, vex omits not_applied |
|
| Read-only, then writable again: re-scan | fail #454 (exit 0, unpatched) |
Probe: https://github.com/SocketDev/socket-patch/actions/runs/36845418214
Refusal / shape matrix (Linux, Hatch 1.18.1, hosted, fresh hatch env create from the rewrite)
- Pass (rewritten, and the fresh env imports the patched six):
templateinheritance, dottedenvs.default.dependencies, matrix env (test.py3.11),features→ optional-dependencies,detachedenv, and hatch.toml[envs]overriding pyproject envs (only hatch.toml is rewritten, matching hatchling's top-levelupdate()merge). - Refused with nothing written (documented): env
overrides,[tool.hatch.env] requires,type = "pip-compile", hatch.tomlenvs = 1. - Observation, not filed:
six==1.16(PEP 440-equal to 1.16.0) is refused with "requires an exact ==1.16.0 declaration". It's a minor over-refusal that fails closed.
Ruled out / not filed
- Hosted
rollback→Manifest not foundwhen the mock URL host isn't--patch-server-url: a harness artifact (see above). - The ubuntu probe "read-only" prefix getting patched: the runner user owned the files, so it could restore write permission. A root-owned prefix fails as expected.
Housekeeping
- Probe branches
bughunt/hatch/20260930-stale-env,bughunt/hatch/20261001-global-pipxand nowbughunt/hatch/20261001-uvtool-rostill can't be deleted (the git proxy hangs up on ref deletes). A maintainer should delete them.
Next
- Vendored → hosted takeover for Hatch, when Poetry hosted ⇄ vendored mode switch is refused, and blames a "user-authored" source that socket-patch wrote itself #328 moves; multi-patch
rollback <purl>(the mock needs a second package). - Vendored Hatch rollback and remove refuse with "configuration drifted" after the project version is bumped or a dependency is added, in both hosted and vendored mode #385 / Hosted Hatch rewrite leaves an existing Hatch environment unpatched with no stale-install warning, and vex still attests not_affected #335 cells on Hatch 1.7.0 and with
installer = "uv"envs. - Hatch 1.0 / 1.1 / 1.2 vendored-env boundary; 1.14.x with a pinned virtualenv.
- Workspaces (Hatch 1.16+
workspace.members) on v5; CRLF / BOM pyproject on v5. - Re-triage Hosted Hatch rewrite leaves an existing Hatch environment unpatched with no stale-install warning, and vex still attests not_affected #335, Hatch rollback and remove refuse with "configuration drifted" after the project version is bumped or a dependency is added, in both hosted and vendored mode #385, Global scan (-g) never crawls pipx venvs, so the dependencies of a pipx-installed Hatch are never reported, patched or rolled back on any OS #415 (Fix global scan missing pipx venvs (#415) #418), scan --sync / --mode agent never re-applies an already-recorded patch, so after a fresh Hatch env (or any reinstall) it exits 0 with the package unpatched #454 when main moves.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
[agent] Progress ledger for the scheduled Hatch bug-hunt routine (label pm:hatch).
Last run: 2026-10-01 09:57Z on main
2463257(v5 workflow, #277). The latest tag v4.0.0 predates Hatch support (#244). Linux runs use real Hatch against a local mock patch API (six 1.16.0; v5 vendored needsintegrity.sha512in the mock, the grant artifactkindmust betarball, andSOCKET_PATCH_SERVER_URLmust point at the mock so hosted wiring is recognised). macOS and Windows use probe branches.Coverage matrix
-g, pipx-installed (L / M / W)-g, uv-tool-installed (L / M / W)UV_TOOL_DIRfail #449 (Linux)Also on v5:
scan -gis report-only and never touches pyproject or the Hatch env dirs;-g/--global-prefix/SOCKET_GLOBAL=1with--mode hostedexit 2 and write nothing. Fresh-environment installs of hosted and vendored rewrites pass on 1.18.1 (and on 1.7.0 for vendored). Workspaces (1.18.1, pre-v5): a member-only dependency is refused from the root with a warning, and passes when scanned from the member.Backlog
UV_TOOL_DIRon macOS / Windows; a read-only, root-owned prefix on macOS (needs sudo on the runner); Windows Program Files prefix. The uv-tool L/M/W and read-only Linux cells are done (20261001T095737Z).rollback <purl>/--preserve-stateandallow-direct-referencesownership (the mock needs a second package).installer = "uv"envs.workspace.members) and CRLF / BOM pyproject on v5; the vendored shapes on v5.Known non-bugs
{root:uri}there): documented.installer = "uv"/uv-pathis refused: documented. Note that uv 0.12 does enforce local wheel hashes, so the documented rationale looks outdated. Hatch's internal uv envs (hatch-testetc.) aren't covered by the refusal, but the hash is still enforced (verified with a tampered wheel).hatch>= 1.2 on PATH (preflightpypi_hatch_unsupported): documented, including forpipx run/uvxusers.Requires-Dist(so the result can't be uploaded to PyPI): inherent to the design.rollbackwith nothing ever written exits 2Manifest not found.removeafter a full rollback givesmanifest_not_found.vendor_prebuilt_requiredunless the grant's artifact carriesintegrity.sha512(v5): a harness requirement, not a bug.scannedPackagesand the apply results, notpackages[], to judge discovery.scan -g, and the bare-ghosted refusal, print the usage error to stderr only, even with--json(exit 2): this matches the exit-code table.rollbackonly recognises wiring onpatch.socket.devor the--patch-server-urlorigin. A mock URL on another origin givesManifest not found, which is a harness artifact.overrides,[tool.hatch.env](requires / collectors), custom envtype, and a non-tableenvsin hatch.toml are refused with nothing written: documented.six==1.16(PEP 440-equal to the installed 1.16.0) is refused as not exact. It's a minor over-refusal that fails closed, logged rather than filed.All reactions