test(guardrails): 4 block-root-delete-target allowed-roots assertions fail on Windows Git Bash
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 57/100
Línea de trabajo
Start with section 2d of plugins/guardrails/hooks/block-root-delete-target.test.sh and compare its allowed-roots fixtures with the Windows Git Bash path behavior described in the issue. Check how the test derives relative paths and handles / under MSYS; the issue also points to hook behavior as an open question. Done when the four assertions behave appropriately on Windows without breaking the existing Linux suite.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
On Windows Git Bash, four assertions in plugins/guardrails/hooks/block-root-delete-target.test.sh (section 2d, allowed roots) fail. They fail the same way on origin/main (a1a836827) as on the #6542 branch, so the suite cannot go fully green locally on Windows. CI is Linux, and the Windows lane does not run this suite.
Failing assertions and output
FAIL: allowed roots: a relative root grants nothing (direct): expected exit 2, got 0
FAIL: allowed roots: a relative root grants nothing (dispatched): expected exit 2, got 0
FAIL: allowed roots: the root '/' does not allow a top-level path (direct): expected exit 2, got 0
FAIL: allowed roots: the root '/' does not allow a top-level path (dispatched): expected exit 2, got 0
Root-cause hypotheses (test fixtures, not the hook)
a relative root grants nothingpasses"${RDT_AR#/}"as a "relative" entry. On Windows,RDT_TOPcomes fromgit rev-parse --show-toplevel, which returns the drive form (D:/worktrees/...).#/therefore strips nothing, and the entry is a valid absolute root that correctly allows$RDT_AR/child. The test does not build a relative entry on this host. Evidence:git rev-parse --show-toplevelprintedD:/worktrees/melodic-software-claude-code-plugins-fix-6542-allowed-roots-prefix.the root '/' does not allow a top-level pathlists/and expectsrm -rf /opt/rdt-allowed-x/yto stay refused. Under MSYS,/is the Git install directory (cygpath -m /printsC:/Program Files/Git/). That is not a filesystem root, sordt_root_likedoes not drop the entry, and/opt/...lies strictly under it, so the delete is allowed.
Suggested fix
- Build the relative entry from a path that is certainly relative on every host, e.g. strip the drive or leading slash with a host-aware helper.
- Skip or re-target the
/case on MSYS, where/is not the volume root. - Decide whether the hook should also refuse an entry spelled
/on Windows. It names the Git install directory, which is probably never what a user means.
Related: #6020. Found while working #6542 (PR #6624).
- Lenguaje dominante
- Shell
- Estrellas
- 22
- Forks
- 2
- Merge medio
- 5 h 15 min
- PR fusionados (30 d)
- 833
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
-
good first issue needs-triage priority: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
melodic-software/claude-code-plugins#6631 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
melodic-software/claude-code-plugins#6547 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
melodic-software/claude-code-plugins#6535 ·
Los mantenedores suelen responder en 1 día
-
test_comment_census.py: SccArgv flag-shaped-filename test errors on Windows (#!/bin/sh scc shim)Abiertogood first issue needs-triage priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
melodic-software/claude-code-plugins#6532 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
good first issue needs-triage priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
melodic-software/claude-code-plugins#6390 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de melodic-software/claude-code-plugins
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
aws-samples/appmod-blueprints#972 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: remote-ls --updates reports up-to-date OCI refs because it ignores deployed Alt-idPosiblemente ocupada @Joao-kouznetz la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
status:needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 3 días