Closed
Fix flaky skill watch test: add non-recursive watchers on skill subdirectories#327448
Conversation
…subdirs In scan mode, skill files are two levels deep (skillsDir/skill-name/SKILL.md). Only a recursive @parcel/watcher on skillsDir was used, which can fail to deliver content-only change events on macOS CI VMs. Add an explicit non-recursive watcher on each discovered skill subdirectory (trigger = SKILL.md file URI) to ensure content changes are reliably detected. This mirrors how agents and discover-mode skill files are watched. Update the existing watcher installation test and add a new test for SKILL.md content change detection. Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix flaky AHP integration test
Fix flaky skill watch test: add non-recursive watchers on skill subdirectories
Jul 25, 2026
Collaborator
|
Closing in favour of Rob's PR from earlier today. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In
scanmode, thewatch skill file changesintegration test flakily times out because content-only modifications toSKILL.md(two levels deep:skillsDir/skill-name/SKILL.md) are sometimes not detected on macOS CI VMs.Root cause
Skills were watched exclusively via a recursive
@parcel/watcheronskillsDir. On macOS VMs, this recursive watcher can fail to fire for content-only changes deep in the tree. Agents don't have this problem because they use a non-recursivefs.watch/kqueue watcher on a directory whose direct children are the watched files.Fix
In
_scanRootforDiscoveredType.Skill, add an explicit non-recursive watcher on each discovered skill subdirectory (trigger = theSKILL.mdfile URI):When
SKILL.mdis modified,e.affects(skillFile)returnstrueimmediately — a more specific, reliable trigger that doesn't depend on@parcel/watcher's recursive event delivery. This mirrors howdiscovermode watches individual skill file paths.Tests
installs watchers for roots that contain discovered customizationsto assert skill subdirectories (e.g..github/skills/bar) are now watched non-recursively in addition to the recursiveskillsDirwatcher.fires onDidChange when an existing SKILL.md file is modifiedto directly validate content-change detection via the new non-recursive watcher.