fix: add and remove reset other settings in config.toml

Aperta
#5 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@laozhej ci sta già lavorando.

Dal 24/10/2026.

  • #14 di @laozhej — aperta

Valutazione

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

Direzione di ricerca

Start with cmd_add and cmd_remove in src/agentsync/cli.py and write_config in src/agentsync/config.py, then inspect the config tests. Reproduce by setting auto_gitignore = false, running add, and reading the value back. Done when add preserves that setting and the regression test passes; an open pull request already addresses this issue.

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

Descrizione

bug good first issue

cmd_add and cmd_remove in src/agentsync/cli.py call write_config in src/agentsync/config.py, which rewrites DEFAULT_CONFIG with only the new tools list. So auto_gitignore, warn_unmanaged, canonical and any user comments go back to the defaults. Make write_config keep the values from the loaded AgentSyncConfig, or change only the tools array in the existing file, and add a test that sets auto_gitignore = false, runs add, and reads it back as false.

Reproduced with:

$ rulesync init >/dev/null
$ sed -i '' 's/= true/= false/' .agentsync/config.toml && grep -E '^(auto_gitignore|warn_unmanaged)' .agentsync/config.toml
auto_gitignore = false
warn_unmanaged = false
$ rulesync add aider >/dev/null && grep -E '^(auto_gitignore|warn_unmanaged)' .agentsync/config.toml
auto_gitignore = true
warn_unmanaged = true
Lingua principale
Python
Stelle
1
Fork
3
Merge medio
26g 1h
PR unite (30g)
5

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 obielin/agentsync

Tutte le issue di obielin/agentsync

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.