build: omit named test source operands

This commit is contained in:
2026-08-22 21:53:10 +09:00
parent 3922f1c34e
commit 2e5451a601
13 changed files with 1666 additions and 21 deletions

View File

@@ -239,6 +239,32 @@ platform classification, symlink spelling, output rollback, residue, and
diagnostic/artifact parity. Directory package coordination and test process,
filter, timeout, signal, and descendant topology are unchanged.
The corresponding focused dual-stage named-test-source build observer proves
the distinct `ww build` rule for one visible raw operand ending exactly
`_test.ww`. It requires each stage to read the package clause and contiguous
initial imports before omitting the sole root: unreadable/header-syntax inputs
retain their diagnostics, while a valid header prevents import resolution,
graph/action creation, producers, runtime, publication, persistence, and all
ordinary body-derived diagnostics. It separately proves that a first malformed
UTF-8 or non-leading BOM body byte is outside the header, while a reached NUL
and an unterminated header-trivia comment retain loader diagnostics. It also
proves WW's grammar-level adaptation of Go's following-`i` byte probe: only the
exact lexical `import` token continues the header, while an identifier such as
`imported` begins the ordinary body. It covers
normal, `-S`, and `/dev/null` successful
empty selections; the exact `no packages to build` and `no main packages to
build` output branches; requested-basename prefix, symlink, symlink-directory,
and wrong-platform spelling controls; cold absence and warm preservation of
outputs/work state; tool/process absence, interruption, concurrency, and
residue cleanup. Cstage and WWstage agree on status, stdout, stderr,
diagnostics, semantic artifact/work snapshots, and unaffected-control artifact
bytes. Complete per-stage warm snapshots additionally cover the intentionally
stage-specific `.wwtool.ww` producer-provenance file.
Raw `ww test`, `-c`, and `-S` test routes retain explicit test-file selection;
directory/recursive selection, package/import identities, graph/action
identities, persistence formats (build 18, test 19, semantic 3), and test
process topology are explicit non-effects.
List mode uses that same product process and initialization boundary but starts
no per-test child. The shared language harness emits only selected qualified
test names, one per line in descriptor order. A valid filter selecting no tests