Skip to content

type_param_binder_frame_test: emit-twin helpers are translate outputs (Outcome<Node>); resolve on main since #12432 - #12756

Merged
gunbai-bot[bot] merged 1 commit into
mainfrom
session/eager-newt-412-tpb-retype
Sep 30, 2026
Merged

gunbai-bot[bot] merged 1 commit into
mainfrom
session/eager-newt-412-tpb-retype

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Fixes a latent resolve failure on main: v2.test.claim.type_param_binder_frame has not resolved since #12432 (339be73).

The defect

#12432 retyped tpb_type_decl_emit_twin and tpb_type_decl_emit_generic to Outcome<ResolvedTree>. Both return v2.compiler.translate translate_type_expression_project(...), which is -> Outcome<Node>. They are translate outputs, not resolve outputs. On main 091ea054730, gunbc run --entry src/v2/test/claim/type_param_binder_frame_test.dag --function __no_such_function__ refuses with:

type_param_binder_frame_test.dag:523:3: error: type mismatch: expected 'Node(Outcome<Product(ResolvedTree)>)', got 'Node(Outcome<Primitive(Node)>)'
type_param_binder_frame_test.dag:527:3: (same)

The fix

  • The two producers become Outcome<Node>.
  • Their readers tpb_accepts and tpb_refuses_with inspect only Accepted/Rejected and the fatal reason, so they become generic, Outcome<T>, instead of being duplicated per value type. This follows the precedent of outcome_is_accepted<T> in scoped_type_reflection_conformance_test. The resolve claims keep passing Outcome<ResolvedTree>.

Verified at 09f1fc6, remotely, with gunbc run --function: the module resolves (__no_such_function__ reaches NoSuchFunction), and these all return true: tpb_translator_refuses_a_generic_type_decl_member (the claim over the two retyped producers), tpb_generic_param_binds_to_its_binder, and tpb_undeclared_type_name_still_refuses.

Named, not fixed here: why main's floor never caught it

The module's resolve failure is a declared-coverage gap in the floor. In main's latest green merge-queue run, 36653654636 at cf40081 (which already contains #12432), v2.test.claim.type_param_binder_frame appears in unresolved-module-identities (tpb=1) and not in judged-module-identities (tpb=0). A module that fails to resolve is counted "unresolved" and never becomes a declarations finding, so the run stays green while a test module the floor rosters (the tpb_* rows in v2.workflow.floor_pure_producer_share) does not compile. It surfaced only on the #12628 integration, where changed-witness selection moved it into the judged set and the declarations phase reported the mismatch. That gap (a rostered test module can go unresolved without a finding) belongs to the floor's owners and is out of scope for this PR.

🤖 Generated with Claude Code

…puts (Outcome<Node>); tpb_accepts/tpb_refuses_with are generic over the value

#12432 retyped tpb_type_decl_emit_twin/_generic to Outcome<ResolvedTree>, but they return
translate_type_expression_project's Outcome<Node>, so the module has not resolved on main since then.
The two readers inspect only Accepted/Rejected and the fatal reason, so they take Outcome<T>.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gunbai-bot Bot pushed a commit that referenced this pull request Sep 30, 2026
@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Sep 30, 2026
Merged via the queue into main with commit 6e4026b Sep 30, 2026
5 checks passed
@gunbai-bot
gunbai-bot Bot deleted the session/eager-newt-412-tpb-retype branch September 30, 2026 09:15
briansrls pushed a commit that referenced this pull request Sep 30, 2026
… reversions

The local witnesses floor refused where the four claim sets could not: both
defects are in modules outside those sets, which is the whole reason the floor
exists and is a repeat of a class I have a standing note on (run the consumers,
not the file you edited).

infer_application_formals was widened by this lane to read a callee's arrow
through the callee's facts, and v2.test.claim.declared_parameter_order was never
compiled against it. Its two call sites now supply entries: [], which is the
fixture's actual premise rather than a stub -- dpo_application puts the Arrow AT
positional 0, so infer_operator_arrow answers from the node and the facts route is
never consulted. A non-empty list would invent a hypothesis this claim's subject
does not have.

tpb_type_decl_emit_twin and tpb_type_decl_emit_generic were reverted to
Outcome<ResolvedTree> by my hand-composition of main; #12756 had already corrected
them to Outcome<Node>, which is what translate_type_expression_project returns.
Main's version restored.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants