skills-init: commit-SHA skill refs never start (git checkout -- <sha> reads the SHA as a pathspec)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 84/100
Línea de trabajo
Lee go/core/internal/skillsinit/git.go, centrándote en CloneGit y en la ruta de checkout de Full refs. El issue incluye una reproducción mínima con Git sin capas adicionales; confirma cómo se pasan los argumentos de checkout y después revisa las pruebas cercanas para este comportamiento. El trabajo estará terminado cuando las refs de SHA de commit se puedan extraer correctamente en la línea 0.10 y las refs de ramas y etiquetas sigan funcionando.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happens
An agent whose skills pin a commit SHA never leaves Init. skills-init fails with:
error: pathspec '<sha>' did not match any file(s) known to git
skills-init: clone <url>: exit status 1
Agents that pin a branch or tag are fine.
Why
CloneGit in go/core/internal/skillsinit/git.go takes the Full path for a commit SHA and runs:
if err := runGitIn(ref.Dest, "checkout", "--", ref.Ref); err != nil {
With the -- separator, git treats everything after it as a pathspec, not a revision. So the SHA is looked up as a file name and the checkout fails. The commit is present in the clone; only the argument parsing is wrong.
The comment above the call says the separator is there so "a ref starting with -" cannot be parsed as a flag, and notes that refs are already validated as 40-char hex when Full is true. That validation is real — the controller sets Full from isCommitSHA, which is ^[0-9a-fA-F]{40}$ — so a 40-character hex string can never be an option and the separator protects nothing.
Minimal reproduction
No kagent needed; this is plain git:
git clone https://github.com/<any>/<repo>.git /tmp/r
cd /tmp/r
git checkout -- "$(git rev-parse HEAD)" # error: pathspec ... did not match any file(s) known to git
git checkout "$(git rev-parse HEAD)" # works
Fix
Drop the separator:
if err := runGitIn(ref.Dest, "checkout", ref.Ref); err != nil {
git checkout <sha> -- (separator last) also works, but the plain form is what the surrounding comment already describes.
Versions
Present in v0.10.4, v0.10.5 and v0.10.6 — the same line in all three.
Already fixed on main / v1.0.0-rc3, where CloneGit was rewritten to git fetch --depth 1 origin <commit> followed by git checkout --detach FETCH_HEAD. So this only affects the 0.10 line.
Impact
Any agent using skills.gitRefs with a commit SHA — which is the recommended way to pin skills — cannot start on 0.10.x. Branch and tag refs are unaffected.
- Lenguaje dominante
- Go
- Estrellas
- 4.1k
- Forks
- 871
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 183
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- 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 kagent-dev/kagent
-
Gemini catalogs omit gemini-4-argon and gemini-3.8-flashPosiblemente ocupada @jayunit100 la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
kagent-dev/kagent#3524 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Don't add the provider's public host to egress when a ModelConfig sets baseUrlPosiblemente ocupada @lakshyab20 la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 81/100
kagent-dev/kagent#3507 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[BUG] OpenAI and Ollama adapters send an empty tool message when a tool returns a dictPosiblemente ocupada @helloxjade la tomó hace 6 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
kagent-dev/kagent#3462 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
kagent-dev/kagent#3428 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[BUG]Posiblemente ocupada @helloxjade la tomó hace 10 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
kagent-dev/kagent#3385 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de kagent-dev/kagent
Issues similares
-
agent-butler-finding chore
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
jordansmall/spindrift#6695 ·
Los mantenedores suelen responder en 1 día
-
book-layout.spec fails when the similar-books rail holds other projects' booksPosiblemente ocupada @praetorianer777 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
praetorianer777/GoTome#373 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
-
/shutdown/ready can fail to return an HTTP response when readiness takes longer than the server write timeoutPosiblemente ocupada @floriankoch la tomó hoy. Abiertotriage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
envoyproxy/gateway#10562 ·
Los mantenedores suelen responder en 1 día
-
Adding an LDAP group reports every search failure as "LDAP Group DN is not found"Posiblemente ocupada @Daksha1611 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día