eval: fix flaky deploy tests - #3071
Merged
JasonYeMSFT (JasonYeMSFT) merged 3 commits intoAug 14, 2026
Merged
Conversation
JasonYeMSFT (JasonYeMSFT)
requested review from
a team and
Paul Yuknewicz (paulyuk)
as code owners
August 14, 2026 22:13
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce flakiness in Azure deploy eval/integration runs by increasing allowed conversation turns and adjusting how assistant output is reconstructed from emitted events.
Changes:
- Increased
max_turnsfrom 80 → 100 acrossazure-deploydeployment eval stimuli. - Removed
assistant.message_deltahandling from assistant-message reconstruction helpers. - Removed
assistant.message_deltahandling from markdown report generation in the agent runner.
Show a summary per file
| File | Description |
|---|---|
| tests/utils/evaluate.ts | Updates assistant message aggregation used by graders/conditions. |
| tests/utils/agent-runner.ts | Updates markdown reporting and keyword checks over assistant output. |
| evals/azure-skills/azure-deploy/deploy-eval.yaml | Bumps max-turn constraints for deploy eval stimuli to reduce timeouts. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Suppressed comments (1)
tests/utils/agent-runner.ts:1274
- This function claims to "merge all messages and message deltas", but it now only considers
assistant.message. If the session ends after matching an early-termination pattern (before the finalassistant.messageevent), keyword checks can miss the assistant output entirely. Re-introduce delta accumulation (while ignoring deltas after the final message arrives) so keyword checks are consistent with streaming behavior.
const allMessages: Record<string, string> = {};
agentMetadata.events.forEach(event => {
if (event.type === "assistant.message" && event.data.messageId && event.data.content) {
allMessages[event.data.messageId] = event.data.content;
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
msalaman
approved these changes
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addressses two issues revealed by the integration tests.
Copilot CLI emits 3 kinds of events for assistant responses meant for the user: assistant.message_start, assistant.message_delta, assistant.message. assistant.message_start indicates the beginning of one response. assistant.message_delta events contain partial pieces of the message associated with the same messageId. assistant.message event contains the full message concatenating all the pieces from the assistant.message_delta events indicating the response is completed. The early terminate code terminates the agent session when the received assistant.message_delta events show that a certain pattern is matched before receiving the actual assistant.message event. However, the code that reconstructs the agent output for vally grader only look at assistant.message events. This causes some graders to fail because it doesn't see the agent response that caused the runner to terminate the session.
Although Copilot SDK had defined the event type assistant.message_delta for quite a while, our test runs never actually saw those events in the past. They had been getting only assistant.message events with full responses. After the upgrade on Aug 13th, Copilot SDK starts emitting assistant.message_delta events and triggers the bug.
Checklist
cd tests && npm test)fix:,feat:,feature:,chore:,misc:,test:,eval:tests/,npm run test:integration -- <skill>ornpm run test:vally -- --skill <skill>)Related Issues