Skip to content

fix(typesafe): harden connector result handling - #30

Draft
lizageorge wants to merge 2 commits into
eavanvalkenburg:add-jev-structured-chatfrom
lizageorge:lg/fix-typesafe-connector-gaps
Draft

lizageorge wants to merge 2 commits into
eavanvalkenburg:add-jev-structured-chatfrom
lizageorge:lg/fix-typesafe-connector-gaps

Conversation

@lizageorge

Copy link
Copy Markdown

Motivation & Context

This is a focused follow-up to microsoft#8592. It hardens the TypeSafe connector against lossy function-result serialization and excessive schema compilation after the connector's routing limits have already been exceeded.

Description & Review Guide

  • What are the major changes? Canonical text items now determine the serialized function result even when the compatibility result field is stale; noncanonical non-string results are rejected; tool compilation stops immediately once routable-tool or internal-question limits are exceeded; focused regression tests cover both behaviors.
  • What is the impact of these changes? TypeSafe receives faithful tool output and avoids unnecessary work on oversized MCP or local-tool sets without changing the connector's documented alpha limitations.
  • What do you want reviewers to focus on? Please focus on the function-result fallback behavior and whether the incremental limit checks preserve the existing supported-tool filtering semantics.

Related Issue

Follow-up to microsoft#8592. This PR is intentionally stacked on eavanvalkenburg/agent-framework:add-jev-structured-chat so it contains only the focused fixes.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and the title prefix in sync automatically.

Preserve canonical text result items even when the compatibility result field is stale, reject noncanonical non-string results, and stop compiling tool schemas once connector limits are exceeded.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use canonical function-result items consistently for both TypeSafe state and caller-visible terminal text.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch had an error being deployed

1 failed deployment
github-app-auth — d4c95543 Deployed Sep 22, 2026 by lizageorge via add_label #34
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.

1 participant