Releases: joelhelbling/shifty
Releases · joelhelbling/shifty
Release list
shifty 0.6.0 — handoff immutability policies
Values crossing worker boundaries are now governed by a handoff policy, and the default changed from raw shared references to deeply frozen values. Mutation bugs that used to surface as mysterious downstream corruption now either cannot happen or raise immediately at the worker responsible.
Breaking changes
:frozenis the new default policy — every value a worker receives is deeply frozen at intake; a task that mutates its input raisesShifty::PolicyViolationwith diagnostics naming the worker and the mutated object. Opt out per worker (policy: :shared/policy: :isolated), per pipeline (.with_policy(...)), or globally (Shifty.configure).- Unshareable values (IO handles, procs, lazy enumerators) raise
Shifty::UnshareableValueat default-policy boundaries — declarepolicy: :sharedon those workers. - The task's second argument is now a policy-governed supply proxy (
#shiftonly). - Ruby floor: 3.2. Older Rubies stay on shifty 0.5.0.
Deprecations
side_worker mode: :hardened→policy: :isolated(same Marshal mechanism, same semantics); warns now, removed in 1.0.0.
Added
- Three policies (
:frozen/:isolated/:shared) with worker > pipeline > global precedence Shifty::Testing.run+mutates_input?mutation detector;mutate_inputmatcher and"a policy-safe worker"shared example (opt-in requires)#freeze!topology locking- Worker
name:for diagnostics - Benchmarks: steady-state
:frozencosts ~71ns per handoff regardless of value size, with zero allocations — the safe default is also the cheapest (benchmark/RESULTS.md)
Docs
In-depth guides on the wiki: Handoff Policies · Coding Idioms Under :frozen · Migration Guide · Testing Workers · Worker Types · Performance
Full details in CHANGELOG.md.