Lh037 — User-defined HEADER entity (`!FOO`) emitted before required HEADER records

§12.1b header/numbering (sub-class: user-defined header entities)

P1 — silent data loss

syntax

Sources

Description

Edition-3 permits user-defined header entities prefixed with `!` (e.g. `!COMPANY_INFO`). The order, duplication, and unknown-record rules are weakly specified. Producers occasionally place `!FOO` before FILE_DESCRIPTION (the spec mandates FILE_DESCRIPTION first) or use `!FOO` names colliding with EXPRESS schema entity names.

Reproducer recipe

HEADER opens with `!COMPANY_INFO('ACME','release-2026',..)` followed by FILE_DESCRIPTION/FILE_NAME/FILE_SCHEMA, then a second `!INTERNAL_ROUTING_TAG(..)` after FILE_SCHEMA.

Expected kernel behavior

skip unknown `!NAME` entities with a warning; tolerate them in any header position; require the three standard records to be present in the spec-mandated order independent of unknown-entity placement.

Notes

**See also**: Lh016. Synonyms: "user-defined HEADER entity before required records", "!COMPANY_INFO before FILE_DESCRIPTION", "vendor header out of order", "bang-prefix header at wrong position", "STEP header order violated by !FOO".

Expected validation

occt=empty/empty gmsh=empty ifc=reject

Byte assertions

Tier-3 assertions

Cross-references

Lh016

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Lh037: user-defined !FOO header entity placed before FILE_DESCRIPTION */
3/* ISO 10303-21 Ed.3 §6.2: FILE_DESCRIPTION must be the first HEADER record */
4/* DEFECT: !COMPANY_INFO appears before FILE_DESCRIPTION — violates required order */
5/* OCC rejects under strict mode; expected: skip !FOO with warning, tolerate any position */
6HEADER;
7!COMPANY_INFO('ACME','release-2026','[email protected]');
8/* DEFECT: standard records follow the !FOO entity, not precede it */
9FILE_DESCRIPTION(('Lh037: !COMPANY_INFO vendor header before FILE_DESCRIPTION'),'2;1');
10FILE_NAME('Lh037.stp','2026-06-20T00:00:00',(''),(''),'cad-research-suite','','');
11FILE_SCHEMA(('AUTOMOTIVE_DESIGN'));
12!INTERNAL_ROUTING_TAG('dept=CAD','priority=low');
13ENDSEC;
14DATA;
15#1=CARTESIAN_POINT('origin',(0.,0.,0.));
16#2=CARTESIAN_POINT('corner',(1.,1.,0.));
17#3=DIRECTION('xdir',(1.,0.,0.));
18#4=DIRECTION('zdir',(0.,0.,1.));
19#5=GEOMETRIC_CURVE_SET('vendor-header-shape',(#1,#2));
20ENDSEC;
21END-ISO-10303-21;