Skip to content

Add Ruby SDK support#41

Draft
donald-pinckney wants to merge 4 commits intodevfrom
add-ruby-support
Draft

Add Ruby SDK support#41
donald-pinckney wants to merge 4 commits intodevfrom
add-ruby-support

Conversation

@donald-pinckney
Copy link
Collaborator

Summary

  • Add 11 Ruby reference files (~2100 lines) covering all major Temporal SDK features: workflows, activities, signals/queries/updates, child workflows, versioning, testing, error handling, data conversion, observability, determinism protection, and advanced features
  • Update SKILL.md to include Ruby in description, overview, and getting started guide
  • Add Ruby entry to core/determinism.md SDK Protection Mechanisms section

Details

The Ruby SDK (temporalio gem, GA) uses a fundamentally different determinism approach from Python (sandbox) and TypeScript (V8 isolate):

  • Illegal Call Tracing via Ruby's TracePoint to detect forbidden method calls at runtime
  • Durable Fiber Scheduler to make fiber operations deterministic

Ruby-specific sections added that don't exist in Python/TypeScript:

  • Cancellation (Token-based) — uses Temporalio::Cancellation objects
  • ActiveModel Integration — Ruby equivalent of Pydantic
  • Converter Hints — workflow_arg_hint/workflow_result_hint for type guidance
  • Illegal Call Tracing Gotchas — third-party gems triggering NondeterminismError
  • Activity Concurrency and Executors — ThreadPool configuration
  • Rails Integration — ActiveRecord, Zeitwerk, forking considerations

Test plan

  • Verify Ruby reference files are loaded correctly by the skill
  • Test with a sample Ruby Temporal project to validate code examples
  • Review alignment with Python/TypeScript content structure

🤖 Generated with Claude Code

donald-pinckney and others added 4 commits March 16, 2026 18:23
Created complete Ruby reference documentation covering:
- ruby.md: Overview, quick start, key concepts, file organization
- patterns.md: Signals, queries, updates, child workflows, saga, cancellation, etc.
- determinism.md: Illegal call tracing, safe alternatives table
- determinism-protection.md: TracePoint, durable fiber scheduler, customization
- versioning.md: Patching API, type versioning, worker versioning
- testing.md: WorkflowEnvironment, mocking, replay, activity testing
- error-handling.md: ApplicationError, retries, timeouts, workflow failure
- data-handling.md: Data converter, ActiveModel, hints, search attributes
- observability.md: Logging, metrics, best practices
- gotchas.md: Common mistakes, illegal call tracing issues
- advanced-features.md: Schedules, async completion, worker tuning, Rails

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Self-review fixes:
- patterns.md: Remove non-existent `workflow_run` annotation; entry point
  is `def execute` (no annotation needed, unlike Python's @workflow.run)
- patterns.md: Remove conflicting manual query methods that duplicated
  workflow_query_attr_reader
- error-handling.md: Remove `await` keyword (doesn't exist in Ruby)
- gotchas.md: Replace TS-style CancellationScope with Ruby's
  Temporalio::Cancellation token-based detached cancellation
- data-handling.md: Replace homemade ActiveModel mixin with official SDK
  pattern using ActiveSupport::Concern + ActiveModel::Serializers::JSON
- data-handling.md: Fix list_workflows call signature (positional, not kw)
- ruby.md, gotchas.md: Fix require paths to use 'temporalio/activity'
  instead of 'temporalio/activity/definition'

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- patterns.md: Fix external workflow signal to use class method ref
  (TargetWorkflow.data_ready instead of TargetWorkflow, :data_ready)
- patterns.md: Add ? suffix to all_handlers_finished (Ruby boolean convention)
- ruby.md: Add 'default' namespace to Client.connect calls

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- SKILL.md: Add "Temporal Ruby" trigger phrase to description
- SKILL.md: Update Overview to list Ruby as supported language
- SKILL.md: Add Ruby entry to Getting Started guide
- core/determinism.md: Add Ruby SDK Protection Mechanism entry
  (Illegal Call Tracing via TracePoint + Durable Fiber Scheduler)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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