Skip to content

Implement operator commands for Standalone Activities - #575

Merged
GregoryTravis merged 1 commit into
mainfrom
gmt/operator-commands-2
Sep 8, 2026
Merged

Implement operator commands for Standalone Activities#575
GregoryTravis merged 1 commit into
mainfrom
gmt/operator-commands-2

Conversation

@GregoryTravis

Copy link
Copy Markdown
Contributor

Implement operator commands for standalone activities

Adds pause, unpause, reset, and update-options to standalone activities, plus
the describe surface needed to observe their effects.

Standalone activities already supported start, result, describe, cancel, and
terminate. This adds the four operator commands the server exposes for them, so
an operator can hold, resume, restart, and retune a running activity without
going through a workflow.

Describe: payload fields are opt-in

DescribeActivityExecutionRequest gates four payload-bearing fields behind
per-call flags (api#792). All four are now plumbed through describe and
default to false.

commit 8ded230
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Sat Sep 5 00:16:27 2026 -0400

    remove reset

commit cce87dc
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Fri Sep 4 15:58:10 2026 -0400

    remove reset

commit 014bbf5
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Fri Sep 4 15:24:21 2026 -0400

    Add test_interceptor_receives_command_arguments, include inputs in RecordingInterceptor

commit 6dc02c4
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Sep 2 15:57:37 2026 -0400

    Do not remove unrequested optional describe payloads

commit 0ff75ac
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Sep 2 12:00:04 2026 -0400

    update changelog

commit a3faec8
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Sep 2 11:18:03 2026 -0400

    fix rbi for test

commit 8785611
Merge: a80466d 47d9010
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Tue Sep 1 15:52:47 2026 -0400

    Merge branch 'main' into gmt/operator-commands

commit a80466d
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Tue Sep 1 15:45:41 2026 -0400

    cleanup

commit 3ceaf0f
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Tue Sep 1 15:28:08 2026 -0400

    missing files

commit f4dec60
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Tue Sep 1 14:54:43 2026 -0400

    start delayed in restore test

commit 20d7344
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Tue Sep 1 14:24:09 2026 -0400

    Remove long start delay wait

commit cb49c38
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Tue Sep 1 12:10:07 2026 -0400

    Remove mocked id checks

commit a183d80
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Fri Aug 28 16:03:17 2026 -0400

    Model update activity options on sdk precedent

commit 9ed46b1
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 27 15:04:29 2026 -0400

    remove test_restore_original_options_routes_through_update

commit 22eda70
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 27 14:54:29 2026 -0400

    cleanup

commit c932756
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 27 14:53:07 2026 -0400

    cleanup

commit 89df79d
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 27 14:42:18 2026 -0400

    cleanup

commit 642eb66
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 27 14:28:54 2026 -0400

    remove describeOptInsReachTheRequest tests

commit 6ae3869
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 27 12:13:53 2026 -0400

    remove non-pr files

commit 1708d80
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Aug 26 16:41:13 2026 -0400

    Test that restore-original routes through the update interceptor

    RestoreOriginalOptions reuses the update-options interceptor rather than
    having one of its own, distinguished purely by the restore flag with an
    empty mask. An interceptor watching option updates would otherwise
    silently miss restores, and nothing pinned that.

    Ported from the Python interceptor suite, which was the only one
    asserting it.

commit ebe9f05
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Aug 26 16:32:39 2026 -0400

    Unit-test that unrequested payloads are stripped client-side

    The stripping in the client implementation existed with no coverage. It
    only matters against a server that ignores the opt-ins, which no
    functional test can produce, so it needs a stub that returns every
    payload field regardless of what was asked for.

    Three cases: nothing requested strips all four, everything requested
    keeps all four, and stripping is per field.

commit b7b632c
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Aug 26 16:30:42 2026 -0400

    Unit-test that the describe opt-ins reach the request

    The four api#792 flags were covered only functionally, so nothing proved
    the SDK actually sets them on the describe request — a default-on bug
    would have looked identical from observable state.

    Three cases against a stubbed service: defaults ask for nothing, all four
    are forwarded, and asking for one does not set the others.

    Brings Ruby level with Python and Go.

commit 44baebc
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Aug 26 16:28:42 2026 -0400

    Narrow desc.failure before reading message, for steep

    The nilable Error::Failure could not be narrowed inline.

commit 3297336
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Aug 26 16:25:22 2026 -0400

    Replace three describe tests with one test_describe_payloads

    Ported from sdk-python#1782, written against our current API shape.

    Replaces test_describe_payload_fields_are_opt_in,
    test_describe_input_and_result_are_opt_in and test_describe_outcome_failure
    with one test covering all three, and more:

    - a new HeartbeatFailIncrementActivity heartbeats, fails once, then
      succeeds, so a single describe carries input, result, heartbeat details
      and a last failure at the same time. The three tests it replaces each
      used a different activity, so no describe ever held them together.
    - pins has_last_failure? true while failure (the terminal outcome) is nil
      on a succeeded activity that failed once, the distinction that was
      untested.
    - asserts the accessors are empty or nil, not merely that has_* is false.

commit 800a2ed
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Aug 26 16:12:02 2026 -0400

    Test that describe input and result hints reach the converter

    Description#input(hints:) and #result(result_hint:) existed with zero
    coverage of the hint argument — the describe payloads come back
    undecoded, so the hints are supplied at read time and nothing verified
    they were forwarded.

    Added to client_activity_hints_test.rb, which already has the tracking
    payload converter this needs. Go and Java already cover their equivalents
    (typed pointers and EncodedValues.get(i, Class)); Python has no hint
    parameter until sdk-python#1782 lands.

commit a9bf36d
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Aug 26 16:06:19 2026 -0400

    Assert every reset flag reaches the request

    test_unobservable_request_fields asserted the reset jitter and request id
    but none of the three boolean flags. Set keep_paused,
    restore_original_options and reset_heartbeat and assert each reaches the
    wire.

    Brings Ruby level with Python and Go.

commit 93821fd
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Aug 26 16:04:32 2026 -0400

    Fix clearing a duration option, and test it

    update_options(heartbeat_timeout: nil) raised rather than clearing the
    option: seconds_to_duration returns nil for a nil value, and assigning
    nil through the proto bracket accessor throws

      Google::Protobuf::TypeError: nil message not allowed here

    Skip the assignment when the value is nil, leaving the field unset while
    the mask still names the path — the same shape Python uses. The
    neighbouring task_queue, retry_policy and priority fields were already
    nil-safe; only the duration loop was affected.

    Adds the test that found it.

commit 1f7fdaa
Merge: 0d366c8 edd0d7c
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Aug 26 14:38:49 2026 -0400

    Merge branch 'main' into gmt/operator-commands

commit 0d366c8
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Aug 26 14:11:47 2026 -0400

    Update server release version

commit b697ab3
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Aug 26 12:09:13 2026 -0400

    Add total_heartbeat_count and test

commit c0fd410
Merge: ba5a1ca 0f26e5c
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Aug 26 10:58:04 2026 -0400

    Merge branch 'main' into gmt/operator-commands

commit ba5a1ca
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Aug 26 10:57:19 2026 -0400

    Changelog

commit 3c3f58f
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Tue Aug 25 15:56:29 2026 -0400

    Remove reset/heartbeat tests

commit 4696a81
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 20 16:51:53 2026 -0400

    Removed an untyped

commit 1fb81d3
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 20 15:34:23 2026 -0400

    cleanup

commit 1e2fba2
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 20 15:32:06 2026 -0400

    Updated types for previous change and eveyrthing else

commit c63c477
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 20 14:51:25 2026 -0400

    move changelog and shorten

commit 0443862
Merge: 7b7d663 ad5eb22
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 20 14:50:29 2026 -0400

    Merge branch 'main' into gmt/operator-commands

commit 7b7d663
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 20 14:38:04 2026 -0400

    Move activity_options proto conversion into interceptor. Strip unrequested optional describe payloads.

commit 52a272a
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Aug 19 17:04:05 2026 -0400

    Revert .ruby_version and Cargo.lock changes used for upstream tracking.

commit c548ff6
Merge: fa5b19e 91b6518
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Aug 19 16:48:03 2026 -0400

    Merge branch 'main' into gmt/operator-commands

commit fa5b19e
Merge: 753af47 9eb1b54
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Mon Aug 17 21:05:09 2026 -0400

    Merge branch 'main' into gmt/operator-commands

commit 753af47
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Mon Aug 17 16:38:31 2026 -0400

    result_hint

commit c8412b1
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Mon Aug 17 16:33:36 2026 -0400

    get input/result/failure

commit c32fca1
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Mon Aug 17 13:35:37 2026 -0400

    Round out implementation of four payload details fields, default false.

commit 7a68ca0
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Fri Aug 14 15:50:26 2026 -0400

    Rename UpdatedOptions to ActivityExecutionOptions

commit a2211da
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Fri Aug 14 15:34:59 2026 -0400

    test_update_options_on_paused_activity; don't compare with delta for exact values

commit 71c5c0d
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Fri Aug 14 15:04:19 2026 -0400

    Add PAUSED, test_describe_paused_activity_reports_paused_status

commit 4d1215f
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Fri Aug 14 14:50:03 2026 -0400

    test: update options requires at least one option, and enforce it as well

commit 949022b
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 13 16:32:04 2026 -0400

    cleanup

commit 7cff123
Merge: c1bf444 91f9e29
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 13 16:08:46 2026 -0400

    Merge branch 'main' into gmt/operator-commands

commit c1bf444
Merge: 81f7ced 50d093b
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 13 10:51:04 2026 -0400

    Merge branch 'main' into gmt/operator-commands

commit 81f7ced
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Aug 13 10:42:55 2026 -0400

    fmt, submodule

commit 3a54e9d
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Tue Aug 11 14:41:04 2026 -0400

    upstream update

commit 44ed201
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Mon Aug 3 10:10:11 2026 -0400

    update submodule

commit fd7693d
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Fri Jul 31 16:12:18 2026 -0400

    upstream update

commit 5ffa7f6
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Fri Jul 31 14:23:54 2026 -0400

    Confirm UpdateOptions surface handles start_delay

commit 85f81aa
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Fri Jul 31 13:30:19 2026 -0400

    Fix heartbeat tests

commit 19c5913
Author: SAA-OC-Tracking <sdk@local>
Date:   Thu Jul 30 16:44:43 2026 -0400

    SAA-OC + Option C on sdk-core v0.5: submodule at sdk-rust-scratch (main + api overlay + api-adapter fixups), Cargo.lock regenerated, pin Ruby 3.3.11

commit 5f205a3
Merge: d9185f6 a8507cb
Author: SAA-OC-Tracking <sdk@local>
Date:   Thu Jul 30 16:33:36 2026 -0400

    Merge sdk-ruby main into gmt/operator-commands (bring in v0.5 sdk-core + bridge updates)

    # Conflicts:
    #	temporalio/ext/sdk-core
    #	temporalio/lib/temporalio/api/enums/v1/failed_cause.rb
    #	temporalio/lib/temporalio/api/namespace/v1/message.rb
    #	temporalio/lib/temporalio/api/workflowservice/v1/request_response.rb
    #	temporalio/sig/temporalio/api/enums/v1/failed_cause.rbs

commit d9185f6
Author: SAA-OC-Tracking <sdk@local>
Date:   Thu Jul 30 16:28:44 2026 -0400

    WIP: pre-main-merge — accumulated tier2 code + optionC-attempt regen

commit f4bceb0
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Jul 30 09:48:02 2026 -0400

    30s timeout

commit abb6b3d
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Fri Jun 26 16:05:13 2026 -0400

    CHANGELOG

commit d816ea7
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Fri Jun 26 13:57:15 2026 -0400

    Task queue update fix

commit 5d46dea
Merge: b3ad5f7 ac3ee93
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Jun 25 17:23:10 2026 -0400

    Merge branch 'main' into gmt/operator-commands

commit b3ad5f7
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Jun 25 13:57:20 2026 -0400

    Redundant test

commit ccee65c
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Jun 24 15:48:51 2026 -0400

    Bump sdk-core to v0.4.0 (d936c6cc) for activity operator command RPCs.

commit ed16a37
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Wed Jun 24 11:01:21 2026 -0400

    Unit test for unobservable params. test_update_options_all_fields.

commit 6eddd1f
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Tue Jun 23 15:55:21 2026 -0400

    wip

commit bcf1e9c
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Tue Jun 23 13:37:57 2026 -0400

    comments, assert_eventually_paused

commit b009d3e
Author: Greg Travis <greg.m.travis@gmail.com>
Date:   Thu Jun 18 15:50:11 2026 -0400

    wip
@GregoryTravis
GregoryTravis requested a review from a team as a code owner September 8, 2026 17:35

@tconley1428 tconley1428 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving based on #543

@GregoryTravis
GregoryTravis enabled auto-merge (squash) September 8, 2026 17:49
@GregoryTravis
GregoryTravis enabled auto-merge (squash) September 8, 2026 17:49
@GregoryTravis
GregoryTravis merged commit 146376b into main Sep 8, 2026
11 checks passed
@GregoryTravis
GregoryTravis deleted the gmt/operator-commands-2 branch September 8, 2026 17:54
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.

2 participants