Skip to content

fix(ci): handle pipefail in skill config discovery - #1257

Merged
danbarr merged 1 commit into
mainfrom
fix/check-skills-empty-configs
Nov 20, 2026
Merged

danbarr merged 1 commit into
mainfrom
fix/check-skills-empty-configs

Conversation

@danbarr

@danbarr danbarr commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Fixes two pipefail bugs in the discover-skill-configs step of check-skills.yml.

ToolHive bumps don't select any skills. The toolhive check pipes git diff into grep -q. grep -q exits on the first match, so on a large diff git diff gets SIGPIPE (141) and pipefail makes the condition false. #1246 (toolhive v0.66.0, a 74 KB diff) hit this. Its list came out empty when it should have included every skill. The fix sends grep's output to /dev/null instead of using -q, so grep reads all of the input.

Empty config list fails the step. When no skills are selected (for example, a non-toolhive go.mod bump like #1245), grep -v '^$' matches nothing and exits 1, which fails the step with no log output. The fix tolerates the no-match exit so the step outputs [], and the downstream jobs already skip on that.

build-skills.yml and build-containers.yml use the same toolhive check but don't enable pipefail, so they aren't affected.

Tested by running the fixed discovery script against both PR heads: #1246 now selects all skills, and #1245 selects none and passes.

🤖 Generated with Claude Code

@danbarr
danbarr force-pushed the fix/check-skills-empty-configs branch from f70b543 to 1b389a9 Compare November 20, 2026 00:45
Two pipefail bugs in the discover-skill-configs step:

- The toolhive check piped git diff into grep -q. grep exits on the
  first match, git diff gets SIGPIPE (141) on large diffs, and
  pipefail makes the condition false. Toolhive bumps (e.g. #1246)
  were not selecting all skills. Discard output instead of -q so
  grep drains the pipe.
- When no skills are selected (e.g. a non-toolhive go.mod bump like
  #1245), grep -v matches nothing and exits 1, failing the step.
  Tolerate the no-match exit so the step emits [].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Dan Barr <6922515+danbarr@users.noreply.github.com>
@danbarr
danbarr force-pushed the fix/check-skills-empty-configs branch from 1b389a9 to 318a75d Compare November 20, 2026 00:45
@danbarr danbarr changed the title Fix check-skills discovery on empty config list fix(ci): handle pipefail in skill config discovery Nov 20, 2026
@danbarr
danbarr enabled auto-merge (squash) November 20, 2026 00:46
@danbarr
danbarr requested a review from a team November 20, 2026 00:51
@danbarr
danbarr merged commit 89fc23d into main Nov 20, 2026
7 checks passed
@danbarr
danbarr deleted the fix/check-skills-empty-configs branch November 20, 2026 07:24
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.

2 participants