Skip to content

fix: share discovery pipeline between validate and generate; add heal-stuck-prs cron#18

Merged
terraboops merged 1 commit intomainfrom
fix/discovery-exclude-only
Apr 23, 2026
Merged

fix: share discovery pipeline between validate and generate; add heal-stuck-prs cron#18
terraboops merged 1 commit intomainfrom
fix/discovery-exclude-only

Conversation

@terraboops
Copy link
Copy Markdown
Collaborator

Summary

Two related fixes:

  1. Discovery: one pipeline, excludes-only. validate and generate used to run different filters on the same discovery output — validate walked the whole tree gated only by excludeDirs, while generate re-filtered through pluginCategories (an include list). A skill under a category not listed in config would validate OK but never land in marketplace.json, with only a [WARN]. That bit us on bc-agentic-marketplace#48 (writing-coach under communication/).

    • Remove getCategoryNames + the include filter in groupIntoPlugins. Category is whatever top-level directory a component sits under.
    • validate runs the same pipeline and fails on orphans.
    • generate hard-fails on orphans instead of warning.
    • pluginCategories in existing configs is tolerated (read, ignored, one-time deprecation warning). No downstream config change required to pick up the fix.
    • Dist rebuilt, tests updated.
  2. heal-stuck-prs — reliability-only workaround. New composite action + reusable workflow for catching auto-update-marketplace PRs stuck due to GH Actions flake (no checks attached, jobs hung in queued, stalled auto-merge). Threshold defaults to 90s (10× the observed runner-wait ceiling in healthy runs). Not a replacement for the normal publish flow — both READMEs make the narrow framing explicit.

Writing-coach dry-run on the consuming marketplace repo produces the correct marketplace.json including the previously-missing skill.

Test plan

  • npm test — 29/29 pass
  • Dry run: node scripts/dist/discover-components.cjs validate / generate against bc-agentic-marketplace → writing-coach now included; orphan SKILL.md at repo root causes both to exit 1
  • shellcheck clean on the heal-stuck-prs inline script
  • Consumer repo PR (bc-agentic-marketplace) to pin to this change and add the cron workflow — follow-up

🤖 Generated with Claude Code

…l-stuck-prs cron

Before this change, validate and generate ran different filters on the same
discovery output: validate walked the whole tree gated only by excludeDirs,
while generate applied a second include filter (pluginCategories) that
silently dropped anything outside the configured category list. The two
stages could disagree about which components existed, and a skill under a
category not listed in config would validate OK but never land in
marketplace.json — with only a [WARN] line. That bit us on PR #48 (the
writing-coach skill under communication/).

Changes:

- discover-components.js: remove getCategoryNames and the include filter in
  groupIntoPlugins. Category is now whatever top-level directory a component
  sits under; excludeDirs / excludePatterns applied during discovery are the
  only gate. discoverAllComponents and groupIntoPlugins form one pipeline,
  consumed by both validate and generate — divergence is structurally
  impossible.
- validate command: runs the same pipeline and fails on orphaned components
  (anything not under <category>/<plugin-name>/), so generate can't silently
  ship an incomplete marketplace.json.
- generate command: hard-fails instead of warning on orphans.
- loadConfig: tolerate pluginCategories in existing configs (read, ignore,
  emit one-time deprecation warning). No config change required to pick up
  the fix.
- Tests and README updated. Bundled dist rebuilt.

Also adds a new reliability-only action for working around GitHub Actions
infrastructure flake on auto-update-marketplace PRs:

- agentic-marketplace/heal-stuck-prs: composite action that scans for open
  auto-update-marketplace PRs stuck with no checks attached, jobs stuck in
  queued state, or stalled auto-merge, and applies targeted recovery.
  Threshold (default 90s) is 10× the observed runner-wait ceiling in
  healthy runs.
- .github/workflows/marketplace-consistency.yml: reusable workflow_call
  wrapper. Consumers invoke on a cron schedule (30 min is a sensible
  default). This is not a replacement for the normal publish flow — both
  READMEs make the narrow framing explicit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, reopen this pull request to trigger a review.

@terraboops terraboops merged commit 144d5fc into main Apr 23, 2026
4 checks passed
@terraboops terraboops deleted the fix/discovery-exclude-only branch April 23, 2026 02:36
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.

1 participant