Skip to content

Add Copilot coding agent setup steps and inner loop guidance#3099

Merged
jstarks merged 3 commits intomicrosoft:mainfrom
jstarks:better_copilot
Mar 23, 2026
Merged

Add Copilot coding agent setup steps and inner loop guidance#3099
jstarks merged 3 commits intomicrosoft:mainfrom
jstarks:better_copilot

Conversation

@jstarks
Copy link
Copy Markdown
Member

@jstarks jstarks commented Mar 22, 2026

Add .github/workflows/copilot-setup-steps.yml to give the Copilot coding agent a working Rust toolchain, cargo-nextest, and restore-packages (protoc + build deps) so it can validate changes locally before pushing.

Add .github/workflows/copilot-setup-steps.yml to give the Copilot coding
agent a working Rust toolchain, cargo-nextest, and restore-packages
(protoc + build deps) so it can validate changes locally before pushing.
Copilot AI review requested due to automatic review settings March 22, 2026 23:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a dedicated GitHub Actions workflow and accompanying repo guidance so the GitHub Copilot coding agent can provision a Rust/OpenVMM build environment and run a recommended local validation loop before pushing changes.

Changes:

  • Introduces .github/workflows/copilot-setup-steps.yml to install Rust, cargo-nextest, and run cargo xflowey restore-packages.
  • Extends .github/copilot-instructions.md with an “Autonomous Agent Inner Loop” checklist (check/clippy/doc/test/fmt).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/copilot-setup-steps.yml New workflow to bootstrap a Rust toolchain + nextest + OpenVMM restore-packages for the coding agent.
.github/copilot-instructions.md Adds agent-specific inner-loop validation guidance intended to mirror early CI feedback locally.

Comment thread .github/workflows/copilot-setup-steps.yml
Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/workflows/copilot-setup-steps.yml Outdated
Comment thread .github/workflows/copilot-setup-steps.yml Outdated
jstarks added 2 commits March 23, 2026 02:29
Skip downloading released OpenHCL IGVM files (used for compatibility
testing) when --no-compat-igvm is passed. This avoids requiring gh CLI
authentication, which is useful for Copilot coding agent setup and
other contexts where gh auth is not available.

Update copilot-setup-steps.yml to use the new flag.
- checkout@v5 -> @v6 to match rest of repo
- Pin cargo-nextest to 0.9.101 (matches cfg_versions.rs) instead of 'latest'
- Rephrase inner loop description: covers common early CI failures,
  not 'the same errors as CI job0'
Copilot AI review requested due to automatic review settings March 23, 2026 03:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread flowey/flowey_hvlite/src/pipelines/restore_packages.rs
@jstarks jstarks marked this pull request as ready for review March 23, 2026 03:38
@jstarks jstarks requested review from a team as code owners March 23, 2026 03:38
@jstarks
Copy link
Copy Markdown
Member Author

jstarks commented Mar 23, 2026

Yeah, we could generate this thing with flowey, but let's not perfect be the enemy of good here. Fine for a followup if someone wants to do this the right way.

3. **Clippy:** `cargo clippy --all-targets -p <package>` — lint.
4. **Doc:** `cargo doc --no-deps -p <package>` — catch doc errors.
5. **Unit tests:** `cargo nextest run -p <package>` — run the crate's
tests. If nextest is not installed, use `cargo test -p <package>`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In a separate PR, folks said cargo test was simply broken for us. If that's true, this will lead astray.

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.

test works fine for all the tests the agent will be able to build (they won't be able to run vmm-tests). But this note in the instructions file is kind of dumb now that we install nextest...

@mattkur
Copy link
Copy Markdown
Contributor

mattkur commented Mar 23, 2026

Nice. I took a stab at this in #1662. Even tried to make it a flowey pipeline. I'm happy to take this simpler change.

Couple other things:

  1. Install additional rust targets, especially those required to build the openhcl scenario? e.g. arch-unknown-linux-musl
  2. Install build-essential, gcc, etc? https://github.com/microsoft/openvmm/pull/1662/changes#diff-42572e5f859a5aacc3aa94168042890f43b27211e50abaafb7659f2ef19531e2R35-R63

@github-actions
Copy link
Copy Markdown

@jstarks jstarks merged commit 9ab7d0d into microsoft:main Mar 23, 2026
139 of 141 checks passed
@jstarks jstarks deleted the better_copilot branch March 23, 2026 15:03
@jstarks
Copy link
Copy Markdown
Member Author

jstarks commented Mar 23, 2026

Nice. I took a stab at this in #1662. Even tried to make it a flowey pipeline. I'm happy to take this simpler change.

Couple other things:

  1. Install additional rust targets, especially those required to build the openhcl scenario? e.g. arch-unknown-linux-musl
  2. Install build-essential, gcc, etc? https://github.com/microsoft/openvmm/pull/1662/changes#diff-42572e5f859a5aacc3aa94168042890f43b27211e50abaafb7659f2ef19531e2R35-R63

Both of these are probably a good idea. But I wanted to get something in to experiment and see how copilot copes before expanding the size of the sandbox.

moor-coding pushed a commit to moor-coding/openvmm that referenced this pull request Mar 24, 2026
…ft#3099)

Add .github/workflows/copilot-setup-steps.yml to give the Copilot coding
agent a working Rust toolchain, cargo-nextest, and restore-packages
(protoc + build deps) so it can validate changes locally before pushing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants