Repository navigation
Commit 65abe33
committed
fix(remote): refuse a forced connect whose backend and platform name different devices
`--force` drops the previous record before the axis is decided, so the lease backend
is the only thing left naming a leaf. `connect --force --platform macos
--lease-backend ios-instance` reached the binding helper with a backend that rents
iOS and a request that wants macOS, and the helper's fallback wrote the requested
platform anyway: a connection recorded as macOS on a backend that can only ever rent
iOS devices, which the next command would then read as permission to ask a macOS
device of an iOS lease. That is the retargeting #2962 set out to close, arriving
through a request that contradicts itself rather than through a bound record.
The fallback goes: a refused narrowing is now refused from connect too. The conflict
factory gains a `detail` because the advice differs — a bound connection is replaced
with `--force`, and a request that names a backend's opposite leaf has no --force to
reach. The thrown error keeps the same typed reason and platform fields.
The pre-existing reuse refusal is untouched: it still fires from the compatibility
check before anything is written.1 parent a30ebda commit 65abe33
3 files changed
Lines changed: 98 additions & 13 deletions
File tree
- src
- __tests__
- cli/commands
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
158 | 164 | | |
159 | 165 | | |
160 | 166 | | |
| |||
345 | 351 | | |
346 | 352 | | |
347 | 353 | | |
348 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
349 | 361 | | |
350 | 362 | | |
351 | 363 | | |
| |||
952 | 964 | | |
953 | 965 | | |
954 | 966 | | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
959 | 977 | | |
960 | 978 | | |
| 979 | + | |
961 | 980 | | |
962 | 981 | | |
963 | 982 | | |
964 | 983 | | |
965 | | - | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
966 | 987 | | |
967 | | - | |
968 | | - | |
969 | | - | |
970 | | - | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
971 | 992 | | |
972 | 993 | | |
973 | 994 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
167 | 174 | | |
168 | 175 | | |
169 | 176 | | |
| |||
208 | 215 | | |
209 | 216 | | |
210 | 217 | | |
| 218 | + | |
211 | 219 | | |
212 | 220 | | |
213 | 221 | | |
214 | 222 | | |
215 | 223 | | |
216 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
217 | 234 | | |
218 | | - | |
| 235 | + | |
219 | 236 | | |
220 | 237 | | |
221 | 238 | | |
| |||
0 commit comments