Skip to content

Enable resilient tasks in LRA samples (invocations + responses) + responses 2.0.0b1 core floor bump - #48399

Merged
Shiva S (Shivakishore14) merged 3 commits into
mainfrom
namantyagi/agentserver-invocations-responses-release-prep
Aug 3, 2026
Merged

Enable resilient tasks in LRA samples (invocations + responses) + responses 2.0.0b1 core floor bump#48399
Shiva S (Shivakishore14) merged 3 commits into
mainfrom
namantyagi/agentserver-invocations-responses-release-prep

Conversation

@Nathandrake229

@Nathandrake229 Nathandrake229 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Enable resilient-task startup recovery explicitly (set_resilient_tasks_enabled(True)) in the resilient (LRA) samples across the invocations and responses packages, with parity across both protocols. Because the responses samples now use a core 2.0.0b10 API, this PR also raises the responses package's core floor and cuts a 2.0.0b1 prep entry.

Changes

Invocations resilient samples — add set_resilient_tasks_enabled(True):

  • samples/resilient_multiturn/app.py
  • samples/resilient_langgraph/app.py
  • samples/resilient_research/app.py

Responses resilient samples — add set_resilient_tasks_enabled(True):

  • samples/sample_19_resilient_streaming.py
  • samples/sample_20_resilient_steering.py
  • samples/sample_21_resilient_langgraph.py
  • samples/sample_22_resilient_multiturn.py

Responses package release-prep (required by the sample change):

  • pyproject.toml: core floor >=2.0.0b9>=2.0.0b10
  • _version.py: 2.0.0b02.0.0b1
  • CHANGELOG.md: new ## 2.0.0b1 (Unreleased) entry documenting the dependency bump

Why

azure-ai-agentserver-core 2.0.0b10 introduced an opt-in gate for the resilient TaskManager startup recovery scan: recovery runs only when a durable task is declared or set_resilient_tasks_enabled(True) was called (an OR gate). Calling the switch explicitly in every resilient sample demonstrates the public opt-in API consistently, and keeps recovery working even if a task is registered lazily (the flag starts the periodic recovery loop at boot).

Since the responses samples now import set_resilient_tasks_enabled (a b10 API) at module top level, the responses package's core floor must be >=2.0.0b10 or the samples would fail at import under the package's minimum supported dependency — hence the floor bump + 2.0.0b1 version + CHANGELOG note (addresses the Copilot review feedback).

Note on the two packages

  • Invocations samples declare user-facing @task / @multi_turn_task, so recovery runs via the task-declared branch; the flag makes the opt-in explicit and covers the lazy-registration edge.
  • Responses samples enable resilience via ResponsesServerOptions(resilient_background=True). The framework already registers its internal durable tasks at ResponsesAgentServerHost construction (before app.run()), so recovery runs regardless — the flag is added for parity and to showcase the opt-in API (the added comment states this explicitly).

Validation

  • All 7 sample apps compile (py_compile).
  • from azure.ai.agentserver.core.tasks import set_resilient_tasks_enabled resolves against the published azure-ai-agentserver-core==2.0.0b10.
  • pyproject.toml parses; responses deps resolve to azure-ai-agentserver-core>=2.0.0b10.
  • Public API surface unchanged, so api.md / api.metadata.yml require no regeneration.
  • Invocations core floor bump to >=2.0.0b10 already merged via Prepare azure-ai-agentserver-invocations 1.0.0b8 release #48398.

Add set_resilient_tasks_enabled(True) to the resilient_multiturn,
resilient_langgraph, and resilient_research sample apps so they
explicitly opt into resilient-task startup recovery introduced by the
core 2.0.0b10 opt-in gate, rather than relying only on the implicit
task-declared behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5222ab61-7d5e-4642-b75f-ef365e375f4f
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
9 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

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.

Pull request overview

Explicitly enables resilient-task startup recovery in all resilient invocation samples.

Changes:

  • Imports and calls set_resilient_tasks_enabled(True).
  • Documents why explicit opt-in supports lazy task registration.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
samples/resilient_research/app.py Enables startup recovery.
samples/resilient_multiturn/app.py Enables startup recovery.
samples/resilient_langgraph/app.py Enables startup recovery.

Add set_resilient_tasks_enabled(True) to the resilient Responses samples
(sample_19_resilient_streaming, sample_20_resilient_steering,
sample_21_resilient_langgraph, sample_22_resilient_multiturn) for parity
with the invocations resilient samples. The Responses framework already
registers its internal durable tasks at host construction, so recovery
runs regardless; the explicit call showcases the opt-in API.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5222ab61-7d5e-4642-b75f-ef365e375f4f
Copilot AI review requested due to automatic review settings August 3, 2026 05:25
@Nathandrake229 Nathandrake229 changed the title Explicitly enable resilient tasks in LRA invocations samples Explicitly enable resilient tasks in LRA samples (invocations + responses) Aug 3, 2026

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.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Suppressed comments (1)

sdk/agentserver/azure-ai-agentserver-responses/samples/sample_22_resilient_multiturn.py:47

  • The PR title, summary, change list, rationale, and validation describe updates only to the three invocations samples, but this also changes four responses samples. Please either remove the responses changes or update the PR metadata and validation to cover this additional package and explain the scope expansion.
from azure.ai.agentserver.core.tasks import set_resilient_tasks_enabled

…2.0.0b10

The resilient Responses samples call set_resilient_tasks_enabled, an API
introduced in azure-ai-agentserver-core 2.0.0b10. Raise the package's
minimum core dependency from >=2.0.0b9 to >=2.0.0b10 so the samples are
valid at the package's stated minimum, bump the version to 2.0.0b1, and
document the dependency change in the CHANGELOG.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5222ab61-7d5e-4642-b75f-ef365e375f4f
Copilot AI review requested due to automatic review settings August 3, 2026 06:27

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.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

Suppressed comments (1)

sdk/agentserver/azure-ai-agentserver-responses/pyproject.toml:21

  • This dependency bump leaves [tool.azure-sdk-build] at lines 75–76 claiming that azure-ai-agentserver-core>=2.0.0b9 is not on PyPI and disabling mindependency. Since this PR depends on the published b10 release, that rationale is now stale and CI will still skip validating the new minimum dependency. Remove/update the stale comment and re-enable mindependency unless another documented blocker remains.
    "azure-ai-agentserver-core>=2.0.0b10",

@Nathandrake229 Nathandrake229 changed the title Explicitly enable resilient tasks in LRA samples (invocations + responses) Enable resilient tasks in LRA samples (invocations + responses) + responses 2.0.0b1 core floor bump Aug 3, 2026
@Shivakishore14
Shiva S (Shivakishore14) enabled auto-merge (squash) August 3, 2026 10:57
@Shivakishore14
Shiva S (Shivakishore14) merged commit 5067ecf into main Aug 3, 2026
23 checks passed
@Shivakishore14
Shiva S (Shivakishore14) deleted the namantyagi/agentserver-invocations-responses-release-prep branch August 3, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hosted Agents sdk/agentserver/*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants