Skip to content

Commit ba600e2

Browse files
Copilotnagilson
andcommitted
Clarify agent pushes commits and simplify test filter
Co-authored-by: nagilson <23152278+nagilson@users.noreply.github.com>
1 parent 58f4ed2 commit ba600e2

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

.github/agents/fixcompletions.instructions.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You are an expert at managing snapshot-based tests in .NET projects. When invoke
2121

2222
### Step 1: Build the Repository
2323

24-
First, ensure the repository is built with the latest changes:
24+
First, ensure the repository is built with the latest changes. This build will create the repo-local dotnet installation at `./.dotnet/dotnet`:
2525

2626
```bash
2727
./build.sh
@@ -31,14 +31,13 @@ This may take 5-10 minutes. Use `async=false` with a timeout of at least 600 sec
3131

3232
### Step 2: Run the Completion Tests
3333

34-
Run the specific completion snapshot tests to generate the new `.received.` files:
34+
Run the completion snapshot tests to generate the new `.received.` files. After the build completes, use the repo-local dotnet that was built:
3535

3636
```bash
37-
# Use the repo-local dotnet
38-
./.dotnet/dotnet test test/dotnet.Tests/dotnet.Tests.csproj --filter "FullyQualifiedName~VerifyCompletions"
37+
./.dotnet/dotnet test test/dotnet.Tests/dotnet.Tests.csproj --filter "Name~VerifyCompletions"
3938
```
4039

41-
This will run the `VerifyCompletions` test which generates completion snapshots for all supported shells. Allow at least 300 seconds (5 minutes) for this command.
40+
This will run all the `VerifyCompletions` tests which generate completion snapshots for all supported shells (bash, zsh, pwsh, fish, nushell). Allow at least 300 seconds (5 minutes) for this command.
4241

4342
**Important**: The tests will likely FAIL if there are differences between current and expected snapshots. This is expected and correct behavior - don't be alarmed by test failures.
4443

@@ -93,11 +92,13 @@ This will move/rename all `.received.*` files to `.verified.*` in the `test/dotn
9392

9493
### Step 6: Commit the Changes
9594

96-
Use the `report_progress` tool to commit and push the snapshot updates:
95+
Use the `report_progress` tool to commit and push the snapshot updates directly to the PR branch:
9796

9897
- Commit message: "Update CLI completions snapshots"
9998
- PR description: Update the checklist to show completion snapshots have been updated
10099

100+
The `report_progress` tool will automatically stage all changes, create a commit, and push to the origin branch that this PR is based on.
101+
101102
### Step 7: Verify Final State
102103

103104
After committing, verify that:
@@ -134,12 +135,12 @@ If no `.received.` files are generated:
134135

135136
When a user comments `/fixcompletions`:
136137

137-
1. Build: `./build.sh` (with 600s timeout)
138-
2. Test: `./.dotnet/dotnet test test/dotnet.Tests/dotnet.Tests.csproj --filter "FullyQualifiedName~VerifyCompletions"`
138+
1. Build: `./build.sh` (with 600s timeout) - creates `./.dotnet/dotnet`
139+
2. Test: `./.dotnet/dotnet test test/dotnet.Tests/dotnet.Tests.csproj --filter "Name~VerifyCompletions"` (with 300s timeout)
139140
3. Compare: `dotnet restore test/dotnet.Tests/ /t:CompareCliSnapshots`
140-
4. Review: `git diff test/dotnet.Tests/CompletionTests/snapshots/` - verify changes are correct
141+
4. Review: `git diff test/dotnet.Tests/CompletionTests/snapshots/` - check for unexpected issues
141142
5. Update: `dotnet restore test/dotnet.Tests/ /t:UpdateCliSnapshots`
142-
6. Commit: Use `report_progress` with message "Update CLI completions snapshots"
143+
6. Commit: Use `report_progress` with message "Update CLI completions snapshots" - this commits and pushes to the PR branch
143144
7. Inform: Let the user know the snapshots have been updated successfully
144145

145146
## References

0 commit comments

Comments
 (0)