`--last-failed` selects only the tests the previous run did not pass, read
from the `report.json` this run overwrites (beside the artifact root):
failed, timed out, interrupted, or skipped because a setup, a serial
predecessor, a hook, or the worker failed, each named per target and agent
by its result id. No report there is `NO_LAST_RUN`; a run with nothing
failed selects nothing. `--shard <index/total>` runs one contiguous slice of
the selected tests, cut once every other filter and the serial closure
applied, the first shards taking the remainder, so a serial group is never
split and each shard brings only the setup tests it needs. `e2e list` takes
both. `RunOptions` and `ListOptions` carry them as `lastFailed` and `shard`.
* fix(collect): glob forms that match nothing are INVALID_GLOB
A tests glob or a positional glob that could never match a file now fails with INVALID_GLOB and a hint: an absolute path, a trailing slash, braces, a backslash separator, or a .. segment. A leading ./, a . segment, and a doubled slash are dropped, so ./tests/**/*.e2e.ts selects what tests/**/*.e2e.ts does instead of matching nothing, walking .git and .e2e, and pointing the NO_TESTS message at a missing example file.
* fix(collect): review fixes for the glob grammar
Segments without wildcards compile to names, so the near-miss scan reads a glob's leading directory off its segments (literalPrefix) and the positional glob test is the grammar's own GLOB_SYNTAX; the pattern string seam is gone. Character classes and extglobs are rejected with hints like braces. A trailing '.' and a normalized leading '!' are caught. An existing path wins over glob classification for positionals, so a file whose name has braces is still selectable by path. Messages name the fix; docs and the changeset describe positionals as the code treats them; the near-miss regression has a test.
* fix(collect): validate tags and the tests globs where they are written
tags must be a list of distinct names without spaces or commas, checked at registration: a bare string was iterable, so tags: 'smoke' registered five one-letter tags and --tag smoke never matched. tests must be a glob or a list of globs, each compiled at config resolution: a wrong type used to reach the glob compiler during collection as a plain TypeError and exit 1 as a test failure instead of INVALID_CONFIG.
* fix(collect): review fixes for tag and tests validation
The tag rule is what --tag can spell back: distinct names, none blank, no comma, no leading or trailing whitespace; inner spaces stay legal, so the mobile benchmark's 'Login Form' tags collect. A registration error names its file. normalizeTests takes the honest unknown boundary, names an empty glob as a value, and its comment states what changed. Messages quote values through describeValue, which now names objects and undefined. Config tests assert error codes; docs state one rule everywhere and the error-code rows list the new causes.