Skip to content

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 into
limitlessprojects:mainfrom
Burapa-J:fix/sendability-set-leaf-and-spawn-callee-shadows
Nov 8, 2026
Merged

limitlessprojects merged 1 commit into
limitlessprojects:mainfrom
Burapa-J:fix/sendability-set-leaf-and-spawn-callee-shadows

Conversation

@Burapa-J

@Burapa-J Burapa-J commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3893

Cause

  1. has_non_sendable_leaf (compiler/crates/hy-check/src/sendability.rs:41-68) omitted set[T] when checking composite leaf types.
  2. check_stmt_chan_direction (sendability.rs:845-875) did not bind user-defined enum variant payload bindings in Stmt::Match arms.
  3. check_spawn_callee (sendability.rs:146-184) checked self.fn_result_count before checking lexical/const bindings and did not check whether package roots (fmt.println) were shadowed.
  4. walk_chan_dir_expr did not check self.is_close_shadowed(st) on close(...) calls.

Fix

  • Recurse into set[...] in has_non_sendable_leaf.
  • Resolve user-defined enum variant payload types in check_stmt_chan_direction (resolve_enum_arm_dir_ty) and shadow non-channel binders.
  • Check self.lookup_binding(st, name) and package root shadowing first in check_spawn_callee, and guard close(...) with !self.is_close_shadowed(st).
  • Add regression tests in 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): 0x46489A4fe1D0B5568352010257fEC049093f527a


Maintainer / Shepherd Queue Note (Session 145)

  1. Pagination Alert (#3843..#3854 are still OPEN & ALL-GREEN):

…hadowed spawn callees, and type enum match chan dirs
@github-actions github-actions Bot added the bot:stale-base Shepherd: behind main beyond threshold label Nov 6, 2026
@limitlessprojects
limitlessprojects merged commit 6c1a060 into limitlessprojects:main Nov 8, 2026
2 checks passed
@limitlessprojects

Copy link
Copy Markdown
Owner

Landed — 6c1a0602

Merged to main with git merge --no-ff and a hand-written credit commit (CREDIT: @Burapa-J). Three genuine blind spots closed in one coherent patch — the set[T] recursion was the most overdue (any set[closure] or set[sync.mutex] sailed through).

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

Bounty

Per BOUNTY.md / discussion #295: this lands against issue #3893 — bounty claim recorded for @Burapa-J on that issue's rail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment