Skip to content

Enhance dependency update skills with Windows test and refspec notes#1048

Merged
dgee2 merged 5 commits intomainfrom
agents/dependency-update-all-616b4255
May 1, 2026
Merged

Enhance dependency update skills with Windows test and refspec notes#1048
dgee2 merged 5 commits intomainfrom
agents/dependency-update-all-616b4255

Conversation

@dgee2
Copy link
Copy Markdown
Owner

@dgee2 dgee2 commented May 1, 2026

This pull request introduces comprehensive improvements to the dependency update automation documentation and workflow, focusing on consistent label management, robust worktree handling (especially on Windows), and ecosystem-specific enhancements. The changes ensure that all dependency update pull requests are consistently labeled, that stale PRs are closed, and that platform-specific issues are addressed for a smoother CI/CD experience.

Label Management and Pull Request Handling

  • Standardized label management across all dependency update skills: every PR must have both dependency-update and the appropriate ecosystem label (dotnet, node, or github-actions). The workflow now includes label creation, PR discovery by label, and closure of stale PRs not updated in the current run. Label management details are added to the main prompt, each ecosystem skill, and the PR description skill. [1] [2] [3] [4] [5]

Worktree and Platform-Specific Improvements

  • Improved instructions for pushing from detached HEAD worktrees, especially for branch names containing /, requiring the full refspec. Added robust cleanup steps for large worktrees (especially with node_modules), including PowerShell equivalents for Windows. [1] [2] [3] [4] [5]

Ecosystem-Specific Enhancements

  • Node ecosystem: Added a coupling rule for msw and msw-storybook-addon to ensure both are updated together to avoid breaking tests. Added instructions for handling open-api/menu-api.json prerequisites and clarified lockfile workflows. [1] [2] [3]
  • .NET and GitHub Actions ecosystems: Added detailed label management and clarified validation/test running steps, including Windows-specific test execution guidance. [1] [2] [3] [4] [5] [6]

Cross-Platform Testing Guidance

  • Added PowerShell equivalents for common Bash commands and detailed patterns for running Playwright/Chromium tests on Windows agents, including job control and output filtering. [1] [2] [3] [4]

Documentation Consistency

  • Updated and clarified documentation in .github/prompts/dependency-update-all.prompt.md, all ecosystem skill files, and AGENTS.md to ensure that all contributors and automation agents follow the same conventions and workflows. [1] [2] [3] [4] [5]

These changes significantly improve the reliability, maintainability, and clarity of the dependency update automation process.

dgee2 and others added 3 commits May 1, 2026 11:49
…atform notes

- SKILL.md (dependency-update-node):
  - Add msw/msw-storybook-addon coupling rule: when both have pending updates,
    move msw into the storybook PR to prevent runtime test failures
  - Add Parallel execution section: push refspec requirement for slash branches
    (HEAD:refs/heads/<name>) and worktree cleanup for node_modules
  - Add Validation prerequisite: open-api/menu-api.json must exist before
    generate-openapi; copy from dotnet build worktree if missing
  - Clarify lockfile workflow: pnpm install first, then --frozen-lockfile to verify
  - Add Windows test execution pattern: Start-Job with 45s timeout captures
    Playwright/Chromium output without blocking the shell indefinitely

- dependency-update-all.prompt.md:
  - Add full refspec push requirement for slash-containing branch names
  - Add worktree cleanup note for node_modules directory size issue

- AGENTS.md:
  - Add Windows/PowerShell Notes section with Bash-to-PowerShell substitution table
  - Add push refspec note for slash branches

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nd GHA skills

- Both skills now document that branch names containing '/' require the
  full refspec (HEAD:refs/heads/<name>) when pushing from a detached HEAD
  worktree, mirroring the pattern already in dependency-update-node
- Both skills now document the Remove-Item workaround for git worktree
  remove failures caused by large directories (e.g. node_modules)
- Both skills now reference the AGENTS.md Windows/PowerShell Notes section
  for the Start-Job pattern needed when pnpm run test blocks the shell

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Create four labels: dependency-update, dotnet, node, github-actions
- Add Label management section to each ecosystem skill (dotnet, node,
  github-actions) describing:
  - which labels to apply when creating or updating PRs
  - how to create missing labels before applying them
  - how to query existing open PRs with those labels before the run
  - how to close stale PRs (open PRs from prior runs that were not
    created or updated in this run)
- Add Required labels section to dependency-update-pr-description skill
  documenting the two-label contract
- Add Label management summary table to dependency-update-all prompt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 1, 2026 11:06
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

This PR updates the repository’s dependency-update automation documentation (skills + main prompt + AGENTS) to standardize PR label management, improve worktree handling guidance (including Windows/PowerShell), and add ecosystem-specific notes for smoother validation.

Changes:

  • Standardizes dependency update PR label creation/application, reuse of existing labeled PRs, and closing of stale labeled PRs across dotnet/node/github-actions skills.
  • Adds Windows/PowerShell guidance (command equivalents + detached worktree push refspec) and additional worktree cleanup notes.
  • Enhances Node dependency update guidance (msw/msw-storybook-addon coupling, OpenAPI prerequisite notes, lockfile workflow, Windows test-running guidance).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
AGENTS.md Adds Windows/PowerShell notes and detached-worktree push guidance.
.github/skills/dependency-update-pr-description/SKILL.md Documents required labels for dependency-update PR descriptions.
.github/skills/dependency-update-node/SKILL.md Adds label workflow + msw coupling + worktree notes + OpenAPI/lockfile/test guidance (incl. Windows).
.github/skills/dependency-update-github-actions/SKILL.md Adds label workflow + worktree push/cleanup notes + Windows test guidance reference.
.github/skills/dependency-update-dotnet/SKILL.md Adds label workflow + worktree push/cleanup notes + Windows test guidance reference.
.github/prompts/dependency-update-all.prompt.md Adds global operating rules for cleanup/push refspec + label management summary.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AGENTS.md Outdated
Comment thread .github/skills/dependency-update-dotnet/SKILL.md
Comment thread .github/skills/dependency-update-github-actions/SKILL.md
Comment thread .github/skills/dependency-update-node/SKILL.md Outdated
Comment thread .github/skills/dependency-update-node/SKILL.md Outdated
@dgee2
Copy link
Copy Markdown
Owner Author

