Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
93af325
Refuse an authored import of a non-mint type that collides with a ker…
Oct 6, 2026
ca07d88
Witness compiles the importer and collision files, not a forked string.
Oct 6, 2026
785270a
Require mint DeclarationRef equality and refuse ambiguous mint rows.
Oct 6, 2026
c648d23
Admit a mint import only via declaration_ref_eq.
Oct 6, 2026
d851c41
Retire stale Optional unimported-bare-provider rows.
Oct 6, 2026
f88f6e4
Install emitted stage0 mirrors and isolate the non-kernel control.
Oct 6, 2026
a085556
Keep the colliding Optional out of the source-root corpus.
Oct 6, 2026
c13efd6
Restore the three Optional unimported-bare-provider rows.
Oct 6, 2026
7219bbd
Merge remote-tracking branch 'origin/main' into session/swift-ram-681
Oct 7, 2026
d6e32f4
Repoint this PR's mint Optional citations onto std.optional.
Oct 7, 2026
e99aa7e
emit_info: type_summaries keyed by declaring identity; variant_to_enu…
Oct 5, 2026
10f0078
emit_info: fn-type syntax; unit control: a same-leaf type elsewhere l…
Oct 5, 2026
a7681cf
emit_info: lookup_emit_type_summary answers the decided summary; disp…
Oct 5, 2026
cc0933e
cli_run: read type summaries by declaration identity; a variant owner…
Oct 5, 2026
208db2c
emit_rust: summary presence through the decided lookup, not a map bui…
Oct 5, 2026
dd7b1c9
emit_rust: shared set by declarer agreement; host-option and native-a…
Oct 5, 2026
f9cebcc
emit_info: a bare kernel-mint spelling resolves through kernel_mint_d…
Oct 5, 2026
2db5765
emit_rust: a reference resolved to a declaration node is the host opt…
Oct 5, 2026
2b5aed2
emit_rust: bind the mint declaration's path before concatenating
Oct 5, 2026
cfd5a87
emit_rust: bind the declaration-node test before the condition (a con…
Oct 5, 2026
0fe67e2
emit_rust: a coproduct structure is the host option only when built f…
Oct 5, 2026
679ba6a
emit_rust: a declaration structure is the host option only when decla…
Oct 5, 2026
1db5cae
emit_info: an unstamped bare leaf is decided by its occurrence's file…
briansrls Oct 6, 2026
abd0fea
Back out the explicit Optional imports: v2.std.optional is not in the…
briansrls Oct 6, 2026
7923441
Unstamped occurrences follow the resolver's order (own file, kernel, …
briansrls Oct 6, 2026
65871af
Occurrence decision mirrors lookup_binding (own file, named import, k…
briansrls Oct 6, 2026
7c83d48
Import arm decided by the import's declaration (node join, else modul…
briansrls Oct 6, 2026
b5ee63f
A named import is followed through re-exports to the declaring module…
briansrls Oct 6, 2026
6098708
Importer specimen leaves the emission-controls closure (the resolver …
briansrls Oct 6, 2026
8c605bb
compiler_tests_rust: escape the interpolation brace in the new contro…
briansrls Oct 6, 2026
cdfed09
anonymous_record_struct_resolution_test: build the identity-keyed Typ…
briansrls Oct 6, 2026
cd41f67
Cite overlay_skips_kernel_name at its new home, v1.compiler.infer_env…
briansrls Oct 6, 2026
90a90c3
Regenerate gunbc_rust_source_type_bindings.rs mirror
briansrls Oct 6, 2026
241c386
Bare-provider gate: a kernel-layer name owes no pair (overlay_skips_k…
briansrls Oct 6, 2026
e850e69
Keep the colliding Optional and its importer out of the source-root c…
briansrls Oct 6, 2026
fc21c85
Repoint this lane's Optional citations to std.optional after #13388 r…
Oct 7, 2026
77b8451
Read identity-keyed type summaries through the committed HashMap seed…
Oct 7, 2026
bdfdcf0
Regenerate stage0 mirrors at the 13454/std.optional fixed point.
briansrls Oct 7, 2026
0d8690b
Read type summaries through TypeSummaryIndex.by_key now that the rege…
Oct 7, 2026
12cd8e5
Converged stage0 mirrors after TypeSummaryIndex seed rebuild.
briansrls Oct 7, 2026
f4f0a56
Walk each imported type against a one-scan declaration-name set.
Oct 7, 2026
46ccad0
Fill SymbolIndex.file_modules and module_named_imports after the rege…
Oct 7, 2026
7975886
Retire the three Optional roster rows as ImportsFixed now that those …
Oct 7, 2026
7e9bf09
Dissolve the stale shadowed-by-kernel-name class into import_collides…
Oct 7, 2026
81bd6ed
Retarget the overlay-shadow class to non-mint kernel names; Optional …
Oct 7, 2026
5ab8a3c
Delete the unused per-name kernel-mint wrappers; cite the resolve pat…
Oct 7, 2026
037ff25
Parse the one-scan type-declaration fold with the same fn form the re…
Oct 7, 2026
0a9ecf0
Collect type-declaration names with the filter/map/fold spelling this…
Oct 7, 2026
ab66389
Take the peel-probe SymbolIndex file maps from empty_symbol_index; th…
Oct 7, 2026
a4f1a32
Install the emitted v1_compiler_resolve.rs mirror so generated surfac…
Oct 7, 2026
307617f
Drop transcribed kernel-import census counts; the wall's scope is qua…
Oct 7, 2026
bb7549d
Refuse an unqualified variant-to-enum identity instead of guessing it…
Oct 7, 2026
9fd3d69
Delete the type-env scan from defining_module_for_resolved_type.
Oct 7, 2026
0150667
Merge session/swift-ram-681: one-scan kernel-import resolve wall.
Oct 7, 2026
e052e3a
Look up owned-data modules by variant leaf or type identity.
Oct 7, 2026
ae38e97
Prefer type-declaration identity over a colliding variant leaf.
Oct 7, 2026
820265d
Cover the BoolWitnessClaim collision at resolved_initializer_decl_ref.
Oct 7, 2026
7eba9e0
Merge origin/main into session/bright-swift-722.
Oct 8, 2026
74aee14
Refuse an ambiguous type-summary question instead of answering false.
Oct 8, 2026
1a4070c
Take main's v1_std_core.rs so the merged seed compiles.
Oct 8, 2026
8b0f27f
Install the three stage0 mirrors that drifted after the main merge.
Oct 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module gunbc.recurring_failure_mode.an_imported_name_shadowed_by_a_kernel_name

import std.types { NonEmptyStr }
import std.decl_ref { DeclarationRef, WholeDeclaration }
import gunbc.recurring_failure_mode { RecurringFailureMode }

data an_imported_name_shadowed_by_a_kernel_name: RecurringFailureMode = RecurringFailureMode {
identity: "an_imported_name_shadowed_by_a_kernel_name" as NonEmptyStr,

receipts: [
"an imported name shadowed by a kernel name -- residual after the Optional mint wall. v1.compiler.infer_env overlay_skips_kernel_name still sits above imports for the kernel types, the container spellings, Unit, Optional, Present, and Absent. lookup_binding still answers from env.bindings (declarations and named imports) before that overlay. INVALID STATE: one spelling, one module, two declarations, chosen by which lookup asks. The Optional instance of that fork is CLOSED: std.literal_elaboration kernel_named_import_standing / v1.compiler.resolve kernel_named_import_diags refuse a non-mint Optional import (gunbc.recurring_failure_mode.import_collides_with_a_kernel_name). The enrolled regression control is test.claim.infer_kernel_import_collision_witness importing_a_non_mint_optional_refuses_at_the_import (ImportCollidesWithKernelName). Names with no kernel_mint_declaration_rows row are KernelNamedImportAdmitted, so the two-lookup fork remains writable for every overlay_skips spelling that is not Optional.",

"RESIDUAL POPULATION: overlay_skips_kernel_name minus the one minted name. kernel_type_set is String, Int, Bool, Float, Secret, Json, Unit, Bytes; containers ride is_container_type; Present and Absent are listed beside Optional. Only Optional has a mint row (std.optional Optional). A module that declares a type of any other overlay name and is imported by that name is still admitted on v1, and the overlay can still disagree with lookup_binding. Dual-representation imports (v2.std.text String via carrier_by_spelling) are a declared admitted population, not this class -- a second String is a carrier pair, not a silent mint leak. A rival Int, List, Present, or other overlay spelling that is not a dual-rep carrier is this class.",

"HARM on the residual: silent wrongness (DESIGN section 5) wherever two readers take different paths on a non-mint overlay name. The Optional emit specimen (HeldChoice<present_value>) is historical of the closed instance; it is not the current red. FOUND 2026-10-06 on gunbc#13454 as the Optional instance; retargeted 2026-10-07 (cursor review 77440) once that instance climbed.",

"CURRENT RUNG: below the floor on the v1 residual -- the non-mint overlay import is still unrefused, so the two lookups can still disagree. The Optional path is mechanically preventable and is owned by import_collides_with_a_kernel_name; this row does not claim that rung. v2 already refuses an imported user Int at the reference (v2.test.claim.body_let_annotation bla_imported_user_int_refuses_rather_than_binding_the_kernel_int); that is a different class (kernel_type_spelling_captured_a_module_declaration) on a different compiler. ATTAINABLE CEILING: structurally guaranteed -- the residual collision is decidable at the import from overlay_skips_kernel_name and the mint-row set. NEXT-RUNG TRIGGER: the v1 import wall covers every overlay_skips spelling the same way Optional is covered (mint row or equivalent DeclarationRef ownership), except the declared dual-representation carriers, so a non-mint overlay import is unwritable and the two lookups can no longer disagree about it.",
],

evidence: [
DeclarationRef { module_path: "v1.compiler.infer_env", decl_name: "overlay_skips_kernel_name", field: WholeDeclaration },
DeclarationRef { module_path: "v1.compiler.infer_env", decl_name: "lookup_binding", field: WholeDeclaration },
DeclarationRef { module_path: "std.literal_elaboration", decl_name: "kernel_named_import_standing", field: WholeDeclaration },
DeclarationRef { module_path: "gunbc.structural_realization_bindings", decl_name: "kernel_mint_declaration_rows", field: WholeDeclaration },
DeclarationRef { module_path: "gunbc.recurring_failure_mode.import_collides_with_a_kernel_name", decl_name: "import_collides_with_a_kernel_name", field: WholeDeclaration },
DeclarationRef { module_path: "test.claim.infer_kernel_import_collision_witness", decl_name: "importing_a_non_mint_optional_refuses_at_the_import", field: WholeDeclaration },
],
}
4 changes: 2 additions & 2 deletions dag/gunbc/recurring_failure_mode/carrier_by_spelling.dag
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ data carrier_by_spelling: RecurringFailureMode = RecurringFailureMode {
identity: "carrier_by_spelling" as NonEmptyStr,

receipts: [
"**carrier by spelling** (INVALID STATE: a module imports the structural text carrier `v2.std.text` `String` and then authors a BARE `String` as if that import bound it; KERNEL NAMES ARE NEVER OVERRIDDEN BY IMPORTS (`v1.compiler.infer` `overlay_skips_kernel_name`, kernel overlay unconditional since #9813), so the bare spelling binds the KERNEL host carrier beside the unused import.",
"**carrier by spelling** (INVALID STATE: a module imports the structural text carrier `v2.std.text` `String` and then authors a BARE `String` as if that import bound it; KERNEL NAMES ARE NEVER OVERRIDDEN BY IMPORTS (`v1.compiler.infer_env` `overlay_skips_kernel_name`, kernel overlay unconditional since #9813), so the bare spelling binds the KERNEL host carrier beside the unused import.",

"A host-carrier value can therefore flow into a fold whose declared positions are the STRUCTURAL carrier, and the front end ACCEPTS the program.",

Expand Down Expand Up @@ -46,7 +46,7 @@ data carrier_by_spelling: RecurringFailureMode = RecurringFailureMode {
],

evidence: [
DeclarationRef { module_path: "v1.compiler.infer", decl_name: "overlay_skips_kernel_name", field: WholeDeclaration },
DeclarationRef { module_path: "v1.compiler.infer_env", decl_name: "overlay_skips_kernel_name", field: WholeDeclaration },
DeclarationRef { module_path: "gunbc.rust_source_type_bindings", decl_name: "checkpoint_row_migration_rows", field: WholeDeclaration },
DeclarationRef { module_path: "test.claim.self_host_structural_text_witness_test", decl_name: "w_bare_string_with_text_import_stays_host_deterministically", field: WholeDeclaration },
DeclarationRef { module_path: "gunbc.self_host_compile_phase_frontier", decl_name: "receipt_2_66765317_raw_error_diagnostic_identities", field: WholeDeclaration },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ data emitter_index_keyed_on_a_type_leaf_takes_the_last_declarer: RecurringFailur

"SPECIMEN, the native approval broker closure (entry dag/gunbc/auth/approval_broker_serve.dag, lane 2A of the native-broker program, main fd30a502): std.access declares AccessRequest<S, A, O, C, E> and gunbc.auth.access_request declares AccessRequest<Subject>. v1.compiler.infer_emit_info add_emit_item_summary inserted both under `AccessRequest`; v1.compiler.trait_derive_emit v1_clone_bounded_type_params therefore held the one-element set Subject for that key, v1_item_clone_bounded_param_names filtered std.access's own [S, A, O, C, E] against it and found none, and std_access.rs printed `pub struct AccessRequest<S, A, O, C, E>` over fields naming AccessContext<C: Clone> and AccessEvidence<E: Clone>: ten rustc errors (E0277, E0369). The paired control is the same emitter over dag/std/authorization_profile.dag, whose closure has one AccessRequest and prints all five bounds.",

"WHAT IS CLOSED AND WHAT IS NOT. The trait-derive family is re-keyed on the declaration -- v1.compiler.infer_emit_info TypeDeclIndex (EmitGraphInfo.type_decl_items), and with it clone_bounded_type_params, clone_impl_required_type_params and map_key_required_type_names -- under the item registry's own identity (v1.std.core callable_identity over owner module and declared name), and a reference reaches a row through resolve_type_decl_routed, whose spelling arm REFUSES a leaf two modules declare. STILL LEAF-KEYED, LAST WRITE WINS, on v1.compiler.infer_emit_info EmitGraphInfo: type_summaries (and its `Enum::Variant` rows), fn_decl_items, recursive_type_set, fielded_variants, positional_payload_variants, shared_types and variant_to_enum. data_variant_wire_spellings is keyed on the coproduct's leaf too but stores DataVariantSpellingRefused when two declarers disagree, so it fails closed; ownership_index and read_only_params_index are module-qualified and are not members.",
"WHAT IS CLOSED AND WHAT IS NOT. The trait-derive family is re-keyed on the declaration -- v1.compiler.infer_emit_info TypeDeclIndex (EmitGraphInfo.type_decl_items), and with it clone_bounded_type_params, clone_impl_required_type_params and map_key_required_type_names -- under the item registry's own identity (v1.std.core callable_identity over owner module and declared name), and a reference reaches a row through resolve_type_decl_routed, whose spelling arm REFUSES a leaf two modules declare. RE-KEYED IN A SECOND CUT: type_summaries is a TypeSummaryIndex keyed by the same declaration identity (variant-payload rows under `<identity>::<Variant>`), and variant_to_enum maps each variant to its owner's identity, so a second same-leaf declaration no longer replaces the first's summary for readers in other modules (the unit row same_leaf_type_elsewhere_leaves_other_modules_emission_unchanged). Readers that hold only a NAME read it through type_summary_decided, which answers no summary for a leaf two declarations own; that residue ends when TypeSummary's field_type_map and field_import_surface_names store identities. STILL LEAF-KEYED, LAST WRITE WINS, on v1.compiler.infer_emit_info EmitGraphInfo: fn_decl_items, recursive_type_set, fielded_variants, positional_payload_variants and shared_types. data_variant_wire_spellings is keyed on the coproduct's leaf too but stores DataVariantSpellingRefused when two declarers disagree, so it fails closed; ownership_index and read_only_params_index are module-qualified and are not members.",

"A DECLARED MIDDLE STATE INSIDE THE CLOSED PART: kernel spellings. A kernel spelling (std.types is_kernel_type) is a reference resolve deliberately leaves unstamped, and the corpus also declares some of those leaves in two modules: v2.std.text and v2.std.node String, std.integer and v2.std.integer Int. Bool was a third until v2.std.logic Bool was retired; the arm is about any kernel-spelled leaf with two declarers, not about a fixed list. For such a reference the routed resolution answers TypeDeclKernelSpellingUndecided: it does NOT refuse, it derives no Clone or Ord bound from either declaration, and it carries a map-key requirement to EVERY declarer of the leaf, which is what the leaf-keyed set did. So for these leaves the emitted derives are unchanged by the re-keying and the question of which declaration a kernel-spelled position denotes is still open. Each occurrence is one row of v1.tests.claim.carrier_realization_census (emitter_decl_route). TRIGGER, at capability grain: resolve identifies a kernel-spelled reference -- as the kernel type or as the corpus declaration its scope binds -- at every type position the emitter reads; the owner is the text-boundary identity work (gunbc.rung_drop text_boundary_identity_wall), not the emitter. One stamped position does not retire the arm.",

"RUNG: for the trait-derive family, mechanically preventable -- gunbc.instruments.native_emission_controls (two ControlSlot declarations of different arity in one closure, emitted, built and run) and the unit row same_leaf_type_declarations_emit_their_own_bounds are the discriminating red and the positive control. For the seven indexes still leaf-keyed, mitigatable at best: the collision is observed only when rustc happens to refuse the foreign fact. ATTAINABLE CEILING: structurally impossible -- an index keyed on the declaration has no row two declarations can share. NEXT-RUNG TRIGGER, at capability grain: every EmitGraphInfo index that answers a question about a type declaration is keyed on the declaration's identity and reached from a reference through the one routed resolution, so that adding a same-leaf declaration to any module of a closure cannot change what is emitted for an existing one. Re-keying one more map is not that capability; the trigger is the set.",
"RUNG: for the trait-derive family, mechanically preventable -- gunbc.instruments.native_emission_controls (two ControlSlot declarations of different arity in one closure, emitted, built and run) and the unit row same_leaf_type_declarations_emit_their_own_bounds are the discriminating red and the positive control. For the five indexes still leaf-keyed, mitigatable at best: the collision is observed only when rustc happens to refuse the foreign fact. ATTAINABLE CEILING: structurally impossible -- an index keyed on the declaration has no row two declarations can share. NEXT-RUNG TRIGGER, at capability grain: every EmitGraphInfo index that answers a question about a type declaration is keyed on the declaration's identity and reached from a reference through the one routed resolution, so that adding a same-leaf declaration to any module of a closure cannot change what is emitted for an existing one. Re-keying one more map is not that capability; the trigger is the set.",
],

evidence: [
Expand Down
Loading
Loading