feat: default new agents to invocations protocol 2.0.0 - #9327
Merged
Conversation
huimiu
requested review from
JeffreyCA,
glharper,
hund030,
therealjohn,
trangevi and
trrwilson
as code owners
July 28, 2026 05:51
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 21 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates newly scaffolded agents to use invocations protocol version 2.0.0 while preserving existing manifests.
Changes:
- Updates the shared invocations protocol default.
- Adjusts interactive and flag-driven test expectations.
- Adds regression coverage for image-based initialization.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
internal/cmd/init_from_code.go |
Sets the invocations default to 2.0.0. |
internal/cmd/init_from_code_test.go |
Updates protocol-selection expectations. |
internal/cmd/init_test.go |
Tests image-manifest synthesis with invocations 2.0.0. |
huimiu
force-pushed
the
hui/update-invocations-protocol-to-2-0-0
branch
from
July 28, 2026 06:22
0f193f6 to
faa8e96
Compare
jongio
approved these changes
Jul 28, 2026
jongio
left a comment
Member
There was a problem hiding this comment.
Verified the change:
knownProtocolsis the only source for both affected paths: interactive and flag selection ininit_from_code.go, and--imagemanifest synthesis ininit.go. There is no second default table to keep in sync.- Nothing client side branches on protocol version.
protocolFromContainerAgentand the endpoint URL builders route on protocol name, andmap.gopasses the version straight through intoprotocol_versions. The only version comparison left in the extension is the legacy"v1"to"1.0.0"normalization inoptimize_deploy.go, which this doesn't touch. - The schema types
versionas a plain string, so no validation surface moves. - The official Foundry sample at
bring-your-own/invocations/hello-worldalready declaresinvocationsat2.0.0, so this lines azd up with what the samples already ship instead of introducing a new default. - The
1.0.0fixtures instate_test.goand the yaml testdata stay valid as back compat parse coverage. - No help text, flag description, or doc references the protocol version, so nothing drifts out of sync.
Skipping the CHANGELOG matches current practice for this extension: everything merged since the 2026-07-23 release cut left it alone and the release prep PR batches the entries.
No findings.
trangevi
approved these changes
Jul 28, 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.
Fixes #9153
Why
invocationswas the last protocol still pinned to1.0.0inazd ai agent init.responses,invocations_ws, andactivityall moved to2.0.0already, so new agents were opting into a stale contract for no reason.Approach
The defaults live in one
knownProtocolstable that feeds both init paths (local code and--image), so a single entry change keeps them consistent.1.0.0keep deploying as authored — no silent upgrade.Validation
--no-prompt --protocol invocationsinvocations/2.0.0--no-prompt --protocol invocationsinvocations/2.0.0responsesandinvocations2.0.0