Skip to content

Modset Model

Pummelchen edited this page Sep 13, 2026 · 3 revisions

Modset Model

Design stage. Nothing here is implemented.

The central modeling decision. Getting this wrong is what makes conflict testing unmanageable.

A mod is never validated on its own

The instinct is to track mods and give each one a status. That is the wrong unit.

Mod A and Mod B might boot together perfectly. Add Mod C and all three crash. Whose status changed? None of them individually — the combination is what failed. A per-mod verdict cannot express this, and any system built on one will keep contradicting itself.

The set carries the verdict. It is the thing that gets tested, deployed and rolled back.

The modset digest

A modset is, for one Minecraft version:

  • an ordered list of exact files — mod ID, filename, SHA-256, source URL
  • the NeoForge build it targets
  • the Minecraft version

Hash that list and you get a modset digest naming it: 26.2@a4f19c…. It behaves exactly like a lockfile.

Property Consequence
Verdicts attach to a digest "26.2@a4f19c booted clean in 94 s" is a durable, re-checkable fact
Deployment is a statement "26.2 is serving a4f19c" — unambiguous, and comparable against what is on disk
Rollback is a pointer move Point current at the previous digest and restart
Changing one file changes the digest The new set has never been validated — which is correct, because it hasn't

That last row is the point. There is no way to quietly change a mod file and keep a validation verdict, because the verdict is bound to the exact bytes of the whole set.

Configs are part of the unit, or the digest is a lie

A modset that names only jars is not reproducible. Mods generate configuration on first boot, and that configuration changes what the server does — including, sometimes, whether two mods conflict at all. Two servers running byte-identical jars with different configs are not running the same thing.

The trap is that config files are generated, so they cannot simply be version-controlled: a mod update rewrites its own file, adds new keys, and sometimes resets values the operator deliberately changed.

The workable split is generated defaults versus operator overrides:

  • Booting a modset produces a default config tree. That is an output, captured from a test session, not something anyone edits.
  • Anything deliberately changed lives in a small, hand-maintained overrides set — the handful of files and keys that actually matter.
  • Deploying means: let the mods generate their defaults, then apply the overrides on top.

The modset digest covers the jars and the overrides. A config change is therefore a new digest that has never been validated, which is correct — a config change can absolutely break a boot.

This also survives mod updates cleanly. The new version regenerates its own defaults; the overrides are reapplied on top; anything the update removed shows up as an override that no longer applies, which is a report rather than a silent loss.

The content-addressed store

Jars live once at /var/minecraft/shared/store/<sha256>.jar. Every server mods/ directory and every test scratch directory is built from hardlinks into that store.

  • Deduplicates mods that are byte-identical across Minecraft versions.
  • A test directory materializes instantly and costs no disk.
  • Retaining several previous validated sets for rollback is nearly free.
  • The file's hash is its identity, so corruption and substitution are detectable by construction.

The conflict graph

Every conflict the system proves becomes a durable edge:

sodium-extra@0.6.0 is incompatible with oculus@1.8.0 on Minecraft 26.2 — proven by run #418, evidence in runs/418/latest.log

This is the asset that compounds. A known-bad pair is never proposed together again and never costs another boot. After a few months of operation most conflicts are caught by graph lookup before a JVM starts, and the expensive tier is reserved for genuinely new combinations.

Edges are scoped to Minecraft version and to mod versions. A conflict between two mods at specific versions says nothing certain about their next releases — when either side is updated, the edge should be marked stale and the pair allowed to be tried again rather than blocked forever.

States

Per mod, per Minecraft version:

State Meaning
listed Present in the sheet, nothing resolved yet
resolved A concrete file exists for this version, downloaded and hashed
unavailable No build for this Minecraft version — reported back to the sheet
quarantined Bisection proved it breaks the set; excluded until cleared
banned Operator decision; never install

Per modset:

State Meaning
candidate Proposed digest, not yet tested
validated Booted clean and held; eligible to deploy
deployed A server is currently serving it
rejected Failed, with evidence and a bisection result attached
flaky Verdict flipped between runs on the same digest — never treated as validated

Why flaky exists

NeoForge mod load order is not guaranteed to be identical between runs. A marginal conflict can pass once and fail the next time.

Treating the first passing run as authoritative would deploy a set that fails intermittently in production — the worst possible outcome, because it looks like a server problem rather than a mod problem. Any digest whose verdict has ever flipped is marked flaky, re-run, and blocked from deployment until it is consistently green.

Clone this wiki locally