@unotest/protocol 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +83 -0
- package/dist/index.d.ts +1124 -963
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,88 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.20.0] - 2026-08-24
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7957469: A status of its own for tests that are supposed to fail, and tiles that fade with age.
|
|
8
|
+
|
|
9
|
+
**`// @expect-fail`.** A scenario can declare that failing IS its assertion.
|
|
10
|
+
The marker lives in the comment block before the first code — with the
|
|
11
|
+
mandatory header (right after the colour line) or without one. The parser is
|
|
12
|
+
`parseScenarioAnnotations` in `@unotest/protocol`; `ScenarioMeta` gains an
|
|
13
|
+
`expectFail` field.
|
|
14
|
+
|
|
15
|
+
Such a scenario carries its own status in the viewer (`expected`, purple):
|
|
16
|
+
it stays out of the FAILED counter, out of the "failing now" badge and out
|
|
17
|
+
of the "Failing now" section. The inverse case — a marked test that
|
|
18
|
+
**passed** — turns red: whatever it was guarding stopped breaking and nobody
|
|
19
|
+
found out. One rule (`scenarioHealthStatus`) drives the dashboard, the
|
|
20
|
+
scenario tree and the badge, so the three cannot drift apart.
|
|
21
|
+
|
|
22
|
+
The runner does not interpret the marker: exit code and run status are
|
|
23
|
+
unchanged. The run really did fail — it is the test itself that is fine.
|
|
24
|
+
|
|
25
|
+
**Fading.** An overview tile dims as its last result ages: four steps (hour /
|
|
26
|
+
day / week / older) set the strength of the fill itself — 46 / 30 / 19 / 11%
|
|
27
|
+
of the status colour. The 11% floor keeps an old red still red. The time of
|
|
28
|
+
the last run is now part of the tile's accessible name — colour is the one
|
|
29
|
+
channel a screen reader does not have.
|
|
30
|
+
|
|
31
|
+
## [0.19.0] - 2026-08-23
|
|
32
|
+
|
|
33
|
+
### Minor Changes
|
|
34
|
+
|
|
35
|
+
- dfb3991: Per-collection parallelism via a `workers:` field in the collection YAML.
|
|
36
|
+
|
|
37
|
+
- `workers: N` (integer ≥ 1) in `unotest/e2e/_collections/*.yaml` sets how
|
|
38
|
+
many scenarios of that collection run concurrently; omitted = serial.
|
|
39
|
+
- Precedence: CLI `--workers=N` flag > manifest `workers:` > 1.
|
|
40
|
+
- Viewer: the collection header shows an editable `workers` value; the
|
|
41
|
+
setting is stored in the YAML, so CLI and CI runs pick it up too.
|
|
42
|
+
- `CollectionMeta` (protocol) gains a `workers: number | null` field.
|
|
43
|
+
|
|
44
|
+
- Run history scales: runs are filed under daily shards and the viewer stops
|
|
45
|
+
polling history it is not showing.
|
|
46
|
+
|
|
47
|
+
- New on-disk layout `unotest/.runs/<YYYY>/<MM>/<DD>/<runId>/` (UTC date the
|
|
48
|
+
run started). The shard is a pure function of the `runId`, which already
|
|
49
|
+
carries the timestamp — a direct link to a run keeps working even with the
|
|
50
|
+
index deleted. Existing flat `.runs/<runId>/` history is migrated
|
|
51
|
+
automatically (see the `runs migrate` entry).
|
|
52
|
+
- The viewer's watcher polls only LIVE runs; finished history never touches
|
|
53
|
+
it. Discovery watches the current day's directory with native `fs.watch`
|
|
54
|
+
and re-attaches at UTC midnight.
|
|
55
|
+
- A JSONL index per day and per scenario backs the history list. It is fully
|
|
56
|
+
rebuildable — rebuilt on start, non-blocking — so a corrupted or missing
|
|
57
|
+
index degrades the listing, never the runs themselves.
|
|
58
|
+
- `@unotest/protocol`: new `run-shard` and `run-index` modules (shard path
|
|
59
|
+
derivation, index record shapes) exported from the root entry.
|
|
60
|
+
|
|
61
|
+
- Step screenshots are stored once and shared, and old runs expire on their
|
|
62
|
+
own — a long history stops growing without bound.
|
|
63
|
+
|
|
64
|
+
- Identical frames are content-addressed in `unotest/.runs/_blobs/` and
|
|
65
|
+
hardlinked into each run. `du` and ordinary copies see whole files;
|
|
66
|
+
`cp -a` / `rsync -H` preserve the sharing. On one dogfood suite: 45
|
|
67
|
+
frames, 2.04 MB by apparent size, 0.96 MB on disk.
|
|
68
|
+
- Reference counting is the filesystem's (`st_nlink`), so nothing to keep in
|
|
69
|
+
sync. Blob generations keep the dedup honest past ext4's 65 000-link
|
|
70
|
+
ceiling, and a fresh blob is untouchable for an hour so the window between
|
|
71
|
+
writing it and linking it is never mistaken for garbage.
|
|
72
|
+
- Retention: `UNOTEST_RUNS_RETENTION_DAYS` (whole days, default 180) sweeps
|
|
73
|
+
runs older than the window at the end of a collection run. It never
|
|
74
|
+
changes the exit code — a failed sweep is reported, not fatal.
|
|
75
|
+
- `@unotest/protocol`: new `run-blobs` module exported from the root entry.
|
|
76
|
+
|
|
77
|
+
- `ScenarioLatestEntry` (`GET /api/runs/latest`) gains `lastDurationMs` and
|
|
78
|
+
`recent` — a window of the last 12 outcomes, oldest first. Both are folded by
|
|
79
|
+
the same `foldScenarioRun` the live path and `rebuild()` already share, so
|
|
80
|
+
the index stays fully derived from the run manifests. Feeds the viewer's
|
|
81
|
+
overview dashboard without a request per scenario.
|
|
82
|
+
|
|
83
|
+
`RUN_INDEX_SCHEMA_VERSION` → 2: an index file from the previous version is
|
|
84
|
+
discarded and rebuilt on start, as before. Nothing to do on upgrade.
|
|
85
|
+
|
|
3
86
|
## [0.18.0] - 2026-08-23
|
|
4
87
|
|
|
5
88
|
### Minor Changes
|