Design decisions

189. The editor reports what cpl check reports, and reads types the checker kept (2026-11-21)

  • Decision. cpl check and cpl lsp both take their diagnostics from cpl_ir::reported, which under CPL_SPEC=1 drops lowering's builtin-shaped errors and NOT_IMPLEMENTED notes that cite design/, as cpl check already did. The checker keeps the type of every call, index, unwrap, paren and range expression (ItemCheck::shapes) so dot completion after xs.sorted() or g[v] reads the checked type instead of guessing from signature text. Editing a file re-analyzes only it and the files that import it.
  • Why. The editor disagreed with cpl check on 76 of 100 hill-climb ports in spec mode, dot completion was empty after 166 calls, and every keystroke re-analyzed every module (352 ms median edit-to-diagnostics in spec mode, now under 4 ms).
  • Reverse. Point the LSP back at cpl_ir::check; drop shapes and the fallback in complete::type_of; invalidate every analysis in Database::set_file.