Repository navigation
Commit 43638b2
* Start fix for #1501
Assisted-by: Claude Code:claude-opus-5-5
* Refuse uv scripts under a parent no-sources
A PEP 723 script takes uv's settings from the nearest directory at or
above it holding a uv.toml or a pyproject.toml with [tool.uv]. When a
script was scanned from a subdirectory (scripts/ under a project whose
root sets no-sources = true), both modes read only the scanned root,
wired the script and exited 0. uv then ignored the source: `uv run
--locked` failed and a plain `uv run` imported the unpatched package.
The script lane now walks above the root when the root sets nothing,
the way uv does, and refuses with the parent file named (vendored
pypi_uv_no_sources, hosted redirect_uv_script_unsupported). The
project lane is unchanged, since a project stops uv's lookup at itself.
Fixes #1501
Assisted-by: Claude Code:claude-opus-5-5
* Document the uv script parent config lookup
Note in the #564 bullet that a script's project settings come from the
nearest uv.toml or [tool.uv] at or above it (#1501).
Assisted-by: Claude Code:claude-opus-5-5
* Read parent uv settings safely and only if needed
The parent lookup now skips the walk when the scanned root's own
uv.toml or [tool.uv] already governs the script, opens each file
through the FIFO-safe regular-file reader, and stops at a settings
file that exists but cannot be read, the way uv does, instead of
going on to a farther one.
Assisted-by: Claude Code:claude-opus-5-5
* Walk past an unparseable pyproject like uv
uv warns about a pyproject.toml it cannot parse during settings
discovery and goes on to the parent directory. The script lookup
treated such a file as governing, so a broken pyproject beside the
script or in between hid a parent uv.toml that sets no-sources, and
the script was wired anyway.
Assisted-by: Claude Code:claude-opus-5-5
* Test a workspace member script stays unwired
In a uv workspace, uv takes a member's script settings from the
workspace root, so a member's own [tool.uv] does not shield the
script from the root's no-sources. The #1138 workspace-member guard
already refuses that run in both modes before the script lookup; this
pins it.
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 51ba2f3 commit 43638b2
6 files changed
Lines changed: 538 additions & 32 deletions
File tree
- crates
- socket-patch-cli/tests
- socket-patch-core/src
- hosted
- patch/redirect
- utils
- vendor
- docs/testing
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
864 | 864 | | |
865 | 865 | | |
866 | 866 | | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
867 | 966 | | |
868 | 967 | | |
869 | 968 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
717 | 744 | | |
718 | 745 | | |
719 | 746 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5948 | 5948 | | |
5949 | 5949 | | |
5950 | 5950 | | |
5951 | | - | |
5952 | | - | |
5953 | | - | |
5954 | | - | |
5955 | | - | |
5956 | | - | |
5957 | | - | |
5958 | | - | |
5959 | | - | |
5960 | | - | |
| 5951 | + | |
| 5952 | + | |
| 5953 | + | |
| 5954 | + | |
| 5955 | + | |
| 5956 | + | |
| 5957 | + | |
| 5958 | + | |
| 5959 | + | |
| 5960 | + | |
| 5961 | + | |
| 5962 | + | |
| 5963 | + | |
| 5964 | + | |
| 5965 | + | |
| 5966 | + | |
| 5967 | + | |
| 5968 | + | |
| 5969 | + | |
| 5970 | + | |
| 5971 | + | |
| 5972 | + | |
| 5973 | + | |
5961 | 5974 | | |
5962 | 5975 | | |
5963 | 5976 | | |
| |||
6349 | 6362 | | |
6350 | 6363 | | |
6351 | 6364 | | |
| 6365 | + | |
| 6366 | + | |
| 6367 | + | |
| 6368 | + | |
| 6369 | + | |
| 6370 | + | |
| 6371 | + | |
| 6372 | + | |
| 6373 | + | |
6352 | 6374 | | |
6353 | 6375 | | |
6354 | 6376 | | |
| |||
25990 | 26012 | | |
25991 | 26013 | | |
25992 | 26014 | | |
| 26015 | + | |
| 26016 | + | |
| 26017 | + | |
| 26018 | + | |
| 26019 | + | |
| 26020 | + | |
| 26021 | + | |
| 26022 | + | |
| 26023 | + | |
| 26024 | + | |
| 26025 | + | |
| 26026 | + | |
| 26027 | + | |
| 26028 | + | |
| 26029 | + | |
| 26030 | + | |
| 26031 | + | |
| 26032 | + | |
| 26033 | + | |
| 26034 | + | |
| 26035 | + | |
| 26036 | + | |
| 26037 | + | |
| 26038 | + | |
| 26039 | + | |
| 26040 | + | |
| 26041 | + | |
| 26042 | + | |
| 26043 | + | |
| 26044 | + | |
| 26045 | + | |
| 26046 | + | |
| 26047 | + | |
| 26048 | + | |
| 26049 | + | |
| 26050 | + | |
| 26051 | + | |
| 26052 | + | |
| 26053 | + | |
| 26054 | + | |
| 26055 | + | |
| 26056 | + | |
| 26057 | + | |
| 26058 | + | |
| 26059 | + | |
| 26060 | + | |
| 26061 | + | |
| 26062 | + | |
| 26063 | + | |
| 26064 | + | |
| 26065 | + | |
| 26066 | + | |
| 26067 | + | |
| 26068 | + | |
| 26069 | + | |
| 26070 | + | |
| 26071 | + | |
| 26072 | + | |
| 26073 | + | |
| 26074 | + | |
| 26075 | + | |
| 26076 | + | |
| 26077 | + | |
25993 | 26078 | | |
25994 | 26079 | | |
25995 | 26080 | | |
| |||
0 commit comments