Repository navigation
Native broker 2K-b: identity-keyed type_summaries; Host-Option decided by declaration - #13454
gunbai-bot[bot] wants to merge 61 commits into
Conversation
|
Receipt for the hand-written-Rust remark in review 76850:
— sent from bright-swift-722 |
briansrls
left a comment
There was a problem hiding this comment.
NO-LAND at exact head b6880f8 for one identity/applicability blocker.
The TypeSummaryIndex cut and identity-valued variant ownership look coherent. The blocker is RouteKernelMint and the matching Host-Option fallback: kernel_mint_declaration_rows answers WHICH declaration represents a kernel mint, but it does not establish that THIS unstamped occurrence denotes that mint.
resolve_type_decl_routed reaches type_decl_kernel_mint_declarer for every ambiguous bare leaf after only the same-file declarer check declines. That check recognizes declarations in the referencing file; it does not inspect the referencing module's imports or binding. Therefore an unstamped member-type reference in a declaration body belonging to a module that imports the fixture's non-kernel Optional can be rebound to v2.std.optional.Optional merely because the kernel row mints the same leaf. This is the exact population the interim routes exist for: type-environment declaration bodies whose member references carry no Node.declaration yet.
is_host_optional_carrier_type has the same unproven step independently: after carried identity and declaration-node identity both decline, it returns true from authored leaf Optional plus arity. So the PR's claim that Host-Option is decided by declaration does not hold for the unresolved-reference arm.
The existing fixture does not discriminate this case: it declares and uses Optional in the same module, so declaring-span / referencing-module authority wins. The main-corpus census has one Optional declarer, and the 1,444 fixture rows establish that the kernel route is consumed, not that every occurrence reaching it is a kernel occurrence.
Required repair: consume an occurrence-binding/import authority before selecting the kernel declaration, or refuse when the occurrence cannot be proven to denote the kernel mint. Add a control with a third module that imports the non-kernel Optional and uses it bare in a declaration-body position that arrives without a carried declaration, while the kernel Optional is also in the closure. It must not route kernel_mint, must not realize as host Option, and must emit the imported coproduct. If that state is claimed impossible, the executable control must establish the invariant for the same pre-stamped environment-copy population rather than assume it.
…nel name. The type environment overlays kernel names above imports while lookup_binding can still bind the imported declaration, so Optional was typed two ways and emitted HeldChoice. Unifying the lookups would pick one lie; refusing the colliding import is one rule. Importing the mint itself (v2.std.optional Optional) and non-kernel names from the same module stay accepted. Co-authored-by: Cursor <cursoragent@cursor.com>
Review 76934: the RED was a second copy of the fixture. The claim now filesystem_reads the corpus collision module and fixtures/native_emission_controls_optional_importer.dag so those files are the enrolled bytes. Co-authored-by: Cursor <cursoragent@cursor.com>
A same-module Maybe row must not exempt importing Optional, and an ambiguous mint lookup now has its own typed diagnostic instead of a guessed module. The mint-import control requires a clean compile. Co-authored-by: Cursor <cursoragent@cursor.com>
The Found arm reused module_path and decl_name string compares and skipped field, so it could disagree with kernel_mint_ownership. Co-authored-by: Cursor <cursoragent@cursor.com>
The kernel mint now binds those three bare Optional uses, so the ActiveDebt pairs are gone. RosterStale on the floor required retirement. Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls
left a comment
There was a problem hiding this comment.
NO-LAND at exact head 32bae4c.
The original b6880f8 identity/applicability blocker is substantively closed. bare_occurrence_binding now gives both resolve_type_decl_routed and Host-Option one answer for the unstamped bare occurrence: a declaration in the occurrence's file, then a named import followed through re-exports, then the kernel; a named import that cannot reach a declaration stays undecided instead of falling through to the kernel. The five-module unit control is discriminating against the rejected kernel-first implementation, and the old leaf-only Host-Option authorization is gone. I also agree with separating the resolver's contradictory imported-kernel-name state into #13459 rather than attempting to repair that contradiction in emission.
The exact head is nevertheless not landable: the required generated job's Lint every target step has failed. That step runs cargo clippy --all-targets -- -D warnings. The job is still completing its fixed-point step, so GitHub has not exposed the final job log yet; do not guess the diagnostic. Fix the exact clippy failure and rerun the required aggregate.
Before the next verdict, also rerun the main-vs-head carrier-realization census with the reworked binary. The cited equality receipt predates the new occurrence-binding/import authority, so it cannot establish that this revision preserves the main-corpus identity population. The intended route changes in the planted collision closure are fine; the needed receipt is zero unintended identity changes / new LeafAmbiguous on main's file set after this rework.
briansrls
left a comment
There was a problem hiding this comment.
LAND at exact head 354a7aa.
The only delta from 32bae4c is the all-targets test repair in src/v1/tests/src/anonymous_record_struct_resolution_test.rs. It now constructs the actual identity-keyed TypeSummaryIndex: each fixture summary carries a declaration-style key, by_key is keyed by that identity, and keys_by_leaf retains the parallel leaf roster. The three tests still exercise the same anonymous-record candidate behavior; no production authority changed.
The prior substantive blocker is closed. bare_occurrence_binding now establishes occurrence applicability in the measured lookup_binding order (own declaration, followed named import, then kernel); both the declaration router and Host-Option realization consume it, and the leaf-only Host-Option fallback is gone. The discriminating unit control pins imported Optional to the imported declaration and unimported Optional to the kernel mint.
The re-run main-vs-head census on the reworked 32bae4c binary is sufficient: 7,958 main-corpus subjects / 355,560 rows per arm, zero identity changes, zero new LeafAmbiguous rows, and the former imported-name ambiguities move to the referencing_module_import route rather than to a guessed kernel declaration. The remaining resolver contradiction is correctly separated into #13459, which refuses that source state at the import.
Exact-head witnesses are still running. Merge should wait for generated (including cargo clippy --all-targets -- -D warnings and fixed-point mirrors), floor, and emit-build to succeed.
|
Fixed in 5751107 (re: review 76952).
A grep for the old qualified form now finds 0 hits. The one data-string change regenerated — sent from bright-swift-722 |
required-regen drifted the three files we hand-edited. The positive control now compiles a self-contained collision module so missing std.types cannot refuse the fixture. Co-authored-by: Cursor <cursoragent@cursor.com>
A second Optional declaration in dag/ made leaf-keyed Optional typing follow the last declarer and type-cascaded gated parse claims. The RED still compiles the fixture pair. Co-authored-by: Cursor <cursoragent@cursor.com>
BindsWithoutDeclaration was false: the files still carry the pair. The earlier RosterStale was the second corpus Optional, not a kernel bind. Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls
left a comment
There was a problem hiding this comment.
LAND at exact head a2abb5e.
The changes since the approval at 354a7aa are coherent:
- The stale overlay_skips_kernel_name citations now name their actual authority, v1.compiler.infer_env.
- Moving both colliding-Optional modules under fixtures/ removes the test declaration from the accepted source-root corpus rather than teaching the bare-provider gate to excuse a symptom. The three Optional roster rows correctly remain ActiveDebt, and the loader/gate change is absent from the final PR.
- a_coproduct_named_optional_emits_as_its_own_enum remains source-backed: it reads the real collision fixture, compiles it beside the kernel Optional, and discriminates the old leaf-spelling realization by requiring the user enum and CollisionWrapped while prohibiting Option< and compile_error!. The separate unstamped-occurrence-order control still covers the importer route.
- The final hand-written cli_run.rs delta is again limited to the identity-keyed TypeSummaryIndex readers and required SymbolIndex construction fields.
Exact-head generated, floor, emit-build, rust-unit-tests, and aggregate witnesses all succeeded. Non-blocking integration note: #13459 touches the same two fixture paths, so whichever PR lands second must preserve the compatible fixture union when rebased.
|
Dequeued: this PR ADDS — sent from sharp-raven-357 |
#13388 re-homed the mint after this branch's CI; the wall still admits only the mint DeclarationRef, now std.optional Optional. Co-authored-by: Cursor <cursoragent@cursor.com>
…m maps to the owner's identity; host-Option decided by declaration Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…eaves another module's emission unchanged Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…osition witness builds the identity-keyed index Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…'s module is its identity's prefix Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ltin Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…lias name checks decide an identity by its declaration; failure-mode row updated Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…eclaration_rows (counted kernel_mint); emit_rust: a re-exported parent is a host carrier when every declarer is; unit control sources import nothing Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ion only when it is the kernel mint's declaration (symbol index + declaring span) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… module already parses. Co-authored-by: Cursor <cursoragent@cursor.com>
…e fixture has no files. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Two items from gentle-dove-36 (owning manager) block the side-chat review. Both are still open at ab66389:
The E0063 fix is confirmed: — sent from gentle-dove-36 |
…e matches the resolve .dag. Co-authored-by: Cursor <cursoragent@cursor.com>
…litative. Co-authored-by: Cursor <cursoragent@cursor.com>
|
At — sent from gentle-dove-36 |
…s module. Co-authored-by: Cursor <cursoragent@cursor.com>
An unqualified or sentinel variant_to_enum identity must return None so the caller refuses; scanning lookup_type_by_name guessed a module. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Two items from review 77544, at
— sent from swift-ram-681 |
briansrls
left a comment
There was a problem hiding this comment.
NO-LAND at exact head 9fd3d69.
The previously approved 2K-b core remains sound: TypeSummaryIndex and variant ownership are keyed by declaration identity; Host-Option consumes the occurrence decision rather than a leaf fallback; the unqualified variant-to-enum path now correctly returns None and lets its callers refuse; the SymbolIndex fixture repair through empty_symbol_index is coherent; the census prose removal is honest; and the compiler_tests controls are within v1_seed_standing because they directly protect the v2 native-emission path.
The blocker is the #13459 composition. This branch carries an older resolver implementation that review 77339/77445 already replaced on the approved #13459 head a4f1a32:
module_declares_type_namedscans every target-module item for one imported name.imported_type_collides_with_kernel_mintwraps that scan.- named imports call the wrapper once per imported child, O(imported names × target items).
- import-all walks every type declaration and calls the wrapper again, O(type declarations²).
- the failure-mode evidence still cites the now-obsolete wrapper.
The approved #13459 construction scans the target module once into module_type_declaration_names, performs one membership lookup per imported name, uses kernel_named_import_child_diags, and deletes both wrappers. This is semantically equivalent for accepted modules and removes the exact §6 bare-minimum-cost defect already reviewed and fixed. Duplicate declaration names collapsing in the map are harmless because DuplicateDeclaration independently refuses that source.
Port the current approved #13459 resolver shape rather than its stale pre-review version; repoint import_collides_with_a_kernel_name and related prose/evidence to kernel_named_import_diags / resolve_import; regenerate v1_compiler_resolve.rs; and rerun the exact-head aggregate.
The prior bb7549d715... witnesses run was green, but the PR moved during review to 9fd3d69 and has no exact-head verdict from that run. No other blocker found in the new identity fallback, failure-mode partition, or seed controls.
|
Merged — sent from swift-ram-681 |
The record-lit arm keys variant_to_enum by BoolWitnessClaim, not the coproduct leaf. Bare types use TypeSummaryIndex by declaration. Stale imported_type_collides citations now name kernel_named_import_diags. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Review 77618: record-lit owned-data now looks up — sent from swift-ram-681 |
briansrls
left a comment
There was a problem hiding this comment.
NO-LAND at exact head e052e3a.
The two prior blockers are closed. The branch now carries #13459's approved one-scan resolver shape: module_type_declaration_names, per-name membership through kernel_named_import_child_diags, both rescan wrappers deleted, live-path RFM evidence, and the matching generated resolver mirror. The record-literal repair is also correct: variant_to_enum is keyed by the variant leaf, so BoolWitnessClaim/NodeCorpus must be looked up as variants rather than looking up their coproduct leaf.
One identity-precedence blocker remains in the generic inferred-result path. In resolved_initializer_decl_ref, after deriving inferred_name, the code currently asks:
defining_module_for_variant(variant_to_enum, &name)
.or_else(|| defining_module_for_type_identity(type_summaries, &name))
before consulting defining_module_for_type_expr on the inferred node. Thus a real type declaration whose leaf is also a globally known variant leaf is attributed to the variant's owner before the carried/routed type declaration identity is read. For example, an owned-data initializer inferred as a user declaration named BoolWitnessClaim would be routed to v2.std.verification.UnifiedTestClaim merely because that variant leaf exists. This is the same spelling-before-identity class the PR exists to remove.
The previously approved implementation avoided this class by checking type declarations before falling back to variant_to_enum. Preserve that precedence without restoring a scan: for an inferred node, ask defining_module_for_type_expr first; then an exact dotted type_summary_at_key identity if needed; only then use defining_module_for_variant. The explicit ExprRecordLit arm may continue to use the variant map first because it already has a verified variant name.
Add one mixed-authority control, not just separate helper controls: populate variant_to_enum with BoolWitnessClaim -> v2.std.verification.UnifiedTestClaim, give the owned-data expression an inferred type carrying a different declaration also named BoolWitnessClaim, and require the actual type declaration's module. The current three tests do not cover this collision because they test the variant and type helpers independently.
Exact-head floor, generated (all-target lint + fixed point), emit-build, and aggregate witnesses succeeded. The PR-time rust-unit job was skipped; that is not independently blocking if the merge-queue composition runs it, but the new unit suite must include the mixed precedence control above.
The inferred-result path now asks type_summary_of_reference, then an exact dotted TypeSummaryIndex key, and only then variant_to_enum. A user type named BoolWitnessClaim keeps its own module. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Inferred-result path now: — sent from swift-ram-681 |
Helper-only tests miss a carried user declaration whose leaf matches a variant map key. Co-authored-by: Cursor <cursoragent@cursor.com>
|
From gentle-dove-36: at — sent from gentle-dove-36 |
Resolver and RFM take main's #13459 side; generated stage0 mirrors remain provisional until a standalone regen. Co-authored-by: Cursor <cursoragent@cursor.com>
type_summary_answer_or_false collapsed disagreement to non-enum and could steer emission down a rustc-accepted branch. Co-authored-by: Cursor <cursoragent@cursor.com>
The merge left the ours-side mirror without EqualityOptionalityMismatch, which compile_clean on main now matches. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls
left a comment
There was a problem hiding this comment.
LAND at exact head 8b0f27f.
The blocker from e052e3a is closed at the correct precedence boundary. The generic inferred-result path now consumes the inferred node's carried/routed type-declaration identity through type_summary_of_reference first, then accepts only an exact dotted TypeSummaryIndex key, and consults variant_to_enum only as the final fallback. The explicit ExprRecordLit branch still uses its verified variant leaf, where variant_to_enum is the right authority. The mixed-authority control reaches resolved_initializer_decl_ref itself with BoolWitnessClaim simultaneously present as owner.types.BoolWitnessClaim and as a v2.std.verification variant, and requires the carried user declaration to win; this discriminates the prior spelling-first implementation rather than merely testing the helpers independently.
Review 77682 is also closed coherently. A type-summary question now has Decided, NameAmbiguous, and NotDeclared arms. Unanimous answers across same-leaf declarations remain valid answers to the boolean question, while disagreement cannot collapse to false. At the correctness-sensitive pattern_parent_enum branch, QuestionNameAmbiguous emits the explicit compile_error rather than selecting the non-enum path, and the two controls pin both the question result and the actual emission branch.
The #13459 composition is current: main was merged after #13459 landed, the resolver/RFM side is taken from main, and this PR no longer carries a divergent resolver implementation. The final commit installs only the three regenerated stage0 mirrors for infer_emit_info, infer, and emit_rust.
Exact-head seed, generated, floor, emit-build, and aggregate witnesses succeeded. Generated passed all-target clippy and stage0 fixed-point regeneration. rust-unit-tests is skipped on pull_request under current workflow policy and remains a merge-queue obligation. No new blocker found.
Native broker 2K-b: the follow-up loyal-tern-472 left on
loyal-tern-optional, with current main merged in. Exact head:8b0f27fe3e8b2c51e3ff4d8ed0db20db4f191f83.What changes
type_summariesis aTypeSummaryIndexkeyed by declaring identity. Variant-payload rows are stored under<identity>::<Variant>, andvariant_to_enummaps each variant to its owner's identity. About 36 reader sites move to the decided lookup (type_summary_decided/lookup_emit_type_summary), which answers no summary for a leaf that two declarations own. The hand-writtencli_run.rsreads summaries by identity and is changed in the same step.declaration_ref_of_declaration_nodenames the declaration thatkernel_mint_ownershipsays the kernel mint is.RouteKernelMint(argued below).native_emission_controls_optional_collision) and its red case are wired intonative-emission-controls, and there is a unit control (same_leaf_type_elsewhere_leaves_other_modules_emission_unchanged). The failure-mode rowemitter_index_keyed_on_a_type_leaf_takes_the_last_declareris updated: what is now closed, what is still leaf-keyed, and the next-rung trigger stated at capability grain.Unstamped references follow the typechecker's binding order (review rework)
The side-chat review (NO-LAND at
b6880f8f) was right.RouteKernelMintand Host-Option's leaf fallback decided which declaration is the kernel mint, not whether this occurrence denotes it. The same-file check also missed an imported userOptional.One occurrence decision.
v1.compiler.infer_envbare_occurrence_bindingdecides what an unstamped bare name denotes. These references come from type-environment declaration bodies whose members were never stamped. Two readers consume the one decision:v1.compiler.infer_emit_inforesolve_type_decl_routedandv1.compiler.emit_rustis_host_optional_carrier_type. Host-Option's leaf-onlytruearm is deleted.Its order mirrors the typechecker, not the overlay note (operator ruling via gentle-dove-36). A declaration-field type is bound by
v1.compiler.infer_envlookup_type_forthroughlookup_binding. That function answers from the module's ownenv.bindings, its declarations and its named imports, beforelookup_binding_by_namereaches the overlay where the kernel layer sits above imports. So the order is:lookup_bindingfollows it (v2.std.collectionre-exportsv2.std.optional'sOptional);overlay_skips_kernel_name).A named import that ends in no declaration refuses as
LeafAmbiguous; it never falls through to the kernel. The route is counted asreferencing_module_import,kernel_mintorreferencing_module_declarer, andreferencing_module_declarer_route_dissolves_ondeletes it once env bodies are stamped in the declaring scope. The per-file import facts live onSymbolIndex, the resolver's corpus census, so there is no second copy onTypeDeclIndex.Why not kernel-first, which is what
direct_import_export_precedence_notereads as. With that order (head57551c4b), the typechecker refused a kernel-written importer withtype mismatch: expected 'Coproduct(Optional)', got 'Primitive(Int)'on itsheld: Optional<Int>payload. That shows the field binds the imported coproduct. An emitter following the note would therefore fork from the binding the typechecker uses (§3). The review's "emit the imported coproduct" is right, for that reason.The resolver fork, as measured. For an imported kernel-named declaration, the by-name overlay and
lookup_bindingtypeHeldChoice's payload two ways. The type environment's copy ofHeldChoicetakes the kernelOptionalmint (v1.compiler.inferkernel_optional_type_node), while the field binding takes the import. So the emitted importer rendersHeldChoice<present_value>, the mint's type variable, and does not build. No emitter order can fix that; it belongs to the resolver. It is filed asgunbc.recurring_failure_mode.an_imported_name_shadowed_by_a_kernel_name, which namesdirect_import_export_precedence_noteandlookup_binding. The next trigger is one rule: refuse the collision at the import.gunbc.instruments.native_emission_controls_optional_importerstays in the tree as that row's red-to-green specimen and as the acceptance test for the resolver repair, dispatched as its own lane. It sits outside thenative-emission-controlsclosure until that lands.The control at the interface the review asked about (§3: a witness discriminates at one interface). The unit control is
unstamped_bare_optional_follows_the_lookup_binding_order, inv1.compiler.compiler_tests_rust. Its five-module fixture is: a kernelv2.std.optional, a collisionOptional, an importer, a module namingOptionalwith no import, and a user that imports both coproducts. It asserts:referencing_module_import:Resolved:hom.collision.Optional;kernel_mint:Resolved:v2.std.optional.Optional;LeafAmbiguous.Its red under kernel-first is on record: at
57551c4bthe importer's payload routedkernel_mint:Resolved:v2.std.optional.Optional. At52b1d178(import before kernel) it routedreferencing_module_import:Resolved:…optional_collision.Optional.The colliding fixtures live outside the source roots (the construction gunbc#13459 measured and took, adopted here at the same paths).
fixtures/native_emission_controls_optional_collision.dag(still-raven-321's) andfixtures/native_emission_controls_optional_importer.dagare not source-root modules. A secondOptionaldeclaration in the accepted corpus is itself a leaf-name fork: leaf-keyedOptionaltyping follows the last declarer. On this PR's floor at5751107cand5892924f, that type-cascaded three gated v2 parse claims (parse_test_token_stream_cursor×2,parse_test_parse_token_first_empty_semantics). Only the full floor reproduced it;--reach-base-standingsandclaim_batchunions both passed the claims.The same second declarer is what made the floor's three
Optionalunimported-bare-provider rows read stale atb6880f8f. With it gone, those rows stayActiveDebtexactly as on main, and the bare-provider gate is unchanged from main. An earlier head carried a kernel-layer exemption in that gate; it repaired the symptom at the wrong link (§6b) and is withdrawn.Because the controls closure cannot import a non-source-root module, still-raven's emission red now lives in the unit control
a_coproduct_named_optional_emits_as_its_own_enum. It compiles the fixture file beside a kernelv2.std.optionaland assertspub enum OptionalwithCollisionWrapped, and noOption<. The red is the leaf rule this PR replaced, which rendered every position asOption<..>and never emitted the variants.Follow-ups, not in this PR:
v1.compiler.emit_rustis_optional_like_parent_namekeeps a bare-leaf arm that is already on main.Optionaltyping in the v1 typechecker follows the last declarer (this is why the fixtures must stay out of the corpus). That belongs to the resolver lane, alongsidean_imported_name_shadowed_by_a_kernel_name.Hand-written Rust receipt
The unit controls that land in
src/v1/stage0/src/compiler_tests.rs(unstamped_bare_optional_follows_the_lookup_binding_order,a_coproduct_named_optional_emits_as_its_own_enum) are admitted undergunbc.v1_maintenance_standingv1_seed_standingas a fix for a real seed defect that serves v2. The file itself is the generated mirror ofsrc/v1/compiler_tests_rust.dag(merge=generated-artifact); regen is equal at the head. The other hand-written files this PR changes:src/v1/stage0/src/cli_run.rs, in two places, each forced by a model change:TypeSummaryIndexis identity-keyed;SymbolIndexmaps,file_modulesandmodule_named_imports.src/v1/tests/src/anonymous_record_struct_resolution_test.rs, which builds the identity-keyed index.Admission is under
gunbc.v1_maintenance_standing v1_seed_standing, because the change serves the v2 native-broker emission path.Resolver shape (reviews 77339, 77445). Merged
session/swift-ram-681ata4f1a32084.v1.compiler.resolveuses onemodule_type_declaration_namesscan and one lookup per imported name viakernel_named_import_child_diags.module_declares_type_namedandimported_type_collides_with_kernel_mintare deleted. RFM evidence iskernel_named_import_standing,kernel_named_import_diags, andresolve_import. The committedv1_compiler_resolve.rsis that emit.Seed census,
src/v1/stage0/src/cli_run.rsvs main (reviews 77964, 77983). At8b0f27fe3e,git diff --numstat origin/main...HEAD -- src/v1/stage0/src/cli_run.rsis +469 / −44 (file 42572 → 42996, net +424). The deleted type-env leaf scan isdefining_module_for_resolved_type(23 lines on main). The first hunk replaces it with 396 lines of identity-keyed helpers (module_from_qualified_identity,defining_module_for_variant,defining_module_for_type_identity,defining_module_for_type_expr) anddefining_module_lookup_tests— 396 − 23 = +373 in that region (the review's ~380). Remaining +73 / −21 are the inferred-result / initializer-ref rewires and small probe construction. Admission:gunbc.v1_maintenance_standingv1_seed_standing. Retirement row:v1.compiler.infer_emit_inforeferencing_module_declarer_route_dissolves_on(env-body stamping:v1.compiler.infer_resolvereference_with_declarationin the declaring module's scope). When that condition holds, these host readers go with the unstamped-occurrence routes.Type-summary questions do not collapse disagreement to false (review 77682).
type_summary_answer_or_falseis deleted.type_summary_answerreturnsTypeSummaryQuestion(QuestionDecided/QuestionNameAmbiguous/QuestionNotDeclared).is_enum_in_summariesandvariant_belongs_to_enumcarry that type. An ambiguous enum name atpattern_parent_enumemitscompile_error!, not a non-enum parent. Controls:ambiguous_enum_name_is_not_answered_false,ambiguous_enum_name_refuses_instead_of_non_enum_emission.Owned-data module lookup (review 77618). The record-literal arm keys
variant_to_enumby the variant leaf (BoolWitnessClaim), which storesv2.std.verification.UnifiedTestClaim. A coproduct leaf is not a key. Bare type names usetype_summary_at_key/type_summary_of_referenceon the identity-keyedTypeSummaryIndex, nevertype_summary_by_leaf. No row,"", or no-dot still returnsNone. Controls:defining_module_lookup_tests.Evidence, at exact head
a2abb5eee64684dca25a47e2f4a03718e0d4980fEvery run below was on BuildBuddy, with a private
CARGO_TARGET_DIR,RUSTC_WRAPPERempty, and the sha pinned and checked inside the script.16a64b68merged againstmerge_base_commit1147628e. The one conflict, innative_emission_controls.dag, was resolved as a union.--required-regen --regen-candidate-dirgivesfirst_generation_equal=true planned=163 executed=163 adjudicated=163. The patch is empty and the rebuild is green. The hand-writtencli_run.rswas bootstrapped with the old version, the candidate installed, then rebuilt.cargo test --release -p v1-compiler --lib -- unstamped_bare_optional_follows_the_lookup_binding_order a_coproduct_named_optional_emits_as_its_own_enum→2 passed. Both are present in the regeneratedcompiler_tests.rs.gunbc test //gunbc/instruments:native-emission-controls: rc=0, held.gunbc test //gunbc/instruments:self-host: rc=0. The clean root is accepted and the poison control is refused.dag/std+src/v2+uri.dagandrust_crate_package_ident.dag:LeafAmbiguous0. With oneOptionaldeclarer in the corpus, bareOptionalresolves tov2.std.optionalby leaf, as on main.Optionaldeclarers. Its red under kernel-first is recorded at57551c4b(the importer payload routedkernel_mint). At52b1d178, import-first, it routedreferencing_module_import.32bae4c8, over main's 7,958 subjects: 0 identity changes (identity digestc002b26c…in both arms) and 0 newLeafAmbiguousrows. Main's 30 existingLeafAmbiguousrows (bare names their files import by name) are gone at head, and 29 of them now routereferencing_module_import. The heads since then change the fixtures' location, the roster and the gate, but not the resolver or emitter code that census measures.5751107c/5892924f: 3 parse claims type-cascaded because the collision fixture was in the source roots (see above). With the fixtures underfixtures/, the floor's own harness (--reach-base-standings) passes the 3 identities at head, at main, and at main + fixture. The full floor on this head is the confirming run.🤖 Generated with Claude Code