docs: describe the v2 test architecture

test-system-v2.md is the authoritative owner table and target graph;
CLAUDE.md rule 13 moves from the sizelint gate to authoritative layout
helpers and rule 14 names the new targets; PROJECT_PLAN.md is marked
historical where superseded.
This commit is contained in:
2026-08-07 23:03:55 +09:00
parent 7cc8cee737
commit a87d931096
3 changed files with 300 additions and 14 deletions

View File

@@ -1,5 +1,11 @@
# WW Project Continuation Plan
> Historical implementation log. The active test targets and ownership model
> are documented in `docs/test-system-v2.md`. References below to `test/run`,
> `test-run`, phase scheduling, last-green caching, frozen `internal/wwtest`,
> or the 106-fixture prototype describe superseded 2026-08-05 states; they are
> retained only as dated design history and are not current operator guidance.
Status date: 2026-08-05
Canonical baseline: `master` at `3d7973596422f1c9e2275016a5f264a2ae504ceb`
@@ -393,22 +399,34 @@ Remaining:
### 5.4 Package-driver limitations
- `ww test DIR` discovers only immediate `_test.ww` files and does not recurse.
- Files are not sorted deterministically.
- Each discovered file is built separately instead of assembling one package
test unit. Same-package helper sharing therefore does not work as expected.
- Production enumeration excludes all `*test.ww`, while test discovery includes
only `_test.ww`; the naming rules disagree.
- Only the first glob argument reaches the runner even though the runner can
This list records the pre-T1 audit baseline. The 2026-08-05 single-directory
vertical slice closes deterministic sorting, compatible group assembly,
multiple-filter forwarding, no-test/no-match behavior, dependency-test
exclusion, and deterministic `-c` output. Recursive discovery and package
`-o` remain deliberately outside that slice.
- `ww test DIR` discovered only immediate `_test.ww` files and did not recurse.
- Files were not sorted deterministically.
- Each discovered file was built separately instead of assembling one package
test unit, so same-package helper sharing did not work as expected.
- Production enumeration excluded all `*test.ww`, while test discovery included
only `_test.ww`; the naming rules disagreed.
- Only the first glob argument reached the runner even though the runner could
support more than one.
- A single file with no tests can silently return success, while a directory
with no recognized tests can error. Define one consistent contract.
- Imported dependency tests are stripped. This is normally correct, but root
package files containing tests must be assembled into the root test build.
- `-c` without `-o` can leave a temporary test executable behind.
- A single file with no tests could silently return success, while a directory
with no recognized tests could error.
- Imported dependency tests were stripped correctly, but root package files
containing tests were not assembled into the root test build.
- `-c` without `-o` could leave a temporary test executable behind.
### 5.5 Runner-protocol limitations
This list likewise records the pre-slice audit baseline. The first package
vertical slice closes completion proof, failure clamping, timeout/group cleanup,
skip reasons, expected-abort state, and qualified current-test identity. The
remaining invalid-attribute diagnostics and abort/exit-1 ABI ambiguity are
tracked in the later task sections.
- A test can call `os.exit(0)` before completing and the parent reports it as a
pass. The parent needs an explicit completion token from the child.
- The runner returns the raw number of failures. At 256 failures, the Unix exit
@@ -622,6 +640,16 @@ before declaring all of T0 complete.
### T1: Implement package-aware `ww test`
First vertical slice status (2026-08-05): one explicit immediate directory is
planned in byte order; production and same-package tests share a white-box
binary; the exact `<package>_test` group uses a second binary; imported tests do
not leak; qualified IDs, multiple filters, explicit empty outcomes, direct
per-test supervision, completion proof, timeout cleanup, and exit clamping are
covered natively. Both public drivers delegate to the same package planner but
pass their own compiler stage. Recursive `./...`, package concurrency/caching,
package `-o`, universal filename migration, and the remaining attribute-shape
diagnostics are still open, so T1 as a whole is not marked complete.
- Introduce a package test-plan data structure in the driver.
- Unify production-file exclusion and candidate discovery on `*_test.ww`, then
classify candidates by their package declarations.