Add unattended work instructions to copilot-instructions.md#15531
Conversation
Document the workflow for autonomous issue work: assign issues, validate locally in Release mode, PR to upstream, monitor builds and mergeable state. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Documents a standard workflow for autonomous/unattended issue work to ensure consistent triage, local validation, PR targeting, and post-creation monitoring.
Changes:
- Adds a new “Unattended Work Instructions” section with steps for issue assignment and triage.
- Documents local Release builds/tests prior to pushing to avoid CI failures from warnings-as-errors.
- Adds guidance for PR creation against upstream and for monitoring CI + mergeability.
| - CI builds take approximately one hour. | ||
| - 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. |
There was a problem hiding this comment.
Recommending a plain force-push can accidentally overwrite remote commits. Prefer explicitly recommending --force-with-lease in the instructions (or calling it out in text) to reduce the risk of clobbering updates while still enabling the rebase workflow.
| - 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.
yes force with lease is very important
|
|
||
| - 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. |
There was a problem hiding this comment.
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.
|
|
||
| ### Monitor PRs | ||
|
|
||
| - CI builds take approximately one hour. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
when build fails take hints from pr review, but you are dealing with automated review, so make sure you reason about it.
There was a problem hiding this comment.
don't make PRs draft, it will force re-build when undrafted.
mark prs as ready to merge when green
|
|
||
| ### Create PR | ||
|
|
||
| - Push the branch to `origin` (the fork). |
There was a problem hiding this comment.
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
Document the workflow for autonomous issue work in copilot-instructions.md: