Skip to content

Python: Lazily load Foundry and OpenAI integrations - #15

Closed
eavanvalkenburg wants to merge 118 commits into
mainfrom
lazy-openai-imports
Closed

eavanvalkenburg wants to merge 118 commits into
mainfrom
lazy-openai-imports

Conversation

@eavanvalkenburg

Copy link
Copy Markdown
Owner

Motivation & Context

The OpenAI Python SDK eagerly loads hundreds of generated type modules, as reported in openai/openai-python#2819. Agent Framework's Foundry and OpenAI integration package facades imported their implementation modules eagerly, so applications paid that cost during startup even when they did not use an OpenAI-backed client. This particularly affects CLI tools and short-lived processes.

Across 25 isolated Python 3.13.1 processes, the median cold imports were 1,362.1 ms for agent_framework_foundry, 607.8 ms for agent_framework_foundry_hosting, and 944.0 ms for agent_framework_openai.

Description & Review Guide

  • What are the major changes? The Foundry, Foundry Hosting, and OpenAI integration package facades now resolve public exports through module __getattr__ while retaining TYPE_CHECKING imports and the existing __all__ surfaces. OpenAI SDK types, the Foundry project client, eval clients, prompt-agent conversion dependencies, and the feature-usage HTTP client are deferred until their runtime paths are used. Isolated-process regression tests enforce the lazy boundaries and public export behavior.
  • What is the impact of these changes? Median cold import time drops from 1,362.1 ms to 48.1 ms for agent_framework_foundry, from 607.8 ms to 68.3 ms for agent_framework_foundry_hosting, and from 944.0 ms to 63.1 ms for agent_framework_openai. A plain Foundry import now loads zero OpenAI modules instead of 869. OpenAI-backed chat and agent implementations still load the SDK when requested.
  • What do you want reviewers to focus on? Please focus on compatibility of the lazy public export maps and whether the remaining runtime import boundaries align with when each dependency is first required.

Related Issue

Related to openai/openai-python#2819. No matching Agent Framework issue or open pull request was found.

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 title prefix in sync automatically.

dependabot Bot and others added 30 commits September 3, 2026 15:44
---
updated-dependencies:
- dependency-name: Aspire.Hosting
  dependency-version: 13.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ft#8035)

* docs: adds missing guidance for public api analyzers updates

* docs: split public API analyzer guidance

Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>

* docs: aligns RS017 fixture with RS016

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

