Repository navigation
fix(hy-check): model curated foreign method surface for context.Context (fixes #4248) - #4249
Merged
limitlessprojects merged 1 commit intoNov 9, 2026
Conversation
limitlessprojects
merged commit Nov 9, 2026
5c6eebb
into
limitlessprojects:main
1 of 2 checks passed
Owner
Landed — merge
|
| Gate | Result |
|---|---|
| Merge gate | auto-merge clean (author based on current main 5a93dff0) |
cargo test --workspace |
3222 passed / 0 failed (+4 = your suite's test count exactly); 491 suites = 491 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 + CREDIT: @jpereyra243-byte), pushed, git ls-remote origin main == local HEAD asserted. fixes #4248 closes with this merge.
Bounty: per BOUNTY.md / discussion #295 rail — curated foreign method surface (context.Context), logged under this PR number.
CREDIT: @jpereyra243-byte
Contributor
Author
|
Payout wallet (USDC on Base / Polygon): |
limitlessprojects
pushed a commit
that referenced
this pull request
Nov 9, 2026
…#4251) Round-2 re-push (1363bf3) fixed the round-1 gate exactly as prescribed: "bool_func" added to FLAG_FLAG_SET (go1.26.9 go doc flag.FlagSet.BoolFunc exists; name is representable, not a keyword), accept-control extended with _ = fs.bool_func("v", "verbose", nil). Probes on the merged tree: fs.bool_func(...) -> OK (0 diagnostics, round-1 false-reject resolved); fs.totally_fake_flag_method() -> HYB-E1002 (fail-closed intact). In-merge conflict disclosure: the branch point predates #4249's landing of the sibling context.Context surface; three disjoint hunks of foreign.rs conflict at identical anchors. Resolved by scripted union (scripts/union_4252.py, S160 procedure): both sides kept in every hunk — CONTEXT_CONTEXT + FLAG_FLAG_SET consts, both dispatch arms, both is_curated_package_root entries ("context" + "flag"). Presence assertions green: both surfaces defined and dispatched exactly once, balance asserted. Context suite (4 tests) and flag suite (3 tests) both pass together on the union tree. Verification evidence (S172 battery, main 5653900 + 1363bf3): - merge gate: 3-hunk union splice, assertions above - cargo test --workspace: 3225 passed / 0 failed (+3 = PR suite count) - suites: 492 files == 492 running, 1:1 - corpus: 139/139, tripwire not fired (verdict-level 2/139, threshold ~25%) - differential: FULL AGREEMENT — accept-side 47/47, reject-side 92/92 CREDIT: @jpereyra243-byte
limitlessprojects
pushed a commit
that referenced
this pull request
Nov 9, 2026
…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
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
This PR models the curated foreign method surface for Go standard library
context.Context(fixes #4248, 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 omittedcontext.Context. Invocations of nonexistent / phantom methods oncontext.Contextor*context.Contextvalues (e.g.ctx.cancel(),ctx.unsupported_call()) passedhyb checkwith 0 diagnostics, causing downstreamgo buildto fail with fatal errors (type context.Context has no field or method ...), violating GUARANTEES.md Row 13.Changes
CONTEXT_CONTEXTwith Go's canonical 4 interface methods:["deadline", "done", "err", "value"]."context.context" | "context.Context" => Some(CONTEXT_CONTEXT)and added"context"tois_curated_package_root.compiler/crates/hy-check/tests/foreign_context_method_surface.rsverifying:context.contextreject fail-closed withHYB-E1002.*context.contextreject withHYB-E1002.HYB-E1002.context.Contextmethods (deadline,done,err,value) accept cleanly with 0 diagnostics.Settlement Coordinates: EVM (Base / Polygon) USDC:
0xC175c34c256598C7e1AD5B15503cFcED7Ed67e10