ww: test sources are *_test.ww only (Go contract)

Go compiles only _test.go files as tests; discovery now keys on the
_test.ww suffix alone. The line-leading-@test compatibility allowance
(noncanonical filenames admitted as test sources) is removed from both
driver stages and the coordinator. An @test declaration outside a
*_test.ww file is rejected loudly ("@test declaration outside
*_test.ww", wording byte-identical cs/ww) instead of silently running
under compose or silently dropping in a non-T build (#6). Tree audit
found zero real carriers; the two allowance fixtures flip canonical
(dep_test.ww, widget_test.ww). New pins: direnum attest-noncanon
reject row (both-stage stderr parity) and the coordinator
noncanonical_attest_rejected package row.
This commit is contained in:
2026-08-08 20:38:02 +09:00
parent 0cf9643be8
commit 659e859f34
10 changed files with 109 additions and 47 deletions

View File

@@ -0,0 +1,7 @@
package dep;
// Go's contract: a package's *_test.ww sources are not part of the
// imported package. Must be excluded when dep is imported by root.
@test fn imported_dependency_test_must_not_leak() void = {
assert(false);
};

View File

@@ -1,7 +0,0 @@
package dep;
// Noncanonical migration spelling: the actual line-leading @test makes this
// test-only. It must be excluded when dep is imported by the root package.
@test fn imported_dependency_test_must_not_leak() void = {
assert(false);
};