---------

Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
…ith cold scope cache (microsoft#7976)

* Fix Purview scope cache miss bypass

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

* Optimize Purview cold scope processing

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

* Run Python Purview cold requests inline

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

* Keep Purview scope refresh best effort

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…crosoft#8038)

* Chore(deps-dev): Bump uv from 0.12.5 to 0.12.6 in /python

Bumps [uv](https://github.com/astral-sh/uv) from 0.12.5 to 0.12.6.
- [Release notes](https://github.com/astral-sh/uv/releases)
- [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md)
- [Commits](astral-sh/uv@0.12.5...0.12.6)

---
updated-dependencies:
- dependency-name: uv
  dependency-version: 0.12.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix lab uv pin and lockfile

Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
microsoft#8019)

Bumps [@humanfs/node](https://github.com/humanwhocodes/humanfs/tree/HEAD/packages/node) from 0.16.6 to 0.16.8.
- [Release notes](https://github.com/humanwhocodes/humanfs/releases)
- [Changelog](https://github.com/humanwhocodes/humanfs/blob/main/packages/node/CHANGELOG.md)
- [Commits](https://github.com/humanwhocodes/humanfs/commits/node-v0.16.8/packages/node)

---
updated-dependencies:
- dependency-name: "@humanfs/node"
  dependency-version: 0.16.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…crosoft#8009)

Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.25.3 to 4.28.8.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](browserslist/browserslist@4.25.3...4.28.8)

---
updated-dependencies:
- dependency-name: browserslist
  dependency-version: 4.28.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…links (microsoft#7777)

* Python: docs: replace the stale learn-docs placeholder with the live links

* Fix the Learn tutorials link
* Stamp AG-UI checkpoint owner on every save

* Validate checkpoint ownership whenever a checkpoint carries an owner

The resume path only compared ownership when the checkpoint had pending request
info events, so a checkpoint with an owner but no pending events skipped the check
entirely. Combined with stamping ownership on every save, a caller could resume
another Snapshot Scope's clean checkpoint and have subsequent saves re-stamped to
themselves.

Validate on owner presence instead. Checkpoints saved before ownership was recorded
have no owner and continue to resume unchanged.

---------

Co-authored-by: Choppaaahh <choppaaahh@users.noreply.github.com>
…on (microsoft#7855)

* Wrap Anthropic and Gemini SDK exceptions in ChatClientException

_inner_get_response() in the OpenAI, Mistral, Ollama, and Bedrock chat
clients all translate raw provider SDK exceptions into the framework's
ChatClientException hierarchy (ChatClientInvalidAuthException for auth
failures, ChatClientInvalidRequestException for bad requests,
ChatClientException otherwise). Mistral's test suite explicitly asserts
this behavior (test_get_response_http_error_wrapped,
test_get_response_network_error_wrapped).

The Anthropic and Gemini clients call their SDKs directly with no
try/except at all, so a raw anthropic.APIError or google.genai.errors.APIError
(and subclasses) propagates unwrapped. Code that catches
ChatClientException to handle chat-client failures in a
provider-agnostic way - the documented purpose of that base class -
silently fails to catch failures from these two providers.

Wraps both the streaming and non-streaming call sites in both clients,
using each SDK's real exception hierarchy (verified against the
installed anthropic and google-genai packages, not assumed) to
classify auth vs. bad-request vs. other errors the same way Mistral
already does.

Adds regression tests mirroring Mistral's existing coverage: one
parametrized non-streaming test per provider covering all three
exception classes, plus a streaming-path test per provider. Full
anthropic and gemini unit test suites pass locally (162 and 154 tests
respectively, no regressions).

* Address review: classify 403 as auth, wrap non-APIError failures, cover mid-stream errors

- Map HTTP 403 (Anthropic PermissionDeniedError / Gemini ClientError) to
  ChatClientInvalidAuthException, matching Mistral's 401/403 handling.
- Replace the provider-specific except chain with a catch-all that routes
  every non-framework exception through a _wrap_*_error helper, so transport
  failures and credential-refresh errors no longer escape ChatClientException.
- Re-raise AgentFrameworkException (e.g. ContentError) untouched.
- Extend tests to cover 403, a non-APIError fallback, and a failure raised
  partway through iterating the stream (generator yields then raises).
* Python: add Magentic custom manager prompts sample

* docs(samples): clarify prompt placeholders
…soft#8023)

* Fix checkpoint pickling of runtime raw representations

* Fix checkpoint serialization review feedback

* Address checkpoint serialization review follow-up

* Fix package check private imports

* Fix pickle state typing

---------

Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
* Run ownership triage for feature issues

* Cancel stale issue triage after retyping
…icrosoft#8036)

* Chore(deps-dev): Bump ruff from 0.16.3 to 0.16.4 in /python

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.3 to 0.16.4.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.16.3...0.16.4)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.16.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix Ruff pins across Python workspace

Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
Co-authored-by: moonbox3 <35585003+moonbox3@users.noreply.github.com>
* Python: move Foundry eval serialization out of core

Keep provider-neutral EvalItem construction in core while moving the Foundry Evals wire conversion into agent-framework-foundry. Remove the accidental experimental converter export and migrate its tests, sample, and current package documentation.

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

* Python: mark eval item helper experimental

Preserve the EVALS feature-stage warning and metadata on the private EvalItem construction helper after removing AgentEvalConverter.

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

* Python: normalize tools for eval items

Apply the standard tool normalization path when constructing EvalItems so callable tools become FunctionTool instances. Simplify the Foundry tool-call sample to use @tool-decorated functions directly.

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

* Python: address Foundry eval review feedback

Remove the stale accepted-ADR link from the Foundry Evals module and keep the tool-call sample's decorated tools directly in the agent and eval item definitions.

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

* Python: deprecate AgentEvalConverter compatibly

Keep the experimental converter import and static methods available so released Foundry packages remain compatible with their declared core 1.x range. Warn on legacy method use while modern Foundry continues to own active wire serialization.

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

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Python: update GitHub Copilot SDK to 1.0.11

* Fix Copilot SDK 1.0.11 permission typing

* Preserve Copilot permission handler compatibility

* Isolate Copilot permission context compatibility type
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aa81fffd-c616-4b3b-bd3f-c407e5959765
* Python: Add core vector store abstractions

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

Copilot-Session: 52e1edc1-384b-4163-b8bd-f659a510ad1f

* Python: Address vector abstraction review feedback

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

Copilot-Session: 52e1edc1-384b-4163-b8bd-f659a510ad1f

* Python: Track vector store feature usage

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

Copilot-Session: 52e1edc1-384b-4163-b8bd-f659a510ad1f

* Python: Preserve vector model decorator typing

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

Copilot-Session: 52e1edc1-384b-4163-b8bd-f659a510ad1f

* Python: Refine vector store public API

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

Copilot-Session: 52e1edc1-384b-4163-b8bd-f659a510ad1f

* Refine vector CRUD embedding controls

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

Copilot-Session: 52e1edc1-384b-4163-b8bd-f659a510ad1f

* Clarify vector ownership and generation

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

Copilot-Session: 52e1edc1-384b-4163-b8bd-f659a510ad1f

---------

Copilot-Session: 52e1edc1-384b-4163-b8bd-f659a510ad1f
…icrosoft#8037)

* Chore(deps-dev): Bump zuban from 0.9.1 to 0.9.2 in /python

Bumps [zuban](https://github.com/zubanls/zubanls-python) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/zubanls/zubanls-python/releases)
- [Commits](zubanls/zuban@v0.9.1...v0.9.2)

---
updated-dependencies:
- dependency-name: zuban
  dependency-version: 0.9.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix zuban lockfile resolution

Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
…icrosoft#8003)

* Python: fix: surface AG-UI workflow intermediate events as reasoning

The AG-UI workflow runner only handled "output" and "data" workflow
events, so "intermediate" events (the modern designation produced by
executors listed under intermediate_output_from) fell through to the
generic CustomEvent fallback instead of being converted to AG-UI
reasoning events.

Add "intermediate" to the handled set and route intermediate text
content to text_reasoning so consumers render it as a collapsible
"thinking" block rather than a final assistant message. The deprecated
"data" alias is treated the same as "intermediate" (per its definition
as the intermediate compatibility alias in _events.py). "output" keeps
the terminal-message behavior, and non-text content (tool calls and
results) still emits as its native AG-UI events.

Fixes microsoft#8000

* Python: address AG-UI intermediate-reasoning review feedback

Follow-up to the intermediate-reasoning change on this branch, addressing
maintainer review:

- Preserve protected_data when re-tagging intermediate text as reasoning so
  the ReasoningEncryptedValueEvent and the snapshot encryptedValue survive.
- Close any open reasoning block (and assistant text message) before every
  terminal event (RUN_FINISHED / RUN_ERROR) and before a request_info tool
  call, via an idempotent _drain_open_blocks() helper. Previously the
  post-loop cleanup emitted the reasoning end events after the terminal
  event, so a client that stopped at RUN_FINISHED never saw them; a
  request_info tool call could likewise sit inside an unclosed reasoning
  block.
- Keep role-less AgentResponseUpdate text (and tool content) instead of
  dropping it to a CUSTOM workflow_output. Explicit non-assistant roles and
  approval requests stay excluded.
…t#7582)

Bumps [actions/github-script](https://github.com/actions/github-script) from 8.0.0 to 9.0.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](actions/github-script@ed59741...3a2844b)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ng contract onto AgentFileStore (microsoft#7671)

* .NET: [BREAKING] Add file_access_read_lines and align grep with the line editor

The harness file tools were line-precise when editing (file_access_replace_lines takes
1-based line numbers and file_access_grep reports them) but all-or-nothing when reading,
so there was no way to see the lines around a match without reading the whole file.

Adds file_access_read_lines, rendering each row as `<n>\t<line>` with everything after
the tab verbatim, including the line's own terminator, so a row feeds straight back into
file_access_replace_lines.

That contract only holds if grep and the line editor agree on what a line is, and they
did not. The stores split on '\n' and stripped '\r'; FileEditor split on '\n', '\r\n'
and a lone '\r' and kept terminators. So on a file using lone '\r' terminators, grep's
line 1 addressed only part of what the model was shown and editing by that number
silently changed the wrong text, and on a newline-terminated file grep could report a
trailing line number the editor rejected as out of range. Both stores now use
FileEditor.SplitLinesKeepEnds and report the matching line verbatim.

BREAKING: FileSearchMatch.Line now includes the line's terminator, and line numbers
change on content containing a lone '\r' or a trailing newline. This affects
file_access_grep and file_memory_grep. The whole surface is [Experimental("MAAI001")].

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* .NET: Strip the whole line terminator before matching, and name args as the schema does

Addresses both review comments on microsoft#7671.

TrimTrailingNewline removed only "\n", so grep matched against text such as
"match\r" on CRLF and lone-CR lines and an end-anchored pattern like "match$"
failed even though the line's text was exactly "match". Renamed to
TrimLineTerminator and it now strips "\r\n", "\n", or a lone "\r".

The file_access_read_lines description and the SliceLines failure messages
referred to end_line/start_line, but the generated schema exposes the arguments
as endLine/startLine, so the model could be prompted to emit an invalid argument
name. Both now use the schema's names. (new_line is left as-is: FileLineEdit
sets it explicitly via JsonPropertyName.)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* .NET: Cover the file-system store's search loop and scope the line-number claim

FileSystemAgentFileStore carries its own copy of the search loop, and its tests
asserted only a line number of 1 and Assert.Contains on the snippet — no test in
that file ever asserted a FileSearchMatch.Line value. Reverting its loop to
Split('\n') with TrimEnd('\r') left the whole suite green, so the store that
touches real files had no coverage of anything this branch changed. Mirrors the
six search tests from InMemoryAgentFileStoreTests; six of the eight new cases fail
against the reverted loop, and the snippet test fails on its own if the per-line
advance regains the "+ 1" that the terminator-keeping split made wrong.

Also scopes the parity claim to the stores in this package. file_access_grep runs
through the public AgentFileStore.SearchAsync, whose contract says nothing about
how content is split or whether terminators survive, while read_lines and
replace_lines split through FileEditor — which is internal, so a custom store
cannot reuse it even deliberately. Promising that the numbers always agree is
therefore something this provider cannot honour. FileEditor.SplitLinesKeepEnds,
FileSearchMatch.Line and ReadLinesAsync now say where the guarantee holds and
where it does not.

The tool's [Description] is left unhedged on purpose: it is prompt text, and
teaching the model to doubt the line numbers would send it back to whole-file
reads, which is the cost this branch exists to remove.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* .NET: Drop the parity promise from the read_lines description and stop copying every line

Two findings from Copilot review 4950508867.

The tool description told the model, unconditionally, that grep's line numbers
match read_lines and replace_lines. That text reaches the model, and it is the
sentence that licenses going straight from grep to replace_lines without reading
the range — which is exactly the wrong-line edit this branch exists to prevent
when the store is a custom one, since AgentFileStore.SearchAsync prescribes no
split. Removed. The grep -> read_lines -> replace_lines workflow in
DefaultInstructions stays: it routes through a read whose numbering shares
FileEditor with the editor, so the model sees the text it is about to change.

TrimLineTerminator copied every line before knowing whether it matched, so a
search over a newline-heavy file allocated a second copy of nearly all its text
on top of SplitLinesKeepEnds. It becomes LineContentLength, and both stores now
call Regex.Match(line, 0, length), which bounds the match without copying.
Verified equivalent across four line shapes and four patterns, match.Index
included, so the snippet offsets are untouched. LineContentLength_BoundsAnEndAnchoredMatch
pins the bound; on CRLF and lone-CR lines it fails without it, while the LF and
unterminated cases pass either way because .NET's '$' already matches before a
trailing newline.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* .NET: [BREAKING] Move the line-numbering contract onto AgentFileStore

Mirrors the Python change in microsoft#7669 so the two SDKs keep the same contract.

file_access_grep took its line numbers from the store, while read_lines and
replace_lines re-counted them from ReadAsync. SearchAsync was abstract with no
numbering contract, so a custom store could make "line 5" mean two different
things and replace_lines would edit the wrong line, in range, reporting success.
FileMemoryProvider had the same hole.

The rule now lives on the base class:

- SplitLines() publishes the split every line_number addresses. Per-SDK: it is
  not required to match Python, only to be consistent here, because a line
  number never crosses runtimes.
- ScanContent() is the numbering primitive. Both shipped stores now report
  through it, which also removes the scan loop that was duplicated between them.
- FindMatchingFilesAsync() is a new hook for narrowing the search to the files
  worth reading. The regex goes down as a hint with superset semantics:
  over-returning is harmless because the base re-scans, under-returning loses
  matches. A backend with a native index overrides it and narrows server-side.
  Its default works, built from ListChildrenAsync, so a store that implements
  nothing beyond the mandatory members now gets aligned numbers for free.
- SearchAsync is no longer abstract. It reads and numbers candidates itself, and
  re-applies the glob and the non-recursive rule, since the hook may over-return.

Overriding SearchAsync stays first-class -- a backend that can do the whole job
natively should -- but then it owns numbering, and both providers verify it:
each reported line is re-matched against the line the editor would touch, and
the whole call is refused on a mismatch. It compares by pattern rather than by
string, because a custom store is not bound to report the line verbatim and
comparing text would reject correct stores.

Two ways to opt out: a store sets ReportsAlignedLineNumbers, or a provider takes
DisableSearchAlignmentCheck. The store flag is narrower and preferred. Both are
promises rather than hints, and a test pins that hazard on purpose.

FileLineEdit also gains an optional ExpectedLine. When supplied, the edit is
refused unless the target line still says what the caller saw, which catches
splitter drift, a stale line number, and the file changing between read and write.

Two things differ from the Python half, both deliberate:

  No batching. Both stores already construct the regex with a match timeout, so
  ReDoS protection is in the engine and there is no thread offload to amortise.
  Python needs one; this does not.

  No reflection. Detecting whether a store overrides SearchAsync via
  GetType().GetMethod trips IL2075 and is not trim-safe, so the base
  implementation records that it ran instead -- which is also more accurate,
  being set by the call that produced the results.

BREAKING: SearchAsync is no longer abstract, and a store whose line numbers
disagree with SplitLines now has its grep results refused rather than silently
applied. Removing abstract while keeping the member virtual passes Package
Validation; verified by building the package in Release.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* .NET: Fix two holes in the search alignment check and four stale contract docs

From Copilot's review of the rebased head (review 4983864371).

SearchAlignment validated only the upper bound of a reported line number, so a
store reporting 0 or a negative one indexed out of range and surfaced a raw
ArgumentOutOfRangeException instead of the misalignment error the check exists
to report. Both bounds are checked now.

A RegexMatchTimeoutException on one line returned from the whole check, so every
later match and file in the call was handed to the model as though it had passed
verification. It now skips that match and keeps going. Python already fails
closed here via asyncio.wait_for, so this was a .NET-only divergence.

Four doc comments still described the design as it was before the contract
commit, telling the reader the opposite of what the code now does:

- FileAccessProvider read_lines remarks said grep's contract does not prescribe
  a split, so a custom store may report incompatible numbers. It does prescribe
  one, and results that disagree are refused.
- FileSearchMatch said a custom store is not held to either property. It is not
  held to the text, but the number must address SplitLines.
- FileEditor.SplitLinesKeepEnds said a custom SearchAsync is not required to use
  this split. It is required to; it just does not inherit it.
- FindMatchingFilesAsync told implementers a dialect mismatch costs recall and
  nothing else, contradicting the superset rule three lines above it. Recall loss
  is precisely the failure the rule forbids, so it now says to widen rather than
  guess.

The narrowing test deliberately under-returns from the hook, which is the very
violation the contract names. That is the only way to prove the hook decided what
got read, and the comment now says so rather than appearing to bless it.

Two new tests, each confirmed to fail without its fix. Reaching the timeout path
needs a budget shorter than the five-second default, so ThrowIfMisalignedAsync
takes an optional per-line timeout; nothing outside the tests passes it.

Two findings from the same review are deliberately not actioned. The expected_line
mismatch message reveals the current line, which is a read oracle where write
tools are auto-approved and read tools are not; removing it defeats the message's
purpose, and Python carries the identical text, so that is a maintainer call. The
ADR request is likewise left open: the requirement is stated in
.github/copilot-instructions.md rather than CONTRIBUTING.md, and the process needs
deciders an external contributor cannot nominate.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mo3qRizH73Gtpviqf5BjP7

* .NET: State the line-counting rule in the tools and give memory its own refusal

Mirrors the Python changes in microsoft#7669, which came out of @westey-m's review there.

The tool descriptions never said how lines are counted. A model that reads a whole
file with file_access_read and then edits by number has to count them itself, and
nothing told it the rule. read, read_lines, replace_lines and grep now state it,
as do the two memory tools that take or report line numbers.

The rule is deliberately not the one Python states, and the wording must not be
copied between the two SDKs. Here a lone \r terminates a line and content ending
in a terminator has no trailing empty line; in Python neither is true. Taken from
the cases FileEditorTests already pins rather than from reading the splitter.

SearchAlignment's refusal is shared by both providers and names read_lines, which
FileMemoryProvider does not register -- there is no file_memory_read_lines at all.
ThrowIfMisalignedAsync now takes the message from the caller, defaulting to the
existing wording, and the memory provider passes one naming file_memory_read.

CreateToolsAsync in the memory tests was typed to InMemoryAgentFileStore, which is
sealed, so a skewed double could not be passed to it. Widened to AgentFileStore.

The new test was confirmed to fail against the file-access wording. Removing the
call argument instead only breaks the build, which shows the constant has one
consumer but not that the assertion discriminates.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mo3qRizH73Gtpviqf5BjP7

* .NET: Make the base-results trust marker prove integrity, not just provenance

From Copilot review 4985186414.

BaseSearchResults marked a list as numbered by the base SearchAsync, and
IsTrusted skipped verification on the strength of the type alone. Everything in
the payload is mutable -- the list itself, FileSearchResult.FileName and
MatchingLines, FileSearchMatch.LineNumber -- so an override could await
base.SearchAsync, renumber the results in place, and return the very same
instance. The marker survived, verification was skipped, and the wrong-line edit
it exists to prevent was reachable again.

This is not only a hostile-store concern. A store that prepends a header in
ReadAsync and "corrects" the base's numbers to compensate is the same shape as
the Python defect fixed in microsoft#7669, and it would have kept full trust here.

The marker now snapshots the file names and line numbers it was constructed with,
and IsUnmodified re-checks them before trust is granted. The tag says who built
the list; the snapshot says the numbers in it are still theirs. Comparison is
exact rather than hashed, because a collision would mean false trust, which is the
one direction this must not fail in. A modified list drops to verification rather
than failing outright, matching the conservative posture elsewhere.

FileSearchMatch.Line is deliberately excluded. A custom store may report the text
differently -- that is why the check matches by pattern rather than by string --
so covering it would reject stores doing something the contract permits.

The type's own documentation claimed an override that post-processes the base
results loses the tag. That was true only of post-processing into a new list, and
is corrected here.

Python needs no equivalent: _numbers_are_trusted keys on the store type and the
identity of the base search function, neither of which a store can mutate. This
gap existed only because .NET routes around GetType().GetMethod for trim-safety.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mo3qRizH73Gtpviqf5BjP7

* .NET: Replace the runtime alignment check with a documented contract

From @westey-m's review. Policing implementations that are not per spec is not
worth the cost at runtime; the expectation belongs on the type an implementer is
reading when they get it wrong. A conformance test library, which is the real
answer for checking an implementation, is tracked separately as microsoft#7931.

SearchAlignment and BaseSearchResults are deleted, along with
ReportsAlignedLineNumbers and its two overrides and DisableSearchAlignmentCheck
on both provider options. SearchAsync returns its results directly instead of a
tagged list, and neither provider verifies what a store reports.

The contract those types enforced now sits on SearchAsync itself: a store
overriding it must number FileSearchMatch.LineNumber as a 1-based coordinate
into SplitLines of the content ReadAsync returns, ScanContent builds that
correctly, and numbering against anything else is a bug whose failure mode is
silent -- the search looks right, and the damage appears when a later line edit
applies to a line the caller never saw.

Two doc comments elsewhere still said the tools verify the numbering, which is
no longer true of either. The FileSearchMatch and FileEditor remarks also scoped
the rule to the stores shipped here rather than stating what implementers owe;
both now read as expectations, which the same review asked for.

Descriptions that state the line-counting rule now also say the numbers are
1-based, so a model counting lines from a whole-file read knows where to start.

Eight tests went with the check: seven alignment cases and their six helper
stores in AgentFileStoreContractTests, and the memory-refusal test with its
skewed store in FileMemoryProviderTests. Nothing exercised the removed types
otherwise; the remaining 2099 unit tests pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* .NET: Drop two usings left dead by the alignment-check removal

From Copilot review 5051570368. Both are fallout from 72a1f03 rather than
pre-existing: removing SkewedMemoryStore took the last CancellationToken out of
FileMemoryProviderTests, and removing the shipped-stores trust test took the last
Path.GetTempPath() out of AgentFileStoreContractTests, leaving System.Threading
and System.IO imported for nothing.

Neither surfaced in the build because unused usings are not an error here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* .NET: Pin the snippet offset for every terminator, and drop a stale test rationale

From Copilot review 5052352338.

SearchFiles_SnippetIsAnchoredAtTheMatch exercised the per-line offset with LF
only, so it would have passed had ScanContent advanced by content length plus one
rather than by the line's own length -- correct for LF and a lone CR, a character
short for CRLF. It is now a theory over all three, and the expected snippet
derives from the terminator length instead of hardcoding 49 padding characters.
Confirmed by making that exact substitution in ScanContent: the CRLF case fails
and the other two pass, which is what the single-Fact version could not see.

The comment above the mirrored filesystem search tests still said that store
carries its own copy of the search loop. It does not: both stores now number
through AgentFileStore.ScanContent, which was one of the goals of this PR, so the
rationale contradicted the code. Reworded as what those tests actually add --
the same rules exercised against real files, where content arrives through a
decoded read rather than an in-memory string.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* .NET: Cover the read_lines approval group in the isolated option tests

From the suppressed comment on Copilot review 5053203365.

DisableReadOnlyToolApproval_ReadOnlyToolsNotWrapped and its write counterpart
enumerated read, ls and grep on one side and the four store-modifying tools on
the other, but never read_lines. Nothing else discriminated which group it is
wired into: the auto-approval theory covers a different mechanism, and
DisableBothToolApprovals only counts tools. Wiring read_lines to
writeRequiresApproval would therefore have reversed the approval boundary for a
read tool with every test still green.

Both tests now assert it alongside the other read-only tools. Confirmed by making
that substitution in FileAccessProvider: both fail, and the other 2114 tests pass,
which is what makes the gap the finding describes visible rather than theoretical.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* .NET: Say which part of a numbered read expected_line takes

From the suppressed comment on Copilot review 5053896798.

The expected_line description told the caller to use the text "as reported by
grep or read_lines". read_lines prefixes each line with its number and a tab, so
a model following that literally can pass the whole row, which never matches:
the editor compares the line's own text. It now says to give the line text only
and names the prefix it must not include.

read_lines is also the wrong tool to name here at all. FileLineEdit is shared by
FileAccessProvider and FileMemoryProvider, and the memory provider registers no
read_lines tool, so half the callers were pointed at something that does not
exist for them. grep is named instead, which both providers do register.

The XML doc above the property carried the same gap and now states the rule too,
since that is what an implementer reads rather than the tool description.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* .NET: State the hook's case semantics, and stop claiming containment on a mismatch

From the two suppressed comments on Copilot review 5058964476.

FindMatchingFilesAsync took the regex and the glob as hints without saying how
either is compared. SearchAsync builds its regex with RegexOptions.IgnoreCase and
StorePaths.CreateGlobMatcher uses OrdinalIgnoreCase, so a backend pushing either
hint into a case-sensitive index returns only case-exact candidates and drops
matches before the base ever re-scans. That is the under-return the superset rule
exists to forbid, and nothing in the contract warned against it. Both parameters
now state the comparison and require widening when the backend cannot reproduce it.

The expected_line mismatch said the line "does not contain the expected text"
while the check is exact equality after trimming terminators. For actual foobar
and expected foo the line does contain it, so the model was handed a diagnostic
that contradicts what it can see and would send it re-reading a file that had not
changed. It now says the line does not match, and the contract test that pinned
the old wording follows.

Confirmed the assertion discriminates by putting the old wording back:
ApplyReplaceLines_ExpectedLineDiffering_Throws fails and the other 2115 pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* .NET: Say what FindMatchingFilesAsync narrows on, and why a store would override it

From @westey-m's review.

The summary described the hook by the regex alone, which reads as though the glob
were someone else's concern. It now names both: files that may contain text
matching the pattern, and whose names may match the glob. Taken from the
suggestion, with the missing space after </em> restored.

The remarks said what the default implementation does but never why anyone would
replace it. They now state the purpose: override when the backing store can
answer either question more cheaply -- a name index for the glob, a content or
full-text index for the regex -- with the store doing the narrowing it is good at
and the base keeping the scanning and the line numbering.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* .NET: Declare this PR's API surface for the new public API analyzers

Build fix, not a change in behaviour. The analyzers landed on main in 0822dd7
after this branch was last built, so every member this PR adds or changes was
undeclared: RS0016 for the seven new symbols, and RS0017 for the shipped abstract
SearchAsync, which this PR made virtual and which therefore no longer exists as
declared.

All eight are recorded in PublicAPI.Unshipped.txt for the five target frameworks,
which stay byte-identical to each other as they were before.

The retired signature is marked with *REMOVED* rather than deleted from
PublicAPI.Shipped.txt. That is the analyzer's own mechanism for retiring a shipped
member, and it keeps the abstract-to-virtual change visible as a line in this PR's
diff instead of a silent deletion from a shipped baseline. Nothing in the repo has
needed it before, since the analyzers are three days old.

Reproduced locally first: the same eighty RS001x errors CI reported, now zero in
both Debug and Release, with 2116 unit tests passing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* .NET: Stop the default tree walk when the token is already cancelled

From Copilot review 5110306826.

FindMatchingFilesAsync passed the token to ListChildrenAsync but never checked it
itself, so a store whose listing ignores the token kept the walk going after
cancellation, one listing per directory. The contract-test store is exactly that
shape: it takes a CancellationToken and never reads it. SearchAsync then threw on
its first candidate, which hid the wasted work behind a correct-looking exception.

The walk now checks before each listing and before each entry.

BaseSearch_StopsWalkingWhenCancelledEvenIfTheStoreIgnoresTheToken pins it by
counting listings rather than by asserting an exception: with the fix zero
listings happen, and without it twenty-one. The first version of this test
asserted only that OperationCanceledException was thrown and passed against the
unfixed code, because SearchAsync throws either way -- the exception was never
the thing worth measuring.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* .NET: Guard ScanContent's fileName alongside its other parameters

From the suppressed comment on Copilot review 5110771736.

ScanContent validated content and regex and left fileName alone, so a null went
through and landed in FileSearchResult.FileName, which is a non-nullable string.
The gap only shows when the scan matches: with no match the method returns null
and the bad argument never surfaces, which is why nothing had caught it on a
member this PR makes public.

ScanContent_NullFileName_Throws pins it with a pattern that does match, for that
reason. Without the guard it fails on "No exception was thrown" rather than on a
wrong exception type, which is the defect rather than a near miss.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Bump Anthropic from 12.42.0 to 12.43.0

---
updated-dependencies:
- dependency-name: Anthropic
  dependency-version: 12.43.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Implement Anthropic beta organization interface

Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
…8027)

* Bump AgentMemory.AgentFramework from 1.4.1 to 1.5.0

---
updated-dependencies:
- dependency-name: AgentMemory.AgentFramework
  dependency-version: 1.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump AgentMemory to 1.5.0 to match AgentMemory.AgentFramework

Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>

* Add dependabot group for AgentMemory packages

Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Bumps [actions/labeler](https://github.com/actions/labeler) from 6.1.0 to 7.0.0.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](actions/labeler@f27b608...bf12e9b)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…icrosoft#8067)

Bumps [github/codeql-action/analyze](https://github.com/github/codeql-action) from 4.37.3 to 4.37.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@e4fba86...cdf488f)

---
updated-dependencies:
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.37.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…crosoft#8066)

Bumps [github/codeql-action/init](https://github.com/github/codeql-action) from 4.37.3 to 4.37.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@e4fba86...cdf488f)

---
updated-dependencies:
- dependency-name: github/codeql-action/init
  dependency-version: 4.37.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* backup

* .NET: Always create A2A agent run options

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

Copilot-Session: 1a876988-01c0-4110-9517-77aba4bf41a8

* .NET: Decouple A2A run mode from agent options

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

Copilot-Session: 1a876988-01c0-4110-9517-77aba4bf41a8

* .NET: Clarify dynamic A2A run mode scope

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

Copilot-Session: 1a876988-01c0-4110-9517-77aba4bf41a8

* .NET: Remove redundant run mode assertion

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

Copilot-Session: 1a876988-01c0-4110-9517-77aba4bf41a8

---------

Co-authored-by: SergeyMenshykh <SergeMenshikh@outlook.com>
Copilot-Session: 1a876988-01c0-4110-9517-77aba4bf41a8
eavanvalkenburg and others added 23 commits September 9, 2026 08:27
* Python: Add Redis HASH and JSON vector stores

Add RedisCollection and RedisStore with native HASH/JSON codecs, portable filter support, dense vector search, lifecycle management, and shared connection settings. Include public documentation, examples, and Redis integration coverage.

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

* Python: Fix Redis vector test typing

Narrow optional deserialize results, patch the owned client close method, and keep dictionary and model collection variables distinct across the five CI test type checkers.

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

* Python: Address Redis vector connector review

Revalidate index existence and schema before nonempty operations, ignore noncanonical foreign index names, honor explicit falsey overrides, clarify the Redis CI baseline, and assert independent Param sentinel identity. Add unit and real Redis HASH/JSON regressions without changing native L2 semantics.

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

* Python: Validate Redis vector client configuration

Require strict UTF-8 encoding and database zero for vector clients. Centralize persisted namespace encoding and parsing without changing names, document supported settings, and add unit and live Unicode regressions.

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

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Python: update Hyperlight sandbox to 0.6

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

* Python: include Hyperlight in Python 3.14 all extra

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

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Python: Add Qdrant vector store connector

Add the alpha Qdrant package with async collections, native filtering and named dense-vector search, AF connection settings, samples, and integration coverage.

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

* Python: Address Qdrant connector review feedback

Normalize tuple payloads, reconcile identifiable collection-create races, and preserve numeric and typed key-filter validation. Reject ordered retrieval before SDK I/O because supported server pagination can omit or duplicate results, while retaining bounded unordered paging. Add regression coverage and clarify the sample documentation.

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

* Python: Restrict Qdrant vectors to floating point

Reject integer vector declarations before any SDK operation because Qdrant stores dense vectors as float32. Keep integer-valued inputs valid for floating-point fields and document the storage precision.

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

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…rosoft#8175)

Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.3.1 to 4.3.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/4.3.2/CHANGELOG.md)
- [Commits](nodeca/js-yaml@4.3.1...4.3.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Python: Add Azure AI Search vector store connector

Add async collection and store APIs with batch CRUD, native vector and hybrid search, shared AF settings, explicit preview capabilities and client ownership. Include public exports, consumer documentation, samples, and connector regressions.

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

* Python: Fix Azure Search connector test typing

Keep constructor fixtures precisely typed, narrow the integration query vector, and use keyword SDK arguments across inherited signatures. Preserve runtime behavior and test coverage.

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

* Python: Harden Azure Search connector request preflight

Bound uploads by native action and serialized request limits before any write. Validate document keys, vector elements, schema options, ordering, and query credentials; default new vector fields to retrievable. Preserve native not_in semantics and add stable/preview wire and boundary regressions.

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

* Python: Release closed Azure Search collections

Deregister factory-created collections when close completes, including failure and cancellation paths. Preserve ordered cleanup and constant-time removal without losing ownership of still-open clients. Add weak-reference lifecycle regressions and document the ownership behavior.

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

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Python: Add PostgreSQL pgvector connector

Add an alpha async PostgreSQL vector store with AF settings, transactional batch CRUD, native filtered vector search, and scoped pgvector integration coverage.

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

* Python: Address PostgreSQL vector connector review

Normalize numeric sequence vectors, validate ANN query mode and declared vector precision, and strengthen connector regression coverage and consumer documentation.

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

* Python: Fix PostgreSQL sequence typing with NumPy stubs

Explicitly type the existing numeric list branch before pgvector adapter dispatch, preserving sequence normalization and runtime validation.

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

* Python: Encapsulate PostgreSQL filters and clarify NumPy codecs

Return SQL and ordered parameters together from the filter compiler. Document and cover typed NumPy scalar round-trips through the existing custom-decoder API.

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

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Python: enforce FIDES labels on expanded variables

Bind expanded hidden values to their stored integrity and confidentiality labels, enforce sink policy without tainting model context, and persist exact approval digests across session restore.

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

* Python: address FIDES argument policy review

Preserve no-session middleware compatibility with run-local state, support enum approval arguments, recover superseded policy approvals safely, and keep mixed function results in valid tool-role messages.

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

* Python: avoid creating approval state on reads

Keep pending-approval lookup side-effect free so runs without approvals do not persist a server-owned approval bucket.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…sualStudio.Threading.Analyzers versions (microsoft#8166)

* ci: update Microsoft.CodeAnalysis.NetAnalyzers and Microsoft.VisualStudio.Threading.Analyzers versions

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* Update analyzer pins in CPM-disabled samples

Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>

---------

Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
…ir latest version, as well as global.json dotnet sdk version to align (microsoft#8190)

* chore: updates microsoft extensions and related packages to their latest version

* chore: upgrades adjacent packages

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* chore: aligns net sdk version

* chore: pins transitive dependencies to avoid conflicts

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ode >=18 preserved) (microsoft#8172)

Rebased onto current main and reduced to only the changes that fix a live
advisory, addressing the Copilot review (unrelated yarn.lock churn) and the
merge conflict.

DevUI frontend (npm overrides + yarn.lock):
  - ajv 6.12.6 -> 6.14.0        GHSA-2g4f-4pwh-qvx6 (ReDoS via $data)
  - brace-expansion 1.1.16 -> 1.1.18, 2.1.2 -> 2.1.4  GHSA-rgw5-rvv9-x895
  - nanoid 3.3.17 -> 3.3.18     GHSA-2v37-7h3g-55p8

Sample frontends (npm override, nanoid only):
  - ag_ui_single_agent, ag_ui_workflow_handoff, chatkit-integration:
    nanoid 3.3.16 -> 3.3.18     GHSA-2v37-7h3g-55p8

Dropped from the original PR:
  - js-yaml pin: main already ships 4.3.2 (no-op).
  - The wholesale yarn.lock regeneration (registry-URL rewrites + incidental
    @babel bumps) Copilot flagged: yarn.lock now changes only the 4 patched
    entries, so the diff is the fix and nothing else. Node >=18 support is
    preserved (no brace-expansion@5, which requires Node 20).

`npm audit` is clean (0 vulnerabilities) in all four frontends.

Co-authored-by: aaronjmars <aaronjmars@users.noreply.github.com>
* fix: revalidate file skill paths before use

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

* fix: mark internal skill path validation calls

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

* fix: address file skill path review feedback

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

* refactor: avoid closure when reading skill resources

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

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…rosoft#7844)

* Initial plan

* Forward opted-in Responses function tools

Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>

* Add guarded client function tools

* Simplify client function tool options

* Clarify client function tool risk

* Dispose HTTP test resources and simplify tool filtering

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2d6ca13a-3274-4167-a074-bfe4df9423ed

* Simplify Responses client function forwarding

Centralize mapping in RunOptionsFactory and make dangerous opt-in a boolean. Leave conflict handling and tool execution to downstream clients.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2d6ca13a-3274-4167-a074-bfe4df9423ed

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2d6ca13a-3274-4167-a074-bfe4df9423ed
* chore: updates additional analyzers packages

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* chore: address analyzer review feedback

Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>

* chore: linting after analyzer upgrade

---------

Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
)

* [BREAKING] Python: isolate Lab dependencies for Projects 2.6

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

* Python: declare isolated workspace test dependencies

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

* Revert unrelated Anthropic formatting

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

* Python: remove redundant transport casts

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

* Python: update uv prerelease policy

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

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…oft#8141)

* Python: preserve confidentiality through FIDES security tools

Keep resolved-input confidentiality on transformed and embedded-label results, publish authoritative inspect/quarantine labels, and avoid unwrapping ordinary response-shaped JSON.

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

* Python: extract quarantine payload predicate

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

* Python: integrate confidentiality propagation with argument labels

Resolve the stacked PR2/PR3 boundary so hidden arguments are expanded once, retain their combined label for policy, and preserve their confidentiality on transformed results.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Python: harden FIDES result label authority

Use middleware provenance for quarantine unwrapping, require explicit label fields, fail unknown quarantine inputs closed, and scope trusted inspect errors to clean parser-marked invocations.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Python: keep unlabeled quarantine output private

Use the existing UNTRUSTED/PRIVATE fail-closed label when quarantined_llm receives no labeled input, with placeholder and configured-client regressions.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Python: bound Hyperlight output attachments

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

* Python: tighten Hyperlight output bounds

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

* Python: restore scandir before test cleanup

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

* Python: pin Hyperlight output file opens

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

* Python: scope Hyperlight atomic swap test

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

* Python: bound Hyperlight output traversal

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

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Bumps the basics group in /python/packages/lab with 2 updates: [uv](https://github.com/astral-sh/uv) and [prek](https://github.com/j178/prek).


Updates `uv` from 0.12.7 to 0.12.9
- [Release notes](https://github.com/astral-sh/uv/releases)
- [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md)
- [Commits](astral-sh/uv@0.12.7...0.12.9)

Updates `prek` from 0.5.0 to 0.5.2
- [Release notes](https://github.com/j178/prek/releases)
- [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md)
- [Commits](j178/prek@v0.5.0...v0.5.2)

---
updated-dependencies:
- dependency-name: uv
  dependency-version: 0.12.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: basics
- dependency-name: prek
  dependency-version: 0.5.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: basics
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Python: bound and recover policy approvals

Bound FIDES policy approvals per session with FIFO and TTL expiry, clean authenticated non-grants by occurrence, and persist visible replacement approvals so stale grants require a safe second approval.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Python: address FIDES approval lifecycle review

Harden request-generation authority, keep lifecycle observation private, and notify fixed-scope FIDES policy middleware from authenticated AG-UI rejection and cancellation paths.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Python: finalize FIDES approval review fixes

Preserve immutable function occurrences while rotating approval generations, route authenticated AG-UI non-grants through private observers, and cover canonical, legacy, mixed-cancellation, and restored-session flows.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@eavanvalkenburg

Copy link
Copy Markdown
Owner Author

Superseded by microsoft#8219; this PR was opened against the fork repository by mistake.

This branch had an error being deployed

1 failed and 1 inactive deployments
github-app-auth — eb7c08b9 Deployed Sep 10, 2026 by eavanvalkenburg via team_check #18
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.