Expand description
Port of internal/config/versions.go: the version registry, the upgrade
walker, and loadAndUpgrade.
Constants§
- LATEST_
VERSION - The current schema version — the version the upgrade walker converges to.
Functions§
- load_
and_ upgrade - Constructs the declared version’s struct, unmarshals data into it, applies defaults, and walks the upgrade chain to the latest config.
- supported_
versions - Returns the registered config versions in ascending order, formatted for error messages (e.g. “1, 2”).
- walk
- Upgrades
cfgto the latest version by repeated single-step upgrades. It terminates when a step reportsUpgrader::is_terminal(the Rust replacement for the Go original’s pointer-identity check — seeversions::Upgrader::is_terminal’s doc comment). The bound guards against a mis-implemented, non-progressingupgrade.