Skip to content

temporal: Add Workflow Updates and Update-With-Start - #8

Draft
kstewartfigma wants to merge 5 commits into
masterfrom
kstewart/ruby-update-with-start
Draft

kstewartfigma wants to merge 5 commits into
masterfrom
kstewart/ruby-update-with-start

Conversation

@kstewartfigma

@kstewartfigma kstewartfigma commented Nov 2, 2026 •

Copy link
Copy Markdown

Description

Adds Workflow Updates and atomic Update-With-Start to Figma's temporal-ruby fork. A caller can start or select a workflow, submit a validated operation, and receive its durable result. For example, a billing coordinator can process a cancel-invoice request against the existing account workflow and return the result to its caller.

Follow-up to merged #6 and #7, based on master. This is the implementation for APP-1298; service rollout remains separate.

Changes

  • Client APIs for plain Updates and Update-With-Start, stable request/update identifiers, accepted/completed handles, run-pinned result polling, reattachment, and bounded transient retries.
  • Worker handlers and validators, durable acceptance/results, asynchronous Activities/timers and owned Future callbacks, replay/reset-admitted Updates, and workflow completion coordination.
  • Additive API descriptor backports with the existing proto submodule pin preserved. Uses temporal: Support use_existing option for start_workflow #6's conflict-policy serializer and shared start-request builder; the normal make proto runs the ordered backports.
  • Documents API semantics, retry identity, failure handling, and worker-first compatibility constraints. Temporal::Testing.local! rejects the unsupported Update APIs.

Test Plan

November 17 validation on Ruby 3.4.12, including the merged conflict-policy and retry-delay prerequisites:

  • Full unit suite: 692 examples, 0 failures, with one optional official-SDK case exercised separately; coexistence coverage passes in hosted CI.
  • Isolated Temporal Server 1.32.0: all 12 Update integration cases pass. The existing ordinary-start cases are exercised by the legacy/conflict-policy CI matrix.
  • Linux make proto twice reproduces the checked-in bindings exactly, including a separate PROTO_OUT directory. Fixed the Update backport's output-directory handling.
  • CI now runs for stacked PRs and includes deterministic protobuf generation plus live Update coverage using the checksum-pinned CLI 1.9.1 package (server 1.32.0).
  • CI exposed a local-test-mode Future callback regression. Added the missing local validator guard and strengthened callback tests; the exact previously failing example now passes, and regression tests fail against the previous implementation.
  • Fresh-context independent reviews using gpt-6.1-sol / high covered the synchronization, CI configuration, and local callback fix. Corrections include explicit readiness configuration and a published server package.

Scoped first-party parity comparison: client Update lifecycle tests, validator restrictions, and atomic start/update arguments and result conversion are covered by the fork's client and live tests. This does not claim first-party API parity: typed payload hints and WithStartWorkflowOperation classes are not implemented.

Limits: no production deployment, mixed-version rollout, process-kill/failover, or live transport fault injection. Worker restart tests reconstruct workers within one process. Servers other than 1.32 and arbitrary Ruby validator state mutations/I/O are not validated or sandboxed. The first-party suite was inspected, not run. The local macOS protoc plugin was killed by signal 9; Linux protobuf regeneration is the passing verification result.

@kstewartfigma
kstewartfigma changed the base branch from kstewart/ruby-start-use-existing to master November 18, 2026 00:34
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