Repository navigation
fix(hy-check): compare exact element widths in copy, restrict string sources to []byte (fixes #2825) - #2940
fix(hy-check): compare exact element widths in copy, restrict string sources to []byte (fixes #2825)#2940Yumihariii wants to merge 1 commit into
copy, restrict string sources to []byte (fixes #2825)#2940Conversation
da66cfd to
c501e48
Compare
|
Updated the branch to the current tip |
c501e48 to
77b8812
Compare
|
Rebased onto current main 7d8b660 (19 behind); patch-id identical. The new base also touches buildable.rs (multi-value E1002, complex const ascriptions) — rebase merged cleanly and the copy-width checks still gate on top of it: targeted copy_slice_elem_width_2825 suite 18/18 pass (11 reject repros incl. the issue's own case, plus the accept-side controls). Head is 77b8812. |
a5b88ca to
4622223
Compare
|
Rebased onto current main |
4622223 to
df40551
Compare
|
Rebased onto current main (23beca2) to clear the stale-base threshold (behind was 31). git patch-id is byte-identical before/after — the fix content did not change, only the base. Local re-verify: hy-check full crate green, targeted copy_slice_elem_width_2825 18/18. Note #3214 (landed) enforces chan directions in copy; this PR covers element width and the string-source arm — different rule dimension, different file (sendability.rs vs buildable.rs), no semantic collision. |
df40551 to
31f2582
Compare
31f2582 to
b460f52
Compare
|
Rebased onto |
b460f52 to
ada9966
Compare
|
Rebased onto |
ada9966 to
c86d10f
Compare
|
Rebased onto |
c86d10f to
59e5642
Compare
|
Refreshed onto |
59e5642 to
eeaee89
Compare
|
Same deal as the other branch: 9 behind after session-80, Since session-80 touched Head is |
…sources to []byte (fixes limitlessprojects#2825) The (slice, slice) arm of the builtin-args copy check compared OpKinds, which collapse every integer width into Int and both float widths into Float, so copy([]int64, []int32) passed hy-check and failed go build (arguments to copy have different element types). The (slice, string) arm accepted any integer-element destination; Go admits only []byte/[]uint8. copy_slice_elem_scalar resolves the element spelling of a slice value through the binding text or, for named slice types, the alias registry (limitlessprojects#2811's named_slice_element_name), then canonical_numeric_name — both sides known and different rejects with the real widths in the label. byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open, matching the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main: 11/11 reject cases Accept with 0 diagnostics. GREEN: new suite 18/18, copy neighbours 10+9+6 unchanged, cargo test --workspace 297 suites 0 fail, corpus 130/130, guards OK.
eeaee89 to
ff66036
Compare
|
DUP CHECK — superseded by landed #3145 (fixes #3085). Verified empirically against current
Landed @Yumihariii: no action needed unless you spot a shape above that should reject and doesn't — if so, open a fresh issue with the verbatim repro rather than reopening this. Otherwise this can be closed as superseded; per queue policy it will also be swept after the review window. Cross-ref: #2825 vs #3085 are duplicate reports of the same gap; #3085 is the one fixed by #3145. |
|
Thanks for the table — I ran your four anonymous-shape repros against But there is one residual family the table doesn't cover: named slice aliases. Ran this PR's full 18-case suite (
Root cause: #3145's comparison works on the resolved element spelling, and for named slice aliases the (slice, slice) arm collapses both sides to the same coarse kind (all integer widths → Int, all float widths → Float, so no conflict fires) while the (slice, string) byte check never resolves the alias. The anonymous spellings in your table dodge this because they resolve directly. Per your instruction ("open a fresh issue with the verbatim repro rather than reopening this"), all three repros are filed verbatim with repro method in #3585. The named-alias resolution in this PR's checker logic ( |
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
limitlessprojects#3585) Landed limitlessprojects#3145 compares exact element spellings resolved from the binding text, which closes the anonymous-slice shapes of the copy() soundness family. Named slice aliases remain uncovered: the (slice, slice) arm collapses both sides to the same coarse OpKind (all integer widths -> Int, all float widths -> Float) so width-mismatched copies between named slices are accepted (go build then fails), and the (slice, string) byte check resolves a named element to an int fallback so the legal copy(namedByteSlice, "s") is rejected with a wrong-type label. copy_slice_elem_scalar adds the missing resolution step: binding text first (unchanged for anonymous spellings), then the alias registry (limitlessprojects#2811's named_slice_element_name) for named slice types, then canonical_numeric_name — byte=uint8 and rune=int32 share one canonical name so genuine aliases stay silent; unresolved elements, user types and aliases-of-aliases fail open per the limitlessprojects#2811/limitlessprojects#2788/limitlessprojects#2796 convention. RED on stock main (d6507a5): 3/6 of the new suite fail (both FN accepts with 0 diagnostics; the FP rejects []byte alias with "element type `int`"). GREEN: new suite 6/6, upstream issue_3085 suite 16/16, issue_2655 suite and hy-check --lib unchanged, cargo test -p hy-check 288 suites 2158 tests 0 fail, workspace check clean. Filed per the DUP CHECK on limitlessprojects#2940: residual named-alias shapes, verbatim repros in limitlessprojects#3585. Supersedes nothing; narrower than limitlessprojects#2940.
fix(hy-check): compare exact element widths in
copy, restrict string sources to[]byte(fixes #2825)What
Two escapes in the
copy(dst, src)arm ofbuildable.rs, both pinned by the issue's reproducer set (Row 13, BUILDABLE):copy_element_kinds_conflictcomparesOpKinds, which collapse every integer width intoIntand both float widths intoFloat.copy([]int64, []int32)compared asSlice(Int) == Slice(Int)→Accept→go build:arguments to copy have different element types: []int64 and []int32.!matches!(**dst_elem, Unknown | Int)), socopy([]int, "hi"),copy([]int64, "hi")and evencopy([]rune, "hi")sailed through; Go admits only[]byte/[]uint8as a string-copy destination.How
copy_slice_elem_scalar: the exact element spelling of a slice value. It reads the[]Ttext from the binding itself (slice_element_type_name) or, when the variable carries a named slice type, resolves it through the alias registry using hy-check accepts invalid slice-to-string and string-to-slice conversions (non-byte/rune elements) violating Row 13 BUILDABLE #2811'snamed_slice_element_name(my_int64_slice→int64), then canonicalises viacanonical_numeric_name. Both sides known and different → HYB-E1002 labelled with the real widths ([]int64vs[]int32), falling back to the kind labels when only one side resolves.scalar != "uint8"→ reject.byte=uint8andrune=int32share one canonical name, so genuine aliases never false-positive; unresolved elements, user-defined element types and aliases-of-aliases returnNoneand fail open, the same convention as hy-check accepts invalid slice-to-string and string-to-slice conversions (non-byte/rune elements) violating Row 13 BUILDABLE #2811/hy-check: slice and map literals permit mismatched concrete numeric types (Row 13 BUILDABLE) #2788/Soundness: hy-check accepts append with mismatched concrete numeric types (Row 13 BUILDABLE violation) #2796.[]mapREJECT via the freeze edge) and 44 ([]int×[]intACCEPT guard) stay exactly as pinned.Evidence (pinned toolchain: go1.26.9 / rust 1.99.0, base d2917dc)
Acceptwith 0 diagnostics on stock main.copy_slice_elem_width_2825.rs18/18.issue_2655_copy_slice_elem_soundness10/10,copy_clear_soundness9/9,copy_const_scope_and_closure6/6 — no regressions on the kind-level behaviour this builds on.cargo test --workspace: 297 suites, 0 failures.corpus_harness130/130 verdict agreement, tripwires not fired;check_test_registrationOK (38 files / 35 patterns);run_examples19/19;check_guaranteesOK.Notes
Distinct from #2861 (
T(x)conversions) and #2827/#2832 (binary/compound operators): this is the builtin-callcopyarm inprocess_call. The thread carries two/claimcomments (10:30Z / 10:32Z) with no linked PR ~4h later while two land rounds ran in between, so I'm posting the verified fix; if those claims land too, the board's cluster policy can adjudicate.