Skip to content

align default identity tags with .NET - #167

Merged
Tomer Rosenthal (torosent) merged 2 commits into
mainfrom
torosent-go-tag-parity
Oct 7, 2026
Merged

Tomer Rosenthal (torosent) merged 2 commits into
mainfrom
torosent-go-tag-parity

Conversation

@torosent

@torosent Tomer Rosenthal (torosent) commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Go repeats owning-orchestration identity in activity, sub-orchestration, and ContinueAsNew tag maps even when the caller supplies no tags. Remove that payload and use native protocol identity fields, matching .NET's automatic-tag behavior.

Behavior

Activities expose their own name/version/task ID and the owning instance ID. Orchestrator contexts obtain their full identity from native history fields. There is no identity-tag encoder, decoder, or richer-identity activity option.

Caller tags, Go activity-tag inheritance, immutable context fields, namespace isolation, and trace fields are preserved. Alignment is specifically automatic identity tags, not all SDK tag features or caller-tag wire formats.

Verified against .NET main 8f1b135: scheduling, gRPC serialization, activity context, and pinned Core 3.9.0 history/tag propagation.

Validation

Local go test ./..., affected-package race tests, go build ./..., and go vet ./... pass with DTS/Azurite/sample targets unset. Coverage includes caller-data isolation, replay/redelivery, cancellation/retries, and native child/ContinueAsNew identity.

Fixed public protobuf fixture, previous → current: action 331 → 85, scheduled history 342 → 95, activity request 343 → 97 bytes. The previous payload exists only as a benchmark fixture. Reproduce with go test ./task -run TestActivityIdentitySerializedSize -v or -run '^$' -bench BenchmarkActivityIdentityWireSize. These are serialization sizes, not storage/WAL or throughput measurements.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@torosent
Tomer Rosenthal (torosent) marked this pull request as ready for review October 6, 2026 20:22
Copilot AI balanced review requested due to automatic review settings October 6, 2026 20:22

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

The scoped behavior change has a documented migration path and focused compatibility coverage, with no unresolved review findings.

Review effort: Balanced
Findings: None

What changed in this PR

Aligns Go’s default automatic identity tags with .NET by omitting redundant orchestration identity while preserving an explicit activity opt-in.

Changes:

  • Removes default identity tags from activities, sub-orchestrations, and ContinueAsNew.
  • Adds task.WithActivityOrchestrationIdentity() and documents migration.
  • Adds compatibility, replay, retry, and serialized-size coverage.
File Description
task/​versioning_test.go Updates tag validation and ContinueAsNew expectations.
task/​tag_identity_test.go Covers identity defaults, opt-in, replay, and retries.
task/​tag_identity_bench_test.go Measures serialized identity-tag overhead.
task/​orchestrator.go Makes activity identity optional and removes other default identity tags.
task/​context_test.go Updates encoding calls and historical identity fixtures.
task/​activity.go Adds the activity identity opt-in option.
README.md Explains new defaults and migration.
internal/​contextprop/​tags.go Allows encoding without orchestration identity.
internal/​contextprop/​tags_test.go Tests optional identity, legacy formats, and data isolation.
CHANGELOG.md Records behavior changes and compatibility guarantees.
api/​context.go Documents activity identity availability.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 6, 2026 20:38

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Historical activity identity decoding must be preserved, and the promised identity opt-in API is missing.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)

Comment thread task/executor.go
Comment thread task/orchestrator.go
@torosent
Tomer Rosenthal (torosent) merged commit 4e79e58 into main Oct 7, 2026
9 checks passed
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.

3 participants