You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3b63926
Browse filesBrowse the repository at this point in the historyBrowse files
[agent] 2026-10-16: handover from the Poetry bug-hunt routine (#311): a lock re-render by another tool version makes vendored revert drift-keep forever (Poetry: #1615); please check the PDM side
2
+
3
+
I filed #1615 for Poetry. Vendored wiring is reverted by `revert_lock_fragment_splice[_atomic]` (`crates/socket-patch-core/src/vendor/common.rs:805`), which needs the recorded `[[package]]` fragment verbatim. Poetry 1.8 → 2.x re-locks re-render each unit (they add `groups = ["main"]`) while keeping the vendored source and hash. After that, `vendor --revert` drift-keeps with exit 0, `rollback` / `remove` exit 1, and re-vendoring is a no-op ("already vendored").
4
+
5
+
PDM goes through the same splice (`revert_lock_fragment_splice`, the non-atomic flavor). Worth trying: vendor with an older PDM, then `pdm lock --refresh` (or `pdm lock` keeping the pin) with a newer PDM whose `pdm.lock` renders a package unit differently (e.g. `groups` / `marker` / `files` layout changes across 2.x minors), then `vendor --revert`, `rollback` and `remove`. Your ledger says `pdm lock --refresh` keeps the vendored pin, so this may be reachable there too.
[agent] 2026-10-16: handover from the Poetry bug-hunt routine (#311): vendored `--revert` of a PEP 751 `pylock.toml` drops comment lines inside `[[packages]]` entries when two or more packages in that pylock were vendored
2
+
3
+
Found while testing poetry-plugin-export `pylock.toml` exports on main `657fce2`. The pylock lane is shared (pip / uv), so I'm handing it over rather than filing it under `pm:poetry`.
4
+
5
+
- Setup: `poetry export -f pylock.toml` (poetry-plugin-export 1.10.1, Poetry 2.5.1) writes `# requires-python = ">=2.7,<3.0 || >=3.3"` inside the six entry. Add any other comment line inside a second entry (idna).
6
+
-`socket-patch scan --mode vendored --yes` wires both six and idna in `pylock.toml` (`poetry.lock` stays upstream, the documented PEP 751 precedence), then `socket-patch vendor --revert --yes`.
7
+
- Result (2/2): `Reverted 2 vendored packages`, but `git diff` shows both comment lines deleted. The rest of the file is byte-identical.
8
+
- Control: with only one package vendored in that pylock (six only), `--revert` is byte-identical and keeps the comment.
9
+
-`poetry.lock` with comments inside two vendored units reverts byte-identical, so this is pylock-lane only.
10
+
- Impact: cosmetic (comments only), but it breaks the byte-identical revert that single-package reverts give. Not filed by me.
11
+
12
+
Also cosmetic: with several pylocks (`pylock.toml` for `--with dev`, `pylock.test.toml` for `--with test`), hosted warns `redirect_uv_entry_not_found` ("No pylock.test.toml archive entry for idna@3.7") for every package a given pylock deliberately doesn't list. Vendored prints the same "wiring pylock.test.toml, pylock.toml" warning for each package, even one that only one of them pins.
**Tested:** main `657fce2` (unchanged since run 24), latest release **v5.0.1** (npm `@socketsecurity/socket-patch@5.0.1`, used as the regression baseline). Linux only, with real Poetry 1.0.10, 1.8.5, 2.4.3 and 2.5.1 (+ poetry-plugin-export 1.10.1), against a rebuilt local mock of the patch API. The mock serves patched copies of the real six 1.16.0, idna 3.7 and attrs 23.2.0 wheels, with hosted grants (sha256 + sha512), agent view/blob routes and a PyPI JSON forwarder.
4
+
5
+
## Re-triage
6
+
7
+
-**#450** (open): not re-run. Main is byte-for-byte the build that run 25 confirmed it on.
8
+
- No other open `bughunt` + `pm:poetry` issues. (#1114 is `arch-audit`, not mine.)
| same | hosted rollback | refused, `hosted_restore_refused` (every registry package in each pylock is hosted, so no sibling evidence; Known non-bugs) |
16
+
| same | vendored: both pylocks wired, `poetry.lock` upstream (`pypi_multiple_lockfiles`), uv install patched, `--check` "wiring contested" | documented precedence |
17
+
| same | vendored `--revert` with ≥ 2 packages vendored in one pylock | comment lines inside `[[packages]]` dropped (single package: byte-identical; `poetry.lock`: byte-identical). Handed over to pip |
| 1.0.10, 2.5.1 | Vendored in a project path with `#`, `%20`, `;`| pass, except `;` on Poetry 1.0 (pip parses `;` as a marker: Known non-bugs) |
20
+
| 2.5.1, 1.8.5 | VEX product for a non-canonical PEP 440 version (`1.0.0-beta.1`, `-rc.2`, `RC1`, `2026.01.05`, `-post.1`, `-dev.3`, `+Local.Build`), `[tool.poetry]` and PEP 621 |**fail**: raw version in the product purl while Poetry builds/installs the normalized one. Covered by #1589 (uv); commented with the Poetry evidence |
| 1.8.5 → 2.5.1 | Hosted, then re-lock with 2.5.1: install, vex, rollback | pass |
25
+
| macOS / Windows | anything | blocked: deleting `bughunt/poetry/*` is still denied, so no probes were pushed |
26
+
27
+
## Issues
28
+
29
+
- Filed **#1615**: vendored Poetry patches can't be reverted after a re-lock with another Poetry major. https://github.com/SocketDev/socket-patch/issues/1615 (plus one comment on the takeover path)
30
+
- Commented on **#1589** (VEX product version not PEP 440-normalized) with the Poetry `[tool.poetry]` / PEP 621 evidence on 1.8.5 and 2.5.1. https://github.com/SocketDev/socket-patch/issues/1589#issuecomment-6223957809
31
+
- Handovers: `entries/pip/20261016T202635Z-from-poetry.md` (pylock comment loss on multi-package revert, multi-pylock warning noise); `entries/pdm/20261016T202635Z-from-poetry.md` (same splice revert, check the PDM re-render).
32
+
33
+
## False positives ruled out
34
+
35
+
-`;` in the project path breaks Poetry 1.0 vendored installs: pip parses the absolute wheel path as `requirement; marker`. Any path dependency in such a directory fails the same way, and Poetry ≥ 1.2 (installer, no pip) is fine.
36
+
-`list --json` "empty": my parser read `patches`; the envelope uses `events[].action = discovered`. `list` is correct.
37
+
- Hosted rollback refusing for multi-pylock exports: documented `hosted_restore_refused` (no sibling registry package).
38
+
39
+
## Next
40
+
41
+
1. Re-check #1615, #1589 and #450 once fixed.
42
+
2.#1615 on legacy formats: vendored with Poetry 1.1 (lock 1.1, two coupled fragments) then re-locked with 1.8 / 2.x.
43
+
3. A maintainer call on `requires-plugins` / `.poetry/plugins` scope.
44
+
4. macOS / Windows probes once deleting `bughunt/poetry/*` is allowed.
Copy file name to clipboardExpand all lines: state/poetry.md
+30-10Lines changed: 30 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
[agent] Progress ledger for the scheduled Poetry bug-hunt routine (label pm:poetry).
2
2
3
-
Last updated: 2026-10-16 (run 25), main `657fce2`, latest release **v5.0.1**. Run 9 re-measured the cells marked "r9". Runs 10–25 have their own tables below. #327, #329, #671, #866, #945, #1023, #1024, #1136, #1282, #1447, #1503, #1527 and #1547 are closed. Open: #450. macOS / Windows cells that still show #327 / #329 haven't been re-run, because probe branches are blocked.
3
+
Last updated: 2026-10-16 (run 26), main `657fce2`, latest release **v5.0.1**. Run 9 re-measured the cells marked "r9". Runs 10–26 have their own tables below. #327, #329, #671, #866, #945, #1023, #1024, #1136, #1282, #1447, #1503, #1527 and #1547 are closed. Open: #450, #1615 (and #1589, filed by the uv routine, with Poetry evidence). macOS / Windows cells that still show #327 / #329 haven't been re-run, because probe branches are blocked.
4
4
5
5
## Coverage matrix
6
6
@@ -9,7 +9,7 @@ Cells are "pass", "fail #N" or "untested". Hosted and vendored cells use a local
| macOS / Windows | anything | blocked (deleting `bughunt/poetry/*` still denied) |
339
+
324
340
## Backlog
325
341
326
-
1.**Lead (run 24):** Poetry 2 `[tool.poetry.requires-plugins]` installs plugins (and their deps) into `<project>/.poetry/plugins`, which no mode crawls. That's code the Poetry CLI loads, not the project runtime, so it needs a maintainer call on scope before anyone files it.
327
-
2. Re-check #1105 (hosted A → vendored B, warm venv), #1184 (export residual keep) and #450 once fixed.
328
-
3.**Lead (run 14):** with `virtualenvs.create = false`, the project global fallback patches the system interpreter's dpkg-owned copy. That follows from #538's "patch every copy" design and needs a maintainer call before anyone files it. Since #409 (#1419), a system-site venv that imports a base copy also patches that base copy, on purpose.
329
-
4. Untested Linux cells: hosted VEX with an undiscovered venv on 1.2.2 / 2.4.3; hand-edited lock 1.0 shapes (Poetry 1.0 writer). (Lock 2.0 from 1.3 / 1.5 / 1.7 writers: pass r25.)
330
-
5. pylock export: `poetry export -f pylock.toml --with dev` / extras, and a named `pylock.<name>.toml`. (Vendored and both takeovers: r25, see Known non-bugs.) Maintainer call: for a Poetry project, vendored prefers an exported pylock over `poetry.lock`, so `poetry install` stays unpatched (warned); hosted rewrites both.
331
-
6.**macOS / Windows re-checks** for closed #327 / #329, the #640 default paths, #866 on macOS, macOS XDG and the Windows Poetry 1.0/1.1 env hash. All need probe branches.
332
-
7. Probe branches are still blocked: `bughunt/poetry/20260930-venv-discovery` and `bughunt/poetry/20260930-windows-modes` still exist, and deletion was denied again in run 25 (runs 9–25). A maintainer needs to delete them and allow deleting `bughunt/poetry/*`.
333
-
8. Docs: `installer.modern-installation = false` (Poetry 1.4–1.8) keeps a warm same-version install, but the "Installer boundaries" table says 1.4–1.8 replace it. Line 24 still says CRLF / legacy `files` get a single-line inline array (changed by #1185). CLI_CONTRACT's error-code row for `mode_ambiguous` still names only agent + vendored state (the mode-resolution paragraph has the #1437 hosted-pin case).
342
+
1. Re-check #1615, #1589, #450, #1105 and #1184 once fixed.
343
+
2.#1615 on legacy formats: vendored with Poetry 1.1 (lock 1.1, coupled `[package.source]` + `[metadata.files]` fragments), then re-locked with 1.8 / 2.x; and 1.3 → 1.8 (lock 2.0 writers) re-render differences.
344
+
3.**Lead (run 24):** Poetry 2 `[tool.poetry.requires-plugins]` installs plugins (and their deps) into `<project>/.poetry/plugins`, which no mode crawls. Needs a maintainer call on scope.
345
+
4.**Lead (run 14):** with `virtualenvs.create = false`, the project global fallback patches the system interpreter's dpkg-owned copy (follows #538's "patch every copy"); a maintainer call before filing.
346
+
5. Untested Linux cells: hosted VEX with an undiscovered venv on 1.2.2 / 2.4.3.
347
+
6. pylock export: vendored prefers an exported pylock over `poetry.lock` for Poetry users (documented precedence; maintainer call).
348
+
7.**macOS / Windows re-checks** for closed #327 / #329, the #640 default paths, #866 on macOS, macOS XDG and the Windows Poetry 1.0/1.1 env hash. All need probe branches.
349
+
8. Probe branches are still blocked: `bughunt/poetry/20260930-venv-discovery` and `bughunt/poetry/20260930-windows-modes` still exist, and deleting them was denied (runs 9–26). A maintainer needs to delete them and allow deleting `bughunt/poetry/*`.
350
+
9. Docs: `installer.modern-installation = false` (Poetry 1.4–1.8) keeps a warm same-version install, but the "Installer boundaries" table says 1.4–1.8 replace it. Line 24 still says CRLF / legacy `files` get a single-line inline array (changed by #1185). CLI_CONTRACT's `mode_ambiguous` row still names only agent + vendored state.
- Hosted rollback of a lock with no final newline adds one, and a restored pylock entry's `upload-time` keeps millisecond precision. Covered by "no guarantee of the original byte layout". Not filed.
414
431
- A bare `--vex` flag is a usage error: `scan --vex` takes a path (`--vex vex.json`).
415
432
- Vendored with an exported `pylock.toml` that pins the package beside `poetry.lock` wires only the pylock and leaves `poetry.lock` on its registry source (`pypi_multiple_lockfiles`; `vendor --check` says "wiring contested"). Documented precedence: standalone PEP 751 locks rank between uv and Poetry when they pin the package (`formats/governing_locks.rs``PYPI_TOOL_LOCKS`). So a hosted → vendored takeover returns `poetry.lock` to upstream. Not filed (r25).
433
+
- A project path containing `;` breaks vendored installs on Poetry 1.0 (pip parses the absolute wheel path as `requirement; marker`, "Invalid marker"). Any path dependency there fails the same way; `#` and `%20` are fine, and Poetry 2.5.1 is fine with all three. Not filed (r26).
434
+
- With several exported pylocks (`--with dev` → `pylock.toml`, `--with test` → `pylock.test.toml`), hosted warns `redirect_uv_entry_not_found` for each package a pylock deliberately doesn't list, and vendored repeats one generic "wiring pylock.test.toml, pylock.toml" warning per package. Cosmetic, handed to pip (r26).
435
+
-`list --json` reports patches as `events[]` with `action: discovered`, not a `patches` array. Not a bug.
0 commit comments