Repository navigation
D1 A: parse type-alias where refinements - #10946
Conversation
v2 had no production for a type-alias `where` refinement, so the six closure files never entered the tree. Attach the clause to the variant (the alias RHS), not to every type_expr, so fn return types stay the shape body-lowering already lowers. Empty `where` still refuses. Later D1 causes are not in this PR. Co-authored-by: Cursor <cursoragent@cursor.com>
d9d395d to
9e4bb2f
Compare
|
review 63162 asked to keep Verified on current head That — sent from witty-boar-671 |
Floor CI refused the changed parse identities with no verdict: they rebuilt the grammar inside the 500ms claim budget. Use dag_prepared_grammar instead. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Fixture receipt at
Reading: the clause is parsed and present on the parse tree, and the empty- |
Graft unfolds `_node_projection` shells at the module body, so a preserved where production was dissolved after an Accepted normalize. Attach the clause as a named child so both survives_normalize arms can still find it. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Fixture receipt at Identical tally to |
A Named where-edge whose target was still a production shell stayed transparent to graft. Wrap the clause so the kept target is not all _node_projection children, and return Witness<Node> (Suggested host) when the production is absent from the admitted tree. Co-authored-by: Cursor <cursoragent@cursor.com>
The if-then Present { value: root } arm typed as Node against the else
fold's Optional<Node>, so neither entry resolved.
Co-authored-by: Cursor <cursoragent@cursor.com>
--claim-run entries must return Bool. The Witness<Node> form is cause_a_where_clause_survives_normalize_locus and where_refinement_clause_survives_normalize_locus for gunbc run --function. Co-authored-by: Cursor <cursoragent@cursor.com>
gunbc run renders String and not Witness<Node>. Claim-run survives arms stay Bool; the companions join edge labels and find=true/false. Co-authored-by: Cursor <cursoragent@cursor.com>
Kernel join builds ExitFailure.reason (std.process has reason, not message). ExitSuccess when parse_subtree_find still sees the clause. Co-authored-by: Cursor <cursoragent@cursor.com>
The companion only ran the brand fixture; the Bool arm also required bare `where non_empty`. where_refinement Bool now uses the same file symbol as its companion. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Fixture receipt at The clause is parsed, carried on the parse tree, and survives normalize + graft on the admitted tree; the empty- |
|
Closure before/after for cause A — measured on a local, unpushed merge of #10882 head 68 → 68. Zero files left the refusing set, zero entered. Terminal causes by class: graft 25 (unchanged), parse 24 (was 26), match-arm 9 (was 8), lexer 8 (unchanged), wrapper-retention 1 (unchanged), Per-file terminal-cause changes (before = #10943 carrier at
Reading: the grammar repair is correct and regression-free at closure grain; acceptance for this PR is the |
Grammar-prepare fill exceeds required_floor_claim_cpu_safety_limit_ms, so enrolling them as test fn witnesses interrupted before verdict and blocked the floor lane. They stay claim_batch functions. Co-authored-by: Cursor <cursoragent@cursor.com>
De-enrolling made the predicates undiscoverable; interpreted-floor interrupted_before_verdict stays a runner-capacity problem, not an enrollment waiver. Co-authored-by: Cursor <cursoragent@cursor.com>
Two brand-refined aliases failed post-normalize well_formed because graft unpacked duplicate where edges onto one Conj. Each alias is now Named by its lexeme, and the clause is a production-shaped Conj over a predicate Atom rather than the parse shell. Co-authored-by: Cursor <cursoragent@cursor.com>
…native. #10882 is on main; keep a merge commit (no rebase).
|
Closure before/after for #10946 at head 68 → 67. Zero regressions (no previously accepted module refuses; no non-A file changed cause). Cause A is discharged on every file the carrier attributes to it:
The two sole-A files are the discriminating evidence: both left cause A, one to acceptance and one to its next cause. The three multi-cause files are This satisfies the cause-relative acceptance (A ceases on every attributed file; each accepts or advances to a typed cause; no accepted member regresses). Ready to leave draft once the PR body states that bar instead of "six files leave the refusing set". |
… authority. Keep a merge commit (no rebase). A required-v2-native 180-minute kill is not this PR's red.
|
Refreshed closure receipt for #10946 at head Identical to the This receipt binds to |
…, and share the parse-witness fixture trees warm (#11032) SYMPTOM: main's required floor is red -- ten identities INTERRUPTED-BEFORE-VERDICT at the 500ms per-claim CPU ceiling (cpu_at_least=506-610ms, right-censored) since #10946 and #10961 landed: the seven where-clause rows of v2.test.parse.d1_declaration_grammar_parse, the two carried/graft rows of v2.test.parse.where_refinement_clause_parse, v2.test.claim.body_lowering.declaration_structure_preserved .where_refinement_clause_interior_is_not_retained_holds, and v2.test.parse.expression_bodied_fn_decl_parse.braced_fn_decl_survives_normalize_holds (runs 34556215902, 34556223550, 34560949186). No floor run has ever reached their verdict. COST SHAPE, measured not inferred. Uncensored (claim_batch, uncontended amd64 host) the ten complete at 318-523ms; the eight file-mate rows that DID complete in run 34556223550 put the lane's runner at 1.4-2.1x that host, so the real cost was ~510-840ms -- structurally over, not marginal. The run's own cross-claim demand census names the halves: parse_grammar_digest at claims=19 evals=19 (~128ms per claim) plus two grammar_to_node walks per claim, every one keyed on the warm-shared prepared grammar -- a once-per-grammar invariant rebuilt on every parse call, the finding #10992's write-up flagged for a separate lane -- and, under it, one module-constant source tokenized and parsed by two to four claims of one file, once per claim frame. Same class as #10992 (a shared precondition re-derived per claim frame), third instance. REPAIR, at both homes, never the line: - v2.compiler.parse: GrammarFirstAnalysis now carries grammar_digest and productions_by_name, computed once in compute_grammar_first_analysis_given (so once per prepare_grammar) and read by parse_table_for_production_analyzed; the grammar's own locus, read only by the rejection arm that carries no diagnostic of its own, is derived on that arm alone. Every claim that parses .dag text inherits this. - The three parse-witness files share each multi-consumer source at the parse tree through nullary producers enrolled WARM in v2.workflow.floor_pure_producer_share (eight rows); normalize stays per claim. Single-consumer sources are not shared, and the one three-source conjunction is split into three rows. Measured on the uncontended amd64 host after the parser repair alone (before the share): 101-460ms per claim, every row under the line; the share then removes the remaining per-claim tokenize+parse (~130-170ms each) from the multi-consumer rows. Positive control by execution: with the where clause removed from type_variant and the `= expr` arm removed from fn_decl, the where-carrying rows of all three where-families and the four expression-bodied rows FAIL while their controls PASS; grammar restored byte-identical. No assertion deleted or weakened; no ceiling change. Claude-Session: https://claude.ai/code/session_01YApoxsmnC96ad2nWpRJdja Co-authored-by: Brian Searls <briansearls1@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Summary
whereclause (type A = T where brand("A")) by attaching the clause todag_production_type_variant, not to everytype_expr.wherestill refuses. Later D1 causes (G, K+L, E, M, J) are not in this PR — each will be a separate PR based on main.Test plan
D1 acceptance bar: cause A is gone from every attributed subject; no previously accepted member regresses; newly exposed causes are recorded; the
wherestructure survives parse and normalize in its intended modeled form. Never “the file leaves the refusing set”.Required CI is build + floor. The head-bound srv2 167-member cause-relative closure receipt is the required native semantic evidence: it establishes the self-host compiler closure and this PR’s cause-relative delta, not whole-
v2.test.*native admission, and does not retirev2_native_route_off_the_merge_path.Current receipt (eager-raven-113, head
5da6623579overlaid on main0423c33770, 167-member closure, controls-only): 68 → 67, zero regressions — identical to195f41f4, bound to this head.dag/std/cache_identity.dagRefusalClearedsrc/v2/std/compilers/target_model.dagAdvancedToNewCause→ match-arm (cause D, #10967)dag/std/cache_interface.dagdag/std/content_hash.dagdag/std/integer.dagLands after #10988 → D2 → D3. Emitter class / native-route drop are unchanged.