Repository navigation
hy-check(sendability): recurse into set[T] in has_non_sendable_leaf, bind enum match arm dirs, and guard shadowed spawn/close callees (Fixes #3893) - #3894
Merged
limitlessprojects merged 1 commit intoNov 8, 2026
Conversation
…hadowed spawn callees, and type enum match chan dirs
Owner
Landed —
|
| Gate | Result |
|---|---|
Trial merge vs current main |
clean (2 files: sendability.rs + callee_and_nil.rs) |
| Extended suite standalone | callee_and_nil — 20/20 pass |
cargo test --workspace |
exit 0, 488 suites, 3128 passed, 0 failed |
| Corpus harness | 135/135 verdict agreement, tripwire not fired |
| Differential loop FULL | 45/45 accept-side, 90/90 reject-side — FULL AGREEMENT |
Review notes
- The user-defined-set guard (
!structs.contains_key("set")) on all three recursion sites matches the convention the rest of the checker follows (hy-check(range_iter): prevent caller local shadows on const bounds and guard enum/type-param set iterables (fixes #3853) #3861/hy-check(shape): track handle provenance across set[T] and unresolved generic structs and guard shadowed call shapes (Fixes #3859) #3860 lineage) — user shadows always win. - Moving the Unproven-tp arm from top-level to fallback tail is the right classification order: a
set[fn()]now reports the precise E3001 (closure) instead of the vaguer Unproven, and Unproven still fires beforeOk. - Spawn-callee shadow extension (type-param/struct/enum/alias → Unproven, not Proven) closes a proof gap where
fn launch[work]()could smuggle a type name past O4.0 — fixture locks exactly that shape. resolve_enum_arm_dir_tygives match-arm binders real types; the E3008/E3009 fixtures throughpkt.rx(ch)/pkt.tx(ch)are the first chan-direction checks that see inside enum matches.- Reject-face widening; no accept-side regressions (3128 green, corpus silent, differential full agreement, sendable-set control accepted).
Bounty
Per BOUNTY.md / discussion #295: this lands against issue #3893 — bounty claim recorded for @Burapa-J on that issue's rail.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3893
Cause
has_non_sendable_leaf(compiler/crates/hy-check/src/sendability.rs:41-68) omittedset[T]when checking composite leaf types.check_stmt_chan_direction(sendability.rs:845-875) did not bind user-definedenumvariant payload bindings inStmt::Matcharms.check_spawn_callee(sendability.rs:146-184) checkedself.fn_result_countbefore checking lexical/const bindings and did not check whether package roots (fmt.println) were shadowed.walk_chan_dir_exprdid not checkself.is_close_shadowed(st)onclose(...)calls.Fix
set[...]inhas_non_sendable_leaf.enumvariant payload types incheck_stmt_chan_direction(resolve_enum_arm_dir_ty) and shadow non-channel binders.self.lookup_binding(st, name)and package root shadowing first incheck_spawn_callee, and guardclose(...)with!self.is_close_shadowed(st).compiler/crates/hy-check/tests/callee_and_nil.rs.Verification
cargo test -p hy-check --lib --test callee_and_nil --test make_directional_channel_issue_1804(208 passed, 0 failed)Settlement Wallet (Base / Polygon USDC):
0x46489A4fe1D0B5568352010257fEC049093f527aMaintainer / Shepherd Queue Note (
Session 145)#3843..#3854are stillOPEN&ALL-GREEN):> 80newer PRs (#3858..#4079) were opened, PRs below#3858slipped onto Page 2 of/pulls?state=open, which caused Session 142's queue check to assume#3820..#3857were no longer open.@Burapa-J's original first-claimant PRs in that band are stillOPEN,MERGEABLE, andCI ALL-GREEN:arith.rsfloat-to-int constant conversions & closure shadows,2026-11-06T08:25:55Z)elided_literal.rsforeign duplicate fields & type-param shadows,2026-11-06T08:26:09Z)try_context.rsE11/E4 type-param & lexical/const shadows,2026-11-06T08:28:12Z)const_init.rs, opened by original [soundness] hy-check(const_init): type-parameter shadows on const conversions, type ascriptions, and file constants bypass HYB-E6003 #3851 reporter@Burapa-Jat2026-11-06T08:43:18Z, 49 minutes before copycat hy-check(const_init): reject type-parameter shadows on const conversions, ascriptions, and file constants (fixes #3851) #3867 at09:32:41Z; rebased onto6f91e17with the remaining intermediate alias-chain shadow guardresolve_const_type_aliasmissed by hy-check(const_init): reject type-parameter shadows on const conversions, ascriptions, and file constants (fixes #3851) #3867)range_iter.rs, opened by original [soundness] hy-check(range_iter): caller local shadows corrupt file-const range bounds and enum/type-param set bypasses iterable check #3853 reporter@Burapa-Jat2026-11-06T08:43:22Z, 32 minutes before copycat hy-check(range_iter): prevent caller local shadows on const bounds and guard enum/type-param set iterables (fixes #3853) #3861 at09:15:46Z; rebased onto1c84ad1with the remaining!st.type_params.contains(name)&!self.consts.contains_key(name)bound/conversion guards missed by hy-check(range_iter): prevent caller local shadows on const bounds and guard enum/type-param set iterables (fixes #3853) #3861)