Repository navigation
NFR burn-down: src/v2/std (target-model) — enumerate closed-coproduct wildcard arms - #12671
gunbai-bot[bot] wants to merge 9 commits into
Conversation
…r closed coproducts Each `_ =>` over a closed coproduct scrutinee listed in the typed NFR census is replaced by the explicit remaining variants, each carrying the wildcard's body verbatim; behavior is unchanged. Wildcards whose multi-line body would be cloned across several arms are kept and reported in the lane handoff with a per-site reason. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Kept wildcards, src/v2/std lane (per site)These are NOT rostered on main. They are listed here for zesty-owl-698's joint landing on #12610. Lines refer to main@785934a.
Not found on main: src/v2/std/compilers/target_model.dag::target_lex_rule_literal_step (the census predates its removal). |
…tted_validate_labeled_wire The enumeration read `kind_seen: true` as a binding, so it treated NamedMetadataFoldOk as fully covered; the floor refused the match as non-exhaustive. Restore the wildcard: the complement of Bool-literal field patterns is kept and reported per site, like its positional twin. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Keep-list addition (after floor refusal fixed in the latest push):
|
…amed fn Per the neat-boar-16 ruling: a multi-line body the remaining variants share is lifted into ONE fn in the same module and every remaining variant gets a one-line arm calling it; nothing is copied. Identical lifted bodies share a single helper. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
# Conflicts: # src/v2/std/compilers/target_model.dag
briansrls
left a comment
There was a problem hiding this comment.
APPROVE at 7bce9e1. The target-model changes replace closed-coproduct fallbacks with their explicit complements, preserve literal-pattern wildcards whose complement is not a closed variant set, and lift shared multi-line bodies into single helpers rather than cloning them. The strict floor, generated, and Rust tests are green; emit-build and witnesses are still queued, so landing remains conditional on those completing green. This overlaps #12669 in target_model.dag; whichever lands second may require a main merge and renewed exact-head review.
emit-build refused the emitted Rust: concrete_syntax_token_node_targets_into
is tail-call lowered to a loop, and that lowering writes nested variant arms
(TypeNode { connective: Disj }) as match guards, which rustc cannot prove
exhaustive (E0004) once the wildcard is gone. Per the ruling for bodies with
a self tail call, the decision moves into concrete_syntax_token_node_targets_step
returning ConcreteSyntaxTokenTargetsStep (TargetsDone | TargetsNext); the fn
keeps its self-call and matches only that flat step.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ets_into Per the silent-koi-310 ruling: this site is blocked on the tail-call emitter defect (nested arms rendered as guards -> emit-build E0004), which is being fixed at the root (adhoc-6e41e4c1-f65). The per-site Done|Next delegation was a workaround; the site returns to main's form and is enumerated in a follow-up once the emitter fix lands. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
# Conflicts: # src/v2/std/compilers/target_model.dag
# Conflicts: # src/v2/std/compilers/target_model.dag
# Conflicts: # src/v2/std/compilers/target_model.dag
|
Consolidated into integration PR #12951 at the operator's request; this branch is merged there unchanged in its own merge commit. Closing here; the branch is kept. — sent from deep-ferret-305 |
Typed NFR census burn-down (work item adhoc-960694d5-b65, lane of zesty-owl-698 / #12610).
Each
_ =>arm in a census-listed decl whose scrutinee is a closed coproduct is replaced by the explicit remaining variants, each carrying the wildcard's body verbatim (nestedNodeKindwildcards expand toTypeNode { connective: <rest> }+ComputationNode { behavior: _ }, following the existing lens precedent). Behavior is identical; no refactor.Kept (not enumerated): wildcards whose multi-line body would be cloned across 2+ arms (DESIGN §2 redundancy), and Int-literal matches. These are reported per-site in the lane handoff to zesty-owl-698; no
non_fold_residue.dagrows are added here (they would read stale to the old scan).Evidence: CI floor on this PR (the module still compiles and exhaustiveness is checked there).
🤖 Generated with Claude Code