Skip to content

Validation & grades

Validation is not a stage of this engine; it is the engine’s spine. Every claim the pipeline makes — “this feature is built”, “this forbidden form is absent”, “these parts fit” — is backed by a named check that actually ran and PASSed on measured geometry.

Three commitments, enforced structurally rather than by convention:

  1. A feature is only claimed after its validators PASS. built can only be written when every check in the feature’s verified_by list has PASSed — and the schema itself enforces built ⊆ supported, so an unsupported feature literally cannot serialize as built.
  2. An unknown name is a load error, never a silent skip. Every check name, recipe op and joint type binds against its registry at catalog load. A typo is a CatalogError before any geometry exists.
  3. A check whose implementation is unavailable honestly does not run. It is reported as an ENGINE GAP finding and any feature it verifies stays honestly un-built — never a silent no-op that still claims its features.

Check names follow <level>.<check>; the level tells you where the measurement happens:

LevelMeasured onCritical?
form.*the Form IR — analytically, zero CAD, no tolerance fuzzper-finding
interface.*datums and port frames on the IR; mates in the assembled poseper-finding
topology.*the compiled solid, via geometry probesyes
region.*the compiled solid, restricted to declared semantic regionsyes
manufacturing.*the solid / exported mesh, against printer constraintscaps the grade
assembly.*cross-part checks in the assembled poseyes
quality.*shape-quality scoring; WARN-orientedno

The same physical property is often checked twice, once per side of the CAD boundary: form.mouth_opens_sideways reads tagged profile segments on the IR; topology.mouth_opens_sideways probes the actual void through the compiled solid. The form check gates cheaply and early; the topology probe verifies the compiler kept the promise.

Which checks run is archetype-driven: a handful of universal form checks always run; the rest come from the archetype’s own validators: list — one product family is never judged by another family’s checks. Browse all registered checks in the registry.

forge validate is the pre-CAD golden gate — it writes nothing, never imports cadquery, and exits non-zero on critical failure. forge build refuses to compile a form that failed its own IR checks, then measures the compiled solid and finalizes two reports:

  • the honesty report — requested / supported / PROVEN-built / missing features, which forbidden forms were checked and with what verdict (absent / present / unchecked), and which gaps the engine admits to;
  • the score — a numeric grade with a hard gate: a critical FAIL at contract / topology / region level forces status FAIL and grade F no matter how good the numbers look.

Every validator, reviewer and repair rule speaks one result shape:

FieldMeaning
checkthe registered check name
statuspass / warn / fail — a report’s status is the worst finding
levelwhich validation level produced it
criticala critical FAIL forces overall FAIL regardless of score
measured / limit / unitthe actual number vs the threshold — findings carry evidence, not just verdicts
suggestionan actionable hint; feeds the deterministic repair rules

report.passed(check) is true only if the check ran and its worst finding is PASS — absence of evidence is never evidence of absence.

An archetype’s contract names what the product must contain and what it must not degenerate into. Forbidden form ids bind at load time to the check whose failure means the form is present (e.g. closed_ring is detected by form.mouth_opens_sideways failing). A detected forbidden form is a critical contract FAIL; an unchecked one is reported as unchecked in the honesty report — never assumed absent.