Repository navigation
hy-check(buildable): validate call arity and reject non-callable symbols on strings (fixes #4184) - #4264
Open
dextermos-dev wants to merge 3 commits into
Conversation
dextermos-dev
force-pushed
the
fix-strings-call-arity-and-non-callable-symbols-4184
branch
from
November 9, 2026 17:05
b513c19 to
61d7460
Compare
…nst_return_roots_2320 compatibility
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 & Root Cause (Soundness / Row 13 BUILDABLE)
Fixes #4184.
Under GUARANTEES.md Row 13 (BUILDABLE), any program accepted by
hy-checkwith verdictAcceptmust compile cleanly under standard Go's toolchain (go build).Previously, invocations of curated
stringspackage symbols bypassed member call arity verification, and package types (builder,reader,replacer) were accepted as function call targets, leading to downstreamgo buildfailures (cannot call non-function strings.<Type>,not enough arguments in call to strings.<Func>,too many arguments in call to strings.<Func>). Furthermore, existing PR #4185 is non-mergeable due to conflicts and omitted type rejection and contained arity discrepancies.Technical Solution
Package Member Validation (
buildable.rs):pkg == "strings" && self.lookup_kind(pkg).is_none()tocheck_strings_package_call.builder,reader,replacer) fail-closed withHYB-E1002.clone,fields,title,to_lower,to_title,to_upper,trim_space,new_reader.compare,contains,contains_any,contains_func,contains_rune,count,cut,cut_prefix,cut_suffix,equal_fold,fields_func,has_prefix,has_suffix,index,index_any,index_byte,index_func,index_rune,join,last_index,last_index_any,last_index_byte,last_index_func,map,repeat,split,split_after,to_lower_special,to_title_special,to_upper_special,to_valid_utf8,trim,trim_func,trim_left,trim_left_func,trim_prefix,trim_right,trim_right_func,trim_suffix.split_n,split_after_n,replace_all.replace.Complete Unit Test Coverage (
tests/strings_call_buildable_soundness.rs):Tree Integrity:
56539008), zero example degradation, zero merge conflicts (Mergeable: True).Settlement Wallet
Settlement Wallet:
0x8366bCe3a2D379De7656D7A67015789FaF999f20