Add unattended work instructions to copilot-instructions.md by nohwnd · Pull Request #15531 · microsoft/vstest (original) (raw)

@nohwnd

Document the workflow for autonomous issue work in copilot-instructions.md:

@nohwnd

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

Copilot AI review requested due to automatic review settings

March 20, 2026 08:50

Evangelink

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

- 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 --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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`).

Copilot uses AI. Check for mistakes.

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

nohwnd

- 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.

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.

nohwnd

### Monitor PRs
- CI builds take approximately one hour.

Choose a reason for hiding this comment

The 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.

Choose a reason for hiding this comment

The 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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't make PRs draft, it will force re-build when undrafted.
mark prs as ready to merge when green

nohwnd

### Create PR
- Push the branch to `origin` (the fork).

Choose a reason for hiding this comment

The 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

This was referenced

May 26, 2026

This was referenced

Jun 16, 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

[ Show hidden characters]({{ revealButtonHref }})