Preserve .yml filenames in dump_yaml - #7275
Conversation
Greptile SummaryThis PR fixes
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness, security, or quality issues identified. The changed suffix check preserves standard YAML extensions case-insensitively, retains the existing default suffix for extensionless paths, and is covered by a focused regression test. Important Files Changed
Reviews (1): Last reviewed commit: "Format YAML changelog fragment" | Re-trigger Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
The change correctly updates dump_yaml filename normalization so valid .yml, .yaml, and case-varied YAML extensions are preserved while extensionless names still receive .yaml. The regression test and package changelog fragment align with that behavior.
- Design and architecture: The fix remains localized to the existing leaf utility and introduces no new abstraction or dependency, consistent with the repository requirement to make the smallest effective change.
- API: The public signature and return behavior are unchanged. The intended observable change is limited to extension handling; names ending in
.ymlor case-varied YAML extensions are now preserved, while non-extension suffixes such asconfigyamlreceive.yaml. The changelog records this user-visible adjustment. - Implementation: The updated suffix check deterministically affects only filename selection before the existing directory creation, conversion, and serialization path. The new test demonstrates the
.ymlregression by checking the requested file is written, the erroneous.yml.yamlpath is absent, and the result can be loaded. Existing coverage retains the extensionless-name behavior, though uppercase variants are covered by the implementation rather than a dedicated test.
No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.
Automated review; human maintainers own approval decisions.
There was a problem hiding this comment.
AI review disclosure: This review was produced with assistance from multiple AI systems.
Thank you for putting this PR together.
Assessment: Case-insensitive extension check correctly preserves .yml/.yaml and adds .yaml only when absent.
Findings: Invalid .patch.rst filename; uppercase behavior promised by changelog lacks direct regression coverage.
Requested changes: Rename fragment and add one config.YML parameter or narrow the changelog claim.
Changelog filename: Rename the current <slug>.patch.rst fragment to <slug>.rst for this patch-level change. IsaacLab accepts <slug>.rst (patch), <slug>.minor.rst, and <slug>.major.rst; it does not accept a .patch.rst suffix.
Test scope: Add at most one uppercase parameter to the existing focused case, not a new test.
Documentation / AI skills: No additional documentation update is required: changelog is sufficient. No AI-skill update is required.
Description
Fixes
dump_yaml()changing valid.ymlfilenames.The helper currently checks only whether the filename ends with the literal string
yaml. Passing a standard YAML filename such asconfig.ymltherefore writesconfig.yml.yamlinstead of the requested path.The extension check now accepts both
.yamland.ymlcase-insensitively. Filenames without a YAML extension continue to receive the default.yamlsuffix.Type of change
Validation
config.ymlis written unchanged andconfig.yml.yamlis not created..yaml.isaaclabchangelog fragment.Checklist