[bug] credentials list --output json returns null instead of stable empty schema
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 65/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- go
- Ambito
- authentication, cli
Direzione di ricerca
Start by running goclaw credentials list --output json and trace the credentials list command and its API response handling; the issue names no source files or tests. Add coverage for an empty API result, then verify that successful empty output has a stable schema and invalid auth or configuration exits non-zero with a clear error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Mô tả
Khi dùng goclaw credentials list --output json, CLI trả về null thay vì một JSON object/array rõ ràng.
Trong lúc debug timeout cho credentialed CLI (codex), agent cần list CLI credentials để tìm codex credential ID và update timeout_seconds bằng command:
goclaw credentials list --output json
Kết quả thực tế:
null
Điều này làm automation khó xử lý vì không rõ nghĩa là:
- Không có credentials?
- Không có quyền?
- Sai profile/server/token?
- API trả body rỗng?
- CLI parse lỗi?
Expected behavior
--output json nên trả về schema ổn định, ví dụ:
{
"items": []
}
hoặc nếu không có credential thì ít nhất:
[]
Nếu auth/profile/server sai hoặc không đủ quyền, CLI nên trả error rõ ràng với non-zero exit code, không trả null như success output.
Actual behavior
Command trả:
null
Không đủ thông tin để agent/human biết trạng thái thật.
Impact
- AI automation không thể phân biệt empty result với lỗi config/auth.
- Không thể tiếp tục flow update timeout cho credentialed CLI như
codexnếu không lấy được credential ID. - Làm trải nghiệm debug bằng CLI bị mơ hồ.
Repro
goclaw credentials list --output json
Observed output:
null
Suggested fix
- Chuẩn hóa JSON output cho list command:
- success empty:
{ "items": [] }hoặc[] - success non-empty: cùng schema
- success empty:
- Nếu API response nil/empty bất thường, CLI nên emit error rõ ràng.
- Nếu profile/server/token chưa đúng, trả non-zero exit + message actionable.
- Bổ sung test cho
credentials list --output jsonkhi API trả empty list.
Context
Use case đang cần:
goclaw credentials list --output json
# find codex credential id
goclaw credentials update <credID> --body '{"timeout_seconds":300}'
Ngoài ra, goclaw credentials update và goclaw credentials agent-grants update đã có command phù hợp để set timeout, nhưng list output null làm bước discovery bị kẹt.
- Lingua principale
- Go
- Stelle
- 5
- Fork
- 6
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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.
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
openclaw/crabbox#3249 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
ec2-subnet, security-group and internet-gateway skip all resources when one is deleted during the scanForse già presa @toabctl l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
gruntwork-io/cloud-nuke#1208 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
snowflakedb/gosnowflake#1872 ·