Language formatter semantics — findings (2026)
Language formatter semantics — findings (2026)
Section titled “Language formatter semantics — findings (2026)”Probe charter
Section titled “Probe charter”Identify whether formatting can:
- Shift line/column spans expected by diagnostics or golden tests
- Reject programs that still parse pre-format
- Hide issues by pretty-printing invalid constructs into valid-looking shapes (unlikely but worth guarding)
Evidence (2026-05-11)
Section titled “Evidence (2026-05-11)”reference/cli.mddocumentsvox fmtbehavior and failure modes — treat CLI prose as user-facing canon pending deeper audit.- LSP formatting is often delegated or partial relative to CLI — parity risk documented in vox-lsp-capabilities-ssot-2026.md.
Hypotheses
Section titled “Hypotheses”- Span instability: Multi-edit workflows (IDE format-on-save + compiler) may reorder diagnostics if spans are not byte-stable.
- Second parser gate: Fail-closed fmt encourages treating the printer as part of developer workflow — needs explicit policy vs
vox check.
Next steps
Section titled “Next steps”- Add tests: format → re-parse → identical AST snapshot for golden files subset.
- Document explicit policy in vox-diagnostic-ux-ssot-2026.md: whether fmt is required before CI merge.