GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix vendored revert leaving created scaffold behind (#636, #670) by mikolalysenko · Pull Request #672 · SocketDev/socket-patch Conversation
|
| Issue | Test | Fix disabled | With fix |
|---|---|---|---|
| #636 | CLI e2e_vendor_pnpm_build::pnpm9_two_packages_vendor_revert_removes_created_scaffold (real vendor / vendor --revert; lock matches what real pnpm 10.28 generated) |
❌ "pnpm": {"overrides": {}} left |
✅ |
| #636 | pnpm_lock::tests::revert_two_packages_creator_first_removes_created_scaffold |
❌ | ✅ |
| #636 | pnpm_lock::tests::revert_two_packages_removes_created_workspace_overrides |
❌ empty overrides: left |
✅ |
| #636 | pnpm_lock::tests::revert_two_packages_repairs_a_creator_only_ledger |
❌ | ✅ |
| #636 | pnpm_lock::tests::revert_two_packages_keeps_a_user_pnpm_table |
❌ | ✅ |
| #636 | pnpm_lock::tests::revert_two_packages_creator_last_removes_created_scaffold (control) |
✅ | ✅ |
| #636 | vendor_ledger_schema_e2e (legacy pnpm ledger), vendor_group_commit_e2e |
old golden encoded the residue | ✅ |
| #670 | pypi_uv::tests::revert_two_packages_creator_first_removes_created_sources_table |
❌ [tool.uv.sources] left |
✅ |
| #670 | pypi_uv::tests::revert_two_packages_repairs_a_creator_only_ledger |
❌ | ✅ |
| #670 | pypi_uv::tests::revert_two_packages_keeps_a_user_sources_table |
✅ | ✅ |
| #670 | pypi_uv::tests::revert_two_packages_creator_last_removes_created_sources_table (control) |
✅ | ✅ |
| both | state::tests::created_scaffold_flags_are_shared_across_entries |
❌ | ✅ |
The #670 coverage is at the backend level: real wire_uv / revert_uv plus the ledger round trip. Producing a two-package uv CLI fixture would need the patch service to build two wheels.
cargo clippy --workspace --all-features -- -D warnings: clean.cargo test -p socket-patch-core --all-features --lib: 4852 passed. 4 failed, all permission-mode tests (chmod 0o555/0o444) that can't fail as root in this sandbox (copy_tree, vlt_heal, pypi_poetry, pypi_requirements). None of them touches this change.cargo test -p socket-patch-cli --all-features --lib: 834 passed.--test e2e_vendor_pnpm_build: 16 passed. --test e2e_vendor_pypi_build (real uv 0.8.17): 17 passed. --test mode_migration_pypi: 12 passed. --test vendor_ledger_schema_e2e: 3 passed. --test vendor_group_commit_e2e: 7 passed.--test covgap_commands_vendor: 41 passed. 3 *_state_write_failure_* tests failed because they rely on a read-only .socket/vendor dir, which root bypasses (same environment limit as above).node --test npm/socket-patch/bin/socket-patch.test.mjs: 4 passed.cargo test --workspace couldn't finish locally because the sandbox ran out of disk while linking test binaries. CI runs the full matrix.cargo fmt: main itself isn't rustfmt-clean (CI has no fmt gate). Every file this PR touches was clean on main and is still clean.On 8cd72d7, test (ubuntu-latest) and coverage failed on the outdated pnpm golden above, fixed in 8212cc8. native (ubuntu-latest, 2.29.2) (PDM backtest) failed one agent-mode cell (marker / appliedExactlyOne). Agent mode never reads the vendor ledger. That cell passes on main and on other open PRs, and it passed on the re-run on 0167c0b.
On 0167c0b, binary (macos-latest) (Bun lockb backtest) failed 1 of 25 cells (0.5.9 writer=0.1.6). Bun entries carry no pnpm/uv metadata, so this change can't affect them. The same job passed on 8cd72d7, which already contained the fix, and it passes on main. It passed on re-run (job 111191290748), so all CI is green on 0167c0b.
🤖 Generated with Claude Code
https://claude.ai/code/session_013yeY9QVvU6wJNVtWQi5MjY
Generated by Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Assisted-by: Claude Code:claude-opus-5-5
When two or more packages were vendored into a pnpm or uv project, only the first ledger entry remembered that vendoring created the shared pnpm.overrides / pnpm table, pnpm-workspace.yaml or [tool.uv.sources] table. A full vendor --revert, rollback or remove then left that scaffolding behind unless the first package happened to be reverted last, leaving the checkout dirty. The ledger now shares those "created by vendoring" flags across every entry that wires the same files, when it is written and when it is read, so whichever entry empties the scaffold removes it. Ledgers written by earlier releases are repaired on read. Scaffolding that still holds anything else, such as user keys, is kept as before. Fixes #636, #670 Assisted-by: Claude Code:claude-opus-5-5
58ef733 to
d46b5fa
Compare
Vendors two packages into a pnpm 9.0-lock project with no pnpm table and no workspace file, then runs vendor --revert end to end, checking package.json, the lock and pnpm-workspace.yaml all come back exact (#636). Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The pnpm legacy-ledger fixture recorded what the earlier binary left after reverting two vendored packages: an empty pnpm.overrides in package.json and the scaffolded pnpm-workspace.yaml (#636). Reverting that same ledger now removes both, so the golden is the restored package.json (still re-indented, as before) and no workspace file. Assisted-by: Claude Code:claude-opus-5-5
The group-commit round-trip test exempted pnpm from the byte-exact check because a two-package revert left the emptied pnpm.overrides and the scaffolded pnpm-workspace.yaml behind (#636). Now that both are removed, say why pnpm is still exempt (the fixture's minified package.json comes back re-indented) and assert the scaffold is gone. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 0167c0b. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent] I don't think this PR caused it:
The FAIL row has an empty error field. The real reason is in Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[burn-down agent] Labeled Ready for review at head
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Codex review of The shared creation flags are normalized on ordinary and group-commit ledger reads and writes. This fixes creator-first cleanup for pnpm and uv while preserving the existing checks that retain user-owned or changed configuration. The production delta is confined to the ledger implementation; the pnpm/uv revert backends are unchanged. Validation on this exact commit:
Current remote checks: 476 successful checks, 7 skipped; 11 successful workflows, 1 skipped. The latest Bun replacement jobs and current PDM run were verified. Bugbot is clean on this commit, with no unresolved review threads or new actionable feedback. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Vendored uv with two or more packages: vendor --revert (and remove in purl order) leave an empty[tool.uv.sources] header in pyproject.toml
Vendored pnpm with two or more packages: vendor --revert and rollback leave an empty pnpm.overrides in package.json and (lockfile 9.0) a scaffolded pnpm-workspace.yaml behind
There was an error while loading. Please reload this page.