Skip to content

feat: add azd ai agent config list-alpha - #10657

Closed
Hui Miao (huimiu) wants to merge 15 commits into
hui/foundry-feature-flags-hosted-agentfrom
hui/foundry-feature-flags-list
Closed

Hui Miao (huimiu) wants to merge 15 commits into
hui/foundry-feature-flags-hosted-agentfrom
hui/foundry-feature-flags-list

Conversation

@huimiu

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

Copy link
Copy Markdown
Member

Fixes #10659

Summary

Adds azd ai agent config list-alpha, modeled on azd config list-alpha. It lists each agent alpha feature from the registry with its name, description, On or Off status for the selected environment, and env var.

The extension had no config group, so this adds one with just list-alpha to match the core command path.

Stacked on #10640.

Behavior

  • Uses the same check as enforcement, so the status matches what commands see.
  • Honors -e/--environment. Without it, uses the default environment, or skips environment values if there's no project. An explicit empty value is rejected before anything is read.
  • --output text (default) prints one block per feature in the core layout (Name, Description, Status) plus Environment variable. --output json prints {"features":[{"name","description","status","envVar","error"}]}.
  • If a read fails, status is Unknown with an Error line (text) or an error field (JSON). All features are still listed, then the command exits with an error.
  • Doesn't show where an opt-in came from.
  • Read only. No auth, no project writes.

Changes

  • internal/cmd/config.go: config group and list-alpha subcommand.
  • internal/cmd/json_output.go: writeJSON takes a writer. emitJSON is unchanged.
  • Tests for text and JSON output, per-feature read errors, the selected environment, the process value, the output allow list, and no feature command.
  • Tests for the empty --environment rejection.
  • Help snapshots for config, config list-alpha, and the root command list.
  • README section, spec section, and Tier 0 scenario 0.32-config-list-alpha.yaml. The scenario copies the real azd config into a scratch AZD_CONFIG_DIR, removes its alpha keys, and deletes the copy in teardown, so the real config is never changed.

Validation

  • go build ./..., go vet ./..., and go test ./... pass. gofmt is clean. golangci-lint with the repo config reports 0 issues. cSpell passes on touched files.

E2E

azd and the extension were built from this PR (b52dddb2f). The extension binary was swapped into the local install. Root help was rechecked at 21d001a69 after merging the latest #10640. Rows with <id> or <ENVVAR> ran for all three features. The project had two envs, dev (default) and other. Each run started from a fresh user config. The last three rows ran at 7cf859518 after the review fixes.

Scenario Expected Result
Root help lists config, no feature config listed, no feature
feature list unknown command unknown command
config list-alpha, fresh config three entries, all Off all Off
config list-alpha -o json, fresh config features array with name, description, status, envVar as expected
azd config set alpha.<id> on that feature On in text and JSON On
azd config unset alpha.<id> back to Off Off
azd env set <ENVVAR> true in the selected env On by default, Off with -e other as expected
azd env set <ENVVAR> true -e other On with -e other, Off by default as expected
Process <ENVVAR>=true On On
azd config set alpha.<id> true Off Off
azd config set alpha.all on all Off all Off
azd env set <ENVVAR> yes or process yes Off Off
One feature on the other two stay Off other two Off
config list-alpha -e nosuchenv every entry Unknown with its error, then exit 1 each entry Unknown with the environment error, exit 1 with a one line count
config list-alpha -o raw rejected with the supported formats rejected
Output never names where an opt-in came from no source field none
config list-alpha -e "" and --environment "", opt-in only in the default env rejected as an empty environment rejected, previous head showed On
Tier 0 0.32 hooks with alpha.all on and voice on in the real config all Off, real config unchanged, copy removed as expected
Same, with process AZD_FOUNDRY_EXT_ENABLE_AGENTS_VOICE=true voice On On

Deploy, invoke, and gate results for the stack are in #10640. This PR doesn't change them.

@azure-pipelines

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

@github-actions github-actions Bot added the ext-agents azure.ai.agents extension label Oct 21, 2026
@huimiu Hui Miao (huimiu) changed the title feat: add azd ai agent feature list feat: add azd ai agent config list-alpha Oct 21, 2026
@github-actions github-actions Bot added the ext-foundry microsoft.foundry meta package or Foundry/AI extensions overall. Not individual extension issues. label Oct 21, 2026
@huimiu
Hui Miao (huimiu) marked this pull request as ready for review October 21, 2026 14:16
Copilot AI lite review requested due to automatic review settings October 21, 2026 14:16

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

Strengthen JSON error-field assertions and complete the scenario command and help tag taxonomy.

1 open issue
What changed in this PR

Adds azd ai agent config list-alpha to display agent alpha-feature status in text or JSON, with environment support and error reporting.

Changes:

  • Adds the config list-alpha command and JSON output support.
  • Adds tests, help snapshots, documentation, and Tier 0 coverage.
  • Updates root command registration and scenario expectations.