dgee2 commented May 1, 2026

@copilot apply changes based on the comments in this thread

- Fix `tail -N` → `tail -n N` in AGENTS.md Windows/PowerShell table
- Add canonical Start-Job pattern with Wait-Job timeout and exit status
  propagation to AGENTS.md Windows/PowerShell Notes section
- Remove cross-worktree copy guidance for open-api/menu-api.json in
  node SKILL.md to avoid stale spec risk
- Fix PowerShell test snippet in node SKILL.md to use Wait-Job with
  explicit timeout (300s), treat timeout as failure, and propagate
  job state instead of grepping partial output

Agent-Logs-Url: https://github.com/dgee2/Menu/sessions/226baf62-93f4-425f-9fa6-9ab2f85edca5

Co-authored-by: dgee2 <5671841+dgee2@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 1, 2026

@copilot apply changes based on the comments in this thread

Applied all five review comments in commit 9237b92:

  1. tail -Ntail -n N in AGENTS.md — corrected the Bash example in the Windows/PowerShell table.
  2. Canonical Start-Job pattern added to AGENTS.md — added a complete snippet using Wait-Job -Timeout, capturing exit state, treating timeout as failure, and propagating job state. The dotnet and github-actions SKILL.md references to this pattern are now accurate.
  3. Cross-worktree copy guidance removed from node SKILL.md — replaced with a note that the dotnet build step in the validation sequence already generates open-api/menu-api.json, and copying from another worktree risks using a stale spec.
  4. PowerShell test snippet fixed in node SKILL.md — replaced the fixed Start-Sleep 45 + unconditional Stop-Job with Wait-Job -Timeout 300, explicit timeout-as-failure handling, and job state propagation instead of grepping partial logs.

Copilot finished work on behalf of dgee2 May 1, 2026 11:17
@dgee2 dgee2 enabled auto-merge (squash) May 1, 2026 11:17
Copilot AI review requested due to automatic review settings May 1, 2026 11:17
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 1, 2026

@dgee2 dgee2 merged commit 39790ee into main May 1, 2026
15 checks passed
@dgee2 dgee2 deleted the agents/dependency-update-all-616b4255 branch May 1, 2026 11:20
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

Updates the repository’s dependency-update automation documentation to improve cross-platform execution (especially Windows worktrees) and to standardize PR label management across .NET, Node, and GitHub Actions dependency update runs.

Changes:

  • Added Windows/PowerShell guidance for common Bash idioms, worktree pushing, and long-running test execution patterns.
  • Standardized dependency-update PR label requirements and documented a workflow for finding/reusing/closing labeled PRs per ecosystem.
  • Refined Node-specific guidance (grouping rules, OpenAPI generation prerequisites, and lockfile workflow notes).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
AGENTS.md Adds Windows/PowerShell notes intended to make dependency-update skills work reliably on Windows agents.
.github/skills/dependency-update-pr-description/SKILL.md Documents required labels for dependency-update PR descriptions.
.github/skills/dependency-update-node/SKILL.md Adds Node label-management workflow and Windows/testing + lockfile/OpenAPI guidance.
.github/skills/dependency-update-github-actions/SKILL.md Adds GitHub Actions label-management workflow and Windows worktree/test notes.
.github/skills/dependency-update-dotnet/SKILL.md Adds .NET label-management workflow and Windows worktree/test notes.
.github/prompts/dependency-update-all.prompt.md Aligns the “all ecosystems” mission prompt with label management and Windows/worktree operational rules.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AGENTS.md
Comment on lines +79 to +90
**Running a command with timeout using `Start-Job`:** When a command may block the shell (e.g. Playwright/Chromium tests), use this pattern to run it with an explicit timeout and propagate the exit status:

```powershell
$job = Start-Job { Set-Location <working-directory>; <command> }
$completed = Wait-Job $job -Timeout <timeout-seconds>
$output = Receive-Job $job
$state = $job.State
Remove-Job $job -Force
$output
if ($null -eq $completed) { throw "Command timed out after <timeout-seconds> seconds" }
if ($state -ne 'Completed') { throw "Command failed (job state: $state)" }
```
Comment on lines 155 to 161
cd ../ui/menu-website
corepack enable pnpm
pnpm install --frozen-lockfile
pnpm install
pnpm run generate-openapi
pnpm run lint
pnpm run build
pnpm run test
Comment on lines +169 to +176
$job = Start-Job { Set-Location <worktree>/ui/menu-website; pnpm run test }
$completed = Wait-Job $job -Timeout 300
$output = Receive-Job $job
$state = $job.State
Remove-Job $job -Force
$output
if ($null -eq $completed) { throw "Test run timed out after 300 seconds" }
if ($state -ne 'Completed') { throw "Tests failed (job state: $state)" }
Comment thread AGENTS.md

| Bash | PowerShell equivalent |
|---|---|
| `tail -n N` | `Select-Object -Last N` |
Comment thread AGENTS.md
|---|---|
| `tail -n N` | `Select-Object -Last N` |
| `grep 'pattern'` | `Select-String 'pattern'` |
| `cmd1 && cmd2` | `cmd1; if ($LASTEXITCODE -eq 0) { cmd2 }` |
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.

3 participants