Skip to content

Drift sync with upstream agent-framework through 2026-08-31 - #8

Open
jamiewest wants to merge 1 commit into
mainfrom
drift/sync-2026-08-31
Open

Drift sync with upstream agent-framework through 2026-08-31#8
jamiewest wants to merge 1 commit into
mainfrom
drift/sync-2026-08-31

Conversation

@jamiewest

Copy link
Copy Markdown
Owner

Weekly /drift sync. Reviews the seven upstream dotnet/src commits since the 92aec78c (2026-08-25) pin and advances upstream-sync to 0822dd74 (2026-08-31).

Upstream commits reviewed

PR# Date Change Classification
#7911 2026-08-27 Add timeout for wait-for-first-completion port
#7913 2026-08-27 ChatMessage input overload on the shared workflow sample runner skip (propose) — recorded in PORTING.md
#7935 2026-08-31 Add public API analyzers out of scope (baseline .txt only, no .cs)
#3932 2026-08-31 Cosmos DB Emulator startup reliability out of scope (CosmosNoSql not ported)
#6046 2026-08-31 ADR renumbering out of scope (Hyperlight README)
#7932 2026-08-28 Fix duplicate Foundry AgentHost port binding out of scope (Foundry.Hosting not ported)
#7864 2026-08-26 Annotate DevUI aggregator analyzer false positives out of scope (Aspire.* not ported)

Totals: 1 ported, 1 skip recorded, 5 out of scope. Suppressed by the PORTING.md ledger: 0 — nothing in this window re-surfaced an existing divergence.

Ported — #7911

BackgroundAgentsProviderOptions gains waitTimeout (default five minutes) plus the defaultWaitTimeout / maximumWaitTimeout bounds, validated in the BackgroundAgentsProvider constructor. BackgroundAgents_WaitForFirstCompletion now races the first-completion future against that timeout; when it elapses the tool returns a message saying the tasks are still running and the tool may be called again, leaving the background work untouched. The timeout stays provider-controlled — the tool's schema still exposes only taskIds.

Dart's Future.timeout is the exact analogue of upstream's Task.WhenAny(firstCompletion, Task.Delay(...)) + timeoutCts.Cancel(): it never cancels the future it wraps, so the tasks keep running. Abandoning the losing Future.any is safe here because BackgroundAgentRuntimeTask.completion is documented never to complete with an error.

Deviations, recorded in PORTING.md:

  • ArgumentOutOfRangeExceptionArgumentError.value (Dart has no range-specific subtype).
  • maximumWaitTimeout keeps upstream's uint.MaxValue - 1 ms value even though that cap is a .NET Task.Delay constraint, so the validated option range matches upstream (and web Timer delays overflow past 2³¹ ms anyway).
  • The timeout message reproduces C# TotalSeconds:g through a small _formatSeconds helper.

Upstream's six new unit tests are mirrored in background_agents_provider_test.dart.

Skipped — #7913

The ChatMessage input overload landed in dotnet/src/Shared/Workflows/Execution/WorkflowRunner.cs: an internal sealed Console/stdin sample harness in namespace Shared.Workflows that targets the out-of-scope Workflows.Declarative project. dotnet/src/Shared/Workflows is not part of any ported namespace — workflows/execution/ maps to Microsoft.Agents.AI.Workflows, not to Shared/. PORTING.md now records that future runs classify dotnet/src/Shared/Workflows/** as out of scope.

Extensions edge (drift.md Step I2.5)

  1. Upstream MEAI bump — none. Microsoft.Extensions.AI* is 10.9.0 (10.6.0 for .OpenAI) at both the pin and main, so no coordination with the extensions repo is needed for this window.
  2. Published-version lag — cleared. extensions ^0.6.0^0.7.1 in both packages, and extensions_flutter ^0.5.0^0.5.2 in agents_flutter. Both packages analyze and test clean against the new resolution; no call sites needed adaptation.
  3. Blocked on extensions — nothing. No port in this window needed an API package:extensions does not expose.

Releases

Since this changes code under packages/agents/lib, and both packages' extensions constraints moved:

  • agents 2.0.0 → 2.1.0 (minor: new public API on BackgroundAgentsProviderOptions)
  • agents_flutter 0.8.2 → 0.8.3 (patch: dependency constraints only)

Each has a matching CHANGELOG entry. agents_flutter's agents: ^2.0.0 constraint still covers 2.1.0 and was left alone.

Verification

  • packages/agents: dart analyze clean (2 pre-existing use_super_parameters infos in summarization_compaction_strategy.dart and chat_protocol_executor.dart, both untouched here), dart test1196 passed.
  • packages/agents_flutter: flutter analyze — no issues, flutter test835 passed.
  • Toolchain: Flutter 3.47.2 / Dart 3.13.2 stable.

Ripple not verified here: the sibling agents_llama and agents_app checkouts are not available in this cloud environment. Both pin this repo by commit, so the extensions ^0.7.1 bump and the new BackgroundAgentsProviderOptions surface should be checked on their next ref bump. No base contract changed, so subclass breaks are unlikely.


Generated by Claude Code

Reviews the seven dotnet/src commits since the 2026-08-25 pin and advances
upstream-sync to 0822dd74 (2026-08-31).

Ported:

- Background-agents wait timeout (#7911): BackgroundAgentsProviderOptions
  gains waitTimeout (default five minutes) plus the defaultWaitTimeout /
  maximumWaitTimeout bounds, validated in the BackgroundAgentsProvider
  constructor. BackgroundAgents_WaitForFirstCompletion now races the
  first-completion future against that timeout and, when it elapses, returns
  a message saying the tasks are still running and the tool may be called
  again — the tasks themselves are left untouched. The timeout stays
  provider-controlled: the tool schema still exposes only taskIds. Mirrors
  upstream's six new unit tests.

Skipped, with the decisions recorded in PORTING.md:

- Shared workflow sample runner (#7913): the ChatMessage input overload
  landed in dotnet/src/Shared/Workflows/Execution/WorkflowRunner.cs, an
  internal Console/stdin sample harness in namespace Shared.Workflows that
  targets the out-of-scope Declarative project. dotnet/src/Shared/Workflows
  is not part of any ported namespace; future runs classify it out of scope.

Out of scope, no ledger entry needed:

- Public API analyzers (#7935): PublicAPI.{Shipped,Unshipped}.txt baselines
  only, no .cs source change.
- Cosmos DB emulator startup (#3932), ADR renumbering in the Hyperlight
  README (#6046), Foundry AgentHost port binding (#7932), and DevUI
  aggregator analyzer annotations (#7864) all land in projects PORTING.md
  lists as not ported.

Extensions edge (drift.md Step I2.5):

- Upstream's Microsoft.Extensions.AI versions are unchanged between the pin
  and main (10.9.0 / 10.6.0 for the OpenAI package), so no coordination with
  the extensions repo is needed for this window.
- Cleared the published-version lag: extensions ^0.6.0 -> ^0.7.1 in both
  packages and extensions_flutter ^0.5.0 -> ^0.5.2 in agents_flutter. Both
  packages analyze and test clean against the new resolution with no call
  sites needing adaptation.
- No port in this window was blocked on a missing package:extensions API.

Version bumps for the automated release: agents 2.0.0 -> 2.1.0 (new public
API on BackgroundAgentsProviderOptions) and agents_flutter 0.8.2 -> 0.8.3
(dependency constraints only), each with a CHANGELOG entry.

Verified with dart analyze && dart test in packages/agents (1196 tests) and
flutter analyze && flutter test in packages/agents_flutter (835 tests).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Smrpnb1FFWC2mxNpZS9R5p
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.

2 participants