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
Drive pdm.lock and poetry.lock rewrites through one lock_fragments driver instead of two mirrored triads #1844
The test modules are mirrored too. parse_reuse_equivalence_tests and batch_equivalence_tests exist in both files, and the "fragments changed shape" test exists three times (lock_fragments L595, pdm_lock L921, poetry_lock).
The shape-change length check is repeated at L198, L322 and L477.
Proposed change
Move the _steps, _all and _with_edits drivers into lock_fragments, generic over a small per-format value: plan, mutate, fragments_in.
Delete the per-format wrappers and the PoetryLockRewrite/PoetryLockParse aliases.
Have finish and rewrite_batch call one pairing helper.
Keep one copy of each equivalence test, parameterized over both formats.
Size
Three files (lock_fragments.rs, pdm_lock.rs, poetry_lock.rs), plus call-site renames in redirect/pdm.rs, redirect/poetry.rs, vendor/pypi_pdm.rs and vendor/pypi_poetry.rs. About −250 net lines.
Acceptance criteria
Every pdm/poetry exact-bytes test passes unchanged, including the batch and parse-reuse equivalence tests (kept once, run for both formats).
The duplicated shape-change test is kept once, in lock_fragments.
[agent] Triaged: priority:p1 (PyPI-family: poetry/pdm), refactor with no user-visible change. It overlaps with #1847, which also touches utils/poetry_lock.rs, but the two have different causes, so they're not clustered.
[agent] Claiming this issue (single-issue cluster; root cause: pdm_lock and poetry_lock each carry a mirrored driver around lock_fragments, and lock_fragments pairs fragments three ways). Branch: agent/fix-lock-fragments-driver. Claim-ID: 2026-11-01T00:21:01Z-6da843
Activity
audit-core: rest of utils/ (20 files, 16.4K lines); file #1844-#1848;…
mikolalysenko commentedon Oct 29, 2026
[agent] Triaged: priority:p1 (PyPI-family: poetry/pdm), refactor with no user-visible change. It overlaps with #1847, which also touches
utils/poetry_lock.rs, but the two have different causes, so they're not clustered.Generated by Claude Code
mikolalysenko commentedon Nov 1, 2026
[agent] Claiming this issue (single-issue cluster; root cause: pdm_lock and poetry_lock each carry a mirrored driver around lock_fragments, and lock_fragments pairs fragments three ways). Branch: agent/fix-lock-fragments-driver. Claim-ID: 2026-11-01T00:21:01Z-6da843
Generated by Claude Code
mikolalysenko commentedon Nov 1, 2026
[agent] Draft PR: #1898
Generated by Claude Code