Skip to content

fix: use process-only preview flags for agents - #10683

Merged
Hui Miao (huimiu) merged 3 commits into
mainfrom
hui/agents-env-only-flags
Oct 23, 2026
Merged

Hui Miao (huimiu) merged 3 commits into
mainfrom
hui/agents-env-only-flags

Conversation

@huimiu

@huimiu Hui Miao (huimiu) commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Keep preview-flag evaluation inside the agents extension until azd core provides shared support. Use AZD_ALPHA_ENABLE_AGENTS_* names now so the later migration can keep the same switches and feature IDs.

This PR updates evaluation and help only. Command and runtime gates remain in #10640.

Changes

  • Replace AZD_FOUNDRY_EXT_ENABLE_* with switches for managed harness, voice, and long-running invocation. Each defaults to off and enables only for true values accepted by strconv.ParseBool.
  • Read the extension's process environment without loading azd config or dotenv files. Values already injected by the azd host still count.
  • Remove the evaluator's client/context parameters and dependencies used only by the old tests. Keep the pinned azd version unchanged.
  • List the switches in azd ai agent --help and update the docs, tests, root help snapshot, and Tier 0 help scenario.

Testing

Feature-flag and help tests, the full agents module build, and scoped vet/lint checks passed. The updated Tier 0 help scenario was not run.

Closes #10684

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
24 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.

🟡 Changes recommended

Direct os.Getenv access can consume host-injected azd environment values, so the required process-only contract is not currently enforced.

1 open issue
What changed in this PR

This pull request updates agents preview feature flags to use canonical AZD_ALPHA_ENABLE_AGENTS_* names, exposes them through root help, and removes legacy configuration and dependency handling. A critical issue remains: direct os.Getenv access can observe host-injected azd environment values, violating the documented process-only contract.

Changes:

  • Simplifies feature evaluation to parse canonical process environment variables.
  • Updates the registry, tests, help output, snapshot, and Tier 0 discovery scenario.
  • Removes obsolete indirect dependencies and documents the revised feature-flag contract.
File Description
cli/​azd/​extensions/​azure.ai.agents/​tests/​cli-interactive-tester-scenarios/​tier0/​0.02-help-root.yaml Adds offline assertions for preview switch discovery and guidance.
cli/​azd/​extensions/​azure.ai.agents/​internal/​featureflags/​registry.go Defines canonical AZD_ALPHA_ENABLE_* environment keys.
cli/​azd/​extensions/​azure.ai.agents/​internal/​featureflags/​registry_test.go Verifies canonical feature IDs, keys, and registry behavior.
cli/​azd/​extensions/​azure.ai.agents/​internal/​featureflags/​featureflags.go Implements declaration validation and environment-based feature evaluation.
cli/​azd/​extensions/​azure.ai.agents/​internal/​featureflags/​featureflags_test.go Covers parsing, defaults, ignored sources, isolation, and mutation safety.
cli/​azd/​extensions/​azure.ai.agents/​internal/​cmd/​testdata/​TestAgentHelp-root.snap Updates the root help snapshot with preview switch guidance.
cli/​azd/​extensions/​azure.ai.agents/​internal/​cmd/​root.go Installs registry-generated help content.
cli/​azd/​extensions/​azure.ai.agents/​internal/​cmd/​help.go Renders registry-derived preview switch documentation.
cli/​azd/​extensions/​azure.ai.agents/​internal/​cmd/​help_test.go Tests help content, formatting, snapshots, and switch independence.
cli/​azd/​extensions/​azure.ai.agents/​go.sum Removes checksums for obsolete dependencies.
cli/​azd/​extensions/​azure.ai.agents/​go.mod Removes obsolete indirect module requirements.
cli/​azd/​extensions/​azure.ai.agents/​docs/​specs/​preview-feature-flags.md Documents the process-only API, canonical names, and deferred adoption boundary.

Review effort: Lite

@github-actions github-actions Bot added the ext-agents azure.ai.agents extension label Oct 23, 2026
Copilot AI lite review requested due to automatic review settings October 23, 2026 03:05
@github-actions

Copy link
Copy Markdown

📋 Prioritization Note

Thanks for the contribution! The linked issue isn't in the current milestone yet.
Thank you for logging this issue; our team is reviewing it. If you need urgent prioritization, tag Rick Winter (@RickWinter) and Kristen Womack (@kristenwomack) to let us know.

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.

🟢 Approval recommended

No unresolved blocking issues were identified, and all readiness assessments support approval.

1 open issue

Review effort: Lite

Copilot AI lite review requested due to automatic review settings October 23, 2026 04:41

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.

🟡 Changes recommended

The linked gating implementation still depends on removed APIs and the combined root changes have a compile-time footer mismatch.

3 open issues
1 resolved since last review

Review effort: Lite

Comment thread cli/azd/extensions/azure.ai.agents/internal/cmd/root.go
@huimiu
Hui Miao (huimiu) added this pull request to stack #10687 October 23, 2026 04:58
@azure-sdk-automation

Copy link
Copy Markdown
Contributor

azure.ai.agents PR build

Note

This is an unsigned development build. Install it only if you trust this PR.

Install the extension:

azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/10683/azure-ai-agents.zip"
  • Version: 1.0.0-beta.21.pr.10683.6992482
  • Merge commit: 78f0014

@huimiu
Hui Miao (huimiu) merged commit e06f938 into main Oct 23, 2026
41 checks passed
@huimiu
Hui Miao (huimiu) deleted the hui/agents-env-only-flags branch October 23, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-agents azure.ai.agents extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use process-environment preview switches for agents

3 participants