`darnit config migrate` drops comments in `.project/darnit.yaml`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 54/100
Research direction
First check whether features 040 and 042 have landed, since the issue says the behavior may differ on main until then. Read packages/darnit/src/darnit/config/operator/migrate.py and compare _write_yaml_file with the round-trip helper used by darnit.config.context_writes and update_project_config. Add the requested test; done means comments survive migration and invalid existing .project/ files are rejected with validation errors.
Written by the indexing model from the issue text.
Description
Applies once features 040 and 042 land (branch 042-candidate-integrity, not yet merged); until then the behaviour described may differ on main.
migrate_baseline_toml (packages/darnit/src/darnit/config/operator/migrate.py) writes .project/darnit.yaml through _write_yaml_file, which re-dumps the whole document and keeps only the leading header comment. Inline comments, comments between sections, and key formatting in an existing darnit.yaml are lost. Since feature 042, darnit.config.context_writes and update_project_config use a ruamel round-trip that preserves them (framework-design.md 7.9, FR-020).
Proposed fix: write the migrated controls: claims through the same round-trip helper, and refuse (with the validation errors) when either .project/ file is present but invalid, as the other writers do. Add a test that a commented darnit.yaml keeps its comments after darnit config migrate.
- Dominant language
- Python
- Stars
- 22
- Forks
- 27
- Avg merge
- 2d 28m
- Merged PRs (30d)
- 40
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from darnitdevorg/darnit
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
darnitdevorg/darnit#589 ·
Maintainers usually reply within 1 day
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
darnitdevorg/darnit#587 ·
Maintainers usually reply within 1 day
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
darnitdevorg/darnit#585 ·
Maintainers usually reply within 1 day
-
quality
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
darnitdevorg/darnit#523 ·
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
darnitdevorg/darnit#516 ·
Maintainers usually reply within 1 day
All issues in darnitdevorg/darnit
Similar issues
-
enhancement from-review
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
khuisman/mcp-gee-sweet#1010 ·
Maintainers usually reply within 1 day
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-webui/open-webui#32333 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ll7/robot_sf_ll7#10368 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
flop-labs/technocore-chat#982 ·
Maintainers usually reply within 1 day