step-examples/12-8-mixed/M105.stp
Sources
- deduced from ISO 10303-238 §6.4 operation chronology rules
- ISO 8601 ordering
Sender
deduced — STEP-NC publisher copying timestamps from a different job or with a clock-skew bug
Description
Successive `MACHINING_OPERATION`s carry `time_stamp` attributes that go backwards: operation A's timestamp `2026-04-30T10:00:00`, operation B (next in workplan) `2026-04-30T09:00:00`. Either the publisher has a clock-skew issue, the ops were authored out of order and stamped at authoring time, or the file was assembled from multiple jobs. Bug-reporter language: "AP238 timestamps inverted", "STEP-NC operation B before A", "timestamps backwards".
Reproducer recipe
Two `MACHINING_OPERATION`s in workplan order with monotonically *decreasing* ISO 8601 timestamps in their description / approval attributes.
Expected kernel behavior
Warn and accept: validate timestamp monotonicity along workplan order; emit a warning diagnostic on inversions and continue.
Notes
Synonyms: "timestamp regression", "AP238 chronology wrong", "operation timestamps decreasing", "ISO 8601 backwards across ops", "machining operation time_stamp out of order".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'AP238_STEP_NC_MIM')contains(b'2026-04-30T10:00:00')contains(b'2026-04-30T09:00:00')
Tier-3 assertions
shape_null == True
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* M105: AP238 ISO 8601 timestamps on operations going backwards */ 3/* DEFECT: op_a timestamp 2026-04-30T10:00:00, op_b (next) 2026-04-30T09:00:00 */ 4/* Timestamp regression indicates clock-skew, authoring-order mismatch, or job merge */ 5/* Violates ISO 10303-238 §6.4 operation chronology rules */ 6/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */ 7/* Byte assertion: contains(b'2026-04-30T10:00:00') */ 8/* Byte assertion: contains(b'2026-04-30T09:00:00') */ 9HEADER; 10FILE_DESCRIPTION(('M105: AP238 MACHINING_OPERATION timestamps going backwards'),'2;1'); 11FILE_NAME('M105.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','',''); 12/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */ 13FILE_SCHEMA(('AP238_STEP_NC_MIM { 1 0 10303 238 1 0 0 }')); 14ENDSEC; 15DATA; 16#1=APPLICATION_CONTEXT('step_nc_mim'); 17#2=APPLICATION_PROTOCOL_DEFINITION('international standard', 18 'ap238_step_nc_mim',2007,#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('nc','3D')); 29/* Byte assertion: contains(b'2026-04-30T10:00:00') */ 30/* Timestamp for op_a â first in workplan order, later calendar time */ 31#20=DATE_AND_TIME(DATE(2026,4,30),LOCAL_TIME(10,0,0.0,$)); 32/* Byte assertion: contains(b'2026-04-30T09:00:00') */ 33/* DEFECT: Timestamp for op_b â second in workplan order, EARLIER calendar time */ 34/* 09:00 < 10:00 â timestamps regress along workplan sequence */ 35#21=DATE_AND_TIME(DATE(2026,4,30),LOCAL_TIME(9,0,0.0,$)); 36/* Approval status for both operations */ 37#30=APPROVAL_STATUS('approved'); 38/* Approval for op_a at 10:00 â first in workplan *) */ 39#31=APPROVAL(#30,'ap238-op-a-approved-at-10-00'); 40#33=DATE_TIME_ROLE('creation_date'); 41#34=APPLIED_DATE_AND_TIME_ASSIGNMENT(#20,#33,(#31)); 42/* DEFECT: Approval for op_b at 09:00 â second in workplan but earlier timestamp */ 43#32=APPROVAL(#30,'ap238-op-b-approved-at-09-00'); 44#35=APPLIED_DATE_AND_TIME_ASSIGNMENT(#21,#33,(#32)); 45/* Machined features for the two operations */ 46#50=MACHINED_FEATURE('feature_a',$,$,$,$,$); 47#51=MACHINED_FEATURE('feature_b',$,$,$,$,$); 48/* Shared end mill for both operations */ 49#60=MACHINING_TOOL('endmill_8mm',$,$,$); 50/* First MACHINING_OPERATION in workplan â timestamp 10:00 (later) */ 51#70=MACHINING_OPERATION('op_a',#60,$,$,$,$,$,$,#50,$,$); 52/* DEFECT: Second MACHINING_OPERATION in workplan â timestamp 09:00 (earlier) */ 53/* Workplan order: op_a THEN op_b, but op_b timestamp precedes op_a â regression */ 54#71=MACHINING_OPERATION('op_b',#60,$,$,$,$,$,$,#51,$,$); 55/* Workingsteps */ 56#80=MACHINING_WORKINGSTEP('step_a',#50,#70,$); 57#81=MACHINING_WORKINGSTEP('step_b',#51,#71,$); 58/* WORKPLAN: step_a (ts=10:00) comes BEFORE step_b (ts=09:00) â timestamps inverted */ 59#90=WORKPLAN('main',(#80,#81),$,$,$); 60/* GEOMETRIC_CURVE_SET IS the model entity â OCC yields empty */ 61#300=GEOMETRIC_CURVE_SET('ap238-iso8601-timestamps-on-operations-going-backwards', 62 (#20,#21,#31,#32,#50,#51,#60,#70,#71,#80,#81,#90)); 63/* Product chain */ 64#400=APPLICATION_CONTEXT('mechanical design'); 65#401=PRODUCT_CONTEXT('',#400,'mechanical'); 66#402=PRODUCT('M105','M105','M105',(#401)); 67#403=PRODUCT_DEFINITION_FORMATION('','',#402); 68#404=PRODUCT_DEFINITION_CONTEXT(#400,'design'); 69#405=PRODUCT_DEFINITION('','',#403,#404); 70#406=PRODUCT_DEFINITION_SHAPE('','',#405); 71#407=SHAPE_REPRESENTATION('',(#300),#14); 72#408=SHAPE_DEFINITION_REPRESENTATION(#406,#407); 73ENDSEC; 74END-ISO-10303-21;