Files
temporal/api/token/v1
Kannan d3049eb97b Add task queue kind to NexusTask token (#11022)
## What

Add `TaskQueueKind` to the `NexusTask` token proto so the frontend can
pass the correct kind to matching on
`RespondNexusTaskCompleted`/`Failed`, instead of hardcoding
`TASK_QUEUE_KIND_NORMAL`.

## Why

To distinguish internal nexus invocations from user facing ones.
[#10141](https://github.com/temporalio/temporal/pull/10141) switched
`nexus_task_requests` `is_internal` detection from task queue name
prefix to `TaskQueueKind`, but the frontend hardcodes `NORMAL` when
constructing the matching request for Respond operations because the
token didn't carry the kind. This means `is_internal` is always `false`
for Respond on worker-commands queues.

## How did you test it?

Unit tests:
- Frontend handler: `RespondNexusTaskCompleted` and
`RespondNexusTaskFailed` preserve `TaskQueueKind` from token
(WORKER_COMMANDS preserved, NORMAL preserved, UNSPECIFIED defaults to
NORMAL)
- Matching engine: `PollNexusTaskQueue` sets the correct `TaskQueueKind`
in the serialized task token for both NORMAL and WORKER_COMMANDS
partitions
- Backwards compatible: old tokens without the field default to
`TASK_QUEUE_KIND_UNSPECIFIED`, treated as `NORMAL`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-07-14 14:25:01 -07:00
..