Skip to content

Upgrade to Effect RC.116 and native property testing - #219

Merged
SandroMaglione merged 2 commits into
mainfrom
codex/upgrade-effect-rc116
Sep 19, 2026
Merged

SandroMaglione merged 2 commits into
mainfrom
codex/upgrade-effect-rc116

Conversation

@SandroMaglione

@SandroMaglione SandroMaglione commented Sep 19, 2026

Copy link
Copy Markdown
Member

Summary

Upgrade Effect and its companion packages from RC.112 to RC.116. The testing API now accepts and returns native Effect Arbitrary values, including the newly released array shrinker:

// Before
FastCheck.array(commandArbitrary, { maxLength: 50 })
// After
Arbitrary.array(commandArbitrary, { maxLength: 50 })

Migrate generator composition, schema annotations, sampling, property options, replay, CLI flags, and schema getters. Command-sequence regression coverage verifies removal of unrelated commands and exact replay. The new generator exposed a reference-model error in ancestor initial-choice lifecycle paths; fix its boundary calculation and cover both reenter settings without changing the planner/runtime.

Document migration of custom generators and replay tokens. Extend the existing fresh-release exceptions to the exact Effect companion packages required by this upgrade.

Changeset

  • Added or updated for a library or package-metadata change
  • Not required because this PR does not change a publishable package

Minor changeset for the public testing generator type change. The fixed release group keeps all four packages synchronized.

Validation

  • pnpm check — 778 tests, core and React type assertions, strict consumer compilation, and all package checks
  • Automated type-performance measurement passed or was not required
  • Automated runtime- and memory-performance measurement passed or was not required

pnpm perf:types and pnpm perf:runtime passed locally. Final-head CI also passed all correctness, packaging, and performance checks.

CI type instantiations decreased across measured machine scenarios. Five alternating runtime runs per revision found no noise-adjusted throughput or heap regressions; measured machine throughput improved by roughly 5–16%. Reviewed both comparison reports for head 403acb3 against base dde2b81.

@github-actions

github-actions Bot commented Sep 19, 2026

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.state (3 children) 3,521 2,664 -857 (-24.3%)
Machine.make (3 states, 2 events) 9,488 8,632 -856 (-9.0%)
machine.handle (3 states, 2 transitions) 49,981 49,125 -856 (-1.7%)
declared transition (10 named branches) 63,038 62,183 -855 (-1.4%)
atomic construction, guards, and reentry 88,529 87,731 -798 (-0.9%)
registered invocation (input-taking Effect) 49,785 48,929 -856 (-1.7%)
machine.handle (depth 24) 197,380 196,525 -855 (-0.4%)
machine.handle (wide depth 16) 221,123 220,268 -855 (-0.4%)
machine.handle (parallel/history/choice) 95,104 94,249 -855 (-0.9%)
machine definition (3 independent implementations) 100,566 99,583 -983 (-1.0%)
machine exact input/output/error/services 85,901 84,918 -983 (-1.1%)
execution adapter readiness 73,376 72,521 -855 (-1.2%)

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

Scenario Base PR Difference
Import effect-machine 0 0 0
Machine.state (3 children) 3,466 2,609 -857 (-24.7%)
Machine.make (3 states, 2 events) 5,959 5,960 +1 (+0.0%)
machine.handle (3 states, 2 transitions) 40,493 40,493 0 (0.0%)
declared transition (10 named branches) 53,930 53,930 0 (0.0%)
atomic construction, guards, and reentry 72,720 72,720 0 (0.0%)
registered invocation (input-taking Effect) 42,088 42,088 0 (0.0%)
machine.handle (depth 24) 179,529 179,530 +1 (+0.0%)
machine.handle (wide depth 16) 204,050 204,051 +1 (+0.0%)
machine.handle (parallel/history/choice) 82,064 82,065 +1 (+0.0%)
machine definition (3 independent implementations) 89,344 89,216 -128 (-0.1%)
machine exact input/output/error/services 73,166 73,038 -128 (-0.2%)
execution adapter readiness 23,179 23,180 +1 (+0.0%)
Check times (informational)
Scenario Base PR
Effect only 0.05s 0.03s
Import effect-machine 0.03s 0.03s
Machine.state (3 children) 0.11s 0.09s
Machine.make (3 states, 2 events) 0.16s 0.14s
machine.handle (3 states, 2 transitions) 0.36s 0.34s
declared transition (10 named branches) 0.43s 0.40s
atomic construction, guards, and reentry 0.56s 0.50s
registered invocation (input-taking Effect) 0.35s 0.34s
machine.handle (depth 24) 0.66s 0.65s
machine.handle (wide depth 16) 0.72s 0.71s
machine.handle (parallel/history/choice) 0.52s 0.51s
machine definition (3 independent implementations) 0.57s 0.55s
machine exact input/output/error/services 0.51s 0.51s
execution adapter readiness 0.45s 0.44s

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

@github-actions

github-actions Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Runtime performance

