run: reject .ww directories as named sources

This commit is contained in:
2026-08-23 01:07:07 +09:00
parent ca0e533c13
commit 59fc76964c
6 changed files with 612 additions and 20 deletions

View File

@@ -278,12 +278,29 @@ parity, direct and symlinked `.ww` directories, a dotted dependency, output
modes, cold/warm transaction behavior, compiler and signaled-linker failure
preservation, selected-route concurrency, cleanup, and the exact test-command
behavior. Direct driver interruption remains owned by the unchanged directory
machinery and is not claimed fixed here. The shared resolver and `ww run` are
deliberately unchanged—and the observer
retains their pre-existing stage difference—because pinned Go's run command
has a distinct named-file front door.
No test product, result, package/import identity, or serialized format changes;
build remains 18, test remains 19, and semantic storage remains 3.
machinery and is not claimed fixed here.
Pinned Go's run command has a distinct suffix-first named-file front door.
Accordingly, an existing `ww run` target whose exact requested spelling ends
`.ww` and whose symlink-following `stat` result is a directory is rejected in
the twin run fronts before the shared resolver and private run scratch. An
`_test.ww` spelling emits exactly
`ww: cannot run *_test.ww files (OPERAND)\n`; every other selected `.ww`
directory emits exactly `OPERAND is a directory, should be a WW file\n`.
Both stages return status 1 with empty stdout, open no directory member, scan
no import, construct no package/graph/action, invoke no producer or runtime,
and create no run scratch or artifact. This includes direct and symlinked
directories and hidden directory spellings; directory contents cannot displace
the classifier diagnostic. A trailing separator and non-`.ww` or dotted
package requests retain the directory package route. The same-spelling build,
raw test, `test -c`, and directory `test -S` routes remain stat-first and keep
their existing diagnostics and artifact bytes. Thus this run change creates no
test product, result, package/import identity, test-process/filter change, or
serialized-format change; build remains 18, test remains 19, and semantic
storage remains 3. Regular or missing `_test.ww`, missing/logical `.ww`,
multiple named sources, finite FIFOs, and hidden regular sources are not
claimed by this existing-directory slice. The general direct-driver `.new`
interruption residue also remains open.
List mode uses that same product process and initialization boundary but starts
no per-test child. The shared language harness emits only selected qualified