Skip to content

Land the misuse tests on main - #3

Merged
winding-lines merged 2 commits into
mainfrom
origins
Sep 3, 2026
Merged

winding-lines merged 2 commits into
mainfrom
origins

Conversation

@winding-lines

Copy link
Copy Markdown
Contributor

#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

winding-lines and others added 2 commits September 3, 2026 05:17
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
@winding-lines
winding-lines merged commit 5197c9f into main Sep 3, 2026
2 checks passed
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