Repository navigation
Commit 368ee0b
* Start fix for #536
Assisted-by: Claude Code:claude-opus-5-5
* Test Composer vendored to hosted takeover
Regression tests for #536: scan and get in hosted mode over a vendored
Composer package must revert the vendored lock entry first, write the
same lock a direct hosted scan writes, and stay restorable by rollback.
The in-memory engine must refuse the takeover like other ecosystems.
Assisted-by: Claude Code:claude-opus-5-5
* Take over vendored Composer packages in hosted
scan and get in hosted mode now revert a vendored Composer package's
composer.lock entry and committed copy before pinning it to the hosted
archive, as cargo, npm, Go and PyPI already do. Before, the hosted
rewriter edited the vendored entry in place and kept its patch-uuid
dist.reference, so rollback refused and the vendored copy and ledger
entry were orphaned. The in-memory hosted engine now refuses such a
package instead of rewriting it.
Fixes #536
Assisted-by: Claude Code:claude-opus-5-5
* Leave vendored Composer entries out of hosted
When a vendored Composer package's ledger entry is lost, the hosted
takeover cannot revert it, and the composer.lock rewriter used to
repoint socket-patch's own vendored path entry in place, keeping the
patch-uuid reference that rollback can never restore. The rewriter now
leaves such an entry alone and warns redirect_composer_vendored_entry,
in both the disk and in-memory hosted engines.
Refs #536
Assisted-by: Claude Code:claude-opus-5-5
* Document the Composer vendored entry warning
Assisted-by: Claude Code:claude-opus-5-5
* Give a working fix for the vendored entry warning
redirect_composer_vendored_entry fires only when the vendored ledger
entry is gone, so its advice to run vendor --revert could not clear it.
It now tells the user to restore the registry entry with composer
update or from version control.
Assisted-by: Claude Code:claude-opus-5-5
* Say what composer update may also change
The redirect_composer_vendored_entry advice now puts the version-control
restore first and notes that a named composer update may also move the
package and its dependents to newer versions, as the other Composer
warnings already do.
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 37f70e7 commit 368ee0b
11 files changed
Lines changed: 526 additions & 3 deletions
File tree
- crates
- socket-patch-cli
- src/commands/scan/hosted
- tests
- socket-patch-core
- src
- formats/composer
- hosted
- tests/fixtures
- redirect/composer/composer-lock/vendored-entry
- input
- vex-discover-golden
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
640 | 690 | | |
641 | 691 | | |
642 | 692 | | |
| |||
0 commit comments