Skip to content

fix(refresh): skip _shim-* files in orphan check#8

Merged
jcasimir merged 1 commit intomainfrom
fix/skip-shim-files-in-orphan-check
May 1, 2026
Merged

fix(refresh): skip _shim-* files in orphan check#8
jcasimir merged 1 commit intomainfrom
fix/skip-shim-files-in-orphan-check

Conversation

@jcasimir
Copy link
Copy Markdown
Member

@jcasimir jcasimir commented May 1, 2026

Problem

generate-shims.sh produces _shim-*.md files in agents/review/ as generated artifacts, not synced content. The orphan check in sync-reviewers.sh flagged every one of them as Orphan: _shim-X.md (not in any configured source) on every sync — ~20 lines of pure noise that made it harder to spot real orphans (e.g., when removing a configured source and wanting to verify cleanup of the files it had been producing).

Fix

Extends the existing _template-reviewer.md skip to a case glob that also matches _shim-*.

   filename=$(basename "$filepath")
-  [ "$filename" = "_template-reviewer.md" ] && continue
+  case "$filename" in
+    _template-reviewer.md|_shim-*) continue ;;
+  esac

Convention: underscore-prefixed files in agents/review/ are internal/generated and excluded from orphan reporting. Matches how _template-reviewer.md was already treated.

Discovery context

Found while cleaning up duplicate orchestrator-as-reviewer sources in reviewer-sources.yaml. Every reviewer sync produced a wall of orphan warnings for the auto-regenerated shim files, drowning the legitimate cleanup signal.

Test plan

  • Run bash sync-reviewers.sh <registry> <output-dir> against a directory containing only _shim-*.md files — confirm no orphan warnings emit
  • Run against a directory with a real orphan (a .md file from a now-removed source) — confirm the orphan warning still fires

🤖 Generated with Claude Code

generate-shims.sh produces _shim-*.md files in agents/review/ as
generated artifacts, not synced content. The orphan check in
sync-reviewers.sh previously flagged every one of them as
"not in any configured source" on every sync — pure noise that
made it harder to spot real orphans (e.g., when removing a
configured source and wanting to clean up the files it had been
producing).

Extends the existing _template-reviewer.md skip to a case glob
that also matches _shim-*. Matches the convention that underscore-
prefixed files in this directory are internal/generated, not
synced content.

Discovered while cleaning up duplicate orchestrator-as-reviewer
sources in reviewer-sources.yaml — every reviewer sync produced
~20 lines of orphan warnings for the auto-regenerated shim files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jcasimir jcasimir merged commit e3ee5bc into main May 1, 2026
2 checks passed
@jcasimir jcasimir deleted the fix/skip-shim-files-in-orphan-check branch May 1, 2026 21:17
@github-actions github-actions Bot mentioned this pull request May 1, 2026
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