Skip to content

Retain transition coverage in exploration - #131

Merged
SandroMaglione merged 1 commit into
mainfrom
codex/exploration-transition-coverage
Aug 17, 2026
Merged

Retain transition coverage in exploration#131
SandroMaglione merged 1 commit into
mainfrom
codex/exploration-transition-coverage

Conversation

@SandroMaglione

Copy link
Copy Markdown
Member

Summary

  • expose exact definition- and branch-level transition coverage on every MachineTest.Exploration
  • reuse one retained-transition collector across trace coverage and bounded exploration
  • count startup, collapsed/self-loop, simultaneous, and state-limit plans while excluding unplanned depth/transition frontiers

Changeset

  • Added or updated for a library or package-metadata change
  • Not required because this PR does not change src/ or package.json

Validation

  • pnpm check
  • Relevant example checks, when examples changed (no examples changed)
  • Automated type-performance measurement passed or was not required
  • Automated runtime- and memory-performance measurement passed or was not required

Local pnpm perf:types and pnpm perf:runtime checks passed; CI comparisons remain authoritative.

@github-actions

Copy link
Copy Markdown
Contributor

Type performance

Measured with TypeScript 6.0.3 and skipLibCheck=true.

Scenario Base PR Difference
Effect only 55 55 0 (0.0%)
Import effect-machine 55 55 0 (0.0%)
Machine.defineStates (3 states) 3,039 3,039 0 (0.0%)
Machine.make (3 states, 2 events) 10,439 10,439 0 (0.0%)
machine.handle (3 states, 2 transitions) 53,206 53,206 0 (0.0%)
Machine.transition (10 conditional cases) 116,110 116,110 0 (0.0%)
Machine.invoke (state-dependent Effect) 57,187 57,187 0 (0.0%)
machine.handle (depth 24) 188,289 188,289 0 (0.0%)
machine.handle (wide depth 16) 219,355 219,355 0 (0.0%)
machine.handle (parallel/history/choice) 132,085 132,085 0 (0.0%)
machine.handle (4 successive calls) 137,762 137,762 0 (0.0%)
machine exact input/output/error/services 114,832 114,832 0 (0.0%)
execution adapter readiness 124,664 124,664 0 (0.0%)

Marginal instantiations are measured against the matching setup without that API call:

Scenario Base PR Difference
Import effect-machine 0 0 0
Machine.defineStates (3 states) 2,984 2,984 0 (0.0%)
Machine.make (3 states, 2 events) 7,392 7,392 0 (0.0%)
machine.handle (3 states, 2 transitions) 42,767 42,767 0 (0.0%)
Machine.transition (10 conditional cases) 106,181 106,181 0 (0.0%)
Machine.invoke (state-dependent Effect) 48,341 48,341 0 (0.0%)
machine.handle (depth 24) 168,599 168,599 0 (0.0%)
machine.handle (wide depth 16) 200,664 200,664 0 (0.0%)
machine.handle (parallel/history/choice) 112,409 112,409 0 (0.0%)
machine.handle (4 successive calls) 122,216 122,216 0 (0.0%)
machine exact input/output/error/services 100,741 100,741 0 (0.0%)
execution adapter readiness 62,727 62,727 0 (0.0%)
Check times (informational)
Scenario Base PR
Effect only 0.03s 0.03s
Import effect-machine 0.03s 0.03s
Machine.defineStates (3 states) 0.09s 0.10s
Machine.make (3 states, 2 events) 0.16s 0.16s
machine.handle (3 states, 2 transitions) 0.31s 0.31s
Machine.transition (10 conditional cases) 0.51s 0.51s
Machine.invoke (state-dependent Effect) 0.36s 0.38s
machine.handle (depth 24) 0.68s 0.70s
machine.handle (wide depth 16) 0.73s 0.72s
machine.handle (parallel/history/choice) 0.56s 0.57s
machine.handle (4 successive calls) 0.58s 0.57s
machine exact input/output/error/services 0.52s 0.53s
execution adapter readiness 0.52s 0.51s

Type instantiations are the comparison metric. Check time varies with runner load and is informational only.

@SandroMaglione
SandroMaglione merged commit a4cd309 into main Aug 17, 2026
13 checks passed
@SandroMaglione
SandroMaglione deleted the codex/exploration-transition-coverage branch August 17, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant