Skip to content

Severity tiers

Not every finding is fatal. laterite grades each one error / warning / fyi, and — like a compiler — the default report shows errors and warnings, keeps the informational tier opt-in, and lets you drop to errors only.

  • error — a real Format Rule violation (missing TRAN, short DATA row, an abbreviation not declared in ABBR). These make a file invalid.
  • warning — a soft signal: a malformed DICT, an unrecognised TRAN_AGS edition, nonstandard abbreviations. Shown by default; suppressible.
  • fyi — informational only (e.g. extended-ASCII under Rule 1). Hidden unless you ask for it.

The same file, two verdicts

A file whose only blemish is an out-of-range TRAN_AGS edition (4.9.9) carries a single warning — nothing in the error tier:

lat validate examples/sample_site_edition.ags
examples/sample_site_edition.ags: 1 finding(s)
┌──────────────────────────────┬──────┬───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Rule                         ┆ Line ┆ Group ┆ Description                                                                                                      │
╞══════════════════════════════╪══════╪═══════╪══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡
│ Warning (Related to Rule 14) ┆ -    ┆ TRAN  ┆ TRAN_AGS is not a recognized AGS4 version: "4.9.9". The standard editions are 4.0.3 / 4.0.4 / 4.1 / 4.1.1 / 4.2. │
└──────────────────────────────┴──────┴───────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Drop the warning tier and the same file reads clean — and the exit code flips from 1 to 0:

lat validate --no-warnings examples/sample_site_edition.ags
examples/sample_site_edition.ags: clean (0 findings)

--no-warnings is errors-only; the default keeps warnings; --show-fyi adds the informational tier on top. See the CLI reference for the full flag list.

The same dial in Python

validate() exposes the tiers as keyword args — warnings= (default True) and fyi= (default False):

import laterite

# Default: errors + warnings. The unrecognised-edition warning shows.
print(laterite.read("examples/sample_site_edition.ags").validate().report.count)

# Errors only — the warning is gone, the verdict is clean.
print(
    laterite.read("examples/sample_site_edition.ags")
    .validate(warnings=False)
    .report.count
)

assert laterite.read("examples/sample_site_edition.ags").validate().report.count == 1
assert (
    laterite.read("examples/sample_site_edition.ags")
    .validate(warnings=False)
    .report.count
    == 0
)
1
0

Same dial as the CLI: validate(warnings=False) mirrors --no-warnings, and validate(fyi=True) mirrors --show-fyi. The verdict (is_valid, count) on .report reflects whichever tiers you asked for.

Tiers and the certificate fast-path

certify() measures every tier, and the certificate records what each one returned. A cert can therefore shortcut any tier it both measured and found clean — not just errors. So a plain validate() takes the cert short-circuit, and so does validate(warnings=True, fyi=True) when the cert recorded those tiers clean. What forces a full re-run is asking a question the cert cannot fully answer: a tier it never measured, or one it measured and found dirty — the findings themselves are not stored, only the verdict, so the engine has to run to hand them back.

See also: Validate · Certificate lifecycle