Repository navigation
Seed floor: a collection and a nominal product are no longer mutually admitted at a declared position - #12083
gunbai-bot[bot] wants to merge 2 commits into
Conversation
… admitted at a declared position collection_at_scalar_declared_type is replaced by collection_disjoint_from_established_identity, a relation over both sides: exactly one side an element/keyed collection (after the nominal-alias peel) and the other an established non-generic kernel scalar, product or coproduct refuses as RefusedCollectionAgainstNonCollectionIdentity. Against a product/coproduct the collection side must carry no unbound type variables, which eliminates the false refusal the v2 self-compile found on a with() record update. Stage0 mirrors regenerated to a fixed point. Specimen three appended to declared_type_wall_keyed_on_the_value_being_a_kernel. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…n its hand-built InferScope The field landed in v1.compiler.infer on main without reaching the mirror; regenerating the 04_infer mirror in this PR surfaced it on the one hand-maintained initializer. Empty, as v1.compiler.emit's scopes supply it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
CI note on 2b7843a: |
|
Superseded by #12045 (merged as 9fd525e). It establishes everything this draft carried: the symmetric collection-vs-established-identity relation, both REDs, the smuggled-argv claim, the conforming and alias positives, the with() record-update repair (with a genuine-Map control this draft lacked), specimen three on declared_type_wall_keyed_on_the_value_being_a_kernel, the v2 counted-frontier witnesses, and the whole-tree census. The only item not in #12045 is a list-element-position RED (w_collection_at_a_list_element_of_record_type_is_refused), which shows the relation fires at a second wired position. It is reported to neat-boar-16 as an optional follow-up, not carried here. |
Seed floor: a collection and a nominal product are no longer mutually admitted at a declared position
DESIGN §4b floor ("values inhabit declared types"), in the v1 seed. It is admitted under
gunbc.v1_maintenance_standingbecause every v2 claim that "the type makes this unwritable" rests on this wall.The grid (measured by neat-boar-16 on main ff2110b,
gunbc runover a probe entry)Rec←List<String>List<Int>←RecInt←StringInt←List<Int>Rec←Other(a record)Rec←Optional<Int>The first row is the loyal-swift-608 discovery: lively-bat-737's quiet-builder record wall was defeated by passing a
List<String>that carried--quiet.The chain (§6b)
v1.compiler.inferdeclared_type_inhabitance, with declared=Recand produced=List<String>:collection_at_scalar_declared_typerefused only when the declared base peeled to a kernel scalar.kernel_value_declared_type_mismatchjudges only a kernel actual.nominal_product_inhabitance_refusalanswers none for a collection, by design.So the pair reached the terminal
Inhabitsarm by fallthrough, and the dual pair did the same. Every arm keyed on the kind of ONE side. The earliest unjustified boundary is that the relation's terminal arm is acceptance, while no arm ever judged whether a collection and a nominal product are disjoint.The repair
collection_at_scalar_declared_typeis replaced, not joined by a sibling arm, withcollection_disjoint_from_established_identity, a relation over both sides:node_is_element_collection/node_is_keyed_collection), read on the authored node and on itspeel_nominal_alias_identitypeel, sotype Words = List<String>still counts as a collection.expected_type_head_exposure), the collection side must be established too, with no unbound type variables. See the false refusal below.RefusedCollectionAgainstNonCollectionIdentity, named for the relation.RefusedKernelAtStructuredwould be the wrong name for record-vs-collection. Downstream code matches reasons with a wildcard, so no rendered diagnostic changes.No per-position code was added: the refusal surfaces through
declared_type_obligation_diags.False refusal found and guarded
The v2 self-compile inside
claim_executor --required-regenrefused a correct record update:with(emit_info, { movable: .. })passed toemit_info: EmitGraphInfoinsrc/v1/05_emit_rust.dag. The cause is thatv1.compiler.infer_methodgives thewithbuiltin the signatureMap<map_key, map_value>, which is a placeholder container with unbound type arguments. The establishedness guard above eliminates that false refusal, and it is enrolled as the positive controlw_a_record_update_at_a_record_argument_is_admitted.05_emit_rust.dagitself is not touched.Census: NOT RUN
The whole-tree false-refusal census has not been run, for this exact reason:
gunbc compile --dependency-pool-index primary-precedence --repository gunbc --measured-root-demands tools/whole_corpus_compile_measured_root_demands.json --source-root dag --source-root src/v2 --target dagrefuses on BuildBuddy withWholeCorpusCompileBudgetUnreadable. That happens even on a 48 GB runner withGUNBC_BIND_MEMORY_CGROUP_BYTESforwarded, because nomemory.maxbinds the process. The main baseline refused the same way. Where to run it has been escalated to neat-boar-16 and the operator (srv1/srv2). This PR is not green until that census runs. The only corpus evidence so far is the v2 self-compile inside--required-regen, which coverssrc/v1andsrc/v2, notdag/.Controls (
test.claim.declared_type_inhabitance_direct_call_witness)w_collection_at_a_nominal_product_argument_is_refused:List<String>atRec, at the direct-call position.w_nominal_product_at_a_collection_argument_is_refused:RecatList<Int>.w_the_declared_record_refuses_a_smuggled_argv_list: the loyal-swift shape. The DECLAREDQuietInvocationrefuses the smuggled--quietlist, which gives lively-bat-737's next-rung trigger something to fire on.w_collection_at_a_list_element_of_record_type_is_refused: the second position. Deviation: the brief asked for the record-literal field, but that position has no obligation producer.v1.compiler.inferDeclaredTypePositionnames it among the nine positions still awaiting one, so a control there would measure the missing producer, not this relation. The list-element position shows the same thing, one emitter with no per-position code.w_conforming_collection_and_record_arguments_are_admitted,w_list_at_an_aliased_list_formal_is_admitted(guards the peel),w_a_record_update_at_a_record_argument_is_admitted.Mutation:
claim_batchbuilt on main's mirrors (the relation reverted) fails all four REDs, and the positives plus the existingw_list_typed_value_at_non_empty_str_argument_is_refusedstay PASS. On this head every claim in the file passes exceptw_a_branded_refinement_at_an_unrelated_product_formal_still_refuses, which is an enrolledExpectAssertionFalseRED and fails identically on main's compiler.Failure-mode row
Specimen three is appended to
gunbc.recurring_failure_mode.declared_type_wall_keyed_on_the_value_being_a_kernel, with both directions, the grid and the chain. This PR does not land that row's trigger: the relation still dispatches on the kind of each side, rather than deciding from the formal's declaration for an actual of any kind. No second row was minted.v2 path, measured
Probed
v2.std.inhabitancedeclared_type_inhabitancewith theinfer_application_argument_inhabitancewitness pattern, using a probe that is not committed.inhabitance_node_undecidable_reasonclasses anyInstantiationtype node (which is howList<String>is represented) asUndecidableGenericFormal:Rec←List<Int>: admitted, with an undecidable advisory.List<String>←Rec: neither refused nor marked undecided.Other←Rec) was also not refused, so my synthetic argument shapes may not carry the types I intended. The v2 grid is reported as partly measured.This is not the same one-relation change: v2 must distinguish applied types with concrete arguments from generic formals. It is reported to neat-boar-16 rather than fixed here.
Emission
Not measured. No claim is made about the emitted route.
Stage0 mirrors
Regenerated through
claim_executor --required-regen. The bootstrap was taken from main's mirrors, because a compiler carrying the unguarded relation refuses to self-compile the guarded source. That produced gen1; gen1 was installed and rebuilt, and the gen2 regen reports all three installed mirrors byte-identical to their candidates (the fixed point). The gen2 regen's only drift is the two pre-existingstd_*files.v1_compiler_infer.rs, plusv1_compiler_emit.rsandv1_compiler_infer_resolve.rs. Those two were already stale on main at 0be6287, and the regenerated infer mirror adds a struct field that the emit mirror must supply. The emit mirror change is two generated lines;05_emit_rust.dagis untouched.std_integer.rsandstd_machine_constraints.rsare also stale on main, but their regenerated candidates do not compile (PointerWidthis a variant, not a type). They are left at main's copies as pre-existing drift, outside this PR.🤖 Generated with Claude Code