Skip to content

Commit d2dfb63

Browse files
committed
poetry: run 25 ledger
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UBZBffU14gsz68QFvnPfrL
1 parent 216aa6d commit d2dfb63

2 files changed

Lines changed: 54 additions & 4 deletions

File tree

‎entries/poetry/20261016T081925Z.md‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[agent] 2026-10-16: Poetry bug-hunt run
2+
3+
**Tested:** main `657fce2` (unchanged since run 24), latest release **v5.0.1**. Linux only, with real Poetry 1.3.2, 1.5.1, 1.7.1 and 2.5.1 (plus poetry-plugin-export) and a rebuilt local mock of the patch API. The mock serves a patched copy of the real `six-1.16.0` wheel (hosted grant with sha256 + base64 sha512, agent view/blob routes, and a PyPI JSON forwarder for rollback).
4+
5+
## Re-triage
6+
7+
- **#450** (open): still reproduces with Poetry 2.5.1. After a project agent apply, `rollback -g` exits 0 ("Freed 67.50 KB of unused blobs"), empties `.socket/manifest.json`, and the `.venv` copy stays patched. No new information, so no comment.
8+
9+
## Cells (Linux, main `657fce2`)
10+
11+
| Poetry | Cell | Result |
12+
| --- | --- | --- |
13+
| writers 1.3.2 (versionless stamp), 1.5.1, 1.7.1 (lock 2.0) and 2.5.1 (lock 2.1) | Hosted scan, fresh install, `vex`, rollback | pass (installs patched; rollback byte-identical) |
14+
| same | Vendored scan, fresh install, `vendor --check`, `vex`, `--revert` | pass (`--revert` byte-identical; 1.3.2 gets the Poetry < 1.4 integrity advisory) |
15+
| 1.3.2, 1.5.1, 1.7.1 | Hosted advisories vs venv state | pass (1.3.2 `redirect_poetry_stale_install_risk`; stale-install warning only when the venv holds upstream bytes) |
16+
| 2.5.1 | Exported `pylock.toml` beside `poetry.lock`: vendored | wires only `pylock.toml` and warns `pypi_multiple_lockfiles` ("installs driven by poetry.lock retain their existing sources"). `uv pip install -r pylock.toml` gets the patch, `vendor --check` reports "wiring contested", `--revert` is byte-identical. This is the documented precedence (see Known non-bugs) |
17+
| 2.5.1 | Same: hosted → vendored → hosted takeovers, fresh `poetry install`, rollback | pass (the hosted → vendored takeover restores `poetry.lock` to upstream, as the precedence implies; rollback restores `poetry.lock` byte-identical) |
18+
| 1.7.1 (`install --sync`), 2.5.1 (`sync`) | Vendored, install, `--revert`, then `vex` before reinstall, then sync | pass (`vex` refuses: nothing to attest; sync puts the upstream bytes back) |
19+
| 2.5.1 | #450 | still fails |
20+
| macOS / Windows | anything | blocked: deleting `bughunt/poetry/*` is still denied, so no probes were pushed |
21+
22+
## Issues
23+
24+
None filed, commented on or closed this run.
25+
26+
## False positives ruled out
27+
28+
- Vendored wiring `pylock.toml` instead of `poetry.lock` when both pin the package: `PYPI_TOOL_LOCKS` documents that standalone PEP 751 locks rank between uv and Poetry when they pin the package (`crates/socket-patch-core/src/formats/governing_locks.rs:110`). The run warns `pypi_multiple_lockfiles`, and `vendor --check` flags the contest. Hosted rewrites both files, so the two modes differ on purpose.
29+
- Rolled-back `pylock.toml` URLs pointing at `127.0.0.1/fph`: my PyPI JSON forwarder rewrites `files.pythonhosted.org`. That's a harness artifact. The dropped `# requires-python` comment and the millisecond `upload-time` fall under "no guarantee of the original byte layout".
30+
31+
## Next
32+
33+
1. Re-check #450, #1105 and #1184 once fixed.
34+
2. A maintainer call on `requires-plugins` / `.poetry/plugins` scope, and on vendored preferring an exported pylock over `poetry.lock` for Poetry users.
35+
3. pylock: `poetry export -f pylock.toml --with dev` / extras, and two pylocks (`pylock.dev.toml`).
36+
4. Hand-edited lock 1.0 shapes (Poetry 1.0 writer).
37+
5. macOS / Windows probes once deleting `bughunt/poetry/*` is allowed.

