Skip to content

Unwrap System Nexus Operations in event history#1017

Open
spkane31 wants to merge 2 commits into
mainfrom
spk/system-nexus-operations
Open

Unwrap System Nexus Operations in event history#1017
spkane31 wants to merge 2 commits into
mainfrom
spk/system-nexus-operations

Conversation

@spkane31
Copy link
Copy Markdown
Contributor

What was changed

  • workflow show (table and --detailed modes) now displays the actual operation name instead of the generic NexusOperationScheduled/NexusOperationCompleted event type when the Nexus endpoint is __temporal_system.
  • workflow describe no longer includes pending Nexus operations on the __temporal_system endpoint in the "Pending Nexus Operations" list or count.

Why?

System Nexus operations (endpoint __temporal_system) are implementation details of high-level SDK operations like SignalWithStartWorkflowExecution. Surfacing them as NexusOperationScheduled/NexusOperationCompleted events is confusing. By unwrapping the operation name, the history and describe output reflect what the workflow actually did at a semantic level. Similarly, pending system operations in describe are noise the user has no actionable interest in.

Checklist

  1. Closes NA

  2. How was this tested:

  • Unit tests added in commands.workflow_show_test.go covering all six NexusOperation event types, the non-system-endpoint no-op path, and the missing-scheduled-event (reverse traversal / orphaned completion) path.
  • Manual validation: ran temporal workflow show -w <id> against a live workflow that executes a SignalWithStartWorkflowExecution system nexus operation and confirmed events 5 and 6 now show as SignalWithStartWorkflowExecutionScheduled and SignalWithStartWorkflowExecutionCompleted.
  1. Any docs updates needed? No

@spkane31 spkane31 requested a review from a team as a code owner April 30, 2026 17:01
@spkane31 spkane31 force-pushed the spk/system-nexus-operations branch from 8f5fd90 to f53981d Compare May 20, 2026 22:15
@chaptersix
Copy link
Copy Markdown
Contributor

Could add new or amend existing functional tests. It'd be great to have some assertion both human readable output and json.

// "__temporal_system" endpoint, replacing the generic NexusOperation* name with the
// actual operation name + event-type suffix. Returns "" for all other events.
// Populates s.systemNexusOps when it encounters a qualifying Scheduled event.
func (s *structuredHistoryIter) systemNexusOpDisplayName(event *history.HistoryEvent) string {
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.

we also have a --reverse flag. Could you add a test for this case?

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