Skip to content

fix(ci): guard check-agent-originality.sh's AGENT_DIRS in check-divisions.sh - #650

Closed
Synvoya wants to merge 1 commit into
msitarzewski:mainfrom
Synvoya:fix-divisions-guard-originality
Closed

fix(ci): guard check-agent-originality.sh's AGENT_DIRS in check-divisions.sh#650
Synvoya wants to merge 1 commit into
msitarzewski:mainfrom
Synvoya:fix-divisions-guard-originality

Conversation

@Synvoya

@Synvoya Synvoya commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Root-cause follow-up to #649. scripts/check-divisions.sh enforces that the AGENT_DIRS arrays in convert.sh and lint-agents.sh match divisions.json — but it does not check the (Python) AGENT_DIRS list in check-agent-originality.sh. That gap is exactly why that list was able to silently drift (see #649). This adds a Python-list extractor and compares it against divisions.json too, so the originality script's division set can no longer drift unnoticed.

⚠️ Depends on #649 — merge that first

This new guard catches the drift that #649 fixes, so on the current main check-divisions.sh will (correctly) fail here, reporting missing: gis security / extra: strategy against the not-yet-fixed originality list. Merge #649 first; then this is green. (Verified: with #649 applied, check-divisions.shPASSED: 16 divisions consistent.)

Testing

Notes

CI/tooling change — happy to fold this into #649 or move to a Discussion first if you'd prefer, per CONTRIBUTING. Kept separate so the fix and the guard-against-recurrence are reviewable independently.

…AGENT_DIRS

The divisions consistency check validated the AGENT_DIRS bash arrays in
convert.sh and lint-agents.sh, but not the Python AGENT_DIRS list in
check-agent-originality.sh — so that list silently drifted out of sync (it was
missing the gis and security divisions). Add a Python-list extractor and compare
it against divisions.json too, closing the gap that allowed the drift.
@msitarzewski

Copy link
Copy Markdown
Owner

Thanks for catching the drift here — you're right that gis and security were missing from the originality check's division list.

Closing this as superseded by #659, which fixes the root cause: instead of patching the hardcoded list, #659 has the script read divisions.json (the catalog's single source of truth) directly, so AGENT_DIRS can never drift out of sync with the divisions again. Really appreciate you flagging it. 🙏

msitarzewski added a commit that referenced this pull request Jul 5, 2026
check-agent-originality.sh hardcoded its own copy of the division list
(AGENT_DIRS) in the Python heredoc — a 5th copy that check-divisions.sh's
bash-array parser never saw, so it drifted: it was missing `gis` and
`security` and still carried the retired `strategy`. The practical effect
was that every gis/ and security/ agent — including newly added ones —
skipped the duplicate-detection scan entirely.

Read divisions.json directly instead of hardcoding, so this check can
never drift from the catalog again. Now scans all 16 divisions; verified
green in full-audit mode.

Supersedes #649/#650, which patch the hardcoded constants rather than
removing them.


Claude-Session: https://claude.ai/code/session_01WKnDRWM4izsB8WAXKszhsq

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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