refactor: split auto-rules into modpack/ vs curated/ provenance subdirs

The previous flat data/rules/ flattened a real distinction:
  - data/rules/modpack/  mirrors of upstream modpack-author-bundled
                         sorting_rules.txt (HellDrinx). Update when
                         upstream publishes; don't unilaterally edit.
  - data/rules/curated/  sortof-operator-authored rules for individual
                         mods whose authors didn't declare load order
                         in their mod.info (RV Interior Expansion).

The loader stays provenance-agnostic; trigger values in _RULES_TRIGGERS
are paths relative to data/rules/ ("modpack/helldrinx.txt" etc.).
File headers in each rules file declare the provenance category and
edit policy.
This commit is contained in:
2026-05-04 16:34:23 +00:00
parent ae408ea437
commit 158bc7c1d7
3 changed files with 25 additions and 18 deletions

View File

@@ -338,21 +338,25 @@ MANUAL_BUILD_PAIRS: Dict[str, str] = {
# parse_sorting_rules runs. User-supplied rules come last so they override
# auto-injected defaults on conflicting keys.
#
# Use cases vary — modpacks (HellDrinx) shipping their own load order,
# individual mods (RV Interior Expansion) whose authors didn't declare
# loadAfter in mod.info, or any other wsid whose presence implies a
# specific sort constraint. The mechanism is generic; each rules file
# describes its own scope in its header.
# Provenance is encoded in the subdirectory:
# data/rules/modpack/ — mirrors of upstream modpack-author-bundled rules
# (HellDrinx etc.). Update when upstream changes.
# data/rules/curated/ — sortof-operator-authored rules for individual
# mods whose authors didn't declare load order
# in their mod.info (RV Interior Expansion etc.).
#
# The loader is provenance-agnostic; trigger values are paths relative to
# data/rules/.
_RULES_DIR = Path(__file__).resolve().parent.parent / "data" / "rules"
_RULES_TRIGGERS: Dict[str, str] = {
# HellDrinx FULL + LITE both bundle the same sorting rules.
"3672556207": "helldrinx.txt", # HellDrinx FULL
"3662909244": "helldrinx.txt", # HellDrinx LITE
# RVInteriorExpansion + Part2 chain after PROJECTRVInterior42.
# Expansion authors didn't declare loadAfter in their mod.info; without
# these rules sortof has no signal to chain the cluster.
"3618427553": "rv_expansion.txt", # RVInteriorExpansion (rvupdate)
"3622163276": "rv_expansion.txt", # RVInteriorExpansionPart2 (rv2)
# HellDrinx FULL + LITE share one upstream-mirrored modpack rules file.
"3672556207": "modpack/helldrinx.txt", # HellDrinx FULL
"3662909244": "modpack/helldrinx.txt", # HellDrinx LITE
# RVInteriorExpansion + Part2 chain after PROJECTRVInterior42 — sortof
# operator-curated; expansion authors didn't declare loadAfter in
# their mod.info, so sortof has no other signal to chain the cluster.
"3618427553": "curated/rv_expansion.txt", # RVInteriorExpansion (rvupdate)
"3622163276": "curated/rv_expansion.txt", # RVInteriorExpansionPart2 (rv2)
}
# Human-readable trigger labels for the warning message.
_RULES_LABELS: Dict[str, str] = {