Skip to content

Load config files in name order - #19

Merged
ryanbarlow97 merged 1 commit into
mainfrom
fix/sorted-yaml-folders
Oct 13, 2026
Merged

ryanbarlow97 merged 1 commit into
mainfrom
fix/sorted-yaml-folders

Conversation

@ryanbarlow97

@ryanbarlow97 ryanbarlow97 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Research read each config folder in whatever order the filesystem listed its files. When two files defined the same id, which copy was kept depended on the machine, and ResearchLoadersTest.templatesValidateNestedPathsCyclesDuplicatesAndWeights failed on the CachyOS build PC on main.

YamlFolder.listYamlFiles now sorts by file name, ignoring case, so the first file by name always keeps a repeated id. A new test feeds the files in a scrambled order and checks the result.

Full gate passes on the CachyOS PC (260 tests, coverage met).

Docs: TF-Minecraft/Docs#221

🤖 Generated with Claude Code

YamlFolder returned files in filesystem order, so when two files in a folder
defined the same id, which one was kept depended on the machine. Sort by file
name (ignoring case) so the first file by name always wins. This also makes
ResearchLoadersTest.templatesValidateNestedPathsCyclesDuplicatesAndWeights pass
on every filesystem.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the size:XS 0-9 effective changed lines (tests excluded in mixed PRs). label Oct 13, 2026
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 32dd66d2-f100-44c2-ac41-68aa1dec3551
📥 Commits

Reviewing files that changed from the base of the PR and between 40d55f8 and 24464d4.

📒 Files selected for processing (2)
  • src/main/java/net/tfminecraft/research/util/YamlFolder.java
  • src/test/java/net/tfminecraft/research/util/ResearchUtilitiesTest.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Improvements
    • YAML files are now listed in a consistent alphabetical order, ignoring case first and using case-sensitive order to resolve ties.

YamlFolder.listYamlFiles now returns matching .yml files in deterministic filename order. Tests check case-insensitive ordering, case-sensitive tie-breaking, and directory results.

Changes: YAML file ordering

Layer / File(s) Summary
Sort YAML files
src/main/java/net/tfminecraft/research/util/YamlFolder.java, src/test/java/net/tfminecraft/research/util/ResearchUtilitiesTest.java
A shared comparator orders filenames case-insensitively, then by case-sensitive filename. listYamlFiles sorts its results. Tests verify the order and retain checks for null, missing, and unlistable directories.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 24464

YAML file inclusion is unchanged, and template loading now has a predictable filename order for duplicate definitions. No actionable merge-blocking risk remains.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ryanbarlow97
ryanbarlow97 merged commit c65892d into main Oct 13, 2026
3 checks passed
@ryanbarlow97
ryanbarlow97 deleted the fix/sorted-yaml-folders branch October 13, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant