merge-config.py: absolute path answers become '{project-root}//abs', and user_setting values leak into shared config.yaml

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

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Start with skills/bmad-bmb-setup/scripts/merge-config.py and trace apply_result_templates() plus the code that writes module values to config.yaml and config.user.yaml. Reproduce with the provided module.yaml and answers.json, then check the corresponding copies in the module-builder templates and samples. Done when absolute paths stay unchanged and user_setting: true values are excluded from shared config and receive the same result template in user config.

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

Descrizione

Describe the bug

Two issues in merge-config.py. It is byte-identical in bmad-bmb-setup, both module-builder templates and both samples. Separate from #96.

  1. Absolute paths get prefixed. apply_result_templates() skips a variable's result template only when the answer already contains {project-root}. Answering an absolute path for a "{project-root}/{value}" variable produces '{project-root}//abs/shared/reports'.
  2. user_setting: true values go into the shared file too, with a different value. Core user keys (user_name, communication_language) are stripped from config.yaml, but module variables marked user_setting: true are written to both files. config.yaml gets the templated value and config.user.yaml gets the raw one. A personal value ends up in the committed team config, and readers see two different values for one key.

Steps to reproduce

cat > module.yaml <<'EOF'
code: demo
name: Demo
description: d
module_version: 1.0.0
output_dir:
  prompt: "Where?"
  default: "out"
  result: "{project-root}/{value}"
api_profile:
  prompt: "Your personal profile"
  default: "me"
  user_setting: true
  result: "profiles/{value}"
EOF
echo '{"core":{"user_name":"Alex"},"module":{"output_dir":"/abs/shared/reports","api_profile":"alex-private"}}' > answers.json
uv run skills/bmad-bmb-setup/scripts/merge-config.py --config-path _bmad/config.yaml \
  --user-config-path _bmad/config.user.yaml --module-yaml module.yaml --answers answers.json
cat _bmad/config.yaml       # output_dir: '{project-root}//abs/shared/reports' ; api_profile: profiles/alex-private
cat _bmad/config.user.yaml  # api_profile: alex-private

Expected behavior

  • Leave absolute (/, C:\, ~) answers untouched when applying result templates.
  • Exclude user_setting: true variables from the module section in config.yaml, matching the core user keys. Apply the same result template to the value written to config.user.yaml.

Environment

  • Model(s) used: n/a (deterministic script)
  • Agentic IDE used: n/a (scripts run directly)
  • BMad version: bmad-builder main @ d4a921c (v2.2.2 + #118)
  • Project language: Python 3.13, Linux
Lingua principale
Python
Stelle
220
Fork
54
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

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 bmad-code-org/bmad-builder

Tutte le issue di bmad-code-org/bmad-builder

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.