Commit 2c76563
committed
fix(registry): refuse a name-only match the receiver chain contradicts
A dotted callee whose first segment starts upper-case names a type. That
receiver chain is evidence, and the two name-only strategies threw it away:
they matched on the final segment alone, so Foundation's
URLSession.shared.data bound to a project's own PickedFile.data — at 0.75
confidence, with nothing in the graph to show the answer was wrong.
receiver_chain_admits() now requires the candidate's own parent segment to
appear somewhere in that chain. Calendar.utcGregorian.startOfDayUTC still
resolves to AuthDTOs.Calendar.startOfDayUTC, because the project really does
extend Calendar and Calendar is in the chain.
Three shapes pass through untouched:
- a callee with no separator, which has no chain to judge;
- a lower-case root, which names a value whose declared type the chain does
not show (vm.load, http.Get, os.path.join);
- a name in capitals with underscores, which is a constant holding a value
rather than a type. Measured: without this carve-out the gate refused
ISO_4217_URL.lower -> builtins.str.lower, which is correct. JSON and URL
carry no underscore and stay guarded.
The gate applies only at the two name-only exits of resolve_name_lookup.
import_map, same_module and qualified_suffix already carry real evidence and
are left alone.
Language agnostic by design: the registry holds no language, and every
language that writes receiver chains gains the same protection.
Fixes DeusData#1893
Signed-off-by: Joshua Richter <jrichter5781@gmail.com>1 parent c38aa35 commit 2c76563
2 files changed
Lines changed: 164 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
888 | 888 | | |
889 | 889 | | |
890 | 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 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
891 | 972 | | |
892 | 973 | | |
893 | 974 | | |
| |||
913 | 994 | | |
914 | 995 | | |
915 | 996 | | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
916 | 1000 | | |
917 | 1001 | | |
918 | 1002 | | |
| |||
927 | 1011 | | |
928 | 1012 | | |
929 | 1013 | | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
930 | 1017 | | |
931 | 1018 | | |
932 | 1019 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9275 | 9275 | | |
9276 | 9276 | | |
9277 | 9277 | | |
| 9278 | + | |
| 9279 | + | |
| 9280 | + | |
| 9281 | + | |
| 9282 | + | |
| 9283 | + | |
| 9284 | + | |
| 9285 | + | |
| 9286 | + | |
| 9287 | + | |
| 9288 | + | |
| 9289 | + | |
| 9290 | + | |
| 9291 | + | |
| 9292 | + | |
| 9293 | + | |
| 9294 | + | |
| 9295 | + | |
| 9296 | + | |
| 9297 | + | |
| 9298 | + | |
| 9299 | + | |
| 9300 | + | |
| 9301 | + | |
| 9302 | + | |
| 9303 | + | |
| 9304 | + | |
| 9305 | + | |
| 9306 | + | |
| 9307 | + | |
| 9308 | + | |
| 9309 | + | |
| 9310 | + | |
| 9311 | + | |
| 9312 | + | |
| 9313 | + | |
| 9314 | + | |
| 9315 | + | |
| 9316 | + | |
| 9317 | + | |
| 9318 | + | |
| 9319 | + | |
| 9320 | + | |
| 9321 | + | |
| 9322 | + | |
| 9323 | + | |
| 9324 | + | |
| 9325 | + | |
| 9326 | + | |
| 9327 | + | |
| 9328 | + | |
| 9329 | + | |
| 9330 | + | |
| 9331 | + | |
| 9332 | + | |
| 9333 | + | |
| 9334 | + | |
| 9335 | + | |
| 9336 | + | |
| 9337 | + | |
| 9338 | + | |
| 9339 | + | |
| 9340 | + | |
| 9341 | + | |
| 9342 | + | |
| 9343 | + | |
| 9344 | + | |
| 9345 | + | |
| 9346 | + | |
| 9347 | + | |
| 9348 | + | |
| 9349 | + | |
9278 | 9350 | | |
9279 | 9351 | | |
9280 | 9352 | | |
| |||
13307 | 13379 | | |
13308 | 13380 | | |
13309 | 13381 | | |
| 13382 | + | |
| 13383 | + | |
| 13384 | + | |
| 13385 | + | |
| 13386 | + | |
13310 | 13387 | | |
13311 | 13388 | | |
13312 | 13389 | | |
| |||
0 commit comments