bug(init): interactive setup silently drops unknown configured agents

Aperta Adatta ai principianti
#406 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 5 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli

Direzione di ricerca

Parti da prompt_for_agents e dal ramo interattivo di resolve_agents, poi traccia come init scrive l'elenco degli agenti configurato. Riproduci con un SYMPOSIUM_HOME/config.toml isolato contenente gemini e claude, esegui cargo agents init in modalità interattiva e conferma che le voci sconosciute vengono preservate a meno che non si usi --remove-agent. Aggiungi copertura per il percorso del prompt interattivo, poiché i test init/sync esistenti catturano l'output senza esercitare i prompt.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Interactive cargo agents init silently removes configured agent names that the current binary does not recognize, even when the user accepts every default.

Reproduction

Start with this user configuration (for example in an isolated SYMPOSIUM_HOME/config.toml):

auto-update = "off"
hook-scope = "project"

[defaults]
symposium-recommendations = false
user-plugins = false

[[agent]]
name = "gemini"

[[agent]]
name = "claude"
  1. Run cargo agents init in an interactive terminal, without --add-agent or --remove-agent.
  2. Accept the default selections and answers at every prompt.
  3. Inspect config.toml.

Actual: the agent list contains only claude. gemini was not shown in the picker and is removed without a warning or explicit removal request.

Expected: accepting the defaults preserves unknown configured agent entries. They should remain until explicitly removed, for example with cargo agents init --remove-agent gemini.

Cause and validation

prompt_for_agents lists only Agent::all(). The interactive branch of resolve_agents returns only those selected known agents, and init replaces the configured agent list with that result.

Reproduced with the actual binary in a pseudo-terminal at revision 5f37e8d175d58a5871d1c441d51d4ce31596f595: all four prompts were accepted, the command exited successfully, and the saved list changed from ["gemini", "claude"] to ["claude"]. Existing init/sync and hook-stdout tests passed; their capturing output does not exercise interactive prompts.

This behavior predates #389 and is tracked as a follow-up bug, not a blocker for that PR. #389 improves preservation in non-interactive and flag-driven runs; the interactive path still needs coverage.

Lingua principale
Rust
Stelle
247
Fork
30
Merge medio
4g 19h
PR unite (30g)
44

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di symposium-dev/symposium

Tutte le issue di symposium-dev/symposium

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.