fix(performance): match complexity-share registry globs per path segment, not with fnmatch
Les mainteneurs répondent en général sous 1 jour
Une pull request liée a déjà été fusionnée.
- #7080 par @kyle-sexton — fusionnée
Évaluation
- Difficulté
- 3/5
- Temps estimé
- Une demi-journée
- Accessibilité débutants
- 45/100
Piste de recherche
Start with registry_key and the fnmatchcase call in scripts/js-complexity-share.py (around lines 72-74), which exist only on the PR #6806 branch, not main. Compare them with the pathglob matcher in plugins/code-metrics/skills/audit-duplication/scripts/registry-filter.py. Done means a member glob like plugins/*/hooks/x.js no longer matches nested paths, both tools agree on the same registry file, and a test covers a nested path that must not match.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Summary
scripts/js-complexity-share.py, added by PR #6806 (not yet on main; the evidence below is pinned to that branch), matches registry cluster members with fnmatch.fnmatchcase. In fnmatch, * matches any characters including /, so a member glob such as plugins/*/hooks/x.js also matches nested paths, and a registry line can sanction more files than it names. The sibling registry reader in the code-metrics plugin uses the gitignore-style pathglob matcher, where * does not cross /.
Failure scenario
Expected: a cluster member glob matches the same set of files here as it does in registry-filter.py, so both tools agree on what counts as a sanctioned copy.
Actual: a member glob with * matches deeper paths here. Files that the registry does not intend to sanction collapse into the cluster and are counted once, which lowers the measured share and loosens the ratchet. The two tools can also disagree on the same registry file.
Evidence
Pinned to the head of PR #6806, branch js-complexity-share-ratchet, commit 108b03fb37d24ca04ea8d6d5d1527b0a596f8531:
registry_keyand thefnmatchcasecall: https://github.com/melodic-software/claude-code-plugins/blob/108b03fb37d24ca04ea8d6d5d1527b0a596f8531/scripts/js-complexity-share.py#L72-L74- Registry format described as a "member glob": https://github.com/melodic-software/claude-code-plugins/blob/108b03fb37d24ca04ea8d6d5d1527b0a596f8531/scripts/js-complexity-share.py#L21-L23
- The sibling matcher (
pathglob, gitignore-style): https://github.com/melodic-software/claude-code-plugins/blob/108b03fb37d24ca04ea8d6d5d1527b0a596f8531/plugins/code-metrics/skills/audit-duplication/scripts/registry-filter.py#L23-L24 registry_keyandfnmatchdo not exist underscripts/or.performance/onorigin/main(7787be41e98e30cd6e3b82e99494886d77e30895).
Suggested fix
Reuse pathglob.matches from the code-metrics plugin, or implement segment-aware matching, so * stops at / and ** is explicit. Add a test with a member glob and a nested path that must not match.
Related
- PR #6806
🤖 Generated with Claude Code
- Langage dominant
- Shell
- Étoiles
- 22
- Forks
- 2
- Merge moyen
- 1 h 18 min
- PR mergées (30 j)
- 942
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de melodic-software/claude-code-plugins
-
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
melodic-software/claude-code-plugins#9179 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Worktree-isolated sessions refuse claude plugin eval (guard reads 'eval' as shell eval)Peut-être pris @kyle-sexton l’a pris il y a 5 jours. Ouverteneeds-human priority: low work-class: read-only
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
melodic-software/claude-code-plugins#5696 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
feat(source-control): record a report-only Merge-Risk line on each unattended lane mergePeut-être pris @kyle-sexton l’a pris aujourd’hui. Ouverteneeds-human priority: medium status: ready work-class: scoped
melodic-software/claude-code-plugins#13657 · 5 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
area: security priority: medium status: needs-decision work-class: structural
Difficulté 4/5 3-5 jours Accessibilité débutants 42/100
melodic-software/claude-code-plugins#13586 · 6 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
host-run priority: medium status: confirmed work-class: scoped
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
melodic-software/claude-code-plugins#13507 · 5 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de melodic-software/claude-code-plugins
Issues similaires
-
blocked
Difficulté 1/5 Moins d'une heure Accessibilité débutants 73/100
fullsend-ai/agents#1908 · 2 commentaires · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
5700模组网络优先级问题Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
luainkernel/lunatik#2372 ·
Les mainteneurs répondent en général sous 1 jour
-
medaka gate explain on an absolute path reports UNMAPPED and the FULL suite (relative paths map)OuverteS3: friction & debt ws:tooling
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
MedakaLang/medaka#4920 ·
Les mainteneurs répondent en général sous 1 jour
-
bug needs-testing
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
void-linux/void-packages#63374 ·
Les mainteneurs répondent en général sous 1 jour