fix(performance): match complexity-share registry globs per path segment, not with fnmatch
Los mantenedores suelen responder en 1 día
Ya se ha fusionado un pull request relacionado.
- #7080 de @kyle-sexton — fusionado
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 45/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Shell
- Estrellas
- 22
- Forks
- 2
- Merge medio
- 8 h 24 min
- PR fusionados (30 d)
- 947
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de melodic-software/claude-code-plugins
-
needs-human needs-triage priority: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
melodic-software/claude-code-plugins#7455 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
priority: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
melodic-software/claude-code-plugins#7351 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
agent-ready priority: high work-class: scoped
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
melodic-software/claude-code-plugins#7312 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
priority: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
melodic-software/claude-code-plugins#7288 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
knowledge: docpage-digest dual verification defines no verdict vocabulary or pass/fail thresholdAbiertoneeds-human
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
melodic-software/claude-code-plugins#7286 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de melodic-software/claude-code-plugins
Issues similares
-
area:install bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Netcracker/qubership-test-pipelines#307 ·
Los mantenedores suelen responder en 2 días
-
Webcam overlay freezes during voxtype dictation while screen recording (pause_media pauses the overlay mpv)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
TYPO3BestPractices/tea#2409 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
msys2/MSYS2-packages#6825 ·
Los mantenedores suelen responder en 1 día