Skip to content

#3016, #3032, #2946, #2976, #2949, #3051, #3005, #3001, #3017, #2521: the day's burn-down - #3056

Merged
ehartford merged 1 commit into
mainfrom
today-bugs
Nov 7, 2026
Merged

ehartford merged 1 commit into
mainfrom
today-bugs

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

The day's burn-down of the "today" bugs, each investigated to its exact line, reproduced, fixed, and pinned by a failing-first fixture under out/bootstrap/bin/with-stage1.

Issue Root cause (the exact line) Fix Fixture
#3016 silent MISMATCH on a folded nested payload variant ComptimeEvaluator.eval_variant_constructor_call took payload_start before evaluating its arguments and pushed each as it came, so a nested variant's extras sat between the start and the value (.Db("users")). lldb: the inner call folds first, the outer goes eval_static_type_method_call → eval_variant_constructor_call. Evaluate every payload first, then push (as eval_variant_shorthand did); a const pins it. A variant constructor call written in a body is no longer folded at all: it is already its value, and the fold loses the enum's name where no binding gives one (let a = G.V(3), behav_1506) and runs before a later-declared enum's body is typed (behav_1430, which crashed with the fold on). behav_3016_folded_nested_payload_variant_matches.w
#3032 ComptimeValue.text_refs double-counts a str A side count of ComptimeValues over a str that is already a counted buffer (D111/D120). text_refs, its helper and the Drop impl are gone; a share is a counted copy (with_str_own_view, which counts under the pinned seed too). The nine boundary .clone()s stay until a post-D111 seed. a comptime string program under --debug-alloc: 0 leaks, no double free
#2946 ICE None < Some(1) The comparison branch peers .None and a variant call but not a bare None ident; a variant-call left checked the right first and met the bare None with no peer. A bare None is peered like .None; on the right it is typed after the left; None beside None is refused with a diagnostic. In MirLower, a bare variant name used as a place (the derived eq's &Self argument in none == None) materializes into a statement temp as .None does; it used to be unsupported, which the first battery surfaced in behav_2137, behav_cstr_from_ptr_to_owned and da_2161. behav_2946_bare_none_compares_with_option.w, err_2946_none_beside_none.w
#2976 BUG discriminant rvalue 0: place 0 has no type mir_place_projected_type answers only projected places; the fallback read mir_local_types, which has no entry for a module global never allocaed. The fallback is mir_local_llvm_type (Sema's type for the local). behav_2976_option_global_discriminant_in_main.w
#2949 D91 comptime match Target.os Works with use std.os.Target; the issue's use std.sysinfo.Target names the wrong module, and the §17.5 example writes no import (flagged below). A pinned fixture that runs under the release compiler. behav_2949_comptime_match_target_os.w
#3051 literal receiver typed by the outer demand check_call checked the method receiver with has_expected_type still set from the let annotation. Both receiver sites check without the call's demand. behav_3051_literal_receiver_under_outer_demand.w
#3005 f"{p}" refuses a Display impl §15.4 said "no trait dispatch". D193 (delegated, D98, 90%): {x} over a type with a program-written impl Display calls its to_str with a borrow (Sema binds by type; MirLower.lower_display_text_op, also under a width spec); error types keep their generated form; the refusal names both remedies. §15.4 reworded, changelog v7.38. behav_3005_fstring_display_impl.w, err_3005_struct_without_display.w
#3001 0..3 |> map(f) parses the pipe inside the range §9.9 had no row for ... D192 (delegated, D98, 85%): ../..= are a level above |> and ??, below | (infix_op; levels 8–13 shift up; the unsafe prefix parses at 15); a .. before ] is left to the slice path and a parsed range in a subscript is the slice. §9.9 and §30 tables. behav_3001_range_binds_above_pipe_and_default.w
#3017 :install-user installs a stale binary require-last-green accepted a binary that matched last-green.json, but nothing tied either to HEAD's green: after a :sources-green battery both are yesterday's. When the binary is the recorded one but the manifest's source_identity is not HEAD's, refuse naming src/main build. (build layer; build.w checked by the gate)
#2521 verdict.w reports a finished uat.log as OPEN The uat log has no rc= line. The uat: N scenarios: summary closes it, its FAIL count is the rc, each failed scenario is a red. two sample logs: rc=1 RED raylib_spiral, rc=0 green

