Skip to content

feat: scheduled primitives — extension model + standalone activity support#2

Open
chaptersix wants to merge 3 commits intomasterfrom
alex/sch-primitives-activity
Open

feat: scheduled primitives — extension model + standalone activity support#2
chaptersix wants to merge 3 commits intomasterfrom
alex/sch-primitives-activity

Conversation

@chaptersix
Copy link
Copy Markdown
Owner

Summary

Extends the Schedule API to support multiple action primitives, with standalone activities as the first non-workflow primitive. Adds the four extension seams described in the Scheduled Primitives Design:

  1. A new ScheduleAction.start_activity oneof variant referencing NewActivityExecutionInfo.
  2. Generic extension types — ScheduleActionStatus, ScheduleActionKind, ScheduledExecutionReference, ScheduleActivityExecution — that replace per-primitive field growth on ScheduleActionResult, ScheduleInfo, and ScheduleListInfo.
  3. New generic ScheduleActionResult fields (start_execution_result, start_execution_status, start_execution_link) used by all non-workflow action types.
  4. A typed Link.Schedule variant so the scheduler can be a typed link target rather than overloading Link.WorkflowEvent.

Existing workflow-specific fields are frozen for backward compatibility:

  • ScheduleAction.start_workflow (field 1)
  • ScheduleActionResult.start_workflow_result (11) / start_workflow_status (12)
  • ScheduleInfo.running_workflows (9)
  • ScheduleListInfo.workflow_type (2)

Commits

  • feat: add Link.Schedule variant for bi-directional schedule linking — adds the typed schedule link variant, modeled after Link.Activity (also a CHASM component without an event history).
  • feat: add schedule extension types for standalone activity actions — adds ScheduleActionStatus, ScheduleActionKind, ScheduledExecutionReference, ScheduleActivityExecution, the start_activity oneof variant, and generic fields on ScheduleActionResult / ScheduleInfo / ScheduleListInfo.
  • feat: add NewActivityExecutionInfo message for schedule actions — shared config message for starting a standalone activity in different contexts (mirrors NewWorkflowExecutionInfo). Carries activity-specific config; request-level fields stay on StartActivityExecutionRequest.

Verification

  • buf build — passes
  • buf lint — passes
  • buf breaking --against upstream/master — passes (no breaking changes)

Test plan

  • Regenerate api-go bindings on top of this branch
  • Wire start_activity dispatch through the scheduler (downstream PR)
  • Manual e2e: create schedule with start_activity, observe running_executions and recent_actions[].start_execution_result

Stacked

PR 2 (alex/sch-primitives-nexus) stacks on this branch and adds start_nexus_operation as the second primitive.

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