microsoft / microsoft/agent-framework
.NET: [Flaky test] DevUIIntegrationTests.TestServerWithDevUI_ResolvesMixedAgentsAndWorkflows_AllRegistrationsAsync
@giles17 is already working on this.
Since May 20, 2026.
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 2.3k
- Avg merge
- 2d 45m
- Merged PRs (30d)
- 358
Description
Summary
Microsoft.Agents.AI.DevUI.UnitTests.DevUIIntegrationTests.TestServerWithDevUI_ResolvesMixedAgentsAndWorkflows_AllRegistrationsAsync is failing intermittently in the merge_group across PRs that do not touch DevUI, blocking the queue.
Failure signature
System.NullReferenceException : Object reference not set to an instance of an object.
at Microsoft.Agents.AI.DevUI.UnitTests.DevUIIntegrationTests.TestServerWithDevUI_ResolvesMixedAgentsAndWorkflows_AllRegistrationsAsync()
in dotnet/tests/Microsoft.Agents.AI.DevUI.UnitTests/DevUIIntegrationTests.cs:273
Line 273 dereferences discoveryResponse.Entities.Count after an HTTP GET on /v1/entities, so either discoveryResponse or discoveryResponse.Entities is null on the failed runs.
Affected merge_group runs (last 30, 5 occurrences)
| Run | PR | Touches DevUI? |
|---|---|---|
| https://github.com/microsoft/agent-framework/actions/runs/25853165883 | #5702 (Hosted-MemoryAgent sample) | no |
| https://github.com/microsoft/agent-framework/actions/runs/25830222281 | #5831 (DevUI CA1873 logger fix) | logger only |
| https://github.com/microsoft/agent-framework/actions/runs/25818514390 | #5755 (eval ground_truth) | no |
| https://github.com/microsoft/agent-framework/actions/runs/25749422776 | #5748 (OpenAIResponsesAgentClient) | no |
| https://github.com/microsoft/agent-framework/actions/runs/25743614853 | #5702 (Hosted-MemoryAgent sample) | no |
4 of 5 occurrences are on PRs that do not modify DevUI source. The one DevUI-touching PR (#5831) only changes logging via source generator, which is unlikely to cause an NRE on the discovery response.
Suspected cause
Race between app.StartAsync() and the test's GetTestClient().GetAsync(""/v1/entities"") discovery enumeration, possibly exposed after the polymorphic registration changes from #3792 layered with the DevUI access controls from #5739. The test registers six entities (3 agents + 3 workflows) using a mix of keyed and default registrations and asserts Entities.Count == 6.
Mitigation
A follow-up PR will quarantine this test with [Fact(Skip = ""..."")] and link this issue. Owner of the DevUI integration surface should investigate the race and re-enable.
Next steps
- Reproduce locally with repeated runs under Release on Linux.
- Verify discovery completes deterministically before the first GET, or guard the test with a poll/wait.
- Re-enable the test once the underlying race is fixed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.