Submit an issue View all issues Source
MIR-874

Nice config parse errors with source locations and suggestions

Done public
phinze phinze Opened Mar 25, 2026 Updated Mar 31, 2026

We now surface config parse errors (MIR-355, MIR-713), but the errors themselves aren't great. We should do a full sweep to make .miren/app.toml parse failures really nice:

  • Source locations: point to the exact file:line where the problem is (we now have the go-toml/v2 unstable AST wired up for alias line numbers — same approach generalizes)
  • Contextual suggestions: "did you mean size_gb?" for unknown fields, "mode must be auto or fixed" with the actual value shown, etc.
  • Consistent formatting: every config error should look the same — file path, line number, the offending line, a caret, and the message
  • Silent swallowing audit: grep for places that eat LoadAppConfig errors (e.g. help alias returns nil on error) and make sure they at least warn

Came up during review of the alias PR (#693) — help alias silently shows "No aliases configured" when the real problem is a TOML syntax error. That's one instance of a broader pattern worth fixing everywhere at once.

Related: MIR-355, MIR-713