Repository navigation
Land the misuse tests on main - #3
Merged
Merged
Conversation
tests/check.sh builds seven wrong programs. tests/caught/ must fail to compile with the diagnostic named in the file's `# expect-error:` line — the four refusals PR #1 lists. tests/uncaught/ must compile with no diagnostic, run, and print the `# expect:` lines in order — the wrong answer, on purpose: the post's untracked Ctx dropping `totals` before the threads start, `opaque()` outside `run` doing the same, and a field-copy-then-deref reading a destroyed object. Both directions are claims about the compiler. A caught case that starts compiling means a stated guarantee is gone; an uncaught case that stops compiling means the compiler learned to see it — move the file over. The destructor in the uncaught cases poisons the cell to -1 and leaks it rather than freeing it: with a real free, the thousand writes corrupted the heap on some runs (pthread_join rc=3), and a test documenting undefined behaviour cannot itself be undefined. Poisoned, the misuse is a number — 499499 — and the harness held over 15 consecutive runs. The harness was checked in both directions: a caught case rewritten to compile and an uncaught case with its expectations reordered are each reported as FAIL. Run it as `pixi run check`; it says so if `mojo` is not on PATH. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015or6oTZmb7EQTXTbALbBXY
Deliberate misuse, sorted by what the compiler does with it
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.
#2 was stacked on #1 and merged into its base branch `origins` 25 seconds after #1 merged into `main` — GitHub only retargets a stacked PR when its base is deleted, so `tests/` and the `check` task ended up on `origins` only. This carries them across; the diff is exactly #2.
🤖 Generated with Claude Code
https://claude.ai/code/session_015or6oTZmb7EQTXTbALbBXY