refactor: co-locate 17 more std module tests in std/<module>/ - #1636
Merged
Conversation
Continues #1634. Seventeen more specs move out of tests/regression/ to sit beside the modules they cover: audio, bytes, cbor, clapae, config, encoding, hash, language, message, msgpack, number, regex, schema, strbuilder, time, url, worker. All 17 are pure R100 renames — no test content changed. SELECTED BY IMPORT, NOT BY NAME. A matching filename is not evidence a test belongs to a module, so each candidate was checked for actually importing its namesake. All 17 do. (test_message looked like a counter-example until I noticed it imports via backticks — `import std.`message`(*)` — which my first grep missed.) DELIBERATELY NOT MOVED: the ~45 regression tests that import exactly one std module but are compiler/codegen tests which merely USE it — test_string_leak_*, test_return_escape_*, test_closure_captures_*, and the like. They exercise the heap tracker and closure lowering, not std.string's API; filing them under std/string/ would misattribute them. That judgement call is left for a human rather than guessed at. Four comment/doc references repointed so they stay accurate: tests/regression/test_result_migration.ae, tests/runtime/ test_runtime_strbuilder.c, tests/regression/test_std_strbuilder_v2.ae and std/schema/README.md. None were build wiring, so nothing would have broken — but a comment that names the wrong path is a small trap for the next reader. CHANGELOG.md and CHANGELOG-archive.md also name old paths and are deliberately left alone: they record where those files were at the time. The dangling-reference sweep was exhaustive this time, per old path across the whole tracked tree, plus a targeted check of every file that pins a fixed corpus. That is the check I got wrong in #1634, where I grepped unrenamed basenames and missed emit_c_determinism's two entries. Verified: 17/17 pass from their new homes (and passed at baseline before the move); `make test-ae` discovers all 17 and the total holds at 965, so nothing went quiet; the seven remaining failures are the known environmental set (h2, background-server, Windows-cross, wycheproof); a staged install ships 0 test files with all 136 modules present, so #1634's std trim covers these automatically. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Under a fresh [current] — the 0.550.0 release consumed main's, and this PR touches std/ so the gate from #1632 requires one. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
paul-hammant
added a commit
that referenced
this pull request
Aug 18, 2026
Resolves the CHANGELOG conflict — the "This branch has conflicts that must be resolved" banner was right and my earlier reading of it as stale outage metadata was wrong: main had moved (#1636 landed) and my local origin/main was stale when I checked. The conflict is the ordinary two-PRs-one-[current] collision, not the release-fold hazard: both sides are live entries that must survive. Kept BOTH under a single [current], ordered Added / Changed / Fixed — Nic's check-docs and check-contrib-modules entries plus his Fixed section, and main's std test co-location entry. Verified all four entries are present and there is exactly one [current] heading. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
paul-hammant
added a commit
that referenced
this pull request
Aug 18, 2026
Resolves the CHANGELOG conflict: seven commits landed on main since this branch was cut, including #1636 (std test co-location) and #1638 (check-docs / check-contrib-modules gates). Both sides are live [current] entries, so both are kept — Nic's Ruby 3.4 nil-ABI and typecheck_program leak fixes, alongside main's Added/Changed/ Fixed sections — merged section-by-section under one [current] in Added / Changed / Fixed order. Verified all six entries survive and there is exactly one [current] heading. The Makefile merged cleanly, keeping both this branch's tests/compiler/test_typechecker.c addition and main's python3 guard on check-docs. The two red jobs on this PR are NOT code failures. Both were cancelled during yesterday's GitHub Actions outage: "WebAssembly (Emscripten)" wedged in "Install native GCC" — a package-install step, before any Aether code, with every later step skipped — and "64-bit Architecture Tests" shows every step SUCCEEDED (392 passed, 0 failed, including the pointer-size check) and was cancelled anyway. Re-running is all they need. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Continues #1634. Seventeen more specs move out of
tests/regression/tosit beside the modules they cover: audio, bytes, cbor, clapae, config,
encoding, hash, language, message, msgpack, number, regex, schema,
strbuilder, time, url, worker.
All 17 are pure
R100renames — no test content changed.Selected by import, not by filename
A matching name is not evidence a test belongs to a module, so each
candidate was checked for actually importing its namesake. All 17 do.
test_messagelooked like a counter-example — it appeared to import onlymapandstring— until I noticed it imports via backticks(
import std.`message`(*)), which my first grep missed.Deliberately not moved
About 45 regression tests import exactly one std module but are
compiler/codegen tests that merely use it:
test_string_leak_*,test_return_escape_*,test_closure_captures_ptr_and_string, andsimilar. They exercise the heap tracker and closure lowering, not
std.string's API — filing them understd/string/would misattributethem. That judgement call is left for a human rather than guessed at.
The reference sweep — the thing I got wrong last time
In #1634 I grepped the unrenamed basenames and missed
emit_c_determinism's two pinned corpus entries; CI caught it. This timethe sweep was exhaustive: every old path across the whole tracked tree,
plus a targeted check of every file that pins a fixed file list.
Six references turned up. Four are comments/docs that were repointed so
they stay accurate —
tests/regression/test_result_migration.ae,tests/runtime/test_runtime_strbuilder.c,tests/regression/test_std_strbuilder_v2.ae,std/schema/README.md.None were build wiring, so nothing would have broken, but a comment
naming the wrong path is a trap for the next reader.
CHANGELOG.mdandCHANGELOG-archive.mdalso name old paths and aredeliberately left alone: they record where those files were at the
time.
Verified
move, so the move is the only variable
make test-aediscovers all 17, and the total holds at 965 — therisk with a move like this is tests going quiet rather than failing
background-server, Windows-cross, wycheproof); none name a moved test
(an apparent
urlhit iscurlin the h2 stress test —std_url_test_urlitself PASSes)
so refactor: co-locate std module tests in std/<module>/ #1634's
std/trim covers these automatically with no Makefile change🤖 Generated with Claude Code