test: close the sprint's coverage gaps, and put its ownership fixes under memcheck - #815
Merged
Conversation
This was referenced Aug 19, 2026
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.
A coverage audit of #804-#812 found the sprint's ownership fixes were invisible to every gate that could catch their real failure mode. This closes the gaps; no compiler or runtime changes.
the memcheck hole
None of the sprint's goldens ran under valgrind, and #804/#805/#809/#810 are ownership fixes whose regression shape is an over-release or overread — which prints the right answer, stays flat in the leak gate, and passes the golden diff. Seven cases join MEMCHECK_CASES (all verified clean under the gate's exact invocation): test_generic_enum_match, test_closure_many_captures, test_closure_capture_boundaries, test_optional_match_ownership, test_optional_payload_eq, test_tail_match_defer, test_argument_literal_ownership.
new and extended tests
deferin it; a revert to the bareretwould have skipped every defer silently. Covers the expression arm, the none arm, and a borrowed-field return.Both(A, B, Int)), matched through a function boundary — per-slot kind substitution had only single-param coverage.!=corner, and a plain argument widening into a fully genericT?parameter.poke([["seed"]])joins the round (flat, 64kb noise). The stored-tuple shape (keep((i, i+1))into a struct field) was measured, leaks its box per round as docs/ownership.md already documents ("real tuple literals still strand their box"), and is deliberately kept OUT of the gate with a comment saying why — its correctness side stays covered by test_argument_literal_ownership.what was tested
make check-invalid-only56 passed;make run-regressions-only374 passed (the three new goldens included).