Repository navigation
hy-check(buildable): validate call arity and reject unpinned/non-callable symbols on rust crates (fixes #4188) - #4189
Open
SuperPiIot wants to merge 1 commit into
Conversation
SuperPiIot
force-pushed
the
fix/rust-crates-call-buildable-soundness
branch
from
November 8, 2026 13:18
1d033f3 to
ddd0a99
Compare
SuperPiIot
force-pushed
the
fix/rust-crates-call-buildable-soundness
branch
3 times, most recently
from
November 9, 2026 01:33
ce64b02 to
877e7e6
Compare
SuperPiIot
force-pushed
the
fix/rust-crates-call-buildable-soundness
branch
from
November 9, 2026 21:19
877e7e6 to
dde23d7
Compare
SuperPiIot
force-pushed
the
fix/rust-crates-call-buildable-soundness
branch
from
November 9, 2026 23:39
dde23d7 to
30449c7
Compare
…able symbols on rust crates (fixes limitlessprojects#4188) Enforce strict argument arity and parameter name validation on curated pinned Rust crates (`sha3`, `regex`, `serde_json`), and reject invocations of unpinned symbols (`regex.compile`, `regex.match_string`) and package types (`serde_json.value`) with HYB-E1002 under Row 13 (BUILDABLE). All checks are guarded with self.lookup_kind(pkg).is_none() so shadowing local declarations preserve user semantics. Includes a comprehensive 11-test integration suite covering arity mismatches, invalid parameter names, unpinned symbols, types, positive controls, and shadowing.
SuperPiIot
force-pushed
the
fix/rust-crates-call-buildable-soundness
branch
from
November 10, 2026 01:17
30449c7 to
f20eef9
Compare
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.
Summary
Enforce strict call arity and parameter name validation on curated pinned Rust crates (
sha3,regex,serde_json), and reject invocations of unpinned symbols (regex.compile,regex.match_string) and package types (serde_json.value) withHYB-E1002under GUARANTEES.md Row 13 (BUILDABLE).Fixes #4188
Changes
compiler/crates/hy-check/src/buildable.rs:check_sha3_call_buildable: enforces exact arity fordigest256(1 arg) andstream_checksum(2 args), validating named argument parameters (data,iters,seed).check_regex_call_buildable: enforces exact arity foris_match(2 args) andis_valid(1 arg), validating named argument parameters (pattern,text), and rejects unpinned symbols (compile,match_string).check_serde_json_call_buildable: enforces exact arity forparse(1 arg),new_object(0 args),new_array(0 args), andto_string_pretty(1 arg), validating named parameters (data,v), and rejects invoking non-callable package types (value).self.lookup_kind(pkg).is_none()so in-scope shadowing declarations preserve user semantics.Integration Test Suite (
compiler/crates/hy-check/tests/rust_crates_call_buildable_soundness.rs):Verification
cargo check -p hy-check: clean (0 errors)cargo test -p hy-check --test rust_crates_call_buildable_soundness: 11/11 passedcargo test -p hy-check --test json_array_handle_soundness: 7/7 passedpython3 tools/differential_loop.py --bin compiler/target/debug/hyb: 45/45 accept, 90/90 reject (FULL AGREEMENT, zero regressions)Settlement Coordinates
0xf084cF0076F91AA48C2370F427C399dAA8C1f07F