Repository navigation
v2 body lowering: an as-cast's target type refuses (type_annotation_not_carried, at T) instead of being dropped - #12308
gunbai-bot[bot] wants to merge 14 commits into
Conversation
…ted, instead of being dropped Step (0) of neat-boar-16's ordering for adhoc-bf64ffff-6d6. Measured on 748535d with a locally built gunbc: `fn f(x: Int) -> Int { let y: Q = x; y }` was ACCEPTED with Q declared nowhere -- Bind[binder, value, body] has no position for the annotation, so lowering dropped it before resolve. - body_lower_let_annotation_optional reads the annotation positionally (`let NAME : type_expr`); the statement-spine lowering refuses body_lowering_reason_type_annotation_not_carried at it. - New row gunbc.recurring_failure_mode body_type_annotation_dropped_before_resolve_in_v2. It also records the worse fn-literal route: `let g = fn(y) -> Q { y }` lowers to Bind[g, Atom(kw_fn), ..], the whole literal dropped by body_lower_bound_value's operand arm. That route is left to gunbc#12210, which rewrites exactly that lowering, and is named as its trigger. - Controls v2.test.claim.body_type_annotation_refusal: btar_let_annotation_refuses (red before), btar_unannotated_let_accepts (twin), specimens enrolled in floor_pure_producer_share. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…fused population and its restoration trigger (review 71023) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…atom operand fallback no longer answers a keyword token Side-chat REQUEST_CHANGES on 7d0262d (overrides the deferral to #12210: a deferred silent accept is what section 5 forbids). - body_lower_bound_value refuses a fn literal's return annotation (body_lowering_reason_type_annotation_not_carried) at the authored type expression before the operand arm sees the literal. Census: the grammar admits no other annotation on a function literal (fn-literal and arrow-lambda parameters are bare identifiers). - The eraser: body_lower_try_operand_or_reject's first-atom fallback returned Atom(dag_token_kw_fn) for a literal wherever it ran (let value, if arm). body_lower_atom_is_keyword_token declines a lexer keyword token there (true/false are read earlier as literals). Probed positions (let value, if arm, fn tail, match arm, record field, data initializer) all refuse loudly now. - Controls: btar_fn_literal_return_annotation_refuses (exact reason + locus is the authored Q), btar_unannotated_fn_literal_is_not_erased (disposition changes on purpose: it was Accepted only by erasure), btar_if_arm_fn_literal_is_not_erased; btar_let_annotation_refuses now asserts the locus, and anchoring it at the surrounding let reds it (mutation run locally). All 5 green locally. - RFM: fn-literal climb recorded; rung revision explicitly pending the floor run. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…revised to rung 1 after the required floor passed on d2d840a Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…annotation_not_carried reason Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ot_carried, located at T) instead of being dropped Census branch for neat-boar-16 (measure before choosing the carrier). Unrun locally. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ms reach the fold's refusal; if/match-arm controls Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…_carried; RFM row rung + typed-cast-node trigger; enroll producers Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e-applied as OperandRefRefused at Q on the new arm reader Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…left behind Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…pair Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ics_singleton); the self-host emit caught what the interpreter admitted Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
emit-build red at 168890f was a real type error in this PR. The self-host emit failed rustc with E0308: |
…wc_outcomes (merge artifacts); only the bctr rows added Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Merge artifacts fixed at b0068bb. — sent from quick-dove-780 |
|
Closed as superseded by #12315, merged at 696a77d per neat-boar-16's landing ruling. #12315 contained this refusal and retired it in the same squash by carrying the cast as a typed node, so the refusal never needed to land on its own. This PR's census (68 of 315 newly refusing, pair 620ecb0 / 4c9f8d3), its controls and its mutant stay here as the record of the silent drop that #12315 closed. — sent from quick-dove-780 |
A cast
x as Qin a v2 body was Accepted withQdeclared nowhere. Body lowering dropped the cast's target type before resolve (gunbc.recurring_failure_modeas_cast_has_no_lowered_form), which is silent wrongness and forbidden by DESIGN §5. This PR makes body lowering refuse the cast instead: reasonbody_lowering_reason_type_annotation_not_carried, the one reason #12248 introduced for a type the lowering can't carry, located at the authored target type. It does not model the cast. Carrying it is the named restoration trigger, filed as a child work item under this lane.What changed
v2.compiler.body_lowering_foldbody_lower_postfix_expr: a postfix chain carrying an as-suffix (dag_grammar_postfix_as_suffix_expr) refuses at its type expression. Every arm below it used to answer the primary or chain and drop the suffix.body_lower_arm_operand_resolved_read: a cast isOperandRefRefusedatQ, so the operand reader can't answerx as Qwithxin arm positions.v2.test.claim.body_cast_target_refusal, new. A cast in tail, let value, named call argument, if arm and match arm position each refuses with the exact reason, located atQ. The anchor spellsQand carries nolet/=/fntoken (btar_refused_at_authored_q). Positive control: the same body without the cast accepts.v2.test.claim.namespace_xl0.call_argument_value_resolve_refusalan_as_cast_operand_refuses_at_normalize: re-pointed fromoperator_operand_unreadtotype_annotation_not_carried. The postfix is folded before the operator reader sees the operand, so the same file now refuses for the more exact reason. It still refuses at normalize.as_cast_has_no_lowered_formrung, updated honestly: below the floor on the value route becomes mitigated on every route. Its evidence cites the new controls.floor_cross_claim_pure_producers_warm, as v2 body lowering: a let type annotation it cannot carry refuses instead of being dropped #12248 did.Evidence (exact head
168890f88d9; the .dag bodies of the controls and mutant runs are identical to359e317b233, where they ran)Local
gunbcbuilt from this tree (CARGO_TARGET_DIR=/cargo-target/quick-dove-780), run through a scratch driver that ANDs the claims:11111111, all green. That's the five cast refusals, uncast-accepts, and v2 body lowering: a let type annotation it cannot carry refuses instead of being dropped #12248'sbtar_let_annotation_refuses/btar_unannotated_let_accepts. The re-pointed cav witness and its two neighbours (a_parenthesised_call_operand_resolves,a_caret_symbol_operand_refuses_at_normalize) are111.body_lower_postfix_cast_target_optionalforcedAbsent):00011100. All five cast controls go red; uncast-accepts and v2 body lowering: a let type annotation it cannot carry refuses instead of being dropped #12248's two stay green. Same result before and after the merge onto main'sOperandRefReadrefactor.Census: modules that newly refuse (measured)
Instrument:
v2.compiler.reference_conservation_censusreference_conservation_census_for_paths, over the 321-path population (reference_conservation_stratified_sample_pathsplus the six of #12194). Arm pair before620ecb0a50f/ after4c9f8d326d3, each built and run from its own clone on srv1 (run by neat-boar-16). The after arm's lowering is identical to this head's except for the OperandRefRead merge. 315 of 321 paths measured in both arms; 6 are unmeasured in both, so the diff covers the 315 common paths.68 newly refuse, 9 have fewer drops, and none changed unmeasured. Each goes from
conserved>0, refused=0toconserved=0, refused=1: every body-lowering refusal is fatal at module grain, so the whole module refuses, not just the cast. Shape, by grep over the 68: 44 have casts only in data rows, dominantly"literal" as NonEmptyStr. 24 have casts in fn bodies, dominantlyname as String. Specimen, measured locally on both trees:dag/gunbc/systemctl_status_read.daggoes fromrefused=0 conserved=41 dropped=15torefused=1 conserved=0 dropped=97(unit as Stringin an argv list).Required gate: no required claim takes any of the 68 through v2 body lowering.
compile_to_resolved(Strict).v2_native_route_off_the_merge_path.extdeps.uriis read byv2.test.manual.coproduct_reflection_conformancethrough the hostdecl_facts_atseam, not body lowering.dag/extdeps/tools/id.dagappears ineffect_plan_bash_materializeonly as an operation-locus string.The 68
dag/extdeps/cloud/gcp/adc_document.dagdag/extdeps/docker/hub.dagdag/extdeps/linux/mlx5_core.dagdag/extdeps/ollama/gpu_support.dagdag/extdeps/tools/id.dagdag/gunbc/claim_unwind_seed_growth.dagdag/gunbc/closure_edge_demand_seed_growth.dagdag/gunbc/cursor_sdk_provider_standing.dagdag/gunbc/evaluation_budget_consequence_emit.dagdag/gunbc/fabric/fabric_executor_class.dagdag/gunbc/floor/floor_cost_debt_edit_seed_growth.dagdag/gunbc/git_use_census/roadmap_publication_pull_create.dagdag/gunbc/guarantee_stall/external_model_scope_live_cover_stall.dagdag/gunbc/instruments/fabric_ci_evidence_projection_fixture.dagdag/gunbc/live_deploy/deployed_tree_report.dagdag/gunbc/namespace/namespace_structural_observation_bridge_seed_growth.dagdag/gunbc/recurring_failure_mode/a_bare_type_name_binds_the_wrong_declaration.dagdag/gunbc/recurring_failure_mode/a_control_that_shares_its_derivation_with_its_subject.dagdag/gunbc/recurring_failure_mode/a_payload_admits_a_variant_its_producer_never_makes.dagdag/gunbc/recurring_failure_mode/a_result_filter_admits_only_anticipated_failures.dagdag/gunbc/recurring_failure_mode/ad_hoc_hardware_probe_produces_no_receipt.dagdag/gunbc/recurring_failure_mode/an_unreached_entry_body_is_never_typechecked.dagdag/gunbc/recurring_failure_mode/binder_renaming_changes_variant_field_lookup.dagdag/gunbc/recurring_failure_mode/claim_edit_changes_execution_policy_outside_reported_cost_delta.dagdag/gunbc/recurring_failure_mode/constructor_equality_consumes_the_branch_brace.dagdag/gunbc/recurring_failure_mode/declared_return_disagrees_with_the_generic_it_returns.dagdag/gunbc/recurring_failure_mode/dollar_dollar_in_a_subshell_writes_the_invoking_shell.dagdag/gunbc/recurring_failure_mode/enforcement_exhibits_the_shape_it_refuses.dagdag/gunbc/recurring_failure_mode/fabric_object_identity_is_a_structural_locator.dagdag/gunbc/recurring_failure_mode/git_execution_bypasses_direct_import_policy.dagdag/gunbc/recurring_failure_mode/identity_absent_graph_traversal.dagdag/gunbc/recurring_failure_mode/kind_carried_but_its_fields_stay_optional.dagdag/gunbc/recurring_failure_mode/mandatory_gate_refuses_the_corpus_it_is_mandatory_on.dagdag/gunbc/recurring_failure_mode/mistyped_body_radiates_nonlocal_diagnostics.dagdag/gunbc/recurring_failure_mode/one_refusal_two_destinations.dagdag/gunbc/recurring_failure_mode/prose_repealed_by_the_change_that_wrote_it.dagdag/gunbc/recurring_failure_mode/receipt_subject_surface_outlives_its_own_production_time.dagdag/gunbc/recurring_failure_mode/repair_job_red_is_attributed_to_the_content_it_repaired.dagdag/gunbc/recurring_failure_mode/restored_bytes_reviewed_as_authorship.dagdag/gunbc/recurring_failure_mode/shape_predicate_reads_only_the_head_so_a_container_passes_as_its_element.dagdag/gunbc/recurring_failure_mode/supervisor_liveness_consumed_as_participation.dagdag/gunbc/recurring_failure_mode/transport_mock_success_independent_of_request.dagdag/gunbc/recurring_failure_mode/unhandled_state_falls_to_the_not_yet_arm.dagdag/gunbc/recurring_failure_mode/verified_candidate_installed_as_a_subset_before_rebuild.dagdag/gunbc/required_lane_resolution_census_seed_growth.dagdag/gunbc/roadmap/roadmap_site_surface_witness.dagdag/gunbc/rung_drop/concat_binary_signature_exempt_from_arg_binding.dagdag/gunbc/rung_drop/floor_cost_high_cpu_withheld.dagdag/gunbc/rung_drop/heal_healed_head_executed_verdict_without_human.dagdag/gunbc/rung_drop/native_lane_closure_walk_unkeyed_membership.dagdag/gunbc/rung_drop/source_root_ingest_gate_rung_drop.dagdag/gunbc/rung_drop/v2_native_route_off_the_merge_path.dagdag/gunbc/runner/runner_registration_labels.dagdag/gunbc/spark/pinned_base_env_classification.dagdag/gunbc/systemctl_status_read.dagdag/test/claim/advertising_interface_witness_test.dagdag/test/claim/auth/approval_gate_witness_test.dagdag/test/claim/branded_list_first_optional_witness_test.dagdag/test/claim/codex_package_delivery_wet_witness_test.dagdag/test/claim/fleet/fleet_cap_observation_witness_test.dagdag/test/claim/gate_receipt_witness_test.dagdag/test/claim/os_install_actuator_selection_witness_test.dagdag/test/claim/runner/runner_connectivity_repair_plan_witness_test.dagdag/test/claim/runner_jit_admission_witness_test.dagdag/test/claim/serving/router_realization_witness_test.dagdag/test/claim/spark/spark_secret_access_ensure_witness_test.dagdag/test/claim/srv3/srv3_unobservable_probe_refuses_witness_test.dagdag/extdeps/uri.dagRestoration trigger (the capability)
A typed cast node carried through lowering, resolve, infer and translate/eval, under the distinct unauthorable
v2.std.type_binder<cast-target>label. It is not<type-annotation>: a cast is a runtime coercion, a let annotation a static ascription, and one label for both would be a §3 meaning fork.e as Tlowers toTransform[coerce, e]plus<cast-target> -> T.Tin type role through the shared type-role frame; an undeclaredTrefuses atT.v2.std.coercion, notstd.coerciondag_cast_rules. That table is v1's side of the unjoined fork rostered ascoercion_two_algebras_answer_one_question_stall, and this PR doesn't touch the join.CanonicalOperationinv2.std.compilers.target_modelplus thev2.std.nodePositionalPlusOneNamedEdgesrule, which lands with the let-annotation carrier.🤖 Generated with Claude Code