Skip to content

Add explicit Agent365 execute-tool transfers - #309

Merged
Nikhil Navakiran (nikhilNava) merged 7 commits into
mainfrom
copilot/a365-transfer-parity
Oct 30, 2026
Merged

Nikhil Navakiran (nikhilNava) merged 7 commits into
mainfrom
copilot/a365-transfer-parity

Conversation

@nikhilNava

Copy link
Copy Markdown
Collaborator

Summary

Port microsoft/opentelemetry-distro-dotnet#157 using Python-native typed contracts.

  • Add public TransferDetails, TransferMode and TransferTargetType types and an optional trailing ToolCallDetails.transfer_details field, preserving existing positional calls.
  • Record explicit transfer mode/target type and only the target agent's ID, name, blueprint ID, platform ID and version. Keep source gen_ai.agent.* identity unchanged.
  • Reject invalid enum values and agent details on human/workflow targets. No transfer telemetry is inferred when details are omitted.
  • Add regression tests, API usage/privacy documentation and a changelog entry. No new dependencies or storage changes.

Validation

Python 3.11, with this branch's src on PYTHONPATH:

  • Regression tests failed before implementation, then passed.
  • python -m pytest tests/a365 --ignore=tests/a365/integration -q --tb=short: 654 passed, 8 skipped, 41 subtests passed.
  • Changed-file python -m pylint --output-format=parseable: passed (10/10).
  • Changed-file python -m mypy --python-version 3.10 --show-error-codes --ignore-missing-imports --check-untyped-defs --follow-imports=silent: passed.
  • Black formatting/check and git diff --check: passed.
  • python -m build --no-isolation: wheel and source distribution built; all five changed source files, including the new transfer module, verified byte-for-byte in both artifacts.
  • Independent read-only review: no actionable introduced defects.

The unit run emits one exporter worker warning (enriching_span_processor.py:449, cannot release un-acquired lock). The exact warning reproduces on unchanged main (640 passed, 8 skipped, 41 subtests passed); this PR does not change exporters.

Full tox environments, Python 3.10/3.12-3.14 execution, live integration tests, Sphinx docs, and .NET/JavaScript execution were not run. No live telemetry was used.

This is an independent main-based PR. Existing Python storage work remains in #300.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: dfa03945-cb0e-4471-ba78-5980a3098d0b

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.

🟢 Approval recommended

No active review issues block the typed transfer-metadata change.

No open issues 🎉

What changed in this PR

Adds explicit, typed transfer metadata to Agent365 execute-tool spans, keeping target-agent identity separate from source-agent attributes. This extends telemetry without changing dependencies or storage.

Changes:

  • Introduces public transfer types and an optional trailing ToolCallDetails.transfer_details field, preserving existing positional calls.
  • Records explicit transfer mode, target type, and five supported target-agent fields; rejects invalid enum values and agent details for non-agent targets.
  • Adds regression coverage, usage/privacy documentation, and a changelog entry.

No actionable findings. No additional validation commands were run.

File Description
tests/​a365/​test_execute_tool_scope.py Tests transfer attributes, validation, opt-in behavior, and disabled telemetry.
src/​microsoft/​opentelemetry/​a365/​core/​transfer_details.py Defines transfer enums and a validated, frozen metadata model.
src/​microsoft/​opentelemetry/​a365/​core/​tool_call_details.py Appends optional transfer metadata to tool-call details.
src/​microsoft/​opentelemetry/​a365/​core/​execute_tool_scope.py Emits explicit transfer attributes and supported target identity fields.
src/​microsoft/​opentelemetry/​a365/​core/​constants.py Defines transfer telemetry attribute keys.
src/​microsoft/​opentelemetry/​a365/​core/​__init__.py Exports the new public transfer types.
CHANGELOG.md Announces typed execute-tool transfer support.
A365_DOCUMENTATION.md Documents transfer usage, validation, and privacy boundaries.

Review effort: Balanced

@nikhilNava

Copy link
Copy Markdown
Collaborator Author

Copilot resolve the merge conflicts in this pull request

…-parity

# Conflicts:
#	CHANGELOG.md

Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Comment thread CHANGELOG.md Resolved
Copilot AI balanced review requested due to automatic review settings October 28, 2026 21:30

Copilot AI commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Copilot resolve the merge conflicts in this pull request

Resolved the CHANGELOG.md conflict, kept both branches' entries, and published merge commit b2fa63e.

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.

🟢 Approval recommended

No active review issues remain, although validation commands were not run during this review.

No open issues 🎉

Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: dfa03945-cb0e-4471-ba78-5980a3098d0b
Copilot AI balanced review requested due to automatic review settings October 28, 2026 22:03
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Performance comparison

Threshold: regressions >15.0% on gating scenarios fail the build. Higher ops/s is better; positive Δ means the PR is slower.

Scenario Gating Baseline (ops/s) Candidate (ops/s) Δ % Status
azure_monitor_log yes 46,375.7 47,662.2 -2.70% ✅
azure_monitor_span yes 288,600.3 282,087.4 +2.31% ✅
otel_log no 54,800.5 56,220.8 -2.53% ✅
otel_span no 83,139.3 85,484.7 -2.74% ✅

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.

🟢 Approval recommended

No active review issues were identified for the transfer-metadata change, although validation commands were not independently run.

No open issues 🎉

Review effort: Balanced

Select the released OpenAIChatCompletionClient instead of the Responses client and pass the configured Azure API version explicitly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 14661e89-86a3-4afe-a454-263eaeeba021
Copilot AI balanced review requested due to automatic review settings October 30, 2026 16:41

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.

🟢 Approval recommended

No actionable review findings remain, although reported validation was not independently rerun and live integration tests and the full supported Python matrix remain unverified.

No open issues 🎉

Review effort: Balanced

@rads-1996 Radhika Gupta (rads-1996) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Copilot AI balanced review requested due to automatic review settings October 30, 2026 17:36

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.

🟢 Approval recommended

No active review issues were identified for the transfer-metadata change, though validation was not rerun and live integration and the full supported Python matrix remain unverified.

No open issues 🎉

Review effort: Balanced

…-parity

# Conflicts:
#	A365_DOCUMENTATION.md
#	CHANGELOG.md
#	src/microsoft/opentelemetry/a365/core/execute_tool_scope.py
#	tests/a365/test_execute_tool_scope.py

Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>

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.

🟢 Approval recommended

No active review issues remain for the transfer-metadata change, though validation commands were not rerun.

No open issues 🎉

Review effort: Balanced

Preserve transfer telemetry and its regression tests alongside the merged request-session correlation changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 14661e89-86a3-4afe-a454-263eaeeba021

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.

🟢 Approval recommended

No active review issues require changes to the Agent365 transfer-metadata update.

No open issues 🎉

Review effort: Balanced

@nikhilNava
Nikhil Navakiran (nikhilNava) merged commit 6df4796 into main Oct 30, 2026
16 checks passed
@nikhilNava
Nikhil Navakiran (nikhilNava) deleted the copilot/a365-transfer-parity branch October 30, 2026 20: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.

5 participants