Skip to content

Fix skills-publish-dry-run acceptance test error message mismatch#13187

Merged
williammartin merged 1 commit intosm/add-skills-commandfrom
sammorrowdrums/fix-skills-acceptance-test
Apr 16, 2026
Merged

Fix skills-publish-dry-run acceptance test error message mismatch#13187
williammartin merged 1 commit intosm/add-skills-commandfrom
sammorrowdrums/fix-skills-acceptance-test

Conversation

@SamMorrowDrums
Copy link
Copy Markdown
Contributor

Fixes the broken acceptance test flagged in https://github.com/cli/cli/pull/13165/changes#r3093956593

The skills-publish-dry-run txtar test expected no skills/ directory found on stderr, but the actual error from discovery.DiscoverSkills is no skills found in <dir>. Updated the stderr matcher to match the current error message.

Change: stderr 'no skills/ directory found'stderr 'no skills found in'

The skills-publish-dry-run acceptance test expected 'no skills/ directory
found' on stderr, but the actual error message from discovery is
'no skills found in <dir>'. Update the stderr matcher accordingly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@SamMorrowDrums SamMorrowDrums requested a review from a team as a code owner April 16, 2026 14:37
@SamMorrowDrums SamMorrowDrums changed the base branch from trunk to sm/add-skills-command April 16, 2026 14:41
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 adds a new gh skill command group (search/preview/update) and supporting internal skills infrastructure (discovery, metadata parsing, lockfile + file locking), along with acceptance tests for the new skills flows. It also updates the skills-publish-dry-run acceptance test to match the current stderr wording (no skills found in …).

Changes:

  • Introduce gh skill root command wiring plus search, preview, and update subcommands.
  • Add internal skills plumbing: discovery helpers, frontmatter metadata injection, install lockfile + cross-platform file locking, and registry of agent hosts.
  • Add/expand unit and acceptance tests for skills commands, plus adjust skills-publish-dry-run stderr matching.
Show a summary per file
File Description
pkg/cmd/skills/update/update.go New gh skill update implementation (scan installed skills, resolve refs, reinstall updates).
pkg/cmd/skills/skills.go New top-level gh skill command group wiring.
pkg/cmd/skills/search/search.go New gh skill search implementation (GitHub Code Search, ranking, enrichment, interactive install).
pkg/cmd/skills/search/search_test.go Unit tests for search behavior, ranking, JSON output, and error handling.
pkg/cmd/skills/preview/preview.go New gh skill preview implementation (resolve version, discover skills, render file tree + pager).
pkg/cmd/skills/preview/preview_test.go Unit tests for preview behavior (interactive/non-interactive, file browsing, limits).
pkg/cmd/root/root.go Registers the new gh skill command under the root CLI.
internal/skills/source/source.go Helpers for supported host validation + parsing/storing repo metadata URLs.
internal/skills/source/source_test.go Unit tests for repo URL parsing + host validation.
internal/skills/registry/registry.go Registry of agent hosts and install directory resolution logic.
internal/skills/registry/registry_test.go Unit tests for agent lookup, install dir resolution, labels, and parsing remotes.
internal/skills/lockfile/lockfile.go New .skill-lock.json writer with process-wide file locking.
internal/skills/lockfile/lockfile_test.go Unit tests for lockfile creation/update and lock acquisition failures.
internal/skills/installer/installer.go Skill installer (remote + local), metadata injection, concurrency, and lockfile recording.
internal/skills/installer/installer_test.go Unit tests for install behaviors, safety checks, and lockfile output.
internal/skills/frontmatter/frontmatter.go Frontmatter parsing + metadata injection/serialization.
internal/skills/frontmatter/frontmatter_test.go Unit tests for frontmatter parsing and metadata injection.
internal/skills/discovery/discovery.go Skill discovery in repos/local dirs; ref resolution; blob/tree helpers.
internal/skills/discovery/collisions.go Name collision detection/formatting helpers.
internal/skills/discovery/collisions_test.go Unit tests for collision detection/formatting.
internal/flock/flock.go OS-agnostic sentinel error for file lock contention.
internal/flock/flock_unix.go Unix implementation of non-blocking file locks.
internal/flock/flock_windows.go Windows implementation of non-blocking file locks.
internal/flock/flock_test.go Unit tests for file locking behavior.
git/client.go Adds helper methods for reading remote URL + checking gitignore, plus ShortSHA.
git/client_test.go Unit tests for the new git client helpers.
go.mod Promotes golang.org/x/sys to a direct dependency (used by Windows file locking).
acceptance/acceptance_test.go Adds a new acceptance test runner for the skills testscript directory.
acceptance/testdata/skills/skills-update.txtar Acceptance coverage for update (dry-run, force update, rewritten SKILL.md).
acceptance/testdata/skills/skills-update-noinstalled.txtar Acceptance coverage for update with no installed skills.
acceptance/testdata/skills/skills-search*.txtar Acceptance coverage for search (basic, pagination, no results).
acceptance/testdata/skills/skills-preview*.txtar Acceptance coverage for preview (interactive + non-interactive failure).
acceptance/testdata/skills/skills-install*.txtar Acceptance coverage for install flows (dir/scope/pin/namespaced/local/force).
acceptance/testdata/skills/skills-publish-*.txtar Acceptance coverage for publish flows; includes updated stderr matcher for dry-run.
.gitignore Ignores the gh binary artifact.

Copilot's findings

Tip

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

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread acceptance/testdata/skills/skills-publish-dry-run.txtar
@williammartin williammartin merged commit a69a5fb into sm/add-skills-command Apr 16, 2026
29 checks passed
@williammartin williammartin deleted the sammorrowdrums/fix-skills-acceptance-test branch April 16, 2026 14:53
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