Repository navigation
fix: use process-only preview flags for agents - #10683
Conversation
|
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. |
There was a problem hiding this comment.
🟡 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
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
azure.ai.agents PR buildNote 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"
|


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
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 bystrconv.ParseBool.azd ai agent --helpand 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