File Description
cli/​azd/​extensions/​azure.ai.agents/​tests/​cli-interactive-tester-scenarios/​tier0/​0.32-config-list-alpha.yaml Adds Tier 0 scenario coverage.
cli/​azd/​extensions/​azure.ai.agents/​tests/​cli-interactive-tester-scenarios/​tier0/​0.02-help-root.yaml Updates root help expectations.
cli/​azd/​extensions/​azure.ai.agents/​tests/​cli-interactive-tester-scenarios/​README.md Documents scenario tags and registration.
cli/​azd/​extensions/​azure.ai.agents/​README.md Documents feature status inspection.
cli/​azd/​extensions/​azure.ai.agents/​internal/​cmd/​testdata/​TestAgentHelpPreviewsOff-root.snap Updates root help snapshot.
cli/​azd/​extensions/​azure.ai.agents/​internal/​cmd/​testdata/​TestAgentHelp-root.snap Updates root help snapshot.
cli/​azd/​extensions/​azure.ai.agents/​internal/​cmd/​testdata/​TestAgentHelp-config.snap Adds config help snapshot.
cli/​azd/​extensions/​azure.ai.agents/​internal/​cmd/​testdata/​TestAgentHelp-config_list-alpha.snap Adds list-alpha help snapshot.
cli/​azd/​extensions/​azure.ai.agents/​internal/​cmd/​root.go Registers the config command.
cli/​azd/​extensions/​azure.ai.agents/​internal/​cmd/​root_test.go Tests command visibility.
cli/​azd/​extensions/​azure.ai.agents/​internal/​cmd/​json_output.go Supports writer-based JSON output.
cli/​azd/​extensions/​azure.ai.agents/​internal/​cmd/​config.go Implements configuration listing and formatting.
cli/​azd/​extensions/​azure.ai.agents/​internal/​cmd/​config_test.go Tests listing behavior and output formats.
cli/​azd/​extensions/​azure.ai.agents/​docs/​specs/​preview-feature-flags.md Specifies command behavior and coverage.

Review effort: Lite

Comment thread cli/azd/extensions/azure.ai.agents/internal/cmd/config_test.go
Copilot AI lite review requested due to automatic review settings October 21, 2026 14:43
@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.

🟡 Changes recommended

Address client-setup failure reporting and update the scenario command tags.

2 open issues

Review effort: Lite

Comment thread cli/azd/extensions/azure.ai.agents/internal/cmd/config.go Outdated
@huimiu
Hui Miao (huimiu) force-pushed the hui/foundry-feature-flags-hosted-agent branch from 73c9077 to 4cc5435 Compare October 22, 2026 00:18
Rebased onto the updated hosted agent feature flag branch. Squashes:

- feat: add azd ai agent feature list
- refactor: rename feature list to config list-alpha

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

Empty-environment validation must prevent the root pre-run from reading project state or reporting telemetry before rejection.

1 open issue

Review effort: Lite

Comment thread cli/azd/extensions/azure.ai.agents/internal/cmd/config.go Outdated
Copilot AI lite review requested due to automatic review settings October 22, 2026 02:20

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

Client initialization failures do not produce the documented Unknown entry for every registered feature.

1 open issue
1 resolved since last review

Review effort: Lite

Comment thread cli/azd/extensions/azure.ai.agents/internal/cmd/config.go
Copilot AI lite review requested due to automatic review settings October 22, 2026 03:56

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 Tier 0 scenario can copy live authentication state and access the caller’s real configuration, so its isolation and safety issues must be addressed.

1 open issue
1 resolved since last review

Review effort: Lite

Copilot AI lite review requested due to automatic review settings October 22, 2026 06:33

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.

🔵 Needs a closer look

The JSON contract can omit description for features with empty descriptions, and the negative-path scenario coverage is missing its required tag.

No open issues 🎉

1 resolved since last review

Review effort: Lite

Include the harness type TrimSpace fix from hui/foundry-feature-flags-hosted-agent.
Copilot AI lite review requested due to automatic review settings October 22, 2026 11:05

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

Final review found no unresolved issues, and all approval-readiness assessments support approval.

No open issues 🎉

Review effort: Lite

@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/10657/azure-ai-agents.zip"
  • Version: 1.0.0-beta.21.pr.10657.6988640
  • Merge commit: b06af8c

@therealjohn John Miller (therealjohn) 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.

This is fine since we cant hook into the core config command - but we could just use env vars for now instead. What are the risks with just doing that?

@huimiu
Hui Miao (huimiu) removed this pull request from stack #10658 October 23, 2026 04:58
@huimiu

Copy link
Copy Markdown
Member Author

This is fine since we cant hook into the core config command - but we could just use env vars for now instead. What are the risks with just doing that?

No risk, so I'll close this PR and use env vars for now

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 ext-foundry microsoft.foundry meta package or Foundry/AI extensions overall. Not individual extension issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add preview feature flags to the agents extension

4 participants