feat(presets/latexmk): audit and validate failure summary coverage #88

Closed
opened 2026-04-26 00:12:26 +00:00 by barrettruth · 1 comment
barrettruth commented 2026-04-26 00:12:26 +00:00

Follow-up to #81 and #70.

Scope

Audit the latex preset (latexmk) and implement a trustworthy short failure summary using the merged failure_summary(result, ctx) hook from #86.

Why this needs its own issue

latexmk has its own compiler output shape and failure modes. We should not mark #81 done until this preset has explicit positive and negative coverage with both automated tests and manual validation.

Acceptance criteria

  • Positive path: a representative valid latexmk document compiles successfully, no failure summary is shown, and stale diagnostics/quickfix clear after success.
  • Primary negative path: the canonical latexmk failure produces the intended one-line summary, and the exact summary string is asserted in automated tests.
  • Noisy negative path: boilerplate, wrapped output, repeated errors, or surrounding CLI noise still yield the right summary instead of truncated or misleading text.
  • Fallback path: when no trustworthy latexmk summary is available, behavior falls back cleanly to the generic failure or :Preview output hint path; never empty, never misleading.
  • Raw output remains available through :Preview output and preview.result().
  • Automated coverage lands in repo specs/fixtures for both success and failure behavior.
  • Manual validation is run in nix develop .#presets against the real toolchain, and the validated output shapes are recorded in the PR.

Representative cases to cover

  • missing package errors such as ! LaTeX Error: File definitelymissingpackage.sty not found.
  • file-line errors such as Undefined control sequence.
  • boilerplate such as Collected error summary (may duplicate other messages): must not win over the real cause when a better TeX error is present
Follow-up to #81 and #70. ## Scope Audit the `latex` preset (`latexmk`) and implement a trustworthy short failure summary using the merged `failure_summary(result, ctx)` hook from #86. ## Why this needs its own issue `latexmk` has its own compiler output shape and failure modes. We should not mark #81 done until this preset has explicit positive and negative coverage with both automated tests and manual validation. ## Acceptance criteria - [ ] Positive path: a representative valid `latexmk` document compiles successfully, no failure summary is shown, and stale diagnostics/quickfix clear after success. - [ ] Primary negative path: the canonical `latexmk` failure produces the intended one-line summary, and the exact summary string is asserted in automated tests. - [ ] Noisy negative path: boilerplate, wrapped output, repeated errors, or surrounding CLI noise still yield the right summary instead of truncated or misleading text. - [ ] Fallback path: when no trustworthy `latexmk` summary is available, behavior falls back cleanly to the generic failure or `:Preview output` hint path; never empty, never misleading. - [ ] Raw output remains available through `:Preview output` and `preview.result()`. - [ ] Automated coverage lands in repo specs/fixtures for both success and failure behavior. - [ ] Manual validation is run in `nix develop .#presets` against the real toolchain, and the validated output shapes are recorded in the PR. ## Representative cases to cover - missing package errors such as `! LaTeX Error: File `definitelymissingpackage.sty` not found.` - file-line errors such as `Undefined control sequence.` - boilerplate such as `Collected error summary (may duplicate other messages):` must not win over the real cause when a better TeX error is present
barrettruth commented 2026-04-26 02:08:07 +00:00

Implemented in #98.

Implemented in #98.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/preview.nvim#88
No description provided.