Skip to content

Commit 2764dd8

Browse files
committed
poetry: run 30 ledger
1 parent 457dc50 commit 2764dd8

3 files changed

Lines changed: 55 additions & 18 deletions

File tree

‎entries/poetry/20261129T215631Z.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[agent] 2026-11-29: Poetry bug-hunt run
2+
3+
**Tested:** main `cfc870f` (unchanged since run 29), latest release v5.1.0. Linux only. Real Poetry 0.12.17, 1.0.10, 1.4.2, 1.8.5 and 2.5.2 (newest), real PyPI, and a local mock patch API serving a deterministic patched copy of the real six 1.16.0 wheel.
4+
5+
## Re-triage
6+
7+
- #2320: main hasn't changed since it was filed, so it wasn't re-run. Still open.
8+
9+
## Cells (Linux, main `cfc870f`)
10+
11+
| Poetry | Cell | Result |
12+
| --- | --- | --- |
13+
| 2.5.2 | Hosted + vendored, six in an optional `dev` group and a `compat` extra, supplemental source: `sync`, `install --with dev`, `sync -E compat`, fresh `--all-extras`, `check --lock`, `vex`, `vendor --check` | pass |
14+
| 1.8.5 | Hosted, extra + optional group + explicit source + primary PyPI: `install --sync` (± `--with dev`, `-E`), `lock --no-update`, `poetry add` keep the pin | pass |
15+
| 1.8.5 ⇄ 2.5.2 | Cross-major relock after vendored (#1615) and hosted, then `vendor --revert` / `rollback` | pass, both directions |
16+
| 1.0.10 | Lock 1.0, hosted (pip 24) and vendored: fresh install, `vex`, rollback / revert byte-identical | pass. pip 23.0.1 refuses the hosted wheel (documented) |
17+
| 0.12.17 | Hosted refused (`redirect_poetry_lock_unsupported`), vendored install + revert | pass |
18+
| 2.5.2 | Lockless PEP 621 project, `virtualenvs.create = false`, PATH interpreter (#2170): scoped to 1 package, agent apply, `vex`, rollback | pass |
19+
| 1.8.5 | Root vendored run on a uid-1000 tree | lock keeps its owner (#1635 fix). `.socket/` is root-owned, so the owner's `vendor --revert` fails with "Check that ./.socket is writable". Listed as a deliberate follow-up in PR #1636; not filed |
20+
| 1.4.2, 1.8.5 | `installer.modern-installation = false`, warm venv, hosted + vendored | **fail #2373** |
21+
22+
## Issues
23+
24+
- Filed **#2373**: on Poetry 1.4–1.8 with `installer.modern-installation = false`, `poetry install` prints "Updating six" but keeps the upstream bytes after a hosted or vendored rewrite. Vendored scan doesn't warn, and vendored `vex` attests `not_affected` with a `vendored_tree_out_of_sync` remedy that does nothing. Hosted `vex` fails closed, but its advice doesn't work either. The risk check reads only the lock writer (`is_pre_1_4`). Earlier runs treated this as a docs-only gap (backlog 9); it's now filed because the vendored attestation and the remedies fail the user. https://github.com/SocketDev/socket-patch/issues/2373
25+
26+
## False positives ruled out
27+
28+
- Hosted `vex` attests a pin for six after `poetry sync` removed it (optional extra). Already in known-non-bugs.
29+
- Poetry 1.8 `install --sync` keeps an optional-group package. Poetry's own behavior; same on the pristine lock.
30+
- Hosted re-scan dry-run says "Would patch 1 package" for a package that's already pinned. The real re-run is a no-op ("already on hosted patches"). Cosmetic.
31+
- With `create = false`, Poetry 2.5 installed into its own interpreter's base (`/usr`), not the PATH `python3`. That's a sandbox setup issue (Poetry in a uv venv), so it's in backlog 4.
32+
33+
## Ledger
34+
35+
- State: dated cells, new #2373 row, backlog reordered (the docs item is folded into #2373).

‎known-non-bugs/poetry.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,6 @@ One line per ruled-out false positive or documented limitation. Search with `git
8888
- 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).
8989
- `list --json` reports patches as `events[]` with `action: discovered`, not a `patches` array. Not a bug.
9090
- Hosted / vendored `rollback` on Poetry 1.4+ (1.8.5, 2.5.2): the next `poetry install` prints "Updating six (… -> 1.16.0)" and restores upstream bytes, so the generic reinstall note is right there (r29). Only 1.0–1.3 are wrong (#2320).
91+
- Root vendored run on a non-root tree leaves `.socket/` root-owned, so the owner's `vendor --revert` fails with "Check that ./.socket is writable". PR #1636 keeps lockfile owners and lists new `.socket/` files as a deliberate follow-up (r30).
92+
- Poetry 1.8 `install --sync` without `--with dev` keeps a package from an optional group that an earlier `--with dev` installed. Same on a pristine lock; it's Poetry's behavior (r30).
93+
- Hosted `scan --dry-run` re-run says "Would patch 1 package" when the pin is already in place, while the real re-run says "already on hosted patches" and writes nothing. Cosmetic (r30).

‎state/poetry.md‎

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,39 @@
11
[agent] Progress ledger for the scheduled Poetry bug-hunt routine (label pm:poetry).
22

3-
Last run: 2026-11-27 (run 29), main `cfc870f`, latest release v5.1.0 (2026-11-11), newest Poetry 2.5.2 (2026-11-21).
3+
Last run: 2026-11-29 (run 30), main `cfc870f`, latest release v5.1.0 (2026-11-11), newest Poetry 2.5.2 (2026-11-21).
44

5-
Compacted in run 29 from a 54 KB file. The per-run cell tables for runs 1–28 and the old known-non-bug list are in this file's git history on `bughunt/ledger` (commit `9326906`) and in `entries/poetry/`. Open bughunt issues: #2320. Closed since run 28: #450, #1105, #1184, #1589, #1615, #1635 (all fixed). #1114 (arch-audit, not bughunt) is still open, though #2229 says it fixes it.
5+
Compacted in run 29 from a 54 KB file. The per-run cell tables for runs 1–28 and the old known-non-bug list are in this file's git history on `bughunt/ledger` (commit `9326906`) and in `entries/poetry/`. Open bughunt issues: #2320, #2373. Closed since run 28: #450, #1105, #1184, #1589, #1615, #1635 (all fixed). #1114 (arch-audit, not bughunt) is still open, though #2229 says it fixes it.
66

77
## Coverage matrix
88

99
Linux only (macOS / Windows probes are switched off; see INSTRUCTIONS.md). The mock is a local patch API that serves a deterministic patched copy of the real six 1.16.0 wheel (grant with sha256 + sha512, view, blob). Real Poetry, real PyPI (now reachable directly). A cell dated before 2026-11-11 counts as untested for the release.
1010

1111
| Workflow | Agent | Hosted | Vendored |
1212
| --- | --- | --- | --- |
13+
| Warm venv, `installer.modern-installation = false` (1.4–1.8) | n/a | fail #2373 | fail #2373 |
1314
| Common path: scan, re-scan, fresh install, import check, `vex`, rollback, reinstall | pass 2.5.2 in-project + default out-of-tree env (2026-11-27) | pass 1.1.15, 1.3.2, 1.8.5, 2.5.2 (2026-11-27), CRLF 2.5.2; rollback advice wrong on 1.1–1.3: fail #2320 | pass 1.1.15, 1.8.5, 2.5.2 incl. `vendor --check` (2026-11-27); revert advice wrong on 1.1–1.3: fail #2320 |
1415
| Mode switch hosted → vendored → hosted, fresh install after each, rollback | n/a | pass 2.5.2 (2026-11-27) | pass 2.5.2 (2026-11-27) |
15-
| Lock formats 1.0 / 1.1 / 2.0 / 2.1, CRLF / mixed EOL, hand-edited units | untested since v5.1.0 | 1.1 / 2.0 / 2.1 pass (2026-11-27); 1.0 and mixed EOL pass pre-release (r13–r26) | 1.1 / 2.1 pass (2026-11-27); 1.0 pass pre-release |
16-
| Groups, extras, markers, `install --sync` / `sync`, `--without` | pass pre-release (r19, 2.5.1) | pass pre-release (2.5.1) | pass pre-release (2.5.1) |
17-
| Sources with priority (primary / secondary / supplemental / explicit / default), `source = "pypi"` pins | n/a | pass pre-release (r18, r28) | pass pre-release (r18, r28) |
16+
| Lock formats 1.0 / 1.1 / 2.0 / 2.1, CRLF / mixed EOL, hand-edited units | untested since v5.1.0 | 1.0 (Poetry 1.0.10, pip 24) / 1.1 / 2.0 / 2.1 pass (2026-11-29); mixed EOL pass pre-release | 1.0 / 1.1 / 2.1 pass (2026-11-29) |
17+
| Groups, extras, markers, `install --sync` / `sync`, `--without` | pass pre-release (r19, 2.5.1) | pass 1.8.5, 2.5.2 (2026-11-29) | pass 2.5.2 (2026-11-29) |
18+
| Sources with priority (primary / secondary / supplemental / explicit / default), `source = "pypi"` pins | n/a | supplemental 2.5.2, explicit + primary 1.8.5 pass (2026-11-29); `source = "pypi"` pre-release | supplemental 2.5.2 pass (2026-11-29) |
1819
| Path / URL / git deps of the patched package | n/a | refused before writing (documented, r12) | refused before writing (documented) |
1920
| Venv discovery: in-project, default path, `virtualenvs.path` templates, `envs.toml`, `env use`, `VIRTUAL_ENV` / conda | pass pre-release (r9–r13, r27) | VEX stale check pass pre-release (r27) | n/a |
20-
| `virtualenvs.create = false` / system-site-packages | pass pre-release (#671, #1023, #409 fixed); dpkg-copy lead open | pass pre-release | pass pre-release |
21-
| Relock after patch (`poetry lock`, `add --lock`, cross-major relock) | n/a | pass pre-release (r27) | pass pre-release (#1615 fixed, not re-run) |
21+
| `virtualenvs.create = false` / system-site-packages | lockless PEP 621 Poetry 2.5.2 into the PATH interpreter: scoped to 1 package, apply + rollback pass (2026-11-29, #2170); dpkg-copy lead open | pass pre-release | pass pre-release |
22+
| Relock after patch (`poetry lock`, `add --lock`, cross-major relock) | n/a | `poetry add`, 2.5→1.8 `lock --no-update` + rollback pass (2026-11-29) | 1.8→2.5 and 2.5→1.8 relock + `vendor --revert` pass (#1615, 2026-11-29) |
2223
| Supersede A → B, `remove` of one of two packages | pass pre-release | pass pre-release (r16) | pass pre-release (#1136 fixed) |
2324
| Global mode `-g` / cross-scope rollback | pass pre-release; #450 fixed, not re-run | n/a | n/a |
24-
| Ownership / mode of rewritten `poetry.lock` (root run on uid-1000 tree) | pass pre-release | #1635 fixed, not re-run | #1635 fixed, not re-run |
25-
| Poetry 0.12 (must be refused for hosted) | untested | refused pre-release (`redirect_poetry_lock_unsupported`) | pass pre-release; #945 fixed |
25+
| Ownership / mode of rewritten `poetry.lock` (root run on uid-1000 tree) | pass pre-release | #1635 fixed, not re-run | lock keeps owner (2026-11-29); `.socket/` stays root-owned, so the owner's `vendor --revert` fails (documented follow-up in PR #1636) |
26+
| Poetry 0.12 (must be refused for hosted) | untested | refused (2026-11-29, `redirect_poetry_lock_unsupported`, exit 0) | pass 0.12.17 install + revert (2026-11-29) |
2627

2728
## Backlog
2829

29-
1. Re-check #2320 once fixed (1.1.15 and 1.3.2, hosted `rollback`, vendored `rollback` and `vendor --revert`, then plain `poetry install`).
30-
2. Re-run the pre-release cells on main after v5.1.0: groups / extras / `sync --without`, sources with priority, `source = "pypi"`, cross-major relock (#1615), root-run ownership (#1635), cross-scope rollback (#450). Start with Poetry 2.5.2 and 1.8.5.
31-
3. Lock 1.0 (Poetry 1.0.10) hosted and vendored on main, plus Poetry 0.12 refusal.
32-
4. #2170 (no-venv Python projects scan only declared packages) for Poetry: a PEP 621-only Poetry 2 project with no `poetry.lock` and `create = false`. The sandbox's system Python already has an apt `six` in `/usr/lib/python3/dist-packages`, so use a controlled interpreter on PATH.
33-
5. Lead (r29), not filed: since #2243, a PyPI patch's VEX product keeps `?artifact_id=…` (by design, from the review). If Grype / Trivy compare qualifiers, the document suppresses nothing for PyPI findings. Needs a real scanner run, and downloading Grype / Trivy was denied in this sandbox.
34-
6. #1635 follow-up: a root vendored run leaves a root-owned `.socket/vendor` tree; check the owner's later `vendor --revert` / `rollback`.
35-
7. Lead (r24): Poetry 2 `[tool.poetry.requires-plugins]` installs plugins into `<project>/.poetry/plugins`, which no mode crawls. Needs a maintainer call on scope.
36-
8. Lead (r14): with `virtualenvs.create = false`, the project fallback patches the system interpreter's dpkg-owned copy. Needs a maintainer call.
37-
9. Docs: `installer.modern-installation = false` (1.4–1.8) keeps a warm same-version install, though the "Installer boundaries" table says 1.4–1.8 replace it.
30+
1. Re-check #2320 and #2373 once fixed (1.1.15 / 1.3.2 rollback; 1.4.2 / 1.8.5 with `modern-installation = false`, hosted and vendored, warm venv). For #2373 also measure the rollback direction.
31+
2. Re-run the remaining pre-release cells on main: `source = "pypi"` pins, mixed-EOL locks, cross-scope rollback (#450), agent mode with groups / `sync --without`.
32+
3. Lead (r29), not filed: since #2243, a PyPI patch's VEX product keeps `?artifact_id=…` (by design, from the review). If Grype / Trivy compare qualifiers, the document suppresses nothing for PyPI findings. Needs a real scanner run (downloads were denied in r29). `vex --grype-config` (#2252) is new on main; try it.
33+
4. With `virtualenvs.create = false`, Poetry 2.5 installs into the interpreter Poetry runs on (here `/usr`), not the `python3` on PATH that the no-venv fallback reads (#2170). Measure the pipx / official-installer setup, where these differ, before calling it a bug.
34+
5. Lead (r24): Poetry 2 `[tool.poetry.requires-plugins]` installs plugins into `<project>/.poetry/plugins`, which no mode crawls. Needs a maintainer call on scope.
35+
6. Lead (r14): with `virtualenvs.create = false`, the project fallback patches the system interpreter's dpkg-owned copy. Needs a maintainer call.
36+
7. Hosted with a default / primary mirror source on 1.8.5 and 2.5.2 (refusal wording, re-check on main).
3837

3938
## Known non-bugs
4039

0 commit comments

Comments
 (0)