Skip to content

Commit f412f4e

Browse files
committed
hatch: 2026-11-28 run
1 parent c4d04c8 commit f412f4e

3 files changed

Lines changed: 46 additions & 16 deletions

File tree

‎entries/hatch/20261128T232514Z.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[agent] 2026-11-28 UTC: Hatch bug-hunt run
2+
3+
**Tested:** main `cfc870f` (unchanged since the last run), release v5.1.0 (to compare), Linux only, real Hatch 1.16.5 and 1.18.2 (newest) against a rebuilt local mock patch API. The mock now serves `six` 1.16.0, `toml` 0.10.2 and `tomli-w` 1.0.0.
4+
5+
## Filed
6+
- #2350: a scan from a Hatch workspace member finds no packages. Hatch installs member dependencies into the workspace root's env, and `hatch_environments(cwd)` only looks at the member's own envs. It exits 0 with "Install its requirements first", and a hosted scan from the root refuses the dependency as transitive-only, so hosted can't patch a member dependency from either directory. Hatch 1.16.5 / 1.18.2, main and v5.1.0 (not a regression). The earlier "workspace member hosted: pass" cells were a sandbox artifact: `six` exists in the system Python. https://github.com/SocketDev/socket-patch/issues/2350
7+
8+
## Re-triage
9+
- #2295 (the only open issue): main is unchanged, and the hosted locked-env restore still refuses (seen again with a one-package `pylock.ci.toml`). Left open.
10+
11+
## Cells (Linux, 2026-11-28)
12+
| Cell | Result |
13+
| --- | --- |
14+
| Hosted common path, pip installer (1.18.2) | pass (harness check) |
15+
| Locked env with a custom `lock-filename = "pylock.ci.toml"`, hosted scan, fresh env, vex (1.18.2) | pass: lock found and wired, fresh env patched, `not_affected` |
16+
| Same, H→V takeover / rollback | fails closed, nothing written (#2295 path; vendored refuses uv anyway) |
17+
| 2-patch H→V takeover then rollback (#674), 1.18.2 | pass: byte-exact original pyproject, no `allow-direct-references` / empty tables left, `.socket/` removed, reinstall unpatched |
18+
| Vendored from `%2F`, `#`, `;`, `?`, tab paths (#547) | pass: refused before writing |
19+
| Vendored from space, unicode, `'`, `[]`, `+&` paths | pass: real install patched |
20+
| Workspace member vendored (#505), 1.18.2 | pass: refused |
21+
| Workspace member hosted, 1.16.5 / 1.18.2 | **fail #2350** |
22+
| Workspace member dep, agent from the root | pass (patched in the root env, rollback clean) |
23+
| Agent, `installer = "uv"`: scan, vex, env recreate + apply (1.18.2) | pass |
24+
| `vex --output --grype-config` on a Hatch project | pass, idempotent |
25+
26+
## Ruled out / not filed
27+
- `toml@0.10.2` showing up in scans comes from the sandbox's system Python (logged in known-non-bugs).
28+
- A custom `lock-filename` outside the root, or one not named `pylock.*.toml`, is rejected by Hatch / uv themselves.

‎known-non-bugs/hatch.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ One line per item. Search with `git grep`; don't read the whole file.
3434
- Harness: the mock must answer HEAD on the wheel route (uv probes with HEAD and fails on 501) and serve `/patches/blob/<sha>` for agent rollback (`missing_blob` otherwise) (2026-11-26).
3535
- Harness: in the sandbox, a scan with no env finds six from the system `/usr/lib/python3/dist-packages`, so "first scan before any env" passing there is an artifact (2026-11-26).
3636
- Hosted scan with `installer = "uv"` and a url / path `[tool.uv.sources]` entry for the patched package exits 0 `success` with nothing written and a warning to use agent mode: the documented #673 refusal (2026-11-26). The warning capitalises the name ("Six:"), which is cosmetic.
37+
- Harness: the sandbox's system Python also has `toml` (and `six`), so scans list `toml@0.10.2` with no Hatch declaration and agent `apply` reports it "not found on disk". Use `tomli-w` 1.0.0 as the probe package; no system Python here carries it (2026-11-28).
38+
- Hosted H→V takeover from a Hatch 1.18 locked env (`installer = "uv"`, any `lock-filename`) fails closed with "cannot restore the upstream entry ... no sibling registry package" (one-package lock) or the #2295 no-header error. It is the same restore path as #2295, and vendored refuses the uv installer anyway (2026-11-28).
39+
- `lock-filename` must be `pylock.toml` / `pylock.<name>.toml` in the project root: uv rejects other names, and Hatch 1.18.2 crashes on a subdirectory. Not socket-patch (2026-11-28).

‎state/hatch.md‎

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
11
[agent] Progress ledger for the scheduled Hatch bug-hunt routine (label pm:hatch).
22

3-
Last run: 2026-11-26 on main `cfc870f`, release v5.1.0, newest Hatch 1.18.2 (bundled uv 0.13.10). Linux only (the probe workflows are off). Harness: real Hatch against a local mock patch API (`six` 1.16.0 with a `SOCKET_PATCHED = 1` marker). The mock serves batch / by-package / package grant (`kind: tarball`, sha256 + `sha512-` SRI) / view (`blobContent` base64) / `patches/blob/<git-sha256>`, plus GET **and HEAD** on the wheel route. Set `SOCKET_PATCH_SERVER_URL` to the mock and use `--vendor-source service` for vendored. Put only the `hatch` binary on PATH (not its venv `bin/`), and create the env before scanning.
3+
Last run: 2026-11-28 on main `cfc870f`, release v5.1.0, newest Hatch 1.18.2 (bundled uv 0.13.10). Linux only (the probe workflows are off). Harness: real Hatch against a local mock patch API (`six` 1.16.0, `toml` 0.10.2 and `tomli-w` 1.0.0, each with a `SOCKET_PATCHED = 1` marker). Prefer `tomli-w`: the sandbox's system Python also has `six` and `toml`, which masks crawl gaps. Use `SOCKET_PROXY_URL` (no token). The mock serves batch / by-package / package grant (`kind: tarball`, `integrity.sha256` + `integrity.sha512`) / view (`blobContent` base64) / `patches/blob/<git-sha256>`, plus GET **and HEAD** on the wheel route. Set `SOCKET_PATCH_SERVER_URL` to the mock and use `--vendor-source service` for vendored. Put only the `hatch` binary on PATH (not its venv `bin/`), and create the env before scanning.
44

5-
All `bughunt` issues filed through 2026-10-03 (#335 #385 #415 #454 #479 #505 #547 #650 #673 #674) are closed as fixed. Open: #2295.
5+
All `bughunt` issues filed through 2026-10-03 (#335 #385 #415 #454 #479 #505 #547 #650 #673 #674) are closed as fixed. Open: #2295, #2350.
66

77
## Coverage matrix
88
Cells dated before 2026-11-11 count as untested for the release (INSTRUCTIONS "Release focus").
99

1010
| Workflow | hosted | vendored | agent |
1111
| --- | --- | --- | --- |
1212
| Common path, project dep, pip installer (scan, existing env, fresh env, vex, build, rollback, reinstall) | pass 1.7.0 / 1.16.5 / 1.18.2 (2026-11-26) | pass 1.7.0 / 1.16.5 / 1.18.2 (2026-11-26) | pass 1.18.2: scan, `apply --check`, vex, apply after env recreate, rollback, remove (2026-11-26) |
13-
| Common path, uv installer | pass 1.16.5 / 1.18.2, existing env resynced (2026-11-26) | refused (documented) | untested |
14-
| Locked env / `lock-envs`, committed pylock | scan + fresh env pass 1.18.2; **rollback / remove fail #2295** on 1.18.1 / 1.18.2 (`--no-header` lock); pass 1.17.0 (2026-11-26) | refused (uv installer, documented) | untested |
13+
| Common path, uv installer | pass 1.16.5 / 1.18.2, existing env resynced (2026-11-26) | refused (documented) | pass 1.18.2: scan, vex, env recreate + apply (2026-11-28) |
14+
| Locked env / `lock-envs`, committed pylock | scan + fresh env pass 1.18.2, also custom `lock-filename = "pylock.ci.toml"` (2026-11-28); **rollback / remove fail #2295** on 1.18.1 / 1.18.2 (`--no-header` lock); pass 1.17.0 (2026-11-26) | refused (uv installer, documented) | untested |
1515
| Superseding patch uuid (#650) | pass 1.18.2, rollback byte-exact (2026-11-26) | pass 1.18.2, old artifact removed (2026-11-26) | untested |
1616
| Mode takeover H→V / V→H, 1 patch | pass 1.18.2 (2026-11-26) | pass 1.18.2 (2026-11-26) | n/a |
17-
| Takeover with 2 patches (#674) | untested since fix | untested since fix | n/a |
17+
| Takeover with 2 patches (#674) | n/a (source of H→V) | pass 1.18.2 H→V, rollback byte-exact (2026-11-28) | n/a |
1818
| `installer = "uv"` + `[tool.uv.sources]` (#673) | url / path refused, nothing written; index source pass (1.18.2, 2026-11-26) | refused | untested |
1919
| Shapes: markers, extras, features, env deps, hatch.toml envs, matrix, templates, CRLF, TOML spellings | pass 1.7.0 / 1.16.5 / 1.18.1 (pre-release, 2026-10) | pass (pre-release, 2026-10) | untested |
20-
| Workspaces (member deps, #505) | pass (pre-release) | untested since fix | untested |
21-
| Checkout path with `%XX` / `#` / `;` (#547) | n/a | untested since fix | n/a |
20+
| Workspaces (member deps, #505) | **fail #2350** 1.16.5 / 1.18.2 (member scan finds nothing; old passes were a sandbox artifact) (2026-11-28) | refused, pass 1.18.2 (2026-11-28) | pass from the root 1.18.2 (2026-11-28) |
21+
| Checkout path with `%XX` / `#` / `;` / `?` (#547) | n/a | pass: refused; space / unicode / `'` / `[]` / `+&` install patched (1.18.2, 2026-11-28) | n/a |
2222
| Rollback after an unrelated edit (#385) | pass (pre-release) | pass (pre-release) | n/a |
2323
| Global `-g`: pipx / uv-tool Hatch (#415, #449) | n/a | n/a | pass Linux (pre-release) |
2424
| Agent re-scan after env recreate (#454) | n/a | n/a | untested since fix |
2525

2626
## Backlog
27-
1. #2295 follow-ups: H→V takeover from a hosted Hatch 1.18 locked env; `lock-filename` custom names; Hatch 1.18.0.
28-
2. Re-run the 2-patch takeover (#674) and workspace vendored (#505) cells on main for the release.
29-
3. Vendored from a checkout path with `%20` / `#` (#547 fix: it should be refused before writing).
30-
4. Agent mode with the uv installer and with locked envs; `scan --sync` after `hatch env prune` (#454).
31-
5. Shapes re-run on 1.18.2: hatch.toml-only envs, `hatch-test` matrix, features, PEP 735 groups, CRLF.
32-
6. `vex --grype-config` (new on main, #2252) on a hosted / vendored Hatch project.
33-
7. Hatch 1.0 / 1.2 boundary (vendored preflight `pypi_hatch_unsupported`) on main.
34-
8. Re-triage #2295 when the uv restore code moves.
27+
1. Re-triage #2350 and #2295 when `crawlers/hatch_env.rs` or the uv restore code moves.
28+
2. #2350 follow-ups: a workspace declared in `hatch.toml`, members with `features`, a non-default root env listing the member; the stale-env warning for the root env after a member is wired.
29+
3. Agent mode with locked envs; `scan --sync` after `hatch env prune` (#454).
30+
4. Shapes re-run on 1.18.2: hatch.toml-only envs, `hatch-test` matrix, features, PEP 735 groups, CRLF.
31+
5. V→H takeover with 2 patches; `remove` (not just rollback) after a takeover.
32+
6. Hatch 1.0 / 1.2 boundary (vendored preflight `pypi_hatch_unsupported`) on main.
33+
7. Hosted `vex --grype-config` (agent checked 2026-11-28).
3534

3635
## Known non-bugs
3736
Full list: `known-non-bugs/hatch.md` (search it with `git grep`). Most likely to be re-filed:
@@ -44,4 +43,4 @@ Full list: `known-non-bugs/hatch.md` (search it with `git grep`). Most likely to
4443
- Hosted rollback drops a user-preset `allow-direct-references` when no direct reference remains: low severity, logged.
4544
- Hosted project rewrites embed a direct URL in the built wheel's `Requires-Dist`: inherent.
4645
- A pyproject.toml with a UTF-8 BOM isn't loadable by Hatch: invalid input.
47-
- In the sandbox, the system `/usr/lib/python3/dist-packages/six.py` makes vex / vendored see an extra six: a sandbox artifact.
46+
- In the sandbox, the system Python's `six` / `toml` show up in scans and vex: a sandbox artifact. Probe with `tomli-w`.

0 commit comments

Comments
 (0)