Repository navigation
fix(hy-check): model curated foreign method surface for flag.FlagSet (fixes #4251) - #4252
Conversation
Automated review — gate FAIL (one observable surface gap:
|
|
Added |
Landed — merge
|
| Gate | Result |
|---|---|
| Merge gate | 3-hunk union splice, assertions green (disclosure above) |
cargo test --workspace |
3225 passed / 0 failed (+3 = your suite's test count exactly); 492 suites = 492 Running lines (1:1) |
| corpus harness | 139/139, tripwire not fired (verdict-level 2/139, threshold ~25%) |
| differential loop | FULL AGREEMENT — accept 47/47 + reject 92/92 |
Protocol followed: merge --no-ff with hand-written credit commit (verification evidence + in-merge disclosure + CREDIT: @jpereyra243-byte), pushed, git ls-remote origin main == local HEAD asserted. fixes #4251 closes with this merge.
Bounty: per BOUNTY.md / discussion #295 rail — curated foreign method surface (flag.FlagSet), logged under this PR number.
CREDIT: @jpereyra243-byte
|
Payout wallet (USDC on Base / Polygon): |
…nts (W-026, fixes #4200) Implements Wildcard Track W-026 Milestone 1 (Issue #4200): hy.send_cap[T]/ hy.recv_cap[T] Tier-0 linear channel capabilities; affine transfer (move-into-task-closure enforcement, HYB-E3001 use-after-move, HYB-E3002 reference capture across task boundaries); ChannelLivenessChecker — forward CFG dataflow guaranteeing every linear send cap reaches Closed (HYB-E4004) and every linear recv cap reaches Drained (HYB-E4005) before nursery scope exit. hy registered in the curated import/root/member sets (pipe, new_pipe, send_cap, recv_cap, channel). In-merge conflict disclosure: one foreign.rs conflict, two hunks, resolved via scripts/resolve_4221.py: - foreign_named_type: union — adopted the PR's `match base` scrutinee (required to strip hy.send_cap[T] generic params), keeping both the PR's send_cap/recv_cap OwnHandle arms and the landed #4198 `error` ForeignOpaque arm. - method-result table: HEAD side kept wholesale (PR side was a stale reformatted subset of the pre-#4198 table; adds no entries). Presence assertions green: send_cap arm + error arm + landed surfaces (#4249/#4252 consts+arms) + #4198 table intact. Verification evidence (S173 battery, main e33e8dc + 0571ecb): - merge gate: 2-hunk scripted resolution (above) - cargo test --workspace: 3245 passed / 0 failed (+20 = PR suite count) - suites: 493 files == 493 running, 1:1 - PR conformance matrix: channel_liveness_4200 20/20 on the union tree - corpus: 139/139, tripwire not fired (verdict-level 2/139, threshold ~25%) - differential: FULL AGREEMENT — accept-side 47/47, reject-side 92/92 CREDIT: @Sora1916
Summary
This PR models the curated foreign method surface for Go standard library
flag.FlagSet(fixes #4251, Row 13 BUILDABLE).Root Cause & Defect
Previously,
foreign_method_surfaceincompiler/crates/hy-check/src/foreign.rscurated standard library types (such assync.Mutex,http.ResponseWriter,http.RoundTripper,os.File,net.Addr), but omittedflag.FlagSet. Invocations of nonexistent / phantom methods onflag.FlagSetor*flag.FlagSetvalues (e.g.fs.totally_fake_flag_method()) passedhyb checkwith 0 diagnostics, causing downstreamgo buildto fail with fatal errors (type *flag.FlagSet has no field or method ...), violating GUARANTEES.md Row 13.Changes
FLAG_FLAG_SETwith Go's canonicalflag.FlagSetmethods (parse,args,n_arg,set, etc.)."flag.flag_set" | "flag.flagset" | "flag.FlagSet" => Some(FLAG_FLAG_SET)and added"flag"tois_curated_package_root.compiler/crates/hy-check/tests/foreign_flag_flagset_method_surface.rsverifying:flag.flag_setreject fail-closed withHYB-E1002.*flag.flag_setreject withHYB-E1002.flag.FlagSetmethods (parse,args,n_arg,name,parsed) accept cleanly with 0 diagnostics.Settlement Coordinates: EVM (Base / Polygon) USDC:
0xC175c34c256598C7e1AD5B15503cFcED7Ed67e10