test(ext-agents): guard tier selectors against false-green#9115
test(ext-agents): guard tier selectors against false-green#9115glharper wants to merge 2 commits into
Conversation
Centralize the Tier 0 and Tier 1 go test patterns, then validate that each selector matches tests, no test belongs to both tiers, and every Test_AIAgent_ test is assigned exactly once. This makes renamed or newly added tests fail CI instead of being silently skipped by go test -run. Co-authored-by: Copilot <[email protected]> Copilot-Session: 6eccd2f8-19dc-4da9-abf7-12eb690cf50c
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
There was a problem hiding this comment.
Pull request overview
Adds CI validation to prevent false-green Azure AI Agents tier test runs.
Changes:
- Centralizes and anchors Tier 0/1 selectors.
- Verifies all nine tests belong to exactly one tier.
- Reuses validated selectors during test execution.
jongio
left a comment
There was a problem hiding this comment.
One non-blocking suggestion on the new validation step, inline. The guard logic itself checks out: I ran it against the current package and the two tier regexes select exactly the 4 Tier 0 and 5 Tier 1 tests with full coverage and no overlap.
| azd x publish | ||
| azd extension install azure.ai.agents --source local --force --no-prompt | ||
|
|
||
| - name: Validate tier test selectors |
There was a problem hiding this comment.
This guard only needs Go and the test sources to compile. go test -list against ./test/functional/ai_agents/ runs fine with just checkout + setup-go (the package only imports test/azdcli and test/recording, no built extension is needed). As placed, it runs after the inspector and agents build/publish steps, so a bad selector won't surface until several minutes of extension builds have already run. Moving this step up to right after setup-go would fail fast on selector drift before the expensive build work. Non-blocking.
There was a problem hiding this comment.
Addressed in a1f99f3. The selector validation now runs immediately after actions/setup-go, before building azd, the inspector dependency, or the agents extension, so selector drift fails fast. Re-ran the guard locally: it still validates the current 4 Tier 0 / 5 Tier 1 split.
Move the selector guard directly after setup-go so regex drift fails before building azd, the inspector dependency, or the agents extension. Co-authored-by: Copilot <[email protected]> Copilot-Session: 6eccd2f8-19dc-4da9-abf7-12eb690cf50c
Summary
The
ext-azure-ai-agents-testworkflow selects Tier 0 and Tier 1 functional tests withgo test -run <regex>. Go exits successfully when a regex matches no tests, so renaming or adding aTest_AIAgent_test without updating the tier selectors could silently produce a false-green CI run.Fix
Validate tier test selectorsstep that usesgo test -listto discover tests and fails when:Test_AIAgent_tests are discovered;The current inventory is validated as 4 Tier 0 tests and 5 Tier 1 tests. The actual test steps reuse the validated regex variables.
Validation
Test_AIAgent_Doctor_Helpfrom the Tier 0 selector in a local negative-control run; the guard failed and identified the uncovered test.git diff --checkpasses.Fixes #8778