Not in this PR, flagged for Eric.

Iterate tier: all new fixtures plus test/hello.w, behav_2950_comptime_payload_variant.w, behav_d97_option_none_first.w, behav_3047_multi_index_d140_no_import.w pass under stage1; check src/main.w clean; ceremony census diff ok.

… the day's burn-down

Each with a failing-first fixture under out/bootstrap/bin/with-stage1.

- #3016 (ComptimeEval.eval_variant_constructor_call): the payload start was
  taken before the arguments were evaluated and each value pushed as it came,
  so a nested payload variant's own extras sat between the start and the
  value: `AppError.Db(DbError.NotFound("users", "42"))` folded to `.Db("users")`
  and matched nothing. Proof: lldb on ct_build_value_tree / comptime_value_enum
  (the inner call folds first, then eval_static_type_method_call →
  eval_variant_constructor_call for the outer). Every payload is evaluated
  first, as eval_variant_shorthand already did; the #3016 bail-out in
  ct_try_fold_type_call is gone.
- #3032 (ComptimeValue): the side count `text_refs` is retired; a str is a
  counted buffer (D111/D120), so a share is a copy (with_str_own_view: one
  more holder, counted under the pinned seed too) and the value's drop is
  its fields'. The nine boundary `.clone()`s stay until a post-D111 seed.
- #2946 (SemaCheck comparison branch): a bare `None` beside an Option takes
  the peer's type as `.None` does; a bare `None` on the right is typed after
  the left (a variant-call left used to check the right first); `None`
  beside `None` is refused with a diagnostic instead of reaching MIR.
- #2976 (CodegenDispatch RK_DISCRIMINANT): an unprojected place's type is
  its local's (mir_local_llvm_type: Sema's type when no alloca named it),
  so a module global's discriminant in main has one.
- #3051 (SemaCheck.check_call): a method call's receiver is checked without
  the call's outer demand (both receiver sites).
- #2949: a pinned fixture for `comptime match Target.os` / `Target.arch`
  under `use std.os.Target`; the §17.5 example writes no import, which the
  PR flags for Eric.
- #3005 (D193, delegated): `{x}` over a type with a program-written
  `impl Display` calls its `to_str` with a borrow (Sema binds it by type,
  display_fmt_*; MirLower.lower_display_text_op, also under a width spec);
  `error` types keep their generated form; the no-display error names both
  remedies; the sig check's message names `{}` or `:?`. §15.4 reworded.
- #3001 (D192, delegated): `..`/`..=` are a level of their own above `|>`
  and `??` (Parser.infix_op; levels 8–13 shift up; the unsafe prefix parses
  at 15); a `..` before `]` is left to the slice path and a parsed range in a
  subscript is the slice. §9.9 and §30 tables, D192.
- #3017 (build/retention.w require-last-green): when the release binary is
  the one last-green recorded but the manifest's source_identity is not
  HEAD's, the install is refused naming `src/main build`.
- #2521 (tools/verdict.w): a `with uat` log closes on its summary line, the
  FAIL count decides its rc, and each failed scenario is a red.

Spec changelog v7.38; decision log D192, D193.
@ehartford

Copy link
Copy Markdown
Contributor Author

Battery green on 4f46d6309 (seed-driven with run tools/battery.w): gate, with uat 13 scenarios (12 pass, 1 skip: the Windows raylib leg), battery-checks all green. A first battery on the unamended commit surfaced three things now in the commit: a variant constructor call must not be folded (behav_1430 crashed, behav_1506 lost the enum name), a bare None ident needs a place in the derived eq (behav_2137, da_2161), and the internals test / an error fixture / verdict.w's green summary needed their updates.

@ehartford
ehartford merged commit afbdbb1 into main Nov 7, 2026
@ehartford
ehartford deleted the today-bugs branch November 7, 2026 00:16
This was referenced Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant