skills-init: commit-SHA skill refs never start (git checkout -- <sha> reads the SHA as a pathspec)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 84/100
Direzione di ricerca
Leggi go/core/internal/skillsinit/git.go, concentrandoti su CloneGit e sul percorso di checkout delle Full refs. L’issue fornisce una riproduzione minima con Git puro; conferma come vengono passati gli argomenti di checkout, poi esamina i test vicini relativi a questo comportamento. Il lavoro è concluso quando le refs SHA dei commit vengono estratte correttamente sulla linea 0.10 e le refs di branch e tag continuano a funzionare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Go
- Stelle
- 4.1k
- Fork
- 871
- Merge medio
- 1g 8h
- PR unite (30g)
- 183
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di kagent-dev/kagent
-
Gemini catalogs omit gemini-4-argon and gemini-3.8-flashForse già presa @jayunit100 l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
kagent-dev/kagent#3524 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Don't add the provider's public host to egress when a ModelConfig sets baseUrlForse già presa @lakshyab20 l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 81/100
kagent-dev/kagent#3507 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] OpenAI and Ollama adapters send an empty tool message when a tool returns a dictForse già presa @helloxjade l’ha presa 6 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
kagent-dev/kagent#3462 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
kagent-dev/kagent#3428 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]Forse già presa @helloxjade l’ha presa 10 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
kagent-dev/kagent#3385 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di kagent-dev/kagent
Issue simili
-
agent-butler-finding chore
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
jordansmall/spindrift#6695 ·
I maintainer di solito rispondono entro 1 giorno
-
book-layout.spec fails when the similar-books rail holds other projects' booksForse già presa @praetorianer777 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
praetorianer777/GoTome#373 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
-
/shutdown/ready can fail to return an HTTP response when readiness takes longer than the server write timeoutForse già presa @floriankoch l’ha presa oggi. Apertatriage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
envoyproxy/gateway#10562 ·
I maintainer di solito rispondono entro 1 giorno
-
Adding an LDAP group reports every search failure as "LDAP Group DN is not found"Forse già presa @Daksha1611 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno