Commit 944dbd6
committed
fix(sharding): address adversarial-review findings on clipped grids
Fixes from a multi-agent adversarial review of the semi-regular grid
change:
- nchunks_initialized used floor division for chunks-per-shard, which
undercounts on clipped grids and reports 0 when chunk_shape exceeds
the shard shape; use ceiling division to match the inner grid
- the scalar-broadcast write memo in _encode_partial_sync gated on
ArraySpec object identity, which never holds because _get_chunk_spec
is uncached (#3054); gate on shape equality so the memo fires again
(one encode instead of one per complete chunk)
- the rectilinear clipping test used shard edges [[6, 4]], which
normalize to a regular grid; use [[4, 6]] with the rectilinear config
flag so RectilinearChunkGridMetadata is actually exercised
Adds regression tests for the first two.
Assisted-by: ClaudeCode:claude-fable-51 parent 45c67bc commit 944dbd6
3 files changed
Lines changed: 76 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
763 | 763 | | |
764 | 764 | | |
765 | 765 | | |
766 | | - | |
767 | 766 | | |
768 | 767 | | |
769 | 768 | | |
| |||
818 | 817 | | |
819 | 818 | | |
820 | 819 | | |
821 | | - | |
| 820 | + | |
822 | 821 | | |
823 | 822 | | |
824 | 823 | | |
| |||
1510 | 1509 | | |
1511 | 1510 | | |
1512 | 1511 | | |
1513 | | - | |
1514 | | - | |
1515 | | - | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
1516 | 1518 | | |
1517 | 1519 | | |
1518 | 1520 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5345 | 5345 | | |
5346 | 5346 | | |
5347 | 5347 | | |
| 5348 | + | |
| 5349 | + | |
5348 | 5350 | | |
5349 | | - | |
| 5351 | + | |
5350 | 5352 | | |
5351 | 5353 | | |
5352 | 5354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
894 | 904 | | |
895 | 905 | | |
896 | 906 | | |
897 | | - | |
| 907 | + | |
898 | 908 | | |
899 | | - | |
900 | | - | |
| 909 | + | |
| 910 | + | |
901 | 911 | | |
902 | 912 | | |
903 | 913 | | |
| |||
935 | 945 | | |
936 | 946 | | |
937 | 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 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
938 | 997 | | |
939 | 998 | | |
940 | 999 | | |
| |||
0 commit comments