slovo/.llm/BETA_19_TEST_DISCOVERY_AND_CONFORMANCE.md

88 lines
2.8 KiB
Markdown

# 1.0.0-beta.19 Test Discovery And User-Project Conformance Foundation
## Scope
`1.0.0-beta.19` is a compiler/tooling and conformance slice. It does
not change the Slovo source language or standard library surface.
Add deterministic list-only test discovery for:
- `glagol test --list <file|project|workspace>`
- `glagol --run-tests --list <file>` for the legacy single-file path
## Contract
List mode must reuse the same checked front-end path as normal test execution:
parse, lower, type-check, resolve project/workspace inputs, discover tests, and
apply `--filter <substring>`.
The command then lists discovered/selected tests without evaluating test bodies.
It must not execute runtime calls from test bodies, mutate files through test
logic, open sockets through test logic, or otherwise trigger user test
side-effects.
Ordering must remain deterministic and match current test execution discovery:
- single-file tests keep source order
- project tests keep existing module/package discovery order
- workspace tests keep existing workspace/package discovery order
Normal `glagol test` behavior and output remain unchanged unless `--list` is
present. Invalid files, projects, and workspaces still fail through the
existing diagnostic path.
## Output Shape
The initial output format is beta tooling. It should be stable enough for local
release-gate tests, but it is not a frozen public schema.
The output should make selected, skipped, total discovered, and filter state
visible. A concise text shape is enough; a stable JSON/event stream is out of
scope for this slice.
## Non-Scope
This scope does not add:
- source-language syntax
- runtime helper names
- JSON expansion
- parallel test execution
- retries
- tags or groups
- coverage reports
- event streams
- stable artifact-manifest schema freeze
- stable Markdown schema freeze
- LSP or watch behavior
- SARIF or daemon protocols
- package registries
- semver solving
- performance claims
## Acceptance Criteria
- `glagol test --list <file.slo>` lists checked/discovered tests without
executing bodies.
- `glagol test --list <project>` and workspace inputs preserve current
project/workspace ordering.
- `glagol --run-tests --list <file.slo>` works for the legacy single-file path.
- `--filter <substring>` marks/selects the same tests as normal filtered
execution while avoiding body evaluation.
- Normal `glagol test` output stays byte-stable for existing covered cases.
- Invalid inputs still emit existing diagnostics.
- Docs describe beta19 as a released tooling/conformance slice.
- Release-gate coverage includes the focused beta19 test-discovery suite.
## Suggested Gates
```bash
cargo fmt --check
cargo test --test test_discovery_beta19
cargo test --test project_mode
cargo test --test cli_v1_1
cargo test --test diagnostics_schema_beta13
cargo test
./scripts/release-gate.sh
```