-
Notifications
You must be signed in to change notification settings - Fork 354
Add unattended work instructions to copilot-instructions.md #15531
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -28,3 +28,31 @@ Anytime you add a new localization resource, you MUST: | |||||
| - Add a corresponding entry in the localization resource file. | ||||||
| - Add an entry in all `*.xlf` files related to the modified `.resx` file. | ||||||
| - Do not modify existing entries in '*.xlf' files unless you are also modifying the corresponding `.resx` file. | ||||||
|
|
||||||
| ## Unattended Work Instructions | ||||||
|
|
||||||
| When working autonomously on issues (e.g. from a milestone), follow this workflow: | ||||||
|
|
||||||
| ### Before Starting | ||||||
|
|
||||||
| - **Assign the issue** to the user you are working on behalf of before starting work. | ||||||
| - **Skip issues with active PRs** — if an issue already has a PR with recent activity, don't duplicate the work. | ||||||
|
|
||||||
| ### Implement | ||||||
|
|
||||||
| - Create a feature branch from `main` (never commit to `main` directly). | ||||||
| - Implement the change and write tests where applicable. | ||||||
| - Build locally with `-c Release` before pushing — CI uses Release mode with `TreatWarningsAsErrors`, so warnings like IDE0005 (unnecessary using) become build errors. | ||||||
| - Run relevant tests locally: `.dotnet\dotnet.exe test <project> --no-build -c Release --filter <testname>`. | ||||||
|
nohwnd marked this conversation as resolved.
|
||||||
|
|
||||||
| ### Create PR | ||||||
|
|
||||||
| - Push the branch to `origin` (the fork). | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. origin might not be the fork, check git remote -v, github.com/microsoft/vstest repo is the official repo. The fork has the user name in the url |
||||||
| - Create the PR against `microsoft/vstest` (the upstream repo) — **never PR to the fork**. | ||||||
|
|
||||||
| ### Monitor PRs | ||||||
|
|
||||||
| - CI builds take approximately one hour. | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can check more frequently, 35minutes is time to full build on good day when macos and ubuntu is not busy, but by that time windows build and tests are already green or red.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when build fails take hints from pr review, but you are dealing with automated review, so make sure you reason about it.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't make PRs draft, it will force re-build when undrafted. |
||||||
| - Check **both** CI status (pass/fail) **and** mergeable state — PR checks can show green even when there are merge conflicts. Always verify with `gh pr view <number> --json mergeable`. | ||||||
| - If a build fails, investigate the failure, push a fix to the same branch, and wait for the rebuild. | ||||||
| - If a PR becomes CONFLICTING, rebase the branch onto `main` and force-push. | ||||||
|
||||||
| - If a PR becomes CONFLICTING, rebase the branch onto `main` and force-push. | |
| - If a PR becomes CONFLICTING, rebase the branch onto `main` and then force-push using `--force-with-lease` (for example, `git push --force-with-lease`). |
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.
yes force with lease is very important
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 don't need to build as release locally, review whole document to avoid building as release locally, it only slows you down, building and testing as release locally is a last ditch effort, that you can write down in troubleshooting, but is not necessary daily practice for you, and makes it harder for human operator to keep up. with you.