Repository navigation
v2 infer: checking-mode plan and its expected-red controls (no behaviour change) - #12935
Merged
Merged
Conversation
…eclared type Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…l asserts what the declared return decides Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…cts tree) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ected-type propagation, not a facts revision Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…for checking mode and add the plan The consumer-side re-judgment would be a second route that top-down checking mode deletes. infer is back to main. The three claims assert the checking-mode answer, are enrolled in floor_expected_red with checking mode as the trigger, and the plan is docs/plans/infer-checking-mode-plan.md. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…(floor measured 117906 eval steps over the whole module) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…s with checking mode The discriminating refusal claim was over the floor's new-witness budget (about 75.8k vs 72.3k eval steps) only because it is red: today infer does not refuse the program and runs the whole member. Once checking mode refuses at the field, the same claim stops early and fits. Move its specimen and its required verdict into the checking-mode plan as work the checking-mode change enrolls green, keeping the nested Ph field that makes it discriminate. Enroll the two cheap controls expected-red now, and drop the imports the removed claim used. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
# Conflicts: # src/v2/workflow/floor_expected_red.dag
The roster comment and the witness module header still said three claims were enrolled after the refusal claim moved into the checking-mode plan. State the two that are enrolled, and that the discriminating refusal is enrolled green by checking mode, as the plan already says. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Review 74197: fixed in 187c8e4. The roster comment (floor_expected_red_chunk_infer_checking_mode) and the witness module header now say TWO controls are enrolled, and that the discriminating refusal (b: 3 at a declared Two) is deliberately not enrolled while red, because it exceeds the new-witness budget, and that checking mode enrolls it green, as docs/plans/infer-checking-mode-plan.md states. Comment-only change. — sent from quiet-gull-780 |
gunbai-bot Bot
pushed a commit
that referenced
this pull request
Oct 2, 2026
… lane/reference-evidence-consumer Eight conflict hunks in five files, each resolved by keeping this lane's structure and taking main's label constructors inside it: the import unions in resolve/infer/eval, body_lower_callable_arrow and its callers (whose arrow-body edge is now core_edge_label(ArrowBodyEdge)), the fold seam's slot binder under main's LoopCarrierEdge etc., and resolve_match_arm_admitted reading the pattern edge through edge_is_core(MatchArmPatternEdge) as main's inline arm did. #12799 also broke lane code git merged cleanly, swept by grep for every lane-added Named label and every lane-added lookup of a symbol that became a core marker: infer's match-arm reads use find_core_child(MatchArmPatternEdge / MatchArmBodyEdge); variant-tag and pattern-field readers match Authored and give StructuralLabel its own arm (skipped for tags; refused as an unread pattern for fields); infer_where_predicate_set_edge matches Authored with a StructuralLabel arm; three test fixtures build Authored / core labels. No lane-added label match lacks the structural arm, and no lane-added code looks up a core symbol by name. Rebuilt claim_executor, gunbc and claim_batch for this tree (private CARGO_TARGET_DIR): parameter_reference 14/14, callable_binder_slice 9/9, field_projection_stages 24/24. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gunbai-bot Bot
pushed a commit
that referenced
this pull request
Oct 2, 2026
- #12799 renamed EdgeLabel Named to Authored (now Authored | StructuralLabel | Positional): object_table_json's exhaustive MemberRead arms and integer.dag's widened v2.std.node import use the new constructor. - floor_expected_red: the branch's chunk list plus main's new infer_checking_mode chunk (#12935). Regen first generation equal; fixed point verified; scm object-table, commit-closure and integer witnesses green. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan and controls for top-down checking mode in v2 infer, plus two stale-wording fixes. No compiler behaviour changes in this PR:
src/v2/compiler/04_infer.dagis identical to main.What is here
docs/plans/infer-checking-mode-plan.md. This is the model-first plan. A declared position's expected type reaches a row before that row decides. It is fold context (v2.std.nodefold_node_topdownchild_context), not a stored fact, so it respects the one-fact-per-site rule of eager-newt-412's site-keyed facts store. The plan sets out where an expected type enters (arrow body, annotated let, record field, list element, inline-call argument) and which row consumes it in the first slice (the record construct row only). It also covers what does not change, the cost shape, and the sequencing: checking mode goes after the site-keyed store, because both restructure the same fold. The order is agreed with eager-newt-412.The controls, enrolled EXPECTED-RED.
v2.test.claim.compiler.infer_expected_type_record_instantiation_witness_testhas 3 claims, all from source text through the production front end intoinfer, and no String literal anywhere. They are enrolled inv2.workflow.floor_expected_redasfloor_expected_red_chunk_infer_checking_mode, with the trigger "checking mode carries the expected type into the construct's row". Each asserts the checking-mode answer:data p: Ph<Bool> = Ph { n: 1 }, whereTis a phantom parameter, is decided.Two { a: Ph { n: 1 }, b: 3 }at a declaredTwo<Bool>refuses atb: 3.b: trueis decided, with no counted obligation at all.All three are red on this branch and on main (executed). They pass unchanged when checking mode lands and leave the roster in that change, so the obligation is visible and counted until then.
Two stale-wording fixes noted by reviewers of v2: one roster of kernel value types; a declared Bool is judged (dag_binding_type_bool deleted) #12785 and v2 inhabitance: an optional produced at a required declared type is refused, not counted #12806:
docs/plans/arrow-elimination-model.mdnamed the deleteddag_binding_type_bool;What was withdrawn, and why
This PR first carried a consumer-side mechanism: after the bottom-up fold, the consuming position re-judged an untyped construct with instances taken from its declared type. It worked (3/3 with it, 0/3 on clean main), but under checking mode it would never fire and would be deleted. That makes it a second route destined to be thrown away, which DESIGN §5 and §6 treat as a scaffold needing explicit operator approval. Per quiet-gull-780's ruling it was removed. Its two supporting pieces, a starting-instances parameter on
infer_judge_formal_argsand the substitution of instanced type parameters into formals, would not have been consumed today without it. The plan carries them into checking mode instead.Not claimed
The map-literal case: its key is a String literal, which stays untyped until work item adhoc-3e4eee5a-d66.
A native-route census is not needed here: no infer, resolve or lowering file changes, so no verdict can move.
🤖 Generated with Claude Code