‎state/poetry.md‎

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

3-
Last updated: 2026-10-15 (run 24), main `657fce2`, latest release **v5.0.1**. Run 9 re-measured the cells marked "r9". Runs 10–24 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 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.
44

55
## Coverage matrix
66

@@ -309,15 +309,27 @@ Mock serves eight packages (six, toml, idna, attrs, packaging, certifi, urllib3,
309309
| 2.5.1 | six in `main` + `dev` with different markers: hosted, vendored, `install --only dev` | pass |
310310
| macOS / Windows | anything | blocked (deleting `bughunt/poetry/*` still denied) |
311311

312+
### Run 25 cells (Linux, main `657fce2`)
313+
314+
| Poetry | Cell | Result |
315+
| --- | --- | --- |
316+
| writers 1.3.2 / 1.5.1 / 1.7.1 (lock 2.0), 2.5.1 (lock 2.1) | Hosted: scan, fresh install, vex, rollback byte-identical; vendored: scan, fresh install, `--check`, vex, `--revert` byte-identical | pass |
317+
| 1.3.2, 1.5.1, 1.7.1 | Hosted advisories vs venv state (versionless 1.3 stamp → `redirect_poetry_stale_install_risk`) | pass |
318+
| 2.5.1 | Exported `pylock.toml` beside `poetry.lock`: vendored, `uv pip install -r pylock.toml`, `--check`, `--revert` | pylock wired, `poetry.lock` left upstream with `pypi_multiple_lockfiles` (documented precedence, see Known non-bugs) |
319+
| 2.5.1 | Same: hosted → vendored → hosted takeovers, fresh install, rollback | pass |
320+
| 1.7.1 (`install --sync`), 2.5.1 (`sync`) | Vendored → `--revert` → `vex` before reinstall → sync | pass |
321+
| 2.5.1 | #450 | still fails |
322+
| macOS / Windows | anything | blocked (deleting `bughunt/poetry/*` still denied) |
323+
312324
## Backlog
313325

314326
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.
315327
2. Re-check #1105 (hosted A → vendored B, warm venv), #1184 (export residual keep) and #450 once fixed.
316328
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.
317-
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 shapes from 1.3–1.7 writers.
318-
5. pylock export: vendored mode and the hosted → vendored takeover with the exported `pylock.toml`; `poetry export -f pylock.toml --with dev` / extras.
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.
319331
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.
320-
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 24 (runs 9–24). A maintainer needs to delete them and allow deleting `bughunt/poetry/*`.
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/*`.
321333
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).
322334

323335
## Known non-bugs
@@ -400,3 +412,4 @@ Mock serves eight packages (six, toml, idna, attrs, packaging, certifi, urllib3,
400412
- Hosted `rollback` of a poetry-plugin-export `pylock.toml` whose only registry package is the hosted one refuses (`hosted_restore_refused`, "no sibling registry package shows the registry and artifact fields", exit 1, nothing rolled back, `poetry.lock` kept hosted too). CLI_CONTRACT "Hosted unwind coverage" refuses a pylock whose other registry packages show no `index`. With none, the restore has no evidence, and the message names the `git checkout` remedy. With one sibling (idna) it restores fine (r24). Not filed.
401413
- 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.
402414
- A bare `--vex` flag is a usage error: `scan --vex` takes a path (`--vex vex.json`).
415+
- 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).

0 commit comments

Comments
 (0)