Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Copy link
Copy Markdown
Member Author

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.

- Run relevant tests locally: `.dotnet\dotnet.exe test <project> --no-build -c Release --filter <testname>`.
Comment thread
nohwnd marked this conversation as resolved.

### Create PR

- Push the branch to `origin` (the fork).

Copy link
Copy Markdown
Member Author

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

- Create the PR against `microsoft/vstest` (the upstream repo) — **never PR to the fork**.

### Monitor PRs

- CI builds take approximately one hour.

Copy link
Copy Markdown
Member Author

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.

@nohwnd nohwnd Mar 20, 2026

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Member Author

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

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

Copilot AI Mar 20, 2026

Copy link

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.

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

Copy link
Copy Markdown
Member Author

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