Skip to content

Resolver: widen record literals from the local coproduct owner node - #10838

Merged
briansrls merged 6 commits into
mainfrom
session/clever-swift-352
Sep 8, 2026
Merged

briansrls merged 6 commits into
mainfrom
session/clever-swift-352

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Record-literal widening re-looked up the parent coproduct by name. A miss fell through to variant_arm_type_projection, so belt_sessions_observe_for_instance could join Primitive(Observed) against Coproduct(BeltObserve) on the same bytes depending on a later larger resolve.
  • Widening now reads the owner node already on the module's constructor binding (constructor_binding_authority), and only when that parent-name lookup misses. A hit still uses the looked-up declaration so interned field types (including Int for host +) stay intact.
  • That is not the three refuted bind stories (foreign unit-arm competitor, Unique/Ambiguous owner-count, global_bare Conj insert).

Production specimen (closed by execution on the real corpus)

The two jobs that refused at belt_sessions_observe_for_instance are green on this PR. The two run ids are the whole argument:

lane #10838 run 34236406831 (fcde13b) #10683 run 34225196473
required-witnesses-floor PASS (was FAIL on 34225196473) FAIL
heal-generated-artifacts PASS (was FAIL on 34225196473) FAIL
required-witnesses-build FAIL (not the belt specimen)
witnesses FAIL (aggregator: red because build was red)

A reviewer who sees a deleted fixture and a green floor should not have to reconstruct which one was the evidence: the specimen is the floor and heal jobs on those two runs, not a fixture.

What is not evidence

  • There is no fixtures/record_lit_unit_arm_neighbor receipt. Those files were added and then deleted because they had no pre-fix RED — I never compiled that analogue on the pre-fix compiler, so I never observed it refuse. An isolated unit-arm analogue was already measured CLEAN as a bind (fierce-deer-825). Do not cite the deletion as coverage of the production class.

Remaining reds on 34236406831

  • required-witnesses-build drifted std_import.rs: preferring the locals owner on a hit left Int as a NoConnective leaf and emitted OperandIdentityUnavailableAt for + in std.import. Fixed on later SHAs by using the locals owner only on a miss. witnesses is that aggregating job, not a second defect.

Test plan

  • Required floor and heal on this PR go green vs 34225196473 on model QSFP cabling surprise #10683 (run 34236406831).
  • Required build (and therefore witnesses) green after the miss-only owner fill.
  • Existing if_join_pool_binding floor witness still clean on the product-channel fixture (not a substitute for the production specimen).

gunbc-ci-auto-heal and others added 4 commits September 8, 2026 12:55
…-lookup.

An unrelated import was enough to miss lookup_type_by_name on the coproduct and fall through to a unit-arm Observed leaf, so the same if in roadmap_belt_actuate joined Primitive(Observed) against Coproduct(BeltObserve). The constructor binding already carries the owner; use it.

Co-authored-by: Cursor <cursoragent@cursor.com>
…uction specimen.

An isolated unit-arm analogue was already measured clean as a bind. Citing it on the floor would look like coverage of Primitive(Observed) vs Coproduct(BeltObserve) without being able to go red on that class.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ot as unit-arm bind.

The within-run discriminator is a parent-name re-lookup that can miss on a larger resolve after the same module typechecked clean; an isolated unit arm as competitor was already measured not to produce Primitive(Observed).

Co-authored-by: Cursor <cursoragent@cursor.com>
review 62493: the Absent arm of raw_resolved could not run after lookup_variant_parent_enum already consulted the same helper, and the hit path looked up locals three times. Bind owner_from_locals first; name lookup and expected-type fallbacks run only on a miss.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

review 62493: the Absent => local_coproduct_owner_from_locals arm was unreachable, and the hit path consulted locals three times. Fixed in 3bd1396: owner_from_locals is bound once; lookup_variant_parent_enum / variant_owner_node / parent-name re-lookup run only on a miss. The dead arm is gone.

— sent from clever-swift-352

Routing lookup_variant_parent_enum and variant_owner_node through the same Disj locals edge rewrote std.import Int + as OperandIdentityUnavailableAt and drifted std_import.rs with a compile_error. Restore those lookups to lookup_type_for so Unique arm names cannot steal value locals.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

review 62508: the seed helper is the ordinary v1 mirror of 04_infer.dag; a same-diff receipt that only asserted the function exists would be specification-without-execution. The production split (typecheck vs larger-entry resolve) is the discriminator, and the helper stays off lookup_variant_parent_enum / variant_owner_node after the std.import Int + emit regression. No further seed-side receipt in this PR.

— sent from clever-swift-352

Preferring that node on a hit replaced interned Int field types with NoConnective leaves and made std.import `+` emit OperandIdentityUnavailableAt, which is the stage0-mirrors drift on this PR.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

review 62516: same advisory as review 62508 — seed helper mirrors 04_infer.dag; a same-diff existence receipt would not discriminate the miss path. No change.

— sent from clever-swift-352

@briansrls
briansrls merged commit 80d96cf into main Sep 8, 2026
4 checks passed
@briansrls
briansrls deleted the session/clever-swift-352 branch September 8, 2026 16:35
gunbai-bot Bot pushed a commit that referenced this pull request Sep 8, 2026
briansrls pushed a commit that referenced this pull request Sep 8, 2026
* Use the locals coproduct owner when parent-enum lookup misses.

Co-authored-by: Cursor <cursoragent@cursor.com>

#10838 only filled lookup_type_by_name(parent) misses. When lookup_type_for on the locals Disj node fails under a larger resolve, parent-enum is Absent and Observed { } stayed a unit-arm Primitive — the belt_actuate:3532 specimen on bdec61e.

* Cite the belt observe symbol and generated_artifact_gate entry, not a file:line.

review 62580: the infer_record_lit owner comment transcribed a line number, SHA, and diagnostic string. Name the declaration and the larger-entry resolve that re-derives the miss instead.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Match the emitted stage0 parens on infer_record_lit owner widening.

required-witnesses-build refused stage0-mirrors on v1_compiler_infer.rs: the hand mirror was semantically the 04_infer.dag emit, not byte-identical.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Widen Observed from expected coproduct when locals name-lookup still yields a unit arm.

The discriminating tree (one import of product.cable_plant_converge into fabric_switch_observed) still refused belt_sessions_observe_for_instance after the locals-on-parent-enum-miss fill: skip_owner_widen treated an on-chain unit-arm Observed as 'declares its own type', and a parent_enum spelling that is the arm itself never reached variant_owner_node or the declared-return coproduct.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Enroll a two-route record-lit owner compile and bind variant_owner_node once.

review 62614: carry the owner node from one variant_owner_node call; admit test.claim.record_lit_owner_route_witness on the required floor over the same subject bytes as own-entry vs a larger pool.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Remove the non-discriminating record-lit owner floor witness.

review 62626: both compile_fixture arms were pinned compile-clean with no pre-fix RED on origin/main's resolver, so admitting them on required_gate_prefixes would cite a permanently-green pair as coverage. The intern-miss producer remains tools.generated_artifact_gate, not a four-file analogue.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: gunbc-ci-auto-heal <gunbc-ci-auto-heal@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.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.

1 participant