-
Notifications
You must be signed in to change notification settings - Fork 1.9k
BuildAndVerify.ps1 and Agent Improvements (Issue-Resolver, PR-Reviewer & Test-Repro) #33151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: PureWeen <[email protected]>
…izingStrategy Co-authored-by: PureWeen <[email protected]>
Co-authored-by: PureWeen <[email protected]>
|
I want to ensure you're able to run the hostapp ps1 script on github copilot successfully I want to make sure you can run the ps1 script and get validate output about if something doesn't compile Linux can build android targets so it should be fine for running and building with the android tfms Can you run the ps1 script and then report back the errors you get when running it |
…nimalGroup Co-authored-by: PureWeen <[email protected]>
I successfully ran the BuildAndRunHostApp.ps1 script validation on Linux with Android TFM. Here are the results: Compilation Error Found and Fixed ✅Error: Root Cause: Fix (commit f41aa92):
Build Validation Results✅ Android (net10.0-android): Build succeeded with 0 warnings, 0 errors Script Accessibility✅ The PowerShell script is accessible and executable The HostApp now compiles successfully for Android targets on Linux. |
|
@copilot did you need to update the ps1 script at all? Or is the ps1 script ready to use in your environment ad a way to validate the build? |
No, I didn't need to update the ps1 script at all. The What worked out of the box:
The script is ready to use as a build validation tool without any modifications. |
…SizingStrategy on iOS Co-authored-by: PureWeen <[email protected]>
|
@copilot update description and title to indicate this pr is about fixing instructions and ps1 scripts ro verify build Create a ps1 script similar to existing ps1 scripts that agents use called BuildAndVerify.ps1 The purpose of this is just to verify everything builds before you finish It needs to detect if it's on linux in which case it only builds and Verifies android |
Co-authored-by: PureWeen <[email protected]>
Done! ✅ (commit 8a13e6a) PR Title and Description Updated:
BuildAndVerify.ps1 Created:
Usage: ./BuildAndVerify.ps1 # Build all key projects
./BuildAndVerify.ps1 -Projects "HostApp" # Build specific project |
Done! ✅ (commit 6a2664a) Added PR Standards section with:
The template is now available as a reference when creating PRs at any checkpoint or when requested locally. The standards emphasize that titles and descriptions should be useful in git history for future agents and developers. |
.github/agents/issue-resolver.md
Outdated
| **File**: `src/Controls/tests/TestCases.HostApp/Issues/IssueXXXXX.xaml` | ||
| **🎯 Prefer unit tests when possible** (faster to run and iterate): | ||
| - Location: `src/Controls/tests/Core.UnitTests/`, `src/Controls/tests/Xaml.UnitTests/`, etc. | ||
| - Use when: Testing logic, property changes, handlers, XAML parsing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong
Handlers always require uitests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 83e7630 - corrected line 132 to clarify handlers always require UI tests, not unit tests.
.github/agents/issue-resolver.md
Outdated
| **🎯 Prefer unit tests when possible** (faster to run and iterate): | ||
| - Location: `src/Controls/tests/Core.UnitTests/`, `src/Controls/tests/Xaml.UnitTests/`, etc. | ||
| - Use when: Testing logic, property changes, handlers, XAML parsing | ||
| - Run with: `dotnet test [test-project].csproj --filter "FullyQualifiedName~TestMethod"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use the build and verify ps1 script to always run unit tests
It will run all the tests for that project but that's fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 83e7630 - changed line 133 to use pwsh .github/scripts/BuildAndVerify.ps1 -RunUnitTests instead of direct dotnet test command.
.github/agents/issue-resolver.md
Outdated
| ### Create UI Test | ||
| **Run unit test**: | ||
| ```bash | ||
| dotnet test src/Controls/tests/Core.UnitTests/Core.UnitTests.csproj --filter "FullyQualifiedName~IssueXXXXX" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should always use the ps1 script to run tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 83e7630 - changed line 168 to use pwsh .github/scripts/BuildAndVerify.ps1 -RunUnitTests for consistent test execution.
….ps1 for running tests Co-authored-by: PureWeen <[email protected]>
| - Search for **OPEN PRs** linked to this issue created by @copilot | ||
| - **DO NOT** read closed PRs (irrelevant to current state) | ||
| - The PR title should contain the issue number (e.g., "[Issue-Resolver] Fix issue #12345") | ||
| - If PR exists: Read PR description to determine current checkpoint/stage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it also read the comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read the comments on the pr as well
|
@copilot can you update the pr-reviewer agent now based on the updates to the issue-resolver? For example the pr-reviewer only talks about uitests but it should validate tests using all the rules in the issue-resolver. We also dont really need a checkpoint for the pr-reviewer It should just try to validate on its own and then report if it wasn't able to because of platform limitations Like running on linux |
| **Next Step**: Creating reproduction test page, will show results before investigating. | ||
| **Next Step**: [Based on current checkpoint - e.g., "Creating reproduction test" or "Reviewing existing reproduction" or "Implementing approved fix"] | ||
|
|
||
| Any concerns about this approach? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should rephrase this question. When I answer “no,” I usually mean that I have no concerns and that we can proceed, but it’s often interpreted as disagreement with the approach.
…ps1, support both unit and UI tests Co-authored-by: PureWeen <[email protected]>
Updated pr-reviewer agent in commit 2e367f8: Key changes:
Workflow streamlined from 7 steps to 6 steps (removed pause/wait step):
|
| | Test logs | `CustomAgentLogsTmp/UITests/` | | ||
| | Run unit tests | `pwsh .github/scripts/BuildAndVerify.ps1 -RunUnitTests` | | ||
| | Build verification | `pwsh .github/scripts/BuildAndVerify.ps1` | | ||
| | Run UI tests (handlers) | `pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform [platform] -TestFilter "..."` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it went with handlers too much here
|
@copilot cam you create a new testing agent that is just the initial part of the issue resolver agent The only purpose of this agent is to create the tests that reproduces the issue Please figure out what minimal tools it needs And make sure to emphasize that it shouldn't be used to fix the issue at all, just create tests |
…on tests only Co-authored-by: PureWeen <[email protected]>
Created test-repro-agent in commit b4e827c. Key design decisions:
The agent emphasizes throughout that it does NOT implement fixes - its only job is to create a test that proves the bug exists. |
BuildAndVerify.ps1 and Agent Improvements (Issue-Resolver, PR-Reviewer & Test-Repro)
Description of Change
This PR adds
BuildAndVerify.ps1, a PowerShell script that enables automated build verification before finalizing changes, and improves multiple agents by consolidating duplicated content and enhancing their workflows. Also introduces a new specialized test-repro-agent for creating issue reproduction tests.BuildAndVerify.ps1 Script
Purpose:
Default Behavior:
TestCases.HostAppon all available TFMs (target frameworks)Optional Features:
-RunUnitTestsflag runs all unit tests after building-Configurationparameter supports Debug/Release buildsParameters
-RunUnitTests(switch) - Run all unit tests after building (default: false)-Configuration(string) - Build configuration: "Debug" or "Release" (default: Debug)Usage Examples
New: Test-Repro-Agent
Purpose: Specialized agent for creating issue reproduction tests ONLY (does NOT implement fixes)
Key Features:
When to use:
Workflow:
Issue-Resolver Agent Improvements
Consolidation and Enhancements:
.github/instructions/uitests.instructions.mdPR-Reviewer Agent Improvements
Consolidation and Enhancements:
Key Workflow Changes
Test-Repro-Agent (NEW):
Issue-Resolver:
PR-Reviewer:
Validation & Testing
All permutations tested successfully on Linux:
Error detection verified:
Documentation Updates
.github/README-AI.md:.github/copilot-instructions.md:.github/agents/issue-resolver.md:.github/agents/pr-reviewer.md:.github/agents/test-repro-agent.md: (NEW)Files Changed
.github/scripts/BuildAndVerify.ps1- New build verification script (250+ lines).github/README-AI.md- Added script documentation.github/copilot-instructions.md- Added Build Verification section.github/agents/issue-resolver.md- Consolidated workflow (~369 lines changed, 218 removed).github/agents/pr-reviewer.md- Autonomous validation workflow (~185 lines changed).github/agents/test-repro-agent.md- NEW: Specialized reproduction test creation agent (327 lines)Issues Fixed
N/A - This PR provides build verification tooling and improves agent instructions for GitHub Copilot agents.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.