Skip to content

Commit 6887b70

Browse files
Version Packages (#126)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent a4cd309 commit 6887b70

8 files changed

Lines changed: 41 additions & 56 deletions

.changeset/exact-machine-test-evidence.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/exploration-transition-coverage.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/retain-transition-branch-evidence.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/static-transition-topology.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/unbounded-transition-cases.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

.changeset/verify-routed-transition-evidence.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
11
# @typeonce/effect-machine
22

3+
## 0.14.0
4+
5+
### Minor Changes
6+
7+
- 4554c4d: Make `MachineTest.coverage` report transition definitions and their exact branches separately. Read definition coverage through `coverage.transitions.definitions` and conditional branch coverage through `coverage.transitions.branches`.
8+
9+
Replace the `targetBounds` verification law group with `definitions`. The new laws validate the declared startup root, transition registration, retained `branchIndex`, and the selected branch's exact target kind and scope.
10+
11+
- a4cd309: Add exact `transitionCoverage` to `MachineTest.Exploration`. Coverage includes startup and every concretely planned event, including state-limit candidates, while unplanned depth- and transition-limit frontiers remain misses.
12+
- 324ae69: Retain exact static and runtime transition evidence for testing and visualization. Transition branch inspection now includes the selected target kind and scope, retained planner transitions identify the zero-based branch that executed, and `Machine.initialDefinition` exposes the root startup selection without executing its resolver.
13+
14+
Use `branchIndex` to associate a retained transition with the corresponding entry in `Machine.transitionDefinitions(machine).branches`. Direct transitions use index `0`; conditional cases retain their declaration index and `otherwise` follows the final case.
15+
16+
- 2c67924: Require `Machine.transition` for every machine transition and capture each possible target as static machine topology. Direct transitions declare `target` and `resolve`; conditional transitions declare titled `cases` whose `when` functions return `Option`, plus an explicit `otherwise` branch. The selected target builder and conditional match value are inferred in each resolver.
17+
18+
Initial state construction now uses the same `target` and `resolve` shape, restricted to the machine's declared initial state. Replace process logic previously created with `Machine.transition` by `Machine.logic`, and replace function handlers, target upper-bound lists, and `States.initial` construction with the explicit transition and initial target selectors.
19+
20+
- 944cdb5: Allow conditional `Machine.transition` definitions to infer any number of heterogeneous cases. Define `cases` with its locally supplied `branch` constructor so each predicate match and selected target remain exact in the corresponding resolver:
21+
22+
```ts
23+
Machine.transition({
24+
cases: (branch) => [
25+
branch({
26+
title: "cached",
27+
when: ({ event }) => event.cached,
28+
target: (to) => to.full.Ready(),
29+
resolve: ({ match, target }) => target.from({ data: match })
30+
})
31+
],
32+
otherwise: {
33+
target: (to) => to.full.Loading(),
34+
resolve: ({ target }) => target.from()
35+
}
36+
})
37+
```
38+
39+
Replace each object previously written directly in the `cases` array with `branch({ ... })` inside the `cases: (branch) => [...]` factory. Direct transitions and `otherwise` keep their existing shape.
40+
41+
- 64094df: Make `MachineTest.verify` accept startup roots reached through exact retained initial-choice routes and reject retained targets whose choice, initial, or history resolution is inconsistent with their selected static branch. Resolution failures are reported as `definitions.resolution`.
42+
343
## 0.13.0
444

545
### Minor Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@typeonce/effect-machine",
3-
"version": "0.13.0",
3+
"version": "0.14.0",
44
"description": "Schema-first state machines and statecharts for Effect",
55
"author": "Sandro Maglione",
66
"repository": {

0 commit comments

Comments
 (0)