Repository navigation
feat(a365): port missing tool metadata and tenant-isolated delivery - #276
Merged
Merged
Conversation
Capture complete tool URLs and explicit transfer targets, isolate durable backoff and replay by tenant, and preserve empty nested metadata. Include focused regressions and the JavaScript parity documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: adab09b1-cb4f-4d83-ad92-31d3462610ec
Nikhil Navakiran (nikhilNava)
requested review from
Jackson Weber (JacksonWeber),
Nev (MSNev),
ajmfehr,
Pujarini Mohapatra (biswapm),
Grant Harris (gwharris7),
Hector Hernandez (hectorhdzg),
Jeremy Voss (jeremydvoss),
Julio Carlos Menendez (juliomenendez),
Leighton Chen (lzchen) and
Radhika Gupta (rads-1996)
as code owners
October 28, 2026 15:48
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Replay can indefinitely starve healthy tenants because older records from a rate-limited tenant repeatedly exhaust each pass’s claim budget without preserving traversal progress.
1 open issue
What changed in this PR
This PR extends Agent365 tool telemetry and durable delivery with portable features from the .NET implementation, without changing existing tool-call signatures or storage formats.
Changes:
- Add full tool endpoint URLs and typed transfer metadata while preserving source identity.
- Introduce tenant-specific backoff gates and bounded replay scanning, with stronger record validation.
- Preserve explicitly empty metadata and add documentation and regression coverage.
| File | Description |
|---|---|
| test/internal/unit/a365/transmissionGateRegistry.test.ts | Tests tenant isolation, leases, and eviction. |
| test/internal/unit/a365/scopes.test.ts | Tests endpoint URLs and transfer attributes. |
| test/internal/unit/a365/persistentStore.test.ts | Tests exclusions, replacement races, and blank tenants. |
| test/internal/unit/a365/messageUtils.test.ts | Tests preservation of empty nested metadata. |
| test/internal/unit/a365/durableRecord.test.ts | Tests rejection of blank tenant identifiers. |
| test/internal/unit/a365/durableDeliveryManager.test.ts | Tests tenant backoff, replay limits, and release failures. |
| src/index.ts | Exports public transfer types and enums. |
| src/a365/scopes/ExecuteToolScope.ts | Validates and records transfers and endpoint URLs. |
| src/a365/message-utils.ts | Preserves explicitly empty metadata. |
| src/a365/index.ts | Exports transfer APIs from Agent365. |
| src/a365/exporter/durable/TransmissionGateRegistry.ts | Adds leased per-tenant gates with eviction. |
| src/a365/exporter/durable/TransmissionGate.ts | Exposes pending backoff for eviction protection. |
| src/a365/exporter/durable/PersistentStore.ts | Skips excluded records before leasing. |
| src/a365/exporter/durable/DurableRecord.ts | Rejects blank tenant identifiers during parsing. |
| src/a365/exporter/durable/DurableDeliveryManager.ts | Shares tenant gates across live delivery and bounded replay. |
| src/a365/contracts.ts | Defines endpoint URL and transfer contracts. |
| src/a365/constants.ts | Adds URL and transfer attribute keys. |
| CHANGELOG.md | Summarizes new features and delivery fixes. |
| A365_DOCUMENTATION.md | Documents transfers, URL sensitivity, metadata, and replay behavior. |
Review effort: Balanced
Prevent blocked prefixes larger than the per-pass scan budget from starving later tenants. Preserve post-claim exclusion checks and cover repeated throttling passes, tenant recovery, and claim-time replacement races. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 19b76a8f-e714-42c6-ac3f-a2905b3f2411
Jackson Weber (JacksonWeber)
approved these changes
Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Port the four missing or partial portable Agent365 features found by reviewing all 29 closed PRs by
nikhilNavainmicrosoft/opentelemetry-distro-dotnet(28 merged, one unmerged WIP).The latest merged change, microsoft/opentelemetry-distro-dotnet#179, is already implemented by #265 and is not duplicated here.
Missing features implemented
ServiceEndpoint.urlrecordsurl.fullon execute-tool spans, preserving existing host/port behavior and not inventing URLs from host-only endpoints.TransferMode,TransferTargetType, and a discriminatedTransferDetailsunion. Record explicit mode, target type, and supported target agent properties without replacing source identity. Validate incompatible details before creating a span.metadata: {}for explicitly emptyextension_dataat top-level and nested models; keep absent/null metadata omitted.No dependencies, publishing workflows, storage record formats, or existing tool call signatures change. The gate registry is internal. Documentation describes URL sensitivity, transfer behavior, tenant isolation, and replay limits.
Remaining reviewed PRs
Audit classification for the other 25 closed PRs
spanProcessorswitha365.enableObservabilityExporter: false.recordAttributes()semantics rather than importing .NET DTO protected-attribute filtering.A365SpanProcessor(introduced by #146).Microsoft.Extensions.AI/.NET instrumentation source, not a JS instrumentation API.Validation
npm run build,npm run test:esm-build, ESM/CJS root transfer API smoke checks,npm run lint, andnpm run formatpass. ESLint reports warnings but no errors.