Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c52d376
Add all Ruby SDK reference files (11 files, ~2100 lines)
donald-pinckney Mar 16, 2026
0dcac1e
Fix alignment issues in Ruby reference files
donald-pinckney Mar 16, 2026
dfcdc82
Fix correctness issues in Ruby reference files
donald-pinckney Mar 16, 2026
ef5d989
Add Ruby to all language references in SKILL.md and core files
donald-pinckney Mar 16, 2026
2e936b2
Merge branch 'main' into add-ruby-support
donald-pinckney May 26, 2026
f9c81ee
Apply suggestions from code review
donald-pinckney May 26, 2026
c3181b8
Apply suggestions from code review
donald-pinckney May 26, 2026
5312401
Apply suggestion from @chris-olszewski
donald-pinckney May 26, 2026
734a347
copy over sample code
donald-pinckney May 26, 2026
ce0d434
Remove useless section, mention Mutex
donald-pinckney May 27, 2026
d051bf3
cleanup mutex mentions
donald-pinckney May 27, 2026
b22eb20
Clean up transitive NDE section
donald-pinckney May 28, 2026
b0630d7
Menial changes to align to python structure
donald-pinckney May 28, 2026
afc00ef
Add Workflow Init section to Ruby advanced-features
donald-pinckney May 28, 2026
d3b0c3c
Document graceful_shutdown_period in Ruby Worker Tuning
donald-pinckney May 28, 2026
76a4f02
Propagate cancellation in Ruby activity-error handling
donald-pinckney May 28, 2026
41c6f0e
Align Ruby Workflow Failure section to Python
donald-pinckney May 28, 2026
adcb0d4
Add logger configuration to Ruby observability
donald-pinckney May 28, 2026
1269e03
Make Ruby Saga compensations cancellation-proof
donald-pinckney May 28, 2026
b08606a
Document patched() memoization caveat in Ruby versioning
donald-pinckney May 28, 2026
d0d5f4b
Add default versioning behavior to Ruby worker versioning
donald-pinckney May 28, 2026
649d296
Fix worker versioning config API names in Ruby docs
donald-pinckney May 28, 2026
dc1994b
Fix worker concurrency config in Ruby Worker Tuning
donald-pinckney May 28, 2026
5fe7a95
Align Ruby Workflow Init title with Python
donald-pinckney May 28, 2026
2c4004a
Structure Ruby Metrics to match Python
donald-pinckney May 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean up transitive NDE section
  • Loading branch information
donald-pinckney committed May 28, 2026
commit b22eb20039ab93c266f00d3fadedec06b4a2e2a6
20 changes: 6 additions & 14 deletions references/ruby/determinism-protection.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,31 +96,23 @@ Hash format:

### Third-party gems triggering NondeterminismError
Comment thread
donald-pinckney marked this conversation as resolved.

Gems that call `IO`, `Time.now`, or `Socket` internally will trigger errors even if you don't call those methods directly.
Gems that call `IO`, `Time.now`, or `Socket` internally will trigger errors even if you don't call those methods directly. The correct fix is context-dependent and requires understanding and possibly debugging of the situation.

**Fix 1:** Wrap in `illegal_call_tracing_disabled`:
**Fix 1:** The call to a gem genuinely is doing IO, side effects, or other non-deterministic things. Then just like with other Temporal Workflow code, it should be moved into an activity.

```ruby
Temporalio::Workflow::Unsafe.illegal_call_tracing_disabled do
ThirdPartyGem.safe_pure_computation(data)
end
```

**Fix 2:** For code that needs IO (e.g., reading a config file), use `io_enabled`:
**Fix 2:** Escape hatch: for code that needs IO to run within the workflow, use `io_enabled`. You should very seriously consider why IO is needed in the workflow and not in an activity. If you use this escape hatch to create non-determinism issues, you might later face non-determinism errors.

```ruby
Temporalio::Workflow::Unsafe.io_enabled do
config = YAML.load_file('config.yml')
end
```

**Fix 3:** Combine with replay check for side effects:
**Fix 3:** Escape hatch: for code that triggers the illegal call tracing but doesn't cause actual non-determinism issues, you can disable `illegal_call_tracing_disabled`. Again, you must be sure that you are semantically correct that there is no non-determinism involved.

```ruby
unless Temporalio::Workflow::Unsafe.replaying?
Temporalio::Workflow::Unsafe.illegal_call_tracing_disabled do
MetricsClient.increment('workflow.started')
end
Temporalio::Workflow::Unsafe.illegal_call_tracing_disabled do
ThirdPartyGem.safe_pure_computation(data)
end
```

Expand Down