Config rules

What a validated config decides at runtime, and how a bad one is reported. The key tables and their defaults live in Config.

What app.id decides

The port guarantee is "stable unless the port is occupied". When the walk moves, that launch has a different origin and nothing migrates old state.

Validation

validateConfig throws ConfigError listing every issue, not just the first, with the issues intact on error.issues.

invalid crust config in crust.config.ts:
  windows[0].width — expected a positive integer, got "wide"

An unknown key is reported the same way, with the accepted set:

invalid crust config in crust.config.ts:
  app.color — expected one of "id", "name", "version", "icon", "activate", got "red"

loadConfig throws plain Error naming the path for: no config file, an explicit path that does not exist, unreadable or unparsable JSON, a module with no default export, and an unsupported extension. Expected filenames are in CONFIG_FILES; findConfig(dir) answers the same question without loading.