M139 — AP203 effectivity start date is AFTER its end date

§12.8 (sub-class: AP203 effectivity window malformed)

P1 — silent data loss

spec-violation

Sources

Sender

deduced — PDM exporter that swapped start / end fields when the effectivity was authored backwards

Description

A `TIME_INTERVAL_BASED_EFFECTIVITY` declares `effectivity_start` later than `effectivity_end`. The interval is empty, or - taken literally - runs backward in time. No date is ever within the effectivity window, making the configuration permanently unavailable.

Reproducer recipe

`TIME_INTERVAL_BASED_EFFECTIVITY('rev','rev_A', 2025-06-01, 2024-12-31)`.

Expected kernel behavior

detect reversed interval; reject or swap the dates with a warning.

Notes

Synonyms: "AP203 effectivity backwards", "negative-duration effectivity", "empty effectivity window".

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Byte assertions

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* M139: AP203 effectivity start date AFTER end date — reversed interval */
3/* DEFECT: TIME_INTERVAL_BASED_EFFECTIVITY start=2025-06-01 > end=2024-12-31 */
4/* The effectivity window is empty: no date falls within [2025-06-01, 2024-12-31] */
5/* Configuration governed by this effectivity is permanently unavailable */
6/* Per ISO 10303-203 §4 invariant: effectivity_start_date <= effectivity_end_date */
7/* Byte assertion: contains(b'CONFIG_CONTROL_DESIGN') */
8/* Byte assertion: contains(b'TIME_INTERVAL_BASED_EFFECTIVITY') */
9HEADER;
10FILE_DESCRIPTION(('M139: AP203 TIME_INTERVAL_BASED_EFFECTIVITY reversed start after end'),'2;1');
11FILE_NAME('M139.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','','');
12/* Byte assertion: contains(b'CONFIG_CONTROL_DESIGN') */
13FILE_SCHEMA(('CONFIG_CONTROL_DESIGN { 1 0 10303 203 1 0 0 }'));
14ENDSEC;
15DATA;
16#1=APPLICATION_CONTEXT('configuration controlled 3D designs of mechanical parts and assemblies');
17#2=APPLICATION_PROTOCOL_DEFINITION('international standard',
18  'config_control_design',1994,#1);
19/* Standard unit context (mm) */
20#10=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
21#11=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
22#12=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
23#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10,
24  'distance_accuracy_value','maximum model space distance between geometric entities');
25#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3)
26  GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13))
27  GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12))
28  REPRESENTATION_CONTEXT('ctx','3D'));
29/* Product under effectivity control */
30#20=PRODUCT('PART-303','Fuel Injector','High-pressure fuel injection nozzle',(#1));
31#21=PRODUCT_DEFINITION_FORMATION('rev_A','Initial release rev A',#20);
32#22=PRODUCT_DEFINITION('design','',#21,PRODUCT_DEFINITION_CONTEXT(#1,'design'));
33/* CALENDAR_DATE for effectivity_start: 2025-06-01 (year=2025, month=6, day=1) */
34/* DEFECT contributor: this date is LATER than the end date below */
35#30=CALENDAR_DATE(2025,6,1);
36/* CALENDAR_DATE for effectivity_end: 2024-12-31 (year=2024, month=12, day=31) */
37/* This end date is EARLIER than start — the exporter swapped the two fields */
38#31=CALENDAR_DATE(2024,12,31);
39/* Byte assertion: contains(b'TIME_INTERVAL_BASED_EFFECTIVITY') */
40/* DEFECT: TIME_INTERVAL_BASED_EFFECTIVITY with reversed dates */
41/* start_date=#30 (2025-06-01) is AFTER end_date=#31 (2024-12-31) */
42/* ISO 10303-203 §4 invariant violated: start must be <= end */
43/* A PDM resolver checking if today falls within this window always returns false */
44#32=TIME_INTERVAL_BASED_EFFECTIVITY('eff-rev-A','rev_A effectivity window',#30,#31);
45/* PRODUCT_DEFINITION_EFFECTIVITY ties the reversed effectivity to the product definition */
46#33=PRODUCT_DEFINITION_EFFECTIVITY(#32,(#22));
47/* GEOMETRIC_CURVE_SET IS the model entity — OCC yields empty */
48#500=GEOMETRIC_CURVE_SET('ap203-time-interval-effectivity-reversed-start-after-end',
49  (#20,#21,#22,#30,#31,#32,#33));
50/* Product chain */
51#600=APPLICATION_CONTEXT('mechanical design');
52#601=PRODUCT_CONTEXT('',#600,'mechanical');
53#602=PRODUCT('M139','M139','M139',(#601));
54#603=PRODUCT_DEFINITION_FORMATION('','',#602);
55#604=PRODUCT_DEFINITION_CONTEXT(#600,'design');
56#605=PRODUCT_DEFINITION('','',#603,#604);
57#606=PRODUCT_DEFINITION_SHAPE('','',#605);
58#607=SHAPE_REPRESENTATION('',(#500),#14);
59#608=SHAPE_DEFINITION_REPRESENTATION(#606,#607);
60ENDSEC;
61END-ISO-10303-21;