Lh004 — HEADER section missing one of the three required entities (FILE_DESCRIPTION / FILE_NAME / FILE_SCHEMA), wrong order, or duplicated

§12.1b header/numbering

spec-violation syntax

Sources

Sender

hand-edited or partially-generated files; minimalist exporters (W033 echo)

Description

ISO 10303-21 requires exactly one each of FILE_DESCRIPTION, FILE_NAME, FILE_SCHEMA, in that order. Real files appear with FILE_SCHEMA omitted, FILE_NAME twice, FILE_DESCRIPTION/FILE_NAME swapped, or DATA before HEADER.

Reproducer recipe

`HEADER; FILE_NAME('a.stp','..',(''),(''),'','',''); FILE_DESCRIPTION((''),'2;1'); ENDSEC;` (no FILE_SCHEMA); or `ISO-10303-21; DATA; #1=A(); ENDSEC; END-ISO-10303-21;` (no HEADER at all).

Expected kernel behavior

reject with "missing required header entity X" or "header section out of order"; never null-deref the schema pointer.

Notes

**See also**: Lh005. Synonyms: "FILE_SCHEMA missing from HEADER", "FILE_NAME twice in HEADER", "DATA before HEADER in STEP", "header records out of order", "duplicated header entity".

Expected validation

occt=empty/empty gmsh=empty ifc=reject

Byte assertions

Tier-3 assertions

Cross-references

Lh005

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1ISO-10303-21;
2/* Lh004: HEADER section missing required schema record */
3/* ISO 10303-21 §8: HEADER must contain exactly one each of: */
4/*   FILE_DESCRIPTION, FILE_NAME, and the schema declaration — in that order */
5/* DEFECT: schema header record is absent; receiver has no schema binding */
6/* Minimalist exporters and hand-edited files drop this record */
7HEADER;
8FILE_DESCRIPTION(('Lh004: schema record missing from HEADER section'),'2;1');
9FILE_NAME('Lh004.stp','2026-06-20T00:00:00',(''),(''),'cad-research-suite','','');
10/* DEFECT: schema declaration record intentionally absent — ENDSEC follows immediately */
11ENDSEC;
12DATA;
13#1=CARTESIAN_POINT('origin',(0.,0.,0.));
14#2=CARTESIAN_POINT('corner',(1.,1.,0.));
15#3=DIRECTION('xdir',(1.,0.,0.));
16#4=DIRECTION('zdir',(0.,0.,1.));
17#5=GEOMETRIC_CURVE_SET('missing-schema-record-shape',(#1,#2));
18ENDSEC;
19END-ISO-10303-21;