Median of 5 independent benchmark processes on AMD EPYC 7763 64-Core Processor with Node v24.20.0.

Pull request baseline

Scenario Effect Machine
Plan counter transitions 113,343 transitions/s
Drain burst with terminal fence 394,661 increments/s
Drain burst with a change observer 366,501 increments/s
Lookup and send to one child 323,062 increments/s
Start and stop a machine 130,141 machines/s
Start and stop a parent with one child 26,391 families/s
Complete an Effect invocation with tracing enabled 7,369 invocations/s
Complete an Effect invocation with tracing disabled 9,128 invocations/s
Plan transitions through a compound state 101,464 transitions/s
Plan transitions through parallel regions 80,161 transitions/s
Drain burst through a compound state 340,046 events/s
Drain burst through two parallel regions 312,937 events/s
Drain a compound-state burst with a change observer 315,051 events/s

Process runtime reference points

Scenario Effect Machine
Start and stop a raw generic process 21,383 processes/s
Start and stop a raw compiled process 71,963 processes/s
Memory profile Effect Machine
Idle machine 1.8 KiB
Raw generic managed process 11.6 KiB
Raw compiled process 3.0 KiB
Two independent idle machines 3.4 KiB
Idle parent with one child 5.8 KiB
Parent with observed child registry 9.3 KiB
Parent with observed invoked child snapshots 6.4 KiB

Effect Machine change from base

Metric Base Base variability PR PR variability Difference
Plan counter transitions 103,921 transitions/s 2.5% MAD 113,343 transitions/s 1.7% MAD +9.1%
Drain burst with terminal fence 368,526 increments/s 0.4% MAD 394,661 increments/s 0.6% MAD +7.1%
Drain burst with a change observer 348,252 increments/s 0.4% MAD 366,501 increments/s 0.8% MAD +5.2%
Lookup and send to one child 303,558 increments/s 0.8% MAD 323,062 increments/s 0.9% MAD +6.4%
Start and stop a machine 111,894 machines/s 0.8% MAD 130,141 machines/s 0.8% MAD +16.3%
Start and stop a parent with one child 23,299 families/s 0.9% MAD 26,391 families/s 1.6% MAD +13.3%
Complete an Effect invocation with tracing enabled 6,916 invocations/s 0.3% MAD 7,369 invocations/s 1.4% MAD +6.5%
Complete an Effect invocation with tracing disabled 8,410 invocations/s 0.6% MAD 9,128 invocations/s 0.7% MAD +8.5%
Plan transitions through a compound state 92,414 transitions/s 1.8% MAD 101,464 transitions/s 1.4% MAD +9.8%
Plan transitions through parallel regions 75,595 transitions/s 1.3% MAD 80,161 transitions/s 1.9% MAD +6.0%
Drain burst through a compound state 300,805 events/s 2.0% MAD 340,046 events/s 1.1% MAD +13.0%
Drain burst through two parallel regions 280,639 events/s 1.8% MAD 312,937 events/s 0.9% MAD +11.5%
Drain a compound-state burst with a change observer 284,901 events/s 1.6% MAD 315,051 events/s 0.5% MAD +10.6%
Idle machine heap per unit 1.9 KiB 0.7% MAD 1.8 KiB 1.0% MAD -3.9%
Raw generic managed process heap per unit 13.9 KiB 0.0% MAD 11.6 KiB 0.0% MAD -16.6%
Raw compiled process heap per unit 3.2 KiB 0.4% MAD 3.0 KiB 0.4% MAD -4.5%
Two independent idle machines heap per unit 3.5 KiB 0.0% MAD 3.4 KiB 0.0% MAD -2.9%
Idle parent with one child heap per unit 6.0 KiB 0.0% MAD 5.8 KiB 0.0% MAD -1.9%
Parent with observed child registry heap per unit 10.0 KiB 0.0% MAD 9.3 KiB 0.0% MAD -7.2%
Parent with observed invoked child snapshots heap per unit 6.5 KiB 0.1% MAD 6.4 KiB 0.2% MAD -1.9%

Process runtime reference change from base

Metric Base Base variability PR PR variability Difference
Start and stop a raw generic process 17,685 processes/s 1.5% MAD 21,383 processes/s 1.5% MAD +20.9%
Start and stop a raw compiled process 60,713 processes/s 0.5% MAD 71,963 processes/s 0.5% MAD +18.5%

Regression guard

No large, noise-adjusted throughput or heap regressions detected.

Versions and interpretation
  • Effect Machine: 0.37.0

Higher throughput is better; lower heap is better. Variability is the median absolute deviation across independent processes, relative to their median. Small differences on shared GitHub-hosted hardware remain informational; the required guard rejects only large changes beyond the measured noise allowance.

@SandroMaglione
SandroMaglione merged commit 36dde0f into main Sep 19, 2026
8 checks passed
@SandroMaglione
SandroMaglione deleted the codex/upgrade-effect-rc116 branch September 19, 2026 07: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