From a8e5e04f7696e2a12affb8a0e5769980c3027b90 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Aug 2026 09:43:44 +0000 Subject: [PATCH] Version Packages --- .changeset/exact-machine-test-evidence.md | 7 ---- .changeset/exploration-transition-coverage.md | 5 --- .../retain-transition-branch-evidence.md | 7 ---- .changeset/static-transition-topology.md | 7 ---- .changeset/unbounded-transition-cases.md | 24 ----------- .../verify-routed-transition-evidence.md | 5 --- CHANGELOG.md | 40 +++++++++++++++++++ package.json | 2 +- 8 files changed, 41 insertions(+), 56 deletions(-) delete mode 100644 .changeset/exact-machine-test-evidence.md delete mode 100644 .changeset/exploration-transition-coverage.md delete mode 100644 .changeset/retain-transition-branch-evidence.md delete mode 100644 .changeset/static-transition-topology.md delete mode 100644 .changeset/unbounded-transition-cases.md delete mode 100644 .changeset/verify-routed-transition-evidence.md diff --git a/.changeset/exact-machine-test-evidence.md b/.changeset/exact-machine-test-evidence.md deleted file mode 100644 index ad4d4b9..0000000 --- a/.changeset/exact-machine-test-evidence.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@typeonce/effect-machine": minor ---- - -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`. - -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. diff --git a/.changeset/exploration-transition-coverage.md b/.changeset/exploration-transition-coverage.md deleted file mode 100644 index 2bbf337..0000000 --- a/.changeset/exploration-transition-coverage.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@typeonce/effect-machine": minor ---- - -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. diff --git a/.changeset/retain-transition-branch-evidence.md b/.changeset/retain-transition-branch-evidence.md deleted file mode 100644 index a20c6e6..0000000 --- a/.changeset/retain-transition-branch-evidence.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@typeonce/effect-machine": minor ---- - -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. - -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. diff --git a/.changeset/static-transition-topology.md b/.changeset/static-transition-topology.md deleted file mode 100644 index 2876cf1..0000000 --- a/.changeset/static-transition-topology.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@typeonce/effect-machine": minor ---- - -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. - -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. diff --git a/.changeset/unbounded-transition-cases.md b/.changeset/unbounded-transition-cases.md deleted file mode 100644 index 5f3a6be..0000000 --- a/.changeset/unbounded-transition-cases.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -"@typeonce/effect-machine": minor ---- - -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: - -```ts -Machine.transition({ - cases: (branch) => [ - branch({ - title: "cached", - when: ({ event }) => event.cached, - target: (to) => to.full.Ready(), - resolve: ({ match, target }) => target.from({ data: match }) - }) - ], - otherwise: { - target: (to) => to.full.Loading(), - resolve: ({ target }) => target.from() - } -}) -``` - -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. diff --git a/.changeset/verify-routed-transition-evidence.md b/.changeset/verify-routed-transition-evidence.md deleted file mode 100644 index beea4f6..0000000 --- a/.changeset/verify-routed-transition-evidence.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@typeonce/effect-machine": minor ---- - -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`. diff --git a/CHANGELOG.md b/CHANGELOG.md index b029b6f..17b4541 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,45 @@ # @typeonce/effect-machine +## 0.14.0 + +### Minor Changes + +- 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`. + + 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. + +- 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. +- 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. + + 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. + +- 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. + + 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. + +- 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: + + ```ts + Machine.transition({ + cases: (branch) => [ + branch({ + title: "cached", + when: ({ event }) => event.cached, + target: (to) => to.full.Ready(), + resolve: ({ match, target }) => target.from({ data: match }) + }) + ], + otherwise: { + target: (to) => to.full.Loading(), + resolve: ({ target }) => target.from() + } + }) + ``` + + 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. + +- 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`. + ## 0.13.0 ### Minor Changes diff --git a/package.json b/package.json index 4f1e534..ee09cef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@typeonce/effect-machine", - "version": "0.13.0", + "version": "0.14.0", "description": "Schema-first state machines and statecharts for Effect", "author": "Sandro Maglione", "repository": {