1macro_rules! contract_pre_absolute_position_add {
12 () => {{}};
13 ($input:expr) => {{
14 let _pv_indices = &$input;
15 debug_assert!(
16 _pv_indices.len() > 0,
17 "Contract absolute_position_add: precondition violated — indices.len() > 0"
18 );
19 }};
20}
21
22macro_rules! contract_pre_gelu {
28 () => {{}};
29 ($input:expr) => {{
30 let _pv_x = &$input;
31 debug_assert!(
32 _pv_x.iter().all(|v| v.is_finite()),
33 "Contract gelu: precondition violated — x.iter().all(|v| v.is_finite())"
34 );
35 debug_assert!(_pv_x.len() > 0, "Contract gelu: precondition violated — x.len() > 0");
36 }};
37}
38
39macro_rules! contract_pre_relu {
42 () => {{}};
43 ($input:expr) => {{
44 let _pv_x = &$input;
45 debug_assert!(
46 _pv_x.iter().all(|v| v.is_finite()),
47 "Contract relu: precondition violated — x.iter().all(|v| v.is_finite())"
48 );
49 debug_assert!(_pv_x.len() > 0, "Contract relu: precondition violated — x.len() > 0");
50 }};
51}
52
53macro_rules! contract_pre_silu {
56 () => {{}};
57 ($input:expr) => {{
58 let _pv_x = &$input;
59 debug_assert!(
60 _pv_x.iter().all(|v| v.is_finite()),
61 "Contract silu: precondition violated — x.iter().all(|v| v.is_finite())"
62 );
63 debug_assert!(_pv_x.len() > 0, "Contract silu: precondition violated — x.len() > 0");
64 }};
65}
66
67macro_rules! contract_pre_entropy_score {
73 () => {{}};
74 ($input:expr) => {{
75 let _pv_input = &$input;
76 debug_assert!(
77 _pv_input.len() > 0,
78 "Contract entropy_score: precondition violated — input.len() > 0"
79 );
80 debug_assert!(
81 _pv_input.iter().all(|v| v.is_finite()),
82 "Contract entropy_score: precondition violated — input.iter().all(|v| v.is_finite())"
83 );
84 }};
85}
86
87macro_rules! contract_pre_margin_score {
90 () => {{}};
91 ($input:expr) => {{
92 let _pv_input = &$input;
93 debug_assert!(
94 _pv_input.len() > 0,
95 "Contract margin_score: precondition violated — input.len() > 0"
96 );
97 debug_assert!(
98 _pv_input.iter().all(|v| v.is_finite()),
99 "Contract margin_score: precondition violated — input.iter().all(|v| v.is_finite())"
100 );
101 }};
102}
103
104macro_rules! contract_pre_qbc_score {
107 () => {{}};
108 ($input:expr) => {{
109 let _pv_input = &$input;
110 debug_assert!(
111 _pv_input.len() > 0,
112 "Contract qbc_score: precondition violated — input.len() > 0"
113 );
114 debug_assert!(
115 _pv_input.iter().all(|v| v.is_finite()),
116 "Contract qbc_score: precondition violated — input.iter().all(|v| v.is_finite())"
117 );
118 }};
119}
120
121macro_rules! contract_pre_uncertainty_score {
124 () => {{}};
125 ($input:expr) => {{
126 let _pv_input = &$input;
127 debug_assert!(_pv_input.len() > 0,
128 "Contract uncertainty_score: precondition violated — input.len() > 0");
129 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
130 "Contract uncertainty_score: precondition violated — input.iter().all(|v| v.is_finite())");
131 }};
132}
133
134macro_rules! contract_pre_adam_moments {
140 () => {{}};
141 ($input:expr) => {{
142 let _pv_params = &$input;
143 debug_assert!(
144 _pv_params.len() > 0,
145 "Contract adam_moments: precondition violated — params.len() > 0"
146 );
147 }};
148}
149
150macro_rules! contract_pre_adam_variance {
153 () => {{}};
154 ($input:expr) => {{
155 let _pv_params = &$input;
156 debug_assert!(
157 _pv_params.len() > 0,
158 "Contract adam_variance: precondition violated — params.len() > 0"
159 );
160 }};
161}
162
163macro_rules! contract_pre_bias_correction {
166 () => {{}};
167 ($input:expr) => {{
168 let _pv_params = &$input;
169 debug_assert!(
170 _pv_params.len() > 0,
171 "Contract bias_correction: precondition violated — params.len() > 0"
172 );
173 }};
174}
175
176macro_rules! contract_pre_weight_update {
179 () => {{}};
180 ($input:expr) => {{
181 let _pv_params = &$input;
182 debug_assert!(
183 _pv_params.len() > 0,
184 "Contract weight_update: precondition violated — params.len() > 0"
185 );
186 }};
187}
188
189macro_rules! contract_pre_context_compaction {
195 () => {{}};
196 ($input:expr) => {{
197 let _contract_input = &$input;
198 }};
199}
200
201macro_rules! contract_post_context_compaction {
204 ($result:expr) => {{
205 let _contract_result = &$result;
206 }};
207}
208
209macro_rules! contract_context_compaction {
211 ($input:expr, $body:expr) => {{
212 contract_pre_context_compaction!($input);
213 let _contract_result = $body;
214 contract_post_context_compaction!(_contract_result);
215 _contract_result
216 }};
217}
218
219macro_rules! contract_post_hook_ordering {
222 ($result:expr) => {{
223 let _contract_result = &$result;
224 }};
225}
226
227macro_rules! contract_pre_loop_termination {
230 () => {{}};
231 ($input:expr) => {{
232 let _pv_x = &$input;
233 }};
234}
235
236macro_rules! contract_post_loop_termination {
239 ($result:expr) => {{
240 let _contract_result = &$result;
241 }};
242}
243
244macro_rules! contract_loop_termination {
246 ($input:expr, $body:expr) => {{
247 contract_pre_loop_termination!($input);
248 let _contract_result = $body;
249 contract_post_loop_termination!(_contract_result);
250 _contract_result
251 }};
252}
253
254macro_rules! contract_post_parallel_tool_safety {
257 ($result:expr) => {{
258 let _contract_result = &$result;
259 }};
260}
261
262macro_rules! contract_pre_sandbox_enforcement {
265 () => {{}};
266 ($input:expr) => {{
267 let _pv_manifest = &$input;
268 }};
269}
270
271macro_rules! contract_post_sandbox_enforcement {
274 ($result:expr) => {{
275 let _contract_result = &$result;
276 }};
277}
278
279macro_rules! contract_sandbox_enforcement {
281 ($input:expr, $body:expr) => {{
282 contract_pre_sandbox_enforcement!($input);
283 let _contract_result = $body;
284 contract_post_sandbox_enforcement!(_contract_result);
285 _contract_result
286 }};
287}
288
289macro_rules! contract_post_session_crash_recovery {
292 ($result:expr) => {{
293 let _contract_result = &$result;
294 }};
295}
296
297macro_rules! contract_post_state_machine {
300 ($result:expr) => {{
301 let _contract_result = &$result;
302 }};
303}
304
305macro_rules! contract_pre_daemon_lifecycle {
311 () => {{}};
312 ($input:expr) => {{
313 let _pv_config = &$input;
314 }};
315}
316
317macro_rules! contract_pre_error_classification {
320 () => {{}};
321 ($input:expr) => {{
322 let _contract_input = &$input;
323 }};
324}
325
326macro_rules! contract_pre_manager_registration {
329 () => {{}};
330 ($input:expr) => {{
331 let _contract_input = &$input;
332 }};
333}
334
335macro_rules! contract_pre_red_metrics {
338 () => {{}};
339 ($input:expr) => {{
340 let _contract_input = &$input;
341 }};
342}
343
344macro_rules! contract_pre_restart_policy {
347 () => {{}};
348 ($input:expr) => {{
349 let _pv_BackoffConfig = &$input;
350 }};
351}
352
353macro_rules! contract_pre_signal_handling {
356 () => {{}};
357 ($input:expr) => {{
358 let _contract_input = &$input;
359 }};
360}
361
362macro_rules! contract_pre_brick_verification {
368 () => {{}};
369 ($input:expr) => {{
370 let _pv_brick = &$input;
371 }};
372}
373
374macro_rules! contract_post_brick_verification {
377 ($result:expr) => {{
378 let _contract_result = &$result;
379 }};
380}
381
382macro_rules! contract_brick_verification {
384 ($input:expr, $body:expr) => {{
385 contract_pre_brick_verification!($input);
386 let _contract_result = $body;
387 contract_post_brick_verification!(_contract_result);
388 _contract_result
389 }};
390}
391
392macro_rules! contract_pre_contrast_accessibility {
395 () => {{}};
396 ($input:expr) => {{
397 let _contract_input = &$input;
398 }};
399}
400
401macro_rules! contract_post_contrast_accessibility {
404 ($result:expr) => {{
405 let _contract_result = &$result;
406 }};
407}
408
409macro_rules! contract_contrast_accessibility {
411 ($input:expr, $body:expr) => {{
412 contract_pre_contrast_accessibility!($input);
413 let _contract_result = $body;
414 contract_post_contrast_accessibility!(_contract_result);
415 _contract_result
416 }};
417}
418
419macro_rules! contract_post_cost_display_accuracy {
422 ($result:expr) => {{
423 let _contract_result = &$result;
424 }};
425}
426
427macro_rules! contract_pre_frame_budget {
430 () => {{}};
431 ($input:expr) => {{
432 let _pv_panels = &$input;
433 debug_assert!(
434 _pv_panels.len() > 0,
435 "Contract frame_budget: precondition violated — panels.len() > 0"
436 );
437 }};
438}
439
440macro_rules! contract_post_frame_budget {
443 ($result:expr) => {{
444 let _contract_result = &$result;
445 }};
446}
447
448macro_rules! contract_frame_budget {
450 ($input:expr, $body:expr) => {{
451 contract_pre_frame_budget!($input);
452 let _contract_result = $body;
453 contract_post_frame_budget!(_contract_result);
454 _contract_result
455 }};
456}
457
458macro_rules! contract_pre_layout_correctness {
461 () => {{}};
462 ($input:expr) => {{
463 let _contract_input = &$input;
464 }};
465}
466
467macro_rules! contract_pre_pixel_coverage {
470 () => {{}};
471 ($input:expr) => {{
472 let _contract_input = &$input;
473 }};
474}
475
476macro_rules! contract_post_pixel_coverage {
479 ($result:expr) => {{
480 let _contract_result = &$result;
481 }};
482}
483
484macro_rules! contract_pixel_coverage {
486 ($input:expr, $body:expr) => {{
487 contract_pre_pixel_coverage!($input);
488 let _contract_result = $body;
489 contract_post_pixel_coverage!(_contract_result);
490 _contract_result
491 }};
492}
493
494macro_rules! contract_pre_streaming_responsiveness {
497 () => {{}};
498 ($input:expr) => {{
499 let _pv_provider = &$input;
500 }};
501}
502
503macro_rules! contract_post_streaming_responsiveness {
506 ($result:expr) => {{
507 let _contract_result = &$result;
508 }};
509}
510
511macro_rules! contract_streaming_responsiveness {
513 ($input:expr, $body:expr) => {{
514 contract_pre_streaming_responsiveness!($input);
515 let _contract_result = $body;
516 contract_post_streaming_responsiveness!(_contract_result);
517 _contract_result
518 }};
519}
520
521macro_rules! contract_pre_alibi_bias {
527 () => {{}};
528 ($input:expr) => {{
529 let _pv_indices = &$input;
530 debug_assert!(
531 _pv_indices.len() > 0,
532 "Contract alibi_bias: precondition violated — indices.len() > 0"
533 );
534 }};
535}
536
537macro_rules! contract_pre_alibi_slopes {
540 () => {{}};
541 ($input:expr) => {{
542 let _pv_indices = &$input;
543 debug_assert!(
544 _pv_indices.len() > 0,
545 "Contract alibi_slopes: precondition violated — indices.len() > 0"
546 );
547 }};
548}
549
550macro_rules! contract_pre_architecture_config_invariants {
556 () => {{}};
557 ($input:expr) => {{
558 let _contract_input = &$input;
559 }};
560}
561
562macro_rules! contract_post_architecture_config_invariants {
565 ($result:expr) => {{
566 let _contract_result = &$result;
567 }};
568}
569
570macro_rules! contract_architecture_config_invariants {
572 ($input:expr, $body:expr) => {{
573 contract_pre_architecture_config_invariants!($input);
574 let _contract_result = $body;
575 contract_post_architecture_config_invariants!(_contract_result);
576 _contract_result
577 }};
578}
579
580macro_rules! contract_pre_attention_tensor_shapes {
583 () => {{}};
584 ($input:expr) => {{
585 let _pv_x = &$input;
586 }};
587}
588
589macro_rules! contract_post_attention_tensor_shapes {
592 ($result:expr) => {{
593 let _contract_result = &$result;
594 }};
595}
596
597macro_rules! contract_attention_tensor_shapes {
599 ($input:expr, $body:expr) => {{
600 contract_pre_attention_tensor_shapes!($input);
601 let _contract_result = $body;
602 contract_post_attention_tensor_shapes!(_contract_result);
603 _contract_result
604 }};
605}
606
607macro_rules! contract_pre_embedding_tensor_shapes {
610 () => {{}};
611 ($input:expr) => {{
612 let _contract_input = &$input;
613 }};
614}
615
616macro_rules! contract_post_embedding_tensor_shapes {
619 ($result:expr) => {{
620 let _contract_result = &$result;
621 }};
622}
623
624macro_rules! contract_embedding_tensor_shapes {
626 ($input:expr, $body:expr) => {{
627 contract_pre_embedding_tensor_shapes!($input);
628 let _contract_result = $body;
629 contract_post_embedding_tensor_shapes!(_contract_result);
630 _contract_result
631 }};
632}
633
634macro_rules! contract_pre_ffn_tensor_shapes {
637 () => {{}};
638 ($input:expr) => {{
639 let _pv_x = &$input;
640 }};
641}
642
643macro_rules! contract_post_ffn_tensor_shapes {
646 ($result:expr) => {{
647 let _contract_result = &$result;
648 }};
649}
650
651macro_rules! contract_ffn_tensor_shapes {
653 ($input:expr, $body:expr) => {{
654 contract_pre_ffn_tensor_shapes!($input);
655 let _contract_result = $body;
656 contract_post_ffn_tensor_shapes!(_contract_result);
657 _contract_result
658 }};
659}
660
661macro_rules! contract_pre_normalization_tensor_shapes {
664 () => {{}};
665 ($input:expr) => {{
666 let _pv_x = &$input;
667 }};
668}
669
670macro_rules! contract_post_normalization_tensor_shapes {
673 ($result:expr) => {{
674 let _contract_result = &$result;
675 }};
676}
677
678macro_rules! contract_normalization_tensor_shapes {
680 ($input:expr, $body:expr) => {{
681 contract_pre_normalization_tensor_shapes!($input);
682 let _contract_result = $body;
683 contract_post_normalization_tensor_shapes!(_contract_result);
684 _contract_result
685 }};
686}
687
688macro_rules! contract_pre_rope_position_encoding {
691 () => {{}};
692 ($input:expr) => {{
693 let _pv_config = &$input;
694 }};
695}
696
697macro_rules! contract_post_rope_position_encoding {
700 ($result:expr) => {{
701 let _contract_result = &$result;
702 }};
703}
704
705macro_rules! contract_rope_position_encoding {
707 ($input:expr, $body:expr) => {{
708 contract_pre_rope_position_encoding!($input);
709 let _contract_result = $body;
710 contract_post_rope_position_encoding!(_contract_result);
711 _contract_result
712 }};
713}
714
715macro_rules! contract_pre_total_tensor_count {
718 () => {{}};
719 ($input:expr) => {{
720 let _contract_input = &$input;
721 }};
722}
723
724macro_rules! contract_post_total_tensor_count {
727 ($result:expr) => {{
728 let _contract_result = &$result;
729 }};
730}
731
732macro_rules! contract_total_tensor_count {
734 ($input:expr, $body:expr) => {{
735 contract_pre_total_tensor_count!($input);
736 let _contract_result = $body;
737 contract_post_total_tensor_count!(_contract_result);
738 _contract_result
739 }};
740}
741
742macro_rules! contract_pre_chat_template_application {
748 () => {{}};
749 ($input:expr) => {{
750 let _contract_input = &$input;
751 }};
752}
753
754macro_rules! contract_post_chat_template_application {
757 ($result:expr) => {{
758 let _contract_result = &$result;
759 }};
760}
761
762macro_rules! contract_chat_template_application {
764 ($input:expr, $body:expr) => {{
765 contract_pre_chat_template_application!($input);
766 let _contract_result = $body;
767 contract_post_chat_template_application!(_contract_result);
768 _contract_result
769 }};
770}
771
772macro_rules! contract_pre_kv_cache_management {
775 () => {{}};
776 ($input:expr) => {{
777 let _pv_new_tokens = &$input;
778 debug_assert!(
779 _pv_new_tokens.len() > 0,
780 "Contract kv_cache_management: precondition violated — new_tokens.len() > 0"
781 );
782 }};
783}
784
785macro_rules! contract_post_kv_cache_management {
788 ($result:expr) => {{
789 let _contract_result = &$result;
790 }};
791}
792
793macro_rules! contract_kv_cache_management {
795 ($input:expr, $body:expr) => {{
796 contract_pre_kv_cache_management!($input);
797 let _contract_result = $body;
798 contract_post_kv_cache_management!(_contract_result);
799 _contract_result
800 }};
801}
802
803macro_rules! contract_pre_session_persistence {
806 () => {{}};
807 ($input:expr) => {{
808 let _contract_input = &$input;
809 }};
810}
811
812macro_rules! contract_post_session_persistence {
815 ($result:expr) => {{
816 let _contract_result = &$result;
817 }};
818}
819
820macro_rules! contract_session_persistence {
822 ($input:expr, $body:expr) => {{
823 contract_pre_session_persistence!($input);
824 let _contract_result = $body;
825 contract_post_session_persistence!(_contract_result);
826 _contract_result
827 }};
828}
829
830macro_rules! contract_pre_session_state_machine {
833 () => {{}};
834 ($input:expr) => {{
835 let _contract_input = &$input;
836 }};
837}
838
839macro_rules! contract_post_session_state_machine {
842 ($result:expr) => {{
843 let _contract_result = &$result;
844 }};
845}
846
847macro_rules! contract_session_state_machine {
849 ($input:expr, $body:expr) => {{
850 contract_pre_session_state_machine!($input);
851 let _contract_result = $body;
852 contract_post_session_state_machine!(_contract_result);
853 _contract_result
854 }};
855}
856
857macro_rules! contract_pre_load_checkpoint {
863 () => {{}};
864 ($input:expr) => {{
865 let _pv_path = &$input;
866 }};
867}
868
869macro_rules! contract_post_load_checkpoint {
872 ($result:expr) => {{
873 let _contract_result = &$result;
874 }};
875}
876
877macro_rules! contract_load_checkpoint {
879 ($input:expr, $body:expr) => {{
880 contract_pre_load_checkpoint!($input);
881 let _contract_result = $body;
882 contract_post_load_checkpoint!(_contract_result);
883 _contract_result
884 }};
885}
886
887macro_rules! contract_pre_save_checkpoint {
890 () => {{}};
891 ($input:expr) => {{
892 let _pv_data = &$input;
893 debug_assert!(
894 !_pv_data.is_empty(),
895 "Contract save_checkpoint: precondition violated — !data.is_empty()"
896 );
897 }};
898}
899
900macro_rules! contract_post_save_checkpoint {
903 ($result:expr) => {{
904 let _contract_result = &$result;
905 }};
906}
907
908macro_rules! contract_save_checkpoint {
910 ($input:expr, $body:expr) => {{
911 contract_pre_save_checkpoint!($input);
912 let _contract_result = $body;
913 contract_post_save_checkpoint!(_contract_result);
914 _contract_result
915 }};
916}
917
918macro_rules! contract_pre_concurrent_model_access {
924 () => {{}};
925 ($input:expr) => {{
926 let _pv_requests = &$input;
927 debug_assert!(
928 _pv_requests.len() > 0,
929 "Contract concurrent_model_access: precondition violated — requests.len() > 0"
930 );
931 }};
932}
933
934macro_rules! contract_post_concurrent_model_access {
937 ($result:expr) => {{
938 let _contract_result = &$result;
939 }};
940}
941
942macro_rules! contract_concurrent_model_access {
944 ($input:expr, $body:expr) => {{
945 contract_pre_concurrent_model_access!($input);
946 let _contract_result = $body;
947 contract_post_concurrent_model_access!(_contract_result);
948 _contract_result
949 }};
950}
951
952macro_rules! contract_pre_inference_determinism {
955 () => {{}};
956 ($input:expr) => {{
957 let _contract_input = &$input;
958 }};
959}
960
961macro_rules! contract_post_inference_determinism {
964 ($result:expr) => {{
965 let _contract_result = &$result;
966 }};
967}
968
969macro_rules! contract_inference_determinism {
971 ($input:expr, $body:expr) => {{
972 contract_pre_inference_determinism!($input);
973 let _contract_result = $body;
974 contract_post_inference_determinism!(_contract_result);
975 _contract_result
976 }};
977}
978
979macro_rules! contract_pre_progress_reporting {
982 () => {{}};
983 ($input:expr) => {{
984 let _contract_input = &$input;
985 }};
986}
987
988macro_rules! contract_post_progress_reporting {
991 ($result:expr) => {{
992 let _contract_result = &$result;
993 }};
994}
995
996macro_rules! contract_progress_reporting {
998 ($input:expr, $body:expr) => {{
999 contract_pre_progress_reporting!($input);
1000 let _contract_result = $body;
1001 contract_post_progress_reporting!(_contract_result);
1002 _contract_result
1003 }};
1004}
1005
1006macro_rules! contract_pre_resource_cleanup {
1009 () => {{}};
1010 ($input:expr) => {{
1011 let _contract_input = &$input;
1012 }};
1013}
1014
1015macro_rules! contract_post_resource_cleanup {
1018 ($result:expr) => {{
1019 let _contract_result = &$result;
1020 }};
1021}
1022
1023macro_rules! contract_resource_cleanup {
1025 ($input:expr, $body:expr) => {{
1026 contract_pre_resource_cleanup!($input);
1027 let _contract_result = $body;
1028 contract_post_resource_cleanup!(_contract_result);
1029 _contract_result
1030 }};
1031}
1032
1033macro_rules! contract_pre_side_effect_classification {
1036 () => {{}};
1037 ($input:expr) => {{
1038 let _contract_input = &$input;
1039 }};
1040}
1041
1042macro_rules! contract_post_side_effect_classification {
1045 ($result:expr) => {{
1046 let _contract_result = &$result;
1047 }};
1048}
1049
1050macro_rules! contract_side_effect_classification {
1052 ($input:expr, $body:expr) => {{
1053 contract_pre_side_effect_classification!($input);
1054 let _contract_result = $body;
1055 contract_post_side_effect_classification!(_contract_result);
1056 _contract_result
1057 }};
1058}
1059
1060macro_rules! contract_pre_tokenizer_consistency {
1063 () => {{}};
1064 ($input:expr) => {{
1065 let _contract_input = &$input;
1066 }};
1067}
1068
1069macro_rules! contract_post_tokenizer_consistency {
1072 ($result:expr) => {{
1073 let _contract_result = &$result;
1074 }};
1075}
1076
1077macro_rules! contract_tokenizer_consistency {
1079 ($input:expr, $body:expr) => {{
1080 contract_pre_tokenizer_consistency!($input);
1081 let _contract_result = $body;
1082 contract_post_tokenizer_consistency!(_contract_result);
1083 _contract_result
1084 }};
1085}
1086
1087macro_rules! contract_pre_command_parse_determinism {
1093 () => {{}};
1094 ($input:expr) => {{
1095 let _contract_input = &$input;
1096 }};
1097}
1098
1099macro_rules! contract_post_command_parse_determinism {
1102 ($result:expr) => {{
1103 let _contract_result = &$result;
1104 }};
1105}
1106
1107macro_rules! contract_command_parse_determinism {
1109 ($input:expr, $body:expr) => {{
1110 contract_pre_command_parse_determinism!($input);
1111 let _contract_result = $body;
1112 contract_post_command_parse_determinism!(_contract_result);
1113 _contract_result
1114 }};
1115}
1116
1117macro_rules! contract_pre_contract_gate_enforcement {
1120 () => {{}};
1121 ($input:expr) => {{
1122 let _contract_input = &$input;
1123 }};
1124}
1125
1126macro_rules! contract_post_contract_gate_enforcement {
1129 ($result:expr) => {{
1130 let _contract_result = &$result;
1131 }};
1132}
1133
1134macro_rules! contract_contract_gate_enforcement {
1136 ($input:expr, $body:expr) => {{
1137 contract_pre_contract_gate_enforcement!($input);
1138 let _contract_result = $body;
1139 contract_post_contract_gate_enforcement!(_contract_result);
1140 _contract_result
1141 }};
1142}
1143
1144macro_rules! contract_pre_model_path_resolution {
1147 () => {{}};
1148 ($input:expr) => {{
1149 let _contract_input = &$input;
1150 }};
1151}
1152
1153macro_rules! contract_post_model_path_resolution {
1156 ($result:expr) => {{
1157 let _contract_result = &$result;
1158 }};
1159}
1160
1161macro_rules! contract_model_path_resolution {
1163 ($input:expr, $body:expr) => {{
1164 contract_pre_model_path_resolution!($input);
1165 let _contract_result = $body;
1166 contract_post_model_path_resolution!(_contract_result);
1167 _contract_result
1168 }};
1169}
1170
1171macro_rules! contract_pre_pipe_stdin_support {
1174 () => {{}};
1175 ($input:expr) => {{
1176 let _contract_input = &$input;
1177 }};
1178}
1179
1180macro_rules! contract_post_pipe_stdin_support {
1183 ($result:expr) => {{
1184 let _contract_result = &$result;
1185 }};
1186}
1187
1188macro_rules! contract_pipe_stdin_support {
1190 ($input:expr, $body:expr) => {{
1191 contract_pre_pipe_stdin_support!($input);
1192 let _contract_result = $body;
1193 contract_post_pipe_stdin_support!(_contract_result);
1194 _contract_result
1195 }};
1196}
1197
1198macro_rules! contract_pre_tokenizer_training_correctness {
1201 () => {{}};
1202 ($input:expr) => {{
1203 let _contract_input = &$input;
1204 }};
1205}
1206
1207macro_rules! contract_post_tokenizer_training_correctness {
1210 ($result:expr) => {{
1211 let _contract_result = &$result;
1212 }};
1213}
1214
1215macro_rules! contract_tokenizer_training_correctness {
1217 ($input:expr, $body:expr) => {{
1218 contract_pre_tokenizer_training_correctness!($input);
1219 let _contract_result = $body;
1220 contract_post_tokenizer_training_correctness!(_contract_result);
1221 _contract_result
1222 }};
1223}
1224
1225macro_rules! contract_pre_training_plan_apply_semantics {
1228 () => {{}};
1229 ($input:expr) => {{
1230 let _pv_x = &$input;
1231 }};
1232}
1233
1234macro_rules! contract_post_training_plan_apply_semantics {
1237 ($result:expr) => {{
1238 let _contract_result = &$result;
1239 }};
1240}
1241
1242macro_rules! contract_training_plan_apply_semantics {
1244 ($input:expr, $body:expr) => {{
1245 contract_pre_training_plan_apply_semantics!($input);
1246 let _contract_result = $body;
1247 contract_post_training_plan_apply_semantics!(_contract_result);
1248 _contract_result
1249 }};
1250}
1251
1252macro_rules! contract_pre_apr_md_compliance {
1258 () => {{}};
1259 ($input:expr) => {{
1260 let _contract_input = &$input;
1261 }};
1262}
1263
1264macro_rules! contract_post_apr_md_compliance {
1267 ($result:expr) => {{
1268 let _contract_result = &$result;
1269 debug_assert!(violated_instructions.len() == 0, "Contract apr_md_compliance: postcondition violated — violated_instructions.len() == 0");
1270 }};
1271}
1272
1273macro_rules! contract_apr_md_compliance {
1275 ($input:expr, $body:expr) => {{
1276 contract_pre_apr_md_compliance!($input);
1277 let _contract_result = $body;
1278 contract_post_apr_md_compliance!(_contract_result);
1279 _contract_result
1280 }};
1281}
1282
1283macro_rules! contract_pre_apr_model_validity {
1286 () => {{}};
1287 ($input:expr) => {{
1288 let _pv_path = &$input;
1289 }};
1290}
1291
1292macro_rules! contract_post_apr_model_validity {
1295 ($result:expr) => {{
1296 let _contract_result = &$result;
1297 }};
1298}
1299
1300macro_rules! contract_apr_model_validity {
1302 ($input:expr, $body:expr) => {{
1303 contract_pre_apr_model_validity!($input);
1304 let _contract_result = $body;
1305 contract_post_apr_model_validity!(_contract_result);
1306 _contract_result
1307 }};
1308}
1309
1310macro_rules! contract_post_no_model_error {
1313 ($result:expr) => {{
1314 let _contract_result = &$result;
1315 }};
1316}
1317
1318macro_rules! contract_pre_session_integrity {
1321 () => {{}};
1322 ($input:expr) => {{
1323 let _pv_session = &$input;
1324 }};
1325}
1326
1327macro_rules! contract_post_session_integrity {
1330 ($result:expr) => {{
1331 let _contract_result = &$result;
1332 }};
1333}
1334
1335macro_rules! contract_session_integrity {
1337 ($input:expr, $body:expr) => {{
1338 contract_pre_session_integrity!($input);
1339 let _contract_result = $body;
1340 contract_post_session_integrity!(_contract_result);
1341 _contract_result
1342 }};
1343}
1344
1345macro_rules! contract_pre_sovereignty_guarantee {
1348 () => {{}};
1349 ($input:expr) => {{
1350 let _pv_x = &$input;
1351 }};
1352}
1353
1354macro_rules! contract_post_sovereignty_guarantee {
1357 ($result:expr) => {{
1358 let _contract_result = &$result;
1359 }};
1360}
1361
1362macro_rules! contract_sovereignty_guarantee {
1364 ($input:expr, $body:expr) => {{
1365 contract_pre_sovereignty_guarantee!($input);
1366 let _contract_result = $body;
1367 contract_post_sovereignty_guarantee!(_contract_result);
1368 _contract_result
1369 }};
1370}
1371
1372macro_rules! contract_pre_startup_latency {
1375 () => {{}};
1376 ($input:expr) => {{
1377 let _pv_project = &$input;
1378 }};
1379}
1380
1381macro_rules! contract_post_startup_latency {
1384 ($result:expr) => {{
1385 let _contract_result = &$result;
1386 }};
1387}
1388
1389macro_rules! contract_startup_latency {
1391 ($input:expr, $body:expr) => {{
1392 contract_pre_startup_latency!($input);
1393 let _contract_result = $body;
1394 contract_post_startup_latency!(_contract_result);
1395 _contract_result
1396 }};
1397}
1398
1399macro_rules! contract_pre_tool_safety {
1402 () => {{}};
1403 ($input:expr) => {{
1404 let _pv_session = &$input;
1405 }};
1406}
1407
1408macro_rules! contract_post_tool_safety {
1411 ($result:expr) => {{
1412 let _contract_result = &$result;
1413 }};
1414}
1415
1416macro_rules! contract_tool_safety {
1418 ($input:expr, $body:expr) => {{
1419 contract_pre_tool_safety!($input);
1420 let _contract_result = $body;
1421 contract_post_tool_safety!(_contract_result);
1422 _contract_result
1423 }};
1424}
1425
1426macro_rules! contract_pre_data_split_determinism {
1432 () => {{}};
1433 ($input:expr) => {{
1434 let _pv_ratios = &$input;
1435 debug_assert!(
1436 _pv_ratios.sum() == 1.0,
1437 "Contract data_split_determinism: precondition violated — ratios.sum() == 1.0"
1438 );
1439 }};
1440}
1441
1442macro_rules! contract_post_data_split_determinism {
1445 ($result:expr) => {{
1446 let _contract_result = &$result;
1447 }};
1448}
1449
1450macro_rules! contract_data_split_determinism {
1452 ($input:expr, $body:expr) => {{
1453 contract_pre_data_split_determinism!($input);
1454 let _contract_result = $body;
1455 contract_post_data_split_determinism!(_contract_result);
1456 _contract_result
1457 }};
1458}
1459
1460macro_rules! contract_pre_data_validation {
1463 () => {{}};
1464 ($input:expr) => {{
1465 let _pv_path = &$input;
1466 }};
1467}
1468
1469macro_rules! contract_post_data_validation {
1472 ($result:expr) => {{
1473 let _contract_result = &$result;
1474 }};
1475}
1476
1477macro_rules! contract_data_validation {
1479 ($input:expr, $body:expr) => {{
1480 contract_pre_data_validation!($input);
1481 let _contract_result = $body;
1482 contract_post_data_validation!(_contract_result);
1483 _contract_result
1484 }};
1485}
1486
1487macro_rules! contract_pre_preprocessing_idempotency {
1490 () => {{}};
1491 ($input:expr) => {{
1492 let _contract_input = &$input;
1493 }};
1494}
1495
1496macro_rules! contract_post_preprocessing_idempotency {
1499 ($result:expr) => {{
1500 let _contract_result = &$result;
1501 }};
1502}
1503
1504macro_rules! contract_preprocessing_idempotency {
1506 ($input:expr, $body:expr) => {{
1507 contract_pre_preprocessing_idempotency!($input);
1508 let _contract_result = $body;
1509 contract_post_preprocessing_idempotency!(_contract_result);
1510 _contract_result
1511 }};
1512}
1513
1514macro_rules! contract_pre_streaming_data_loader {
1517 () => {{}};
1518 ($input:expr) => {{
1519 let _pv_dataset = &$input;
1520 debug_assert!(
1521 _pv_dataset.len() > 0,
1522 "Contract streaming_data_loader: precondition violated — dataset.len() > 0"
1523 );
1524 }};
1525}
1526
1527macro_rules! contract_post_streaming_data_loader {
1530 ($result:expr) => {{
1531 let _contract_result = &$result;
1532 }};
1533}
1534
1535macro_rules! contract_streaming_data_loader {
1537 ($input:expr, $body:expr) => {{
1538 contract_pre_streaming_data_loader!($input);
1539 let _contract_result = $body;
1540 contract_post_streaming_data_loader!(_contract_result);
1541 _contract_result
1542 }};
1543}
1544
1545macro_rules! contract_pre_detect_regression {
1551 () => {{}};
1552 ($input:expr) => {{
1553 let _pv_input = &$input;
1554 debug_assert!(
1555 _pv_input.len() > 0,
1556 "Contract detect_regression: precondition violated — input.len() > 0"
1557 );
1558 }};
1559}
1560
1561macro_rules! contract_pre_format_report {
1564 () => {{}};
1565 ($input:expr) => {{
1566 let _pv_input = &$input;
1567 debug_assert!(
1568 _pv_input.len() > 0,
1569 "Contract format_report: precondition violated — input.len() > 0"
1570 );
1571 }};
1572}
1573
1574macro_rules! contract_pre_parse_playbook {
1577 () => {{}};
1578 ($input:expr) => {{
1579 let _pv_input = &$input;
1580 debug_assert!(
1581 _pv_input.len() > 0,
1582 "Contract parse_playbook: precondition violated — input.len() > 0"
1583 );
1584 }};
1585}
1586
1587macro_rules! contract_pre_serialize_roundtrip {
1590 () => {{}};
1591 ($input:expr) => {{
1592 let _pv_input = &$input;
1593 debug_assert!(
1594 _pv_input.len() > 0,
1595 "Contract serialize_roundtrip: precondition violated — input.len() > 0"
1596 );
1597 }};
1598}
1599
1600macro_rules! contract_pre_validate_schema {
1603 () => {{}};
1604 ($input:expr) => {{
1605 let _pv_input = &$input;
1606 debug_assert!(
1607 _pv_input.len() > 0,
1608 "Contract validate_schema: precondition violated — input.len() > 0"
1609 );
1610 }};
1611}
1612
1613macro_rules! contract_pre_dtype_coercion_safety {
1619 () => {{}};
1620 ($input:expr) => {{
1621 let _contract_input = &$input;
1622 }};
1623}
1624
1625macro_rules! contract_post_dtype_coercion_safety {
1628 ($result:expr) => {{
1629 let _contract_result = &$result;
1630 }};
1631}
1632
1633macro_rules! contract_dtype_coercion_safety {
1635 ($input:expr, $body:expr) => {{
1636 contract_pre_dtype_coercion_safety!($input);
1637 let _contract_result = $body;
1638 contract_post_dtype_coercion_safety!(_contract_result);
1639 _contract_result
1640 }};
1641}
1642
1643macro_rules! contract_pre_header_integrity {
1646 () => {{}};
1647 ($input:expr) => {{
1648 let _contract_input = &$input;
1649 }};
1650}
1651
1652macro_rules! contract_post_header_integrity {
1655 ($result:expr) => {{
1656 let _contract_result = &$result;
1657 }};
1658}
1659
1660macro_rules! contract_header_integrity {
1662 ($input:expr, $body:expr) => {{
1663 contract_pre_header_integrity!($input);
1664 let _contract_result = $body;
1665 contract_post_header_integrity!(_contract_result);
1666 _contract_result
1667 }};
1668}
1669
1670macro_rules! contract_pre_magic_byte_validation {
1673 () => {{}};
1674 ($input:expr) => {{
1675 let _contract_input = &$input;
1676 }};
1677}
1678
1679macro_rules! contract_post_magic_byte_validation {
1682 ($result:expr) => {{
1683 let _contract_result = &$result;
1684 }};
1685}
1686
1687macro_rules! contract_magic_byte_validation {
1689 ($input:expr, $body:expr) => {{
1690 contract_pre_magic_byte_validation!($input);
1691 let _contract_result = $body;
1692 contract_post_magic_byte_validation!(_contract_result);
1693 _contract_result
1694 }};
1695}
1696
1697macro_rules! contract_pre_provenance_enforcement {
1700 () => {{}};
1701 ($input:expr) => {{
1702 let _contract_input = &$input;
1703 }};
1704}
1705
1706macro_rules! contract_post_provenance_enforcement {
1709 ($result:expr) => {{
1710 let _contract_result = &$result;
1711 }};
1712}
1713
1714macro_rules! contract_provenance_enforcement {
1716 ($input:expr, $body:expr) => {{
1717 contract_pre_provenance_enforcement!($input);
1718 let _contract_result = $body;
1719 contract_post_provenance_enforcement!(_contract_result);
1720 _contract_result
1721 }};
1722}
1723
1724macro_rules! contract_pre_strict_import_validation {
1727 () => {{}};
1728 ($input:expr) => {{
1729 let _contract_input = &$input;
1730 }};
1731}
1732
1733macro_rules! contract_post_strict_import_validation {
1736 ($result:expr) => {{
1737 let _contract_result = &$result;
1738 }};
1739}
1740
1741macro_rules! contract_strict_import_validation {
1743 ($input:expr, $body:expr) => {{
1744 contract_pre_strict_import_validation!($input);
1745 let _contract_result = $body;
1746 contract_post_strict_import_validation!(_contract_result);
1747 _contract_result
1748 }};
1749}
1750
1751macro_rules! contract_pre_truncation_detection {
1754 () => {{}};
1755 ($input:expr) => {{
1756 let _contract_input = &$input;
1757 }};
1758}
1759
1760macro_rules! contract_post_truncation_detection {
1763 ($result:expr) => {{
1764 let _contract_result = &$result;
1765 }};
1766}
1767
1768macro_rules! contract_truncation_detection {
1770 ($input:expr, $body:expr) => {{
1771 contract_pre_truncation_detection!($input);
1772 let _contract_result = $body;
1773 contract_post_truncation_detection!(_contract_result);
1774 _contract_result
1775 }};
1776}
1777
1778macro_rules! contract_pre_architecture_extraction {
1784 () => {{}};
1785 ($input:expr) => {{
1786 let _contract_input = &$input;
1787 }};
1788}
1789
1790macro_rules! contract_post_architecture_extraction {
1793 ($result:expr) => {{
1794 let _contract_result = &$result;
1795 }};
1796}
1797
1798macro_rules! contract_architecture_extraction {
1800 ($input:expr, $body:expr) => {{
1801 contract_pre_architecture_extraction!($input);
1802 let _contract_result = $body;
1803 contract_post_architecture_extraction!(_contract_result);
1804 _contract_result
1805 }};
1806}
1807
1808macro_rules! contract_pre_jidoka_validation {
1811 () => {{}};
1812 ($input:expr) => {{
1813 let _contract_input = &$input;
1814 }};
1815}
1816
1817macro_rules! contract_post_jidoka_validation {
1820 ($result:expr) => {{
1821 let _contract_result = &$result;
1822 }};
1823}
1824
1825macro_rules! contract_jidoka_validation {
1827 ($input:expr, $body:expr) => {{
1828 contract_pre_jidoka_validation!($input);
1829 let _contract_result = $body;
1830 contract_post_jidoka_validation!(_contract_result);
1831 _contract_result
1832 }};
1833}
1834
1835macro_rules! contract_pre_no_model_ux {
1838 () => {{}};
1839 ($input:expr) => {{
1840 let _contract_input = &$input;
1841 }};
1842}
1843
1844macro_rules! contract_post_no_model_ux {
1847 ($result:expr) => {{
1848 let _contract_result = &$result;
1849 }};
1850}
1851
1852macro_rules! contract_no_model_ux {
1854 ($input:expr, $body:expr) => {{
1855 contract_pre_no_model_ux!($input);
1856 let _contract_result = $body;
1857 contract_post_no_model_ux!(_contract_result);
1858 _contract_result
1859 }};
1860}
1861
1862macro_rules! contract_pre_search_order {
1865 () => {{}};
1866 ($input:expr) => {{
1867 let _contract_input = &$input;
1868 }};
1869}
1870
1871macro_rules! contract_post_search_order {
1874 ($result:expr) => {{
1875 let _contract_result = &$result;
1876 }};
1877}
1878
1879macro_rules! contract_search_order {
1881 ($input:expr, $body:expr) => {{
1882 contract_pre_search_order!($input);
1883 let _contract_result = $body;
1884 contract_post_search_order!(_contract_result);
1885 _contract_result
1886 }};
1887}
1888
1889macro_rules! contract_pre_sort_priority {
1892 () => {{}};
1893 ($input:expr) => {{
1894 let _pv_candidates = &$input;
1895 debug_assert!(
1896 _pv_candidates.len() > 0,
1897 "Contract sort_priority: precondition violated — candidates.len() > 0"
1898 );
1899 }};
1900}
1901
1902macro_rules! contract_post_sort_priority {
1905 ($result:expr) => {{
1906 let _contract_result = &$result;
1907 }};
1908}
1909
1910macro_rules! contract_sort_priority {
1912 ($input:expr, $body:expr) => {{
1913 contract_pre_sort_priority!($input);
1914 let _contract_result = $body;
1915 contract_post_sort_priority!(_contract_result);
1916 _contract_result
1917 }};
1918}
1919
1920macro_rules! contract_pre_export_roundtrip {
1926 () => {{}};
1927 ($input:expr) => {{
1928 let _pv_model = &$input;
1929 }};
1930}
1931
1932macro_rules! contract_post_export_roundtrip {
1935 ($result:expr) => {{
1936 let _contract_result = &$result;
1937 }};
1938}
1939
1940macro_rules! contract_export_roundtrip {
1942 ($input:expr, $body:expr) => {{
1943 contract_pre_export_roundtrip!($input);
1944 let _contract_result = $body;
1945 contract_post_export_roundtrip!(_contract_result);
1946 _contract_result
1947 }};
1948}
1949
1950macro_rules! contract_pre_import_format_detection {
1953 () => {{}};
1954 ($input:expr) => {{
1955 let _pv_path = &$input;
1956 }};
1957}
1958
1959macro_rules! contract_post_import_format_detection {
1962 ($result:expr) => {{
1963 let _contract_result = &$result;
1964 }};
1965}
1966
1967macro_rules! contract_import_format_detection {
1969 ($input:expr, $body:expr) => {{
1970 contract_pre_import_format_detection!($input);
1971 let _contract_result = $body;
1972 contract_post_import_format_detection!(_contract_result);
1973 _contract_result
1974 }};
1975}
1976
1977macro_rules! contract_pre_merge_weight_conservation {
1980 () => {{}};
1981 ($input:expr) => {{
1982 let _pv_models = &$input;
1983 debug_assert!(
1984 _pv_models.len() >= 2,
1985 "Contract merge_weight_conservation: precondition violated — models.len() >= 2"
1986 );
1987 }};
1988}
1989
1990macro_rules! contract_post_merge_weight_conservation {
1993 ($result:expr) => {{
1994 let _contract_result = &$result;
1995 }};
1996}
1997
1998macro_rules! contract_merge_weight_conservation {
2000 ($input:expr, $body:expr) => {{
2001 contract_pre_merge_weight_conservation!($input);
2002 let _contract_result = $body;
2003 contract_post_merge_weight_conservation!(_contract_result);
2004 _contract_result
2005 }};
2006}
2007
2008macro_rules! contract_pre_pull_cache_integrity {
2011 () => {{}};
2012 ($input:expr) => {{
2013 let _contract_input = &$input;
2014 }};
2015}
2016
2017macro_rules! contract_post_pull_cache_integrity {
2020 ($result:expr) => {{
2021 let _contract_result = &$result;
2022 }};
2023}
2024
2025macro_rules! contract_pull_cache_integrity {
2027 ($input:expr, $body:expr) => {{
2028 contract_pre_pull_cache_integrity!($input);
2029 let _contract_result = $body;
2030 contract_post_pull_cache_integrity!(_contract_result);
2031 _contract_result
2032 }};
2033}
2034
2035macro_rules! contract_pre_quantize_precision_bound {
2038 () => {{}};
2039 ($input:expr) => {{
2040 let _pv_model = &$input;
2041 }};
2042}
2043
2044macro_rules! contract_post_quantize_precision_bound {
2047 ($result:expr) => {{
2048 let _contract_result = &$result;
2049 }};
2050}
2051
2052macro_rules! contract_quantize_precision_bound {
2054 ($input:expr, $body:expr) => {{
2055 contract_pre_quantize_precision_bound!($input);
2056 let _contract_result = $body;
2057 contract_post_quantize_precision_bound!(_contract_result);
2058 _contract_result
2059 }};
2060}
2061
2062macro_rules! contract_pre_canary_regression_detection {
2068 () => {{}};
2069 ($input:expr) => {{
2070 let _pv_baseline = &$input;
2071 }};
2072}
2073
2074macro_rules! contract_post_canary_regression_detection {
2077 ($result:expr) => {{
2078 let _contract_result = &$result;
2079 }};
2080}
2081
2082macro_rules! contract_canary_regression_detection {
2084 ($input:expr, $body:expr) => {{
2085 contract_pre_canary_regression_detection!($input);
2086 let _contract_result = $body;
2087 contract_post_canary_regression_detection!(_contract_result);
2088 _contract_result
2089 }};
2090}
2091
2092macro_rules! contract_pre_lint_model_conventions {
2095 () => {{}};
2096 ($input:expr) => {{
2097 let _pv_path = &$input;
2098 }};
2099}
2100
2101macro_rules! contract_post_lint_model_conventions {
2104 ($result:expr) => {{
2105 let _contract_result = &$result;
2106 }};
2107}
2108
2109macro_rules! contract_lint_model_conventions {
2111 ($input:expr, $body:expr) => {{
2112 contract_pre_lint_model_conventions!($input);
2113 let _contract_result = $body;
2114 contract_post_lint_model_conventions!(_contract_result);
2115 _contract_result
2116 }};
2117}
2118
2119macro_rules! contract_pre_model_integrity_check {
2122 () => {{}};
2123 ($input:expr) => {{
2124 let _pv_path = &$input;
2125 }};
2126}
2127
2128macro_rules! contract_post_model_integrity_check {
2131 ($result:expr) => {{
2132 let _contract_result = &$result;
2133 }};
2134}
2135
2136macro_rules! contract_model_integrity_check {
2138 ($input:expr, $body:expr) => {{
2139 contract_pre_model_integrity_check!($input);
2140 let _contract_result = $body;
2141 contract_post_model_integrity_check!(_contract_result);
2142 _contract_result
2143 }};
2144}
2145
2146macro_rules! contract_pre_probar_property_tests {
2149 () => {{}};
2150 ($input:expr) => {{
2151 let _pv_properties = &$input;
2152 debug_assert!(
2153 _pv_properties.len() > 0,
2154 "Contract probar_property_tests: precondition violated — properties.len() > 0"
2155 );
2156 }};
2157}
2158
2159macro_rules! contract_post_probar_property_tests {
2162 ($result:expr) => {{
2163 let _contract_result = &$result;
2164 }};
2165}
2166
2167macro_rules! contract_probar_property_tests {
2169 ($input:expr, $body:expr) => {{
2170 contract_pre_probar_property_tests!($input);
2171 let _contract_result = $body;
2172 contract_post_probar_property_tests!(_contract_result);
2173 _contract_result
2174 }};
2175}
2176
2177macro_rules! contract_pre_qa_gate_composition {
2180 () => {{}};
2181 ($input:expr) => {{
2182 let _contract_input = &$input;
2183 }};
2184}
2185
2186macro_rules! contract_post_qa_gate_composition {
2189 ($result:expr) => {{
2190 let _contract_result = &$result;
2191 }};
2192}
2193
2194macro_rules! contract_qa_gate_composition {
2196 ($input:expr, $body:expr) => {{
2197 contract_pre_qa_gate_composition!($input);
2198 let _contract_result = $body;
2199 contract_post_qa_gate_composition!(_contract_result);
2200 _contract_result
2201 }};
2202}
2203
2204macro_rules! contract_pre_chat_template_dispatch {
2210 () => {{}};
2211 ($input:expr) => {{
2212 let _pv_state = &$input;
2213 }};
2214}
2215
2216macro_rules! contract_post_chat_template_dispatch {
2219 ($result:expr) => {{
2220 let _contract_result = &$result;
2221 }};
2222}
2223
2224macro_rules! contract_chat_template_dispatch {
2226 ($input:expr, $body:expr) => {{
2227 contract_pre_chat_template_dispatch!($input);
2228 let _contract_result = $body;
2229 contract_post_chat_template_dispatch!(_contract_result);
2230 _contract_result
2231 }};
2232}
2233
2234macro_rules! contract_pre_concurrent_inference_isolation {
2237 () => {{}};
2238 ($input:expr) => {{
2239 let _contract_input = &$input;
2240 }};
2241}
2242
2243macro_rules! contract_post_concurrent_inference_isolation {
2246 ($result:expr) => {{
2247 let _contract_result = &$result;
2248 }};
2249}
2250
2251macro_rules! contract_concurrent_inference_isolation {
2253 ($input:expr, $body:expr) => {{
2254 contract_pre_concurrent_inference_isolation!($input);
2255 let _contract_result = $body;
2256 contract_post_concurrent_inference_isolation!(_contract_result);
2257 _contract_result
2258 }};
2259}
2260
2261macro_rules! contract_pre_format_detection {
2264 () => {{}};
2265 ($input:expr) => {{
2266 let _contract_input = &$input;
2267 }};
2268}
2269
2270macro_rules! contract_post_format_detection {
2273 ($result:expr) => {{
2274 let _contract_result = &$result;
2275 }};
2276}
2277
2278macro_rules! contract_format_detection {
2280 ($input:expr, $body:expr) => {{
2281 contract_pre_format_detection!($input);
2282 let _contract_result = $body;
2283 contract_post_format_detection!(_contract_result);
2284 _contract_result
2285 }};
2286}
2287
2288macro_rules! contract_pre_graceful_shutdown {
2291 () => {{}};
2292 ($input:expr) => {{
2293 let _contract_input = &$input;
2294 }};
2295}
2296
2297macro_rules! contract_post_graceful_shutdown {
2300 ($result:expr) => {{
2301 let _contract_result = &$result;
2302 }};
2303}
2304
2305macro_rules! contract_graceful_shutdown {
2307 ($input:expr, $body:expr) => {{
2308 contract_pre_graceful_shutdown!($input);
2309 let _contract_result = $body;
2310 contract_post_graceful_shutdown!(_contract_result);
2311 _contract_result
2312 }};
2313}
2314
2315macro_rules! contract_pre_request_routing {
2318 () => {{}};
2319 ($input:expr) => {{
2320 let _contract_input = &$input;
2321 }};
2322}
2323
2324macro_rules! contract_post_request_routing {
2327 ($result:expr) => {{
2328 let _contract_result = &$result;
2329 }};
2330}
2331
2332macro_rules! contract_request_routing {
2334 ($input:expr, $body:expr) => {{
2335 contract_pre_request_routing!($input);
2336 let _contract_result = $body;
2337 contract_post_request_routing!(_contract_result);
2338 _contract_result
2339 }};
2340}
2341
2342macro_rules! contract_pre_server_lifecycle {
2345 () => {{}};
2346 ($input:expr) => {{
2347 let _pv_config = &$input;
2348 }};
2349}
2350
2351macro_rules! contract_post_server_lifecycle {
2354 ($result:expr) => {{
2355 let _contract_result = &$result;
2356 }};
2357}
2358
2359macro_rules! contract_server_lifecycle {
2361 ($input:expr, $body:expr) => {{
2362 contract_pre_server_lifecycle!($input);
2363 let _contract_result = $body;
2364 contract_post_server_lifecycle!(_contract_result);
2365 _contract_result
2366 }};
2367}
2368
2369macro_rules! contract_pre_gpu_utilization_gate {
2375 () => {{}};
2376 ($input:expr) => {{
2377 let _contract_input = &$input;
2378 }};
2379}
2380
2381macro_rules! contract_pre_parity_ratio {
2384 () => {{}};
2385 ($input:expr) => {{
2386 let _contract_input = &$input;
2387 }};
2388}
2389
2390macro_rules! contract_pre_arch_constraint_lookup {
2396 () => {{}};
2397 ($input:expr) => {{
2398 let _pv_input = &$input;
2399 debug_assert!(
2400 _pv_input.len() > 0,
2401 "Contract arch_constraint_lookup: precondition violated — input.len() > 0"
2402 );
2403 }};
2404}
2405
2406macro_rules! contract_pre_constraint_matrix_exhaustiveness {
2412 () => {{}};
2413 ($input:expr) => {{
2414 let _pv_input = &$input;
2415 debug_assert!(
2416 _pv_input.len() > 0,
2417 "Contract constraint_matrix_exhaustiveness: precondition violated — input.len() > 0"
2418 );
2419 }};
2420}
2421
2422macro_rules! contract_pre_role_mapping {
2425 () => {{}};
2426 ($input:expr) => {{
2427 let _pv_input = &$input;
2428 debug_assert!(
2429 _pv_input.len() > 0,
2430 "Contract role_mapping: precondition violated — input.len() > 0"
2431 );
2432 }};
2433}
2434
2435macro_rules! contract_pre_weight_completeness {
2438 () => {{}};
2439 ($input:expr) => {{
2440 let _pv_input = &$input;
2441 debug_assert!(
2442 _pv_input.len() > 0,
2443 "Contract weight_completeness: precondition violated — input.len() > 0"
2444 );
2445 }};
2446}
2447
2448macro_rules! contract_pre_ar_forecast {
2454 () => {{}};
2455 ($input:expr) => {{
2456 let _pv_input = &$input;
2457 debug_assert!(
2458 _pv_input.len() > 0,
2459 "Contract ar_forecast: precondition violated — input.len() > 0"
2460 );
2461 debug_assert!(
2462 _pv_input.iter().all(|v| v.is_finite()),
2463 "Contract ar_forecast: precondition violated — input.iter().all(|v| v.is_finite())"
2464 );
2465 }};
2466}
2467
2468macro_rules! contract_pre_differencing {
2471 () => {{}};
2472 ($input:expr) => {{
2473 let _pv_input = &$input;
2474 debug_assert!(
2475 _pv_input.len() > 0,
2476 "Contract differencing: precondition violated — input.len() > 0"
2477 );
2478 debug_assert!(
2479 _pv_input.iter().all(|v| v.is_finite()),
2480 "Contract differencing: precondition violated — input.iter().all(|v| v.is_finite())"
2481 );
2482 }};
2483}
2484
2485macro_rules! contract_pre_forecast_finite {
2488 () => {{}};
2489 ($input:expr) => {{
2490 let _pv_input = &$input;
2491 debug_assert!(_pv_input.len() > 0,
2492 "Contract forecast_finite: precondition violated — input.len() > 0");
2493 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
2494 "Contract forecast_finite: precondition violated — input.iter().all(|v| v.is_finite())");
2495 }};
2496}
2497
2498macro_rules! contract_pre_ma_filter {
2501 () => {{}};
2502 ($input:expr) => {{
2503 let _pv_input = &$input;
2504 debug_assert!(
2505 _pv_input.len() > 0,
2506 "Contract ma_filter: precondition violated — input.len() > 0"
2507 );
2508 debug_assert!(
2509 _pv_input.iter().all(|v| v.is_finite()),
2510 "Contract ma_filter: precondition violated — input.iter().all(|v| v.is_finite())"
2511 );
2512 }};
2513}
2514
2515macro_rules! contract_pre_cancellation_safe {
2521 () => {{}};
2522 ($input:expr) => {{
2523 let _contract_input = &$input;
2524 }};
2525}
2526
2527macro_rules! contract_post_cancellation_safe {
2530 ($result:expr) => {{
2531 let _contract_result = &$result;
2532 }};
2533}
2534
2535macro_rules! contract_cancellation_safe {
2537 ($input:expr, $body:expr) => {{
2538 contract_pre_cancellation_safe!($input);
2539 let _contract_result = $body;
2540 contract_post_cancellation_safe!(_contract_result);
2541 _contract_result
2542 }};
2543}
2544
2545macro_rules! contract_pre_channel_lossless {
2548 () => {{}};
2549 ($input:expr) => {{
2550 let _contract_input = &$input;
2551 }};
2552}
2553
2554macro_rules! contract_post_channel_lossless {
2557 ($result:expr) => {{
2558 let _contract_result = &$result;
2559 }};
2560}
2561
2562macro_rules! contract_channel_lossless {
2564 ($input:expr, $body:expr) => {{
2565 contract_pre_channel_lossless!($input);
2566 let _contract_result = $body;
2567 contract_post_channel_lossless!(_contract_result);
2568 _contract_result
2569 }};
2570}
2571
2572macro_rules! contract_pre_structured_spawn {
2575 () => {{}};
2576 ($input:expr) => {{
2577 let _contract_input = &$input;
2578 }};
2579}
2580
2581macro_rules! contract_post_structured_spawn {
2584 ($result:expr) => {{
2585 let _contract_result = &$result;
2586 }};
2587}
2588
2589macro_rules! contract_structured_spawn {
2591 ($input:expr, $body:expr) => {{
2592 contract_pre_structured_spawn!($input);
2593 let _contract_result = $body;
2594 contract_post_structured_spawn!(_contract_result);
2595 _contract_result
2596 }};
2597}
2598
2599macro_rules! contract_pre_extract_heads {
2605 () => {{}};
2606 ($input:expr) => {{
2607 let _pv_q = &$input;
2608 debug_assert!(
2609 _pv_q.len() > 0,
2610 "Contract extract_heads: precondition violated — q.len() > 0"
2611 );
2612 }};
2613}
2614
2615macro_rules! contract_post_extract_heads {
2618 ($result:expr) => {{
2619 let _contract_result = &$result;
2620 }};
2621}
2622
2623macro_rules! contract_extract_heads {
2625 ($input:expr, $body:expr) => {{
2626 contract_pre_extract_heads!($input);
2627 let _contract_result = $body;
2628 contract_post_extract_heads!(_contract_result);
2629 _contract_result
2630 }};
2631}
2632
2633macro_rules! contract_pre_attention {
2639 () => {{}};
2640 ($input:expr) => {{
2641 let _pv_query = &$input;
2642 debug_assert!(
2643 _pv_query.len() > 0,
2644 "Contract attention: precondition violated — query.len() > 0"
2645 );
2646 }};
2647}
2648
2649macro_rules! contract_post_attention {
2652 ($result:expr) => {{
2653 let _contract_result = &$result;
2654 debug_assert!(
2655 _contract_result.iter().all(|v| v.is_finite()),
2656 "Contract attention: postcondition violated — result.iter().all(|v| v.is_finite())"
2657 );
2658 }};
2659}
2660
2661macro_rules! contract_attention {
2663 ($input:expr, $body:expr) => {{
2664 contract_pre_attention!($input);
2665 let _contract_result = $body;
2666 contract_post_attention!(_contract_result);
2667 _contract_result
2668 }};
2669}
2670
2671macro_rules! contract_pre_rmsnorm {
2677 () => {{}};
2678 ($input:expr) => {{
2679 let _pv_x = &$input;
2680 }};
2681}
2682
2683macro_rules! contract_pre_rope_rotation {
2686 () => {{}};
2687 ($input:expr) => {{
2688 let _pv_x = &$input;
2689 debug_assert!(
2690 _pv_x.len() % 2 == 0,
2691 "Contract rope_rotation: precondition violated — x.len() % 2 == 0"
2692 );
2693 }};
2694}
2695
2696macro_rules! contract_pre_scaled_dot_product {
2699 () => {{}};
2700 ($input:expr) => {{
2701 let _pv_x = &$input;
2702 }};
2703}
2704
2705macro_rules! contract_pre_attention_entropy {
2711 () => {{}};
2712 ($input:expr) => {{
2713 let _pv_q = &$input;
2714 debug_assert!(
2715 _pv_q.len() > 0,
2716 "Contract attention_entropy: precondition violated — q.len() > 0"
2717 );
2718 }};
2719}
2720
2721macro_rules! contract_pre_numerical_stability {
2724 () => {{}};
2725 ($input:expr) => {{
2726 let _pv_q = &$input;
2727 debug_assert!(
2728 _pv_q.len() > 0,
2729 "Contract numerical_stability: precondition violated — q.len() > 0"
2730 );
2731 }};
2732}
2733
2734macro_rules! contract_pre_scaled_dot_product {
2737 () => {{}};
2738 ($input:expr) => {{
2739 let _pv_a = &$input;
2740 debug_assert!(
2741 _pv_a.len() > 0,
2742 "Contract scaled_dot_product: precondition violated — a.len() > 0"
2743 );
2744 }};
2745}
2746
2747macro_rules! contract_pre_score_bound_with_qknorm {
2750 () => {{}};
2751 ($input:expr) => {{
2752 let _pv_input = &$input;
2753 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
2754 "Contract score_bound_with_qknorm: precondition violated — input.iter().all(|v| v.is_finite())");
2755 debug_assert!(_pv_input.len() > 0,
2756 "Contract score_bound_with_qknorm: precondition violated — input.len() > 0");
2757 }};
2758}
2759
2760macro_rules! contract_pre_softmax_saturation {
2763 () => {{}};
2764 ($input:expr) => {{
2765 let _pv_x = &$input;
2766 debug_assert!(
2767 _pv_x.iter().all(|v| v.is_finite()),
2768 "Contract softmax_saturation: precondition violated — x.iter().all(|v| v.is_finite())"
2769 );
2770 debug_assert!(
2771 _pv_x.len() > 0,
2772 "Contract softmax_saturation: precondition violated — x.len() > 0"
2773 );
2774 }};
2775}
2776
2777macro_rules! contract_pre_variance_preservation {
2780 () => {{}};
2781 ($input:expr) => {{
2782 let _pv_q = &$input;
2783 debug_assert!(
2784 _pv_q.len() > 0,
2785 "Contract variance_preservation: precondition violated — q.len() > 0"
2786 );
2787 }};
2788}
2789
2790macro_rules! contract_pre_dot_product {
2796 () => {{}};
2797 ($input:expr) => {{
2798 let _pv_a = &$input;
2799 debug_assert!(_pv_a.len() > 0,
2800 "Contract dot_product: precondition violated — a.len() > 0");
2801 }};
2802}
2803
2804macro_rules! contract_pre_fma_accumulation {
2807 () => {{}};
2808 ($input:expr) => {{
2809 let _pv_a = &$input;
2810 debug_assert!(
2811 _pv_a.len() > 0,
2812 "Contract fma_accumulation: precondition violated — a.len() > 0"
2813 );
2814 }};
2815}
2816
2817macro_rules! contract_pre_garbage_oracle {
2823 () => {{}};
2824 ($input:expr) => {{
2825 let _pv_input = &$input;
2826 debug_assert!(
2827 _pv_input.len() > 0,
2828 "Contract garbage_oracle: precondition violated — input.len() > 0"
2829 );
2830 debug_assert!(
2831 _pv_input.iter().all(|v| v.is_finite()),
2832 "Contract garbage_oracle: precondition violated — input.iter().all(|v| v.is_finite())"
2833 );
2834 }};
2835}
2836
2837macro_rules! contract_pre_gpu_threshold {
2840 () => {{}};
2841 ($input:expr) => {{
2842 let _pv_input = &$input;
2843 debug_assert!(
2844 _pv_input.len() > 0,
2845 "Contract gpu_threshold: precondition violated — input.len() > 0"
2846 );
2847 debug_assert!(
2848 _pv_input.iter().all(|v| v.is_finite()),
2849 "Contract gpu_threshold: precondition violated — input.iter().all(|v| v.is_finite())"
2850 );
2851 }};
2852}
2853
2854macro_rules! contract_pre_qk_norm_score_bound {
2857 () => {{}};
2858 ($input:expr) => {{
2859 let _pv_input = &$input;
2860 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
2861 "Contract qk_norm_score_bound: precondition violated — input.iter().all(|v| v.is_finite())");
2862 debug_assert!(_pv_input.len() > 0,
2863 "Contract qk_norm_score_bound: precondition violated — input.len() > 0");
2864 }};
2865}
2866
2867macro_rules! contract_pre_simd_only_threshold {
2870 () => {{}};
2871 ($input:expr) => {{
2872 let _pv_input = &$input;
2873 debug_assert!(_pv_input.len() > 0,
2874 "Contract simd_only_threshold: precondition violated — input.len() > 0");
2875 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
2876 "Contract simd_only_threshold: precondition violated — input.iter().all(|v| v.is_finite())");
2877 }};
2878}
2879
2880macro_rules! contract_pre_batch_loss {
2886 () => {{}};
2887 ($input:expr) => {{
2888 let _pv_predicted = &$input;
2889 debug_assert!(
2890 _pv_predicted.len() > 0,
2891 "Contract batch_loss: precondition violated — predicted.len() > 0"
2892 );
2893 }};
2894}
2895
2896macro_rules! contract_pre_gradient_accumulation {
2899 () => {{}};
2900 ($input:expr) => {{
2901 let _pv_params = &$input;
2902 debug_assert!(
2903 _pv_params.len() > 0,
2904 "Contract gradient_accumulation: precondition violated — params.len() > 0"
2905 );
2906 }};
2907}
2908
2909macro_rules! contract_pre_gradient_clipping {
2912 () => {{}};
2913 ($input:expr) => {{
2914 let _pv_params = &$input;
2915 debug_assert!(
2916 _pv_params.len() > 0,
2917 "Contract gradient_clipping: precondition violated — params.len() > 0"
2918 );
2919 }};
2920}
2921
2922macro_rules! contract_pre_batched_beam_projection {
2928 () => {{}};
2929 ($input:expr) => {{
2930 let _pv_input = &$input;
2931 debug_assert!(
2932 _pv_input.len() > 0,
2933 "Contract batched_beam_projection: precondition violated — input.len() > 0"
2934 );
2935 }};
2936}
2937
2938macro_rules! contract_pre_beam_selection {
2941 () => {{}};
2942 ($input:expr) => {{
2943 let _pv_input = &$input;
2944 debug_assert!(
2945 _pv_input.len() > 0,
2946 "Contract beam_selection: precondition violated — input.len() > 0"
2947 );
2948 }};
2949}
2950
2951macro_rules! contract_pre_sequential_beam_projection {
2954 () => {{}};
2955 ($input:expr) => {{
2956 let _pv_input = &$input;
2957 debug_assert!(
2958 _pv_input.len() > 0,
2959 "Contract sequential_beam_projection: precondition violated — input.len() > 0"
2960 );
2961 }};
2962}
2963
2964macro_rules! contract_pre_termination {
2967 () => {{}};
2968 ($input:expr) => {{
2969 let _pv_input = &$input;
2970 debug_assert!(
2971 _pv_input.len() > 0,
2972 "Contract termination: precondition violated — input.len() > 0"
2973 );
2974 }};
2975}
2976
2977macro_rules! contract_pre_batchnorm_eval {
2983 () => {{}};
2984 ($input:expr) => {{
2985 let _pv_input = &$input;
2986 debug_assert!(
2987 _pv_input.iter().all(|v| v.is_finite()),
2988 "Contract batchnorm_eval: precondition violated — input.iter().all(|v| v.is_finite())"
2989 );
2990 debug_assert!(
2991 _pv_input.len() > 0,
2992 "Contract batchnorm_eval: precondition violated — input.len() > 0"
2993 );
2994 }};
2995}
2996
2997macro_rules! contract_pre_batchnorm_train {
3000 () => {{}};
3001 ($input:expr) => {{
3002 let _pv_input = &$input;
3003 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
3004 "Contract batchnorm_train: precondition violated — input.iter().all(|v| v.is_finite())");
3005 debug_assert!(_pv_input.len() > 0,
3006 "Contract batchnorm_train: precondition violated — input.len() > 0");
3007 }};
3008}
3009
3010macro_rules! contract_pre_running_stats {
3013 () => {{}};
3014 ($input:expr) => {{
3015 let _pv_input = &$input;
3016 debug_assert!(
3017 _pv_input.iter().all(|v| v.is_finite()),
3018 "Contract running_stats: precondition violated — input.iter().all(|v| v.is_finite())"
3019 );
3020 debug_assert!(
3021 _pv_input.len() > 0,
3022 "Contract running_stats: precondition violated — input.len() > 0"
3023 );
3024 }};
3025}
3026
3027macro_rules! contract_pre_blr_predict {
3033 () => {{}};
3034 ($input:expr) => {{
3035 let _pv_input = &$input;
3036 debug_assert!(
3037 _pv_input.len() > 0,
3038 "Contract blr_predict: precondition violated — input.len() > 0"
3039 );
3040 debug_assert!(
3041 _pv_input.iter().all(|v| v.is_finite()),
3042 "Contract blr_predict: precondition violated — input.iter().all(|v| v.is_finite())"
3043 );
3044 }};
3045}
3046
3047macro_rules! contract_pre_conjugate_update {
3050 () => {{}};
3051 ($input:expr) => {{
3052 let _pv_input = &$input;
3053 debug_assert!(_pv_input.len() > 0,
3054 "Contract conjugate_update: precondition violated — input.len() > 0");
3055 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
3056 "Contract conjugate_update: precondition violated — input.iter().all(|v| v.is_finite())");
3057 }};
3058}
3059
3060macro_rules! contract_pre_posterior_predictive {
3063 () => {{}};
3064 ($input:expr) => {{
3065 let _pv_input = &$input;
3066 debug_assert!(_pv_input.len() > 0,
3067 "Contract posterior_predictive: precondition violated — input.len() > 0");
3068 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
3069 "Contract posterior_predictive: precondition violated — input.iter().all(|v| v.is_finite())");
3070 }};
3071}
3072
3073macro_rules! contract_pre_posterior_valid {
3076 () => {{}};
3077 ($input:expr) => {{
3078 let _pv_input = &$input;
3079 debug_assert!(_pv_input.len() > 0,
3080 "Contract posterior_valid: precondition violated — input.len() > 0");
3081 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
3082 "Contract posterior_valid: precondition violated — input.iter().all(|v| v.is_finite())");
3083 }};
3084}
3085
3086macro_rules! contract_pre_bm25_ranking {
3092 () => {{}};
3093 ($input:expr) => {{
3094 let _pv_0 = &$input;
3095 }};
3096}
3097
3098macro_rules! contract_pre_index_insert_retrieve {
3101 () => {{}};
3102 ($input:expr) => {{
3103 let _pv_doc = &$input;
3104 }};
3105}
3106
3107macro_rules! contract_pre_robots_compliance {
3110 () => {{}};
3111 ($input:expr) => {{
3112 let _pv_x = &$input;
3113 }};
3114}
3115
3116macro_rules! contract_pre_tokenize_normalization {
3119 () => {{}};
3120 ($input:expr) => {{
3121 let _contract_input = &$input;
3122 }};
3123}
3124
3125macro_rules! contract_post_tokenize_normalization {
3128 ($result:expr) => {{
3129 let _contract_result = &$result;
3130 }};
3131}
3132
3133macro_rules! contract_tokenize_normalization {
3135 ($input:expr, $body:expr) => {{
3136 contract_pre_tokenize_normalization!($input);
3137 let _contract_result = $body;
3138 contract_post_tokenize_normalization!(_contract_result);
3139 _contract_result
3140 }};
3141}
3142
3143macro_rules! contract_pre_bias_add {
3149 () => {{}};
3150 ($input:expr) => {{
3151 let _pv_input = &$input;
3152 debug_assert!(
3153 _pv_input.len() > 0,
3154 "Contract bias_add: precondition violated — input.len() > 0"
3155 );
3156 debug_assert!(
3157 _pv_input.iter().all(|v| v.is_finite()),
3158 "Contract bias_add: precondition violated — input.iter().all(|v| v.is_finite())"
3159 );
3160 }};
3161}
3162
3163macro_rules! contract_pre_bidirectional_attention {
3169 () => {{}};
3170 ($input:expr) => {{
3171 let _pv_q = &$input;
3172 debug_assert!(
3173 _pv_q.len() > 0,
3174 "Contract bidirectional_attention: precondition violated — q.len() > 0"
3175 );
3176 }};
3177}
3178
3179macro_rules! contract_pre_composite_hash {
3185 () => {{}};
3186 ($input:expr) => {{
3187 let _pv_parts = &$input;
3188 debug_assert!(
3189 _pv_parts.len() > 0,
3190 "Contract composite_hash: precondition violated — parts.len() > 0"
3191 );
3192 }};
3193}
3194
3195macro_rules! contract_pre_hash_file {
3198 () => {{}};
3199 ($input:expr) => {{
3200 let _contract_input = &$input;
3201 }};
3202}
3203
3204macro_rules! contract_pre_hash_string {
3207 () => {{}};
3208 ($input:expr) => {{
3209 let _pv_input = &$input;
3210 debug_assert!(
3211 !_pv_input.is_empty(),
3212 "Contract hash_string: precondition violated — !input.is_empty()"
3213 );
3214 debug_assert!(
3215 _pv_input.len() <= 1_073_741_824,
3216 "Contract hash_string: precondition violated — input.len() <= 1_073_741_824"
3217 );
3218 }};
3219}
3220
3221macro_rules! contract_pre_decode {
3227 () => {{}};
3228 ($input:expr) => {{
3229 let _pv_input = &$input;
3230 debug_assert!(
3231 _pv_input.len() > 0,
3232 "Contract decode: precondition violated — input.len() > 0"
3233 );
3234 }};
3235}
3236
3237macro_rules! contract_pre_encode {
3240 () => {{}};
3241 ($input:expr) => {{
3242 let _pv_input = &$input;
3243 debug_assert!(
3244 _pv_input.len() > 0,
3245 "Contract encode: precondition violated — input.len() > 0"
3246 );
3247 }};
3248}
3249
3250macro_rules! contract_pre_merge_rule {
3253 () => {{}};
3254 ($input:expr) => {{
3255 let _pv_input = &$input;
3256 debug_assert!(
3257 _pv_input.len() > 0,
3258 "Contract merge_rule: precondition violated — input.len() > 0"
3259 );
3260 }};
3261}
3262
3263macro_rules! contract_pre_builder_pattern {
3269 () => {{}};
3270 ($input:expr) => {{
3271 let _contract_input = &$input;
3272 }};
3273}
3274
3275macro_rules! contract_post_builder_pattern {
3278 ($result:expr) => {{
3279 let _contract_result = &$result;
3280 }};
3281}
3282
3283macro_rules! contract_builder_pattern {
3285 ($input:expr, $body:expr) => {{
3286 contract_pre_builder_pattern!($input);
3287 let _contract_result = $body;
3288 contract_post_builder_pattern!(_contract_result);
3289 _contract_result
3290 }};
3291}
3292
3293macro_rules! contract_pre_build {
3299 () => {{}};
3300 ($input:expr) => {{
3301 let _pv_builder = &$input;
3302 }};
3303}
3304
3305macro_rules! contract_pre_expected_calibration_error {
3311 () => {{}};
3312 ($input:expr) => {{
3313 let _pv_input = &$input;
3314 debug_assert!(_pv_input.len() > 0,
3315 "Contract expected_calibration_error: precondition violated — input.len() > 0");
3316 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
3317 "Contract expected_calibration_error: precondition violated — input.iter().all(|v| v.is_finite())");
3318 }};
3319}
3320
3321macro_rules! contract_pre_isotonic_regression {
3324 () => {{}};
3325 ($input:expr) => {{
3326 let _pv_input = &$input;
3327 debug_assert!(_pv_input.len() > 0,
3328 "Contract isotonic_regression: precondition violated — input.len() > 0");
3329 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
3330 "Contract isotonic_regression: precondition violated — input.iter().all(|v| v.is_finite())");
3331 }};
3332}
3333
3334macro_rules! contract_pre_maximum_calibration_error {
3337 () => {{}};
3338 ($input:expr) => {{
3339 let _pv_input = &$input;
3340 debug_assert!(_pv_input.len() > 0,
3341 "Contract maximum_calibration_error: precondition violated — input.len() > 0");
3342 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
3343 "Contract maximum_calibration_error: precondition violated — input.iter().all(|v| v.is_finite())");
3344 }};
3345}
3346
3347macro_rules! contract_pre_platt_scaling {
3350 () => {{}};
3351 ($input:expr) => {{
3352 let _pv_input = &$input;
3353 debug_assert!(
3354 _pv_input.len() > 0,
3355 "Contract platt_scaling: precondition violated — input.len() > 0"
3356 );
3357 debug_assert!(
3358 _pv_input.iter().all(|v| v.is_finite()),
3359 "Contract platt_scaling: precondition violated — input.iter().all(|v| v.is_finite())"
3360 );
3361 }};
3362}
3363
3364macro_rules! contract_pre_reliability_diagram {
3367 () => {{}};
3368 ($input:expr) => {{
3369 let _pv_input = &$input;
3370 debug_assert!(_pv_input.len() > 0,
3371 "Contract reliability_diagram: precondition violated — input.len() > 0");
3372 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
3373 "Contract reliability_diagram: precondition violated — input.iter().all(|v| v.is_finite())");
3374 }};
3375}
3376
3377macro_rules! contract_pre_domain_loss {
3383 () => {{}};
3384 ($input:expr) => {{
3385 let _contract_input = &$input;
3386 }};
3387}
3388
3389macro_rules! contract_pre_domain_throughput {
3392 () => {{}};
3393 ($input:expr) => {{
3394 let _contract_input = &$input;
3395 }};
3396}
3397
3398macro_rules! contract_pre_schema_completeness {
3401 () => {{}};
3402 ($input:expr) => {{
3403 let _pv_x = &$input;
3404 }};
3405}
3406
3407macro_rules! contract_pre_parity_gate {
3413 () => {{}};
3414 ($input:expr) => {{
3415 let _contract_input = &$input;
3416 }};
3417}
3418
3419macro_rules! contract_pre_throughput_gate {
3422 () => {{}};
3423 ($input:expr) => {{
3424 let _contract_input = &$input;
3425 }};
3426}
3427
3428macro_rules! contract_pre_vram_gate {
3431 () => {{}};
3432 ($input:expr) => {{
3433 let _contract_input = &$input;
3434 }};
3435}
3436
3437macro_rules! contract_pre_appstate_architecture_cache {
3443 () => {{}};
3444 ($input:expr) => {{
3445 let _pv_quantized_model = &$input;
3446 }};
3447}
3448
3449macro_rules! contract_post_appstate_architecture_cache {
3452 ($result:expr) => {{
3453 let _contract_result = &$result;
3454 }};
3455}
3456
3457macro_rules! contract_appstate_architecture_cache {
3459 ($input:expr, $body:expr) => {{
3460 contract_pre_appstate_architecture_cache!($input);
3461 let _contract_result = $body;
3462 contract_post_appstate_architecture_cache!(_contract_result);
3463 _contract_result
3464 }};
3465}
3466
3467macro_rules! contract_pre_architecture_aware_selection {
3470 () => {{}};
3471 ($input:expr) => {{
3472 let _contract_input = &$input;
3473 }};
3474}
3475
3476macro_rules! contract_post_architecture_aware_selection {
3479 ($result:expr) => {{
3480 let _contract_result = &$result;
3481 }};
3482}
3483
3484macro_rules! contract_architecture_aware_selection {
3486 ($input:expr, $body:expr) => {{
3487 contract_pre_architecture_aware_selection!($input);
3488 let _contract_result = $body;
3489 contract_post_architecture_aware_selection!(_contract_result);
3490 _contract_result
3491 }};
3492}
3493
3494macro_rules! contract_pre_format_conversation_determinism {
3497 () => {{}};
3498 ($input:expr) => {{
3499 let _pv_messages = &$input;
3500 debug_assert!(_pv_messages.len() >= 0,
3501 "Contract format_conversation_determinism: precondition violated — messages.len() >= 0");
3502 }};
3503}
3504
3505macro_rules! contract_post_format_conversation_determinism {
3508 ($result:expr) => {{
3509 let _contract_result = &$result;
3510 }};
3511}
3512
3513macro_rules! contract_format_conversation_determinism {
3515 ($input:expr, $body:expr) => {{
3516 contract_pre_format_conversation_determinism!($input);
3517 let _contract_result = $body;
3518 contract_post_format_conversation_determinism!(_contract_result);
3519 _contract_result
3520 }};
3521}
3522
3523macro_rules! contract_pre_thinking_block_suppression {
3526 () => {{}};
3527 ($input:expr) => {{
3528 let _contract_input = &$input;
3529 }};
3530}
3531
3532macro_rules! contract_post_thinking_block_suppression {
3535 ($result:expr) => {{
3536 let _contract_result = &$result;
3537 }};
3538}
3539
3540macro_rules! contract_thinking_block_suppression {
3542 ($input:expr, $body:expr) => {{
3543 contract_pre_thinking_block_suppression!($input);
3544 let _contract_result = $body;
3545 contract_post_thinking_block_suppression!(_contract_result);
3546 _contract_result
3547 }};
3548}
3549
3550macro_rules! contract_pre_trait_completeness {
3553 () => {{}};
3554 ($input:expr) => {{
3555 let _contract_input = &$input;
3556 }};
3557}
3558
3559macro_rules! contract_post_trait_completeness {
3562 ($result:expr) => {{
3563 let _contract_result = &$result;
3564 }};
3565}
3566
3567macro_rules! contract_trait_completeness {
3569 ($input:expr, $body:expr) => {{
3570 contract_pre_trait_completeness!($input);
3571 let _contract_result = $body;
3572 contract_post_trait_completeness!(_contract_result);
3573 _contract_result
3574 }};
3575}
3576
3577macro_rules! contract_pre_classifier_weight_shape {
3583 () => {{}};
3584 ($input:expr) => {{
3585 let _pv_a = &$input;
3586 debug_assert!(
3587 _pv_a.len() > 0,
3588 "Contract classifier_weight_shape: precondition violated — a.len() > 0"
3589 );
3590 }};
3591}
3592
3593macro_rules! contract_pre_label_bounds {
3596 () => {{}};
3597 ($input:expr) => {{
3598 let _pv_a = &$input;
3599 debug_assert!(
3600 _pv_a.len() > 0,
3601 "Contract label_bounds: precondition violated — a.len() > 0"
3602 );
3603 }};
3604}
3605
3606macro_rules! contract_pre_logit_shape {
3609 () => {{}};
3610 ($input:expr) => {{
3611 let _pv_a = &$input;
3612 debug_assert!(_pv_a.len() > 0,
3613 "Contract logit_shape: precondition violated — a.len() > 0");
3614 }};
3615}
3616
3617macro_rules! contract_pre_softmax_sum {
3620 () => {{}};
3621 ($input:expr) => {{
3622 let _pv_x = &$input;
3623 debug_assert!(_pv_x.iter().all(|v| v.is_finite()),
3624 "Contract softmax_sum: precondition violated — x.iter().all(|v| v.is_finite())");
3625 debug_assert!(_pv_x.len() > 0,
3626 "Contract softmax_sum: precondition violated — x.len() > 0");
3627 }};
3628}
3629
3630macro_rules! contract_pre_embedding_extraction {
3636 () => {{}};
3637 ($input:expr) => {{
3638 let _pv_indices = &$input;
3639 debug_assert!(
3640 _pv_indices.len() > 0,
3641 "Contract embedding_extraction: precondition violated — indices.len() > 0"
3642 );
3643 }};
3644}
3645
3646macro_rules! contract_pre_evaluation {
3649 () => {{}};
3650 ($input:expr) => {{
3651 let _contract_input = &$input;
3652 }};
3653}
3654
3655macro_rules! contract_pre_linear_probe {
3658 () => {{}};
3659 ($input:expr) => {{
3660 let _contract_input = &$input;
3661 }};
3662}
3663
3664macro_rules! contract_pre_duplicate_detection {
3670 () => {{}};
3671 ($input:expr) => {{
3672 let _contract_input = &$input;
3673 }};
3674}
3675
3676macro_rules! contract_pre_outlier_detection {
3679 () => {{}};
3680 ($input:expr) => {{
3681 let _contract_input = &$input;
3682 }};
3683}
3684
3685macro_rules! contract_pre_scan_completeness {
3688 () => {{}};
3689 ($input:expr) => {{
3690 let _contract_input = &$input;
3691 }};
3692}
3693
3694macro_rules! contract_pre_dispatch_completeness {
3700 () => {{}};
3701 ($input:expr) => {{
3702 let _pv_args = &$input;
3703 }};
3704}
3705
3706macro_rules! contract_pre_exit_code_semantics {
3709 () => {{}};
3710 ($input:expr) => {{
3711 let _contract_input = &$input;
3712 }};
3713}
3714
3715macro_rules! contract_pre_feature_gated_dispatch {
3718 () => {{}};
3719 ($input:expr) => {{
3720 let _contract_input = &$input;
3721 }};
3722}
3723
3724macro_rules! contract_post_feature_gated_dispatch {
3727 ($result:expr) => {{
3728 let _contract_result = &$result;
3729 }};
3730}
3731
3732macro_rules! contract_feature_gated_dispatch {
3734 ($input:expr, $body:expr) => {{
3735 contract_pre_feature_gated_dispatch!($input);
3736 let _contract_result = $body;
3737 contract_post_feature_gated_dispatch!(_contract_result);
3738 _contract_result
3739 }};
3740}
3741
3742macro_rules! contract_pre_idempotent_inspection {
3745 () => {{}};
3746 ($input:expr) => {{
3747 let _contract_input = &$input;
3748 }};
3749}
3750
3751macro_rules! contract_pre_output_format_fidelity {
3754 () => {{}};
3755 ($input:expr) => {{
3756 let _contract_input = &$input;
3757 }};
3758}
3759
3760macro_rules! contract_pre_exit_code_semantics {
3766 () => {{}};
3767 ($input:expr) => {{
3768 let _contract_input = &$input;
3769 }};
3770}
3771
3772macro_rules! contract_post_exit_code_semantics {
3775 ($result:expr) => {{
3776 let _contract_result = &$result;
3777 }};
3778}
3779
3780macro_rules! contract_exit_code_semantics {
3782 ($input:expr, $body:expr) => {{
3783 contract_pre_exit_code_semantics!($input);
3784 let _contract_result = $body;
3785 contract_post_exit_code_semantics!(_contract_result);
3786 _contract_result
3787 }};
3788}
3789
3790macro_rules! contract_pre_output_format_fidelity {
3793 () => {{}};
3794 ($input:expr) => {{
3795 let _contract_input = &$input;
3796 }};
3797}
3798
3799macro_rules! contract_post_output_format_fidelity {
3802 ($result:expr) => {{
3803 let _contract_result = &$result;
3804 }};
3805}
3806
3807macro_rules! contract_output_format_fidelity {
3809 ($input:expr, $body:expr) => {{
3810 contract_pre_output_format_fidelity!($input);
3811 let _contract_result = $body;
3812 contract_post_output_format_fidelity!(_contract_result);
3813 _contract_result
3814 }};
3815}
3816
3817macro_rules! contract_pre_result_cardinality {
3820 () => {{}};
3821 ($input:expr) => {{
3822 let _contract_input = &$input;
3823 }};
3824}
3825
3826macro_rules! contract_post_result_cardinality {
3829 ($result:expr) => {{
3830 let _contract_result = &$result;
3831 }};
3832}
3833
3834macro_rules! contract_result_cardinality {
3836 ($input:expr, $body:expr) => {{
3837 contract_pre_result_cardinality!($input);
3838 let _contract_result = $body;
3839 contract_post_result_cardinality!(_contract_result);
3840 _contract_result
3841 }};
3842}
3843
3844macro_rules! contract_pre_timeout_honoring {
3847 () => {{}};
3848 ($input:expr) => {{
3849 let _contract_input = &$input;
3850 }};
3851}
3852
3853macro_rules! contract_post_timeout_honoring {
3856 ($result:expr) => {{
3857 let _contract_result = &$result;
3858 }};
3859}
3860
3861macro_rules! contract_timeout_honoring {
3863 ($input:expr, $body:expr) => {{
3864 contract_pre_timeout_honoring!($input);
3865 let _contract_result = $body;
3866 contract_post_timeout_honoring!(_contract_result);
3867 _contract_result
3868 }};
3869}
3870
3871macro_rules! contract_pre_exit_code_dispatch {
3877 () => {{}};
3878 ($input:expr) => {{
3879 let _pv_args = &$input;
3880 debug_assert!(
3881 _pv_args.len() >= 2,
3882 "Contract exit_code_dispatch: precondition violated — args.len() >= 2"
3883 );
3884 debug_assert!(
3885 _pv_args[0] == "lint",
3886 "Contract exit_code_dispatch: precondition violated — args[0] == \"lint\""
3887 );
3888 }};
3889}
3890
3891macro_rules! contract_pre_finding_determinism {
3894 () => {{}};
3895 ($input:expr) => {{
3896 let _contract_input = &$input;
3897 }};
3898}
3899
3900macro_rules! contract_pre_output_format_validity {
3903 () => {{}};
3904 ($input:expr) => {{
3905 let _contract_input = &$input;
3906 }};
3907}
3908
3909macro_rules! contract_pre_severity_ordering {
3912 () => {{}};
3913 ($input:expr) => {{
3914 let _pv_diagnostics = &$input;
3915 debug_assert!(
3916 _pv_diagnostics.len() >= 0,
3917 "Contract severity_ordering: precondition violated — diagnostics.len() >= 0"
3918 );
3919 }};
3920}
3921
3922macro_rules! contract_pre_dispatch_correctness {
3928 () => {{}};
3929 ($input:expr) => {{
3930 let _contract_input = &$input;
3931 }};
3932}
3933
3934macro_rules! contract_pre_index_freshness {
3937 () => {{}};
3938 ($input:expr) => {{
3939 let _contract_input = &$input;
3940 }};
3941}
3942
3943macro_rules! contract_pre_rag_query_correctness {
3946 () => {{}};
3947 ($input:expr) => {{
3948 let _pv_query = &$input;
3949 debug_assert!(
3950 _pv_query.len() > 0,
3951 "Contract rag_query_correctness: precondition violated — query.len() > 0"
3952 );
3953 }};
3954}
3955
3956macro_rules! contract_pre_exit_code_dispatch {
3962 () => {{}};
3963 ($input:expr) => {{
3964 let _pv_args = &$input;
3965 debug_assert!(
3966 _pv_args.len() >= 2,
3967 "Contract exit_code_dispatch: precondition violated — args.len() >= 2"
3968 );
3969 debug_assert!(
3970 _pv_args[0] == "transpile",
3971 "Contract exit_code_dispatch: precondition violated — args[0] == \"transpile\""
3972 );
3973 }};
3974}
3975
3976macro_rules! contract_pre_input_validation {
3979 () => {{}};
3980 ($input:expr) => {{
3981 let _contract_input = &$input;
3982 }};
3983}
3984
3985macro_rules! contract_pre_output_validity {
3988 () => {{}};
3989 ($input:expr) => {{
3990 let _pv_rust_source = &$input;
3991 debug_assert!(
3992 !_pv_rust_source.is_empty(),
3993 "Contract output_validity: precondition violated — !rust_source.is_empty()"
3994 );
3995 debug_assert!(
3996 _pv_rust_source.len() <= 10_000_000,
3997 "Contract output_validity: precondition violated — rust_source.len() <= 10_000_000"
3998 );
3999 }};
4000}
4001
4002macro_rules! contract_pre_transpilation_determinism {
4005 () => {{}};
4006 ($input:expr) => {{
4007 let _contract_input = &$input;
4008 }};
4009}
4010
4011macro_rules! contract_pre_covariance_update {
4017 () => {{}};
4018 ($input:expr) => {{
4019 let _pv_params = &$input;
4020 debug_assert!(
4021 _pv_params.len() > 0,
4022 "Contract covariance_update: precondition violated — params.len() > 0"
4023 );
4024 }};
4025}
4026
4027macro_rules! contract_pre_mean_update {
4030 () => {{}};
4031 ($input:expr) => {{
4032 let _pv_params = &$input;
4033 debug_assert!(
4034 _pv_params.len() > 0,
4035 "Contract mean_update: precondition violated — params.len() > 0"
4036 );
4037 }};
4038}
4039
4040macro_rules! contract_pre_sample {
4043 () => {{}};
4044 ($input:expr) => {{
4045 let _pv_params = &$input;
4046 debug_assert!(
4047 _pv_params.len() > 0,
4048 "Contract sample: precondition violated — params.len() > 0"
4049 );
4050 }};
4051}
4052
4053macro_rules! contract_pre_tokenizer_adequacy {
4059 () => {{}};
4060 ($input:expr) => {{
4061 let _pv_input = &$input;
4062 debug_assert!(
4063 _pv_input.len() > 0,
4064 "Contract tokenizer_adequacy: precondition violated — input.len() > 0"
4065 );
4066 }};
4067}
4068
4069macro_rules! contract_pre_apply_script {
4075 () => {{}};
4076 ($input:expr) => {{
4077 let _contract_input = &$input;
4078 }};
4079}
4080
4081macro_rules! contract_pre_check_script {
4084 () => {{}};
4085 ($input:expr) => {{
4086 let _contract_input = &$input;
4087 }};
4088}
4089
4090macro_rules! contract_pre_state_query_script {
4093 () => {{}};
4094 ($input:expr) => {{
4095 let _contract_input = &$input;
4096 }};
4097}
4098
4099macro_rules! contract_pre_insert_get_consistency {
4105 () => {{}};
4106 ($input:expr) => {{
4107 let _contract_input = &$input;
4108 }};
4109}
4110
4111macro_rules! contract_pre_query_correctness {
4114 () => {{}};
4115 ($input:expr) => {{
4116 let _contract_input = &$input;
4117 }};
4118}
4119
4120macro_rules! contract_pre_wasm_parity {
4123 () => {{}};
4124 ($input:expr) => {{
4125 let _contract_input = &$input;
4126 }};
4127}
4128
4129macro_rules! contract_pre_aggregate_score {
4135 () => {{}};
4136 ($input:expr) => {{
4137 let _pv_checks = &$input;
4138 debug_assert!(
4139 _pv_checks.len() > 0,
4140 "Contract aggregate_score: precondition violated — checks.len() > 0"
4141 );
4142 }};
4143}
4144
4145macro_rules! contract_post_aggregate_score {
4148 ($result:expr) => {{
4149 let _contract_result = &$result;
4150 }};
4151}
4152
4153macro_rules! contract_aggregate_score {
4155 ($input:expr, $body:expr) => {{
4156 contract_pre_aggregate_score!($input);
4157 let _contract_result = $body;
4158 contract_post_aggregate_score!(_contract_result);
4159 _contract_result
4160 }};
4161}
4162
4163macro_rules! contract_pre_run_checks {
4166 () => {{}};
4167 ($input:expr) => {{
4168 let _contract_input = &$input;
4169 }};
4170}
4171
4172macro_rules! contract_post_run_checks {
4175 ($result:expr) => {{
4176 let _contract_result = &$result;
4177 }};
4178}
4179
4180macro_rules! contract_run_checks {
4182 ($input:expr, $body:expr) => {{
4183 contract_pre_run_checks!($input);
4184 let _contract_result = $body;
4185 contract_post_run_checks!(_contract_result);
4186 _contract_result
4187 }};
4188}
4189
4190macro_rules! contract_pre_batch_correctness {
4196 () => {{}};
4197 ($input:expr) => {{
4198 let _pv_B = &$input;
4199 debug_assert!(
4200 _pv_B.len() > 0,
4201 "Contract batch_correctness: precondition violated — B.len() > 0"
4202 );
4203 }};
4204}
4205
4206macro_rules! contract_pre_roundtrip_identity {
4209 () => {{}};
4210 ($input:expr) => {{
4211 let _pv_data = &$input;
4212 debug_assert!(
4213 !_pv_data.is_empty(),
4214 "Contract roundtrip_identity: precondition violated — !data.is_empty()"
4215 );
4216 }};
4217}
4218
4219macro_rules! contract_pre_simd_scalar_parity {
4222 () => {{}};
4223 ($input:expr) => {{
4224 let _pv_data = &$input;
4225 debug_assert!(
4226 _pv_data.len() > 0,
4227 "Contract simd_scalar_parity: precondition violated — data.len() > 0"
4228 );
4229 }};
4230}
4231
4232macro_rules! contract_pre_compression_ratio {
4238 () => {{}};
4239 ($input:expr) => {{
4240 let _pv_data = &$input;
4241 debug_assert!(
4242 _pv_data.len() > 0,
4243 "Contract compression_ratio: precondition violated — data.len() > 0"
4244 );
4245 }};
4246}
4247
4248macro_rules! contract_pre_page_state {
4251 () => {{}};
4252 ($input:expr) => {{
4253 let _contract_input = &$input;
4254 }};
4255}
4256
4257macro_rules! contract_pre_roundtrip_identity {
4260 () => {{}};
4261 ($input:expr) => {{
4262 let _pv_data = &$input;
4263 debug_assert!(
4264 _pv_data.len() > 0,
4265 "Contract roundtrip_identity: precondition violated — data.len() > 0"
4266 );
4267 }};
4268}
4269
4270macro_rules! contract_pre_lz4_roundtrip {
4276 () => {{}};
4277 ($input:expr) => {{
4278 let _contract_input = &$input;
4279 }};
4280}
4281
4282macro_rules! contract_post_lz4_roundtrip {
4285 ($result:expr) => {{
4286 let _contract_result = &$result;
4287 }};
4288}
4289
4290macro_rules! contract_lz4_roundtrip {
4292 ($input:expr, $body:expr) => {{
4293 contract_pre_lz4_roundtrip!($input);
4294 let _contract_result = $body;
4295 contract_post_lz4_roundtrip!(_contract_result);
4296 _contract_result
4297 }};
4298}
4299
4300macro_rules! contract_pre_sqlite_migration {
4303 () => {{}};
4304 ($input:expr) => {{
4305 let _contract_input = &$input;
4306 }};
4307}
4308
4309macro_rules! contract_post_sqlite_migration {
4312 ($result:expr) => {{
4313 let _contract_result = &$result;
4314 }};
4315}
4316
4317macro_rules! contract_sqlite_migration {
4319 ($input:expr, $body:expr) => {{
4320 contract_pre_sqlite_migration!($input);
4321 let _contract_result = $body;
4322 contract_post_sqlite_migration!(_contract_result);
4323 _contract_result
4324 }};
4325}
4326
4327macro_rules! contract_pre_backend_dispatch_complete {
4333 () => {{}};
4334 ($input:expr) => {{
4335 let _contract_input = &$input;
4336 }};
4337}
4338
4339macro_rules! contract_post_backend_dispatch_complete {
4342 ($result:expr) => {{
4343 let _contract_result = &$result;
4344 }};
4345}
4346
4347macro_rules! contract_backend_dispatch_complete {
4349 ($input:expr, $body:expr) => {{
4350 contract_pre_backend_dispatch_complete!($input);
4351 let _contract_result = $body;
4352 contract_post_backend_dispatch_complete!(_contract_result);
4353 _contract_result
4354 }};
4355}
4356
4357macro_rules! contract_pre_gpu_cpu_parity {
4360 () => {{}};
4361 ($input:expr) => {{
4362 let _contract_input = &$input;
4363 }};
4364}
4365
4366macro_rules! contract_post_gpu_cpu_parity {
4369 ($result:expr) => {{
4370 let _contract_result = &$result;
4371 }};
4372}
4373
4374macro_rules! contract_gpu_cpu_parity {
4376 ($input:expr, $body:expr) => {{
4377 contract_pre_gpu_cpu_parity!($input);
4378 let _contract_result = $body;
4379 contract_post_gpu_cpu_parity!(_contract_result);
4380 _contract_result
4381 }};
4382}
4383
4384macro_rules! contract_pre_simd_scalar_parity {
4387 () => {{}};
4388 ($input:expr) => {{
4389 let _contract_input = &$input;
4390 }};
4391}
4392
4393macro_rules! contract_post_simd_scalar_parity {
4396 ($result:expr) => {{
4397 let _contract_result = &$result;
4398 }};
4399}
4400
4401macro_rules! contract_simd_scalar_parity {
4403 ($input:expr, $body:expr) => {{
4404 contract_pre_simd_scalar_parity!($input);
4405 let _contract_result = $body;
4406 contract_post_simd_scalar_parity!(_contract_result);
4407 _contract_result
4408 }};
4409}
4410
4411macro_rules! contract_pre_channel_lossless {
4417 () => {{}};
4418 ($input:expr) => {{
4419 let _contract_input = &$input;
4420 }};
4421}
4422
4423macro_rules! contract_post_channel_lossless {
4426 ($result:expr) => {{
4427 let _contract_result = &$result;
4428 }};
4429}
4430
4431macro_rules! contract_channel_lossless {
4433 ($input:expr, $body:expr) => {{
4434 contract_pre_channel_lossless!($input);
4435 let _contract_result = $body;
4436 contract_post_channel_lossless!(_contract_result);
4437 _contract_result
4438 }};
4439}
4440
4441macro_rules! contract_pre_parallel_determinism {
4444 () => {{}};
4445 ($input:expr) => {{
4446 let _contract_input = &$input;
4447 }};
4448}
4449
4450macro_rules! contract_post_parallel_determinism {
4453 ($result:expr) => {{
4454 let _contract_result = &$result;
4455 }};
4456}
4457
4458macro_rules! contract_parallel_determinism {
4460 ($input:expr, $body:expr) => {{
4461 contract_pre_parallel_determinism!($input);
4462 let _contract_result = $body;
4463 contract_post_parallel_determinism!(_contract_result);
4464 _contract_result
4465 }};
4466}
4467
4468macro_rules! contract_pre_task_cancellation_cleanup {
4471 () => {{}};
4472 ($input:expr) => {{
4473 let _contract_input = &$input;
4474 }};
4475}
4476
4477macro_rules! contract_post_task_cancellation_cleanup {
4480 ($result:expr) => {{
4481 let _contract_result = &$result;
4482 }};
4483}
4484
4485macro_rules! contract_task_cancellation_cleanup {
4487 ($input:expr, $body:expr) => {{
4488 contract_pre_task_cancellation_cleanup!($input);
4489 let _contract_result = $body;
4490 contract_post_task_cancellation_cleanup!(_contract_result);
4491 _contract_result
4492 }};
4493}
4494
4495macro_rules! contract_pre_threshold_invariants {
4501 () => {{}};
4502 ($input:expr) => {{
4503 let _contract_input = &$input;
4504 }};
4505}
4506
4507macro_rules! contract_post_threshold_invariants {
4510 ($result:expr) => {{
4511 let _contract_result = &$result;
4512 }};
4513}
4514
4515macro_rules! contract_threshold_invariants {
4517 ($input:expr, $body:expr) => {{
4518 contract_pre_threshold_invariants!($input);
4519 let _contract_result = $body;
4520 contract_post_threshold_invariants!(_contract_result);
4521 _contract_result
4522 }};
4523}
4524
4525macro_rules! contract_pre_unknown_key_rejection {
4528 () => {{}};
4529 ($input:expr) => {{
4530 let _contract_input = &$input;
4531 }};
4532}
4533
4534macro_rules! contract_post_unknown_key_rejection {
4537 ($result:expr) => {{
4538 let _contract_result = &$result;
4539 }};
4540}
4541
4542macro_rules! contract_unknown_key_rejection {
4544 ($input:expr, $body:expr) => {{
4545 contract_pre_unknown_key_rejection!($input);
4546 let _contract_result = $body;
4547 contract_post_unknown_key_rejection!(_contract_result);
4548 _contract_result
4549 }};
4550}
4551
4552macro_rules! contract_pre_configuration {
4558 () => {{}};
4559 ($input:expr) => {{
4560 let _pv_path = &$input;
4561 }};
4562}
4563
4564macro_rules! contract_post_configuration {
4567 ($result:expr) => {{
4568 let _contract_result = &$result;
4569 }};
4570}
4571
4572macro_rules! contract_configuration {
4574 ($input:expr, $body:expr) => {{
4575 contract_pre_configuration!($input);
4576 let _contract_result = $body;
4577 contract_post_configuration!(_contract_result);
4578 _contract_result
4579 }};
4580}
4581
4582macro_rules! contract_pre_bfs {
4588 () => {{}};
4589 ($input:expr) => {{
4590 let _contract_input = &$input;
4591 }};
4592}
4593
4594macro_rules! contract_pre_connect {
4600 () => {{}};
4601 ($input:expr) => {{
4602 let _contract_input = &$input;
4603 }};
4604}
4605
4606macro_rules! contract_pre_validate_index {
4612 () => {{}};
4613 ($input:expr) => {{
4614 let _contract_input = &$input;
4615 }};
4616}
4617
4618macro_rules! contract_pre_validate_size {
4621 () => {{}};
4622 ($input:expr) => {{
4623 let _contract_input = &$input;
4624 }};
4625}
4626
4627macro_rules! contract_pre_insert {
4636 () => {{}};
4637 ($input:expr) => {{
4638 let _contract_input = &$input;
4639 }};
4640}
4641
4642macro_rules! contract_pre_query {
4645 () => {{}};
4646 ($input:expr) => {{
4647 let _contract_input = &$input;
4648 }};
4649}
4650
4651macro_rules! contract_pre_config {
4657 () => {{}};
4658 ($input:expr) => {{
4659 let _contract_input = &$input;
4660 }};
4661}
4662
4663macro_rules! contract_pre_generate_context {
4669 () => {{}};
4670 ($input:expr) => {{
4671 let _contract_input = &$input;
4672 }};
4673}
4674
4675macro_rules! contract_post_generate_context {
4678 ($result:expr) => {{
4679 let _contract_result = &$result;
4680 }};
4681}
4682
4683macro_rules! contract_generate_context {
4685 ($input:expr, $body:expr) => {{
4686 contract_pre_generate_context!($input);
4687 let _contract_result = $body;
4688 contract_post_generate_context!(_contract_result);
4689 _contract_result
4690 }};
4691}
4692
4693macro_rules! contract_pre_index_persistence {
4696 () => {{}};
4697 ($input:expr) => {{
4698 let _contract_input = &$input;
4699 }};
4700}
4701
4702macro_rules! contract_post_index_persistence {
4705 ($result:expr) => {{
4706 let _contract_result = &$result;
4707 }};
4708}
4709
4710macro_rules! contract_index_persistence {
4712 ($input:expr, $body:expr) => {{
4713 contract_pre_index_persistence!($input);
4714 let _contract_result = $body;
4715 contract_post_index_persistence!(_contract_result);
4716 _contract_result
4717 }};
4718}
4719
4720macro_rules! contract_pre_chunked_prefill {
4726 () => {{}};
4727 ($input:expr) => {{
4728 let _contract_input = &$input;
4729 }};
4730}
4731
4732macro_rules! contract_pre_correctness_under_batching {
4735 () => {{}};
4736 ($input:expr) => {{
4737 let _contract_input = &$input;
4738 }};
4739}
4740
4741macro_rules! contract_pre_decode_degradation {
4744 () => {{}};
4745 ($input:expr) => {{
4746 let _pv_input = &$input;
4747 debug_assert!(
4748 _pv_input.len() > 0,
4749 "Contract decode_degradation: precondition violated — input.len() > 0"
4750 );
4751 }};
4752}
4753
4754macro_rules! contract_pre_request_state {
4757 () => {{}};
4758 ($input:expr) => {{
4759 let _contract_input = &$input;
4760 }};
4761}
4762
4763macro_rules! contract_pre_scheduling_fairness {
4766 () => {{}};
4767 ($input:expr) => {{
4768 let _contract_input = &$input;
4769 }};
4770}
4771
4772macro_rules! contract_pre_throughput_scaling {
4775 () => {{}};
4776 ($input:expr) => {{
4777 let _contract_input = &$input;
4778 }};
4779}
4780
4781macro_rules! contract_pre_token_budget {
4784 () => {{}};
4785 ($input:expr) => {{
4786 let _pv_input = &$input;
4787 debug_assert!(
4788 _pv_input.len() > 0,
4789 "Contract token_budget: precondition violated — input.len() > 0"
4790 );
4791 }};
4792}
4793
4794macro_rules! contract_pre_conv1d {
4800 () => {{}};
4801 ($input:expr) => {{
4802 let _pv_a = &$input;
4803 debug_assert!(_pv_a.len() > 0, "Contract conv1d: precondition violated — a.len() > 0");
4804 }};
4805}
4806
4807macro_rules! contract_pre_chatml_format {
4813 () => {{}};
4814 ($input:expr) => {{
4815 let _pv_input = &$input;
4816 debug_assert!(
4817 _pv_input.len() > 0,
4818 "Contract chatml_format: precondition violated — input.len() > 0"
4819 );
4820 }};
4821}
4822
4823macro_rules! contract_pre_conversation_types {
4826 () => {{}};
4827 ($input:expr) => {{
4828 let _pv_input = &$input;
4829 debug_assert!(
4830 _pv_input.len() > 0,
4831 "Contract conversation_types: precondition violated — input.len() > 0"
4832 );
4833 }};
4834}
4835
4836macro_rules! contract_pre_quality_gate {
4839 () => {{}};
4840 ($input:expr) => {{
4841 let _pv_input = &$input;
4842 debug_assert!(
4843 _pv_input.len() > 0,
4844 "Contract quality_gate: precondition violated — input.len() > 0"
4845 );
4846 }};
4847}
4848
4849macro_rules! contract_pre_block_reuse {
4858 () => {{}};
4859 ($input:expr) => {{
4860 let _pv_old_idx = &$input;
4861 }};
4862}
4863
4864macro_rules! contract_pre_delta_correctness {
4867 () => {{}};
4868 ($input:expr) => {{
4869 let _contract_input = &$input;
4870 }};
4871}
4872
4873macro_rules! contract_pre_identity_sync {
4876 () => {{}};
4877 ($input:expr) => {{
4878 let _contract_input = &$input;
4879 }};
4880}
4881
4882macro_rules! contract_pre_transfer_minimality {
4885 () => {{}};
4886 ($input:expr) => {{
4887 let _pv_delta = &$input;
4888 }};
4889}
4890
4891macro_rules! contract_pre_class_to_struct {
4897 () => {{}};
4898 ($input:expr) => {{
4899 let _contract_input = &$input;
4900 }};
4901}
4902
4903macro_rules! contract_post_class_to_struct {
4906 ($result:expr) => {{
4907 let _contract_result = &$result;
4908 }};
4909}
4910
4911macro_rules! contract_class_to_struct {
4913 ($input:expr, $body:expr) => {{
4914 contract_pre_class_to_struct!($input);
4915 let _contract_result = $body;
4916 contract_post_class_to_struct!(_contract_result);
4917 _contract_result
4918 }};
4919}
4920
4921macro_rules! contract_pre_inheritance_to_composition {
4924 () => {{}};
4925 ($input:expr) => {{
4926 let _contract_input = &$input;
4927 }};
4928}
4929
4930macro_rules! contract_post_inheritance_to_composition {
4933 ($result:expr) => {{
4934 let _contract_result = &$result;
4935 }};
4936}
4937
4938macro_rules! contract_inheritance_to_composition {
4940 ($input:expr, $body:expr) => {{
4941 contract_pre_inheritance_to_composition!($input);
4942 let _contract_result = $body;
4943 contract_post_inheritance_to_composition!(_contract_result);
4944 _contract_result
4945 }};
4946}
4947
4948macro_rules! contract_pre_namespace_to_mod {
4951 () => {{}};
4952 ($input:expr) => {{
4953 let _contract_input = &$input;
4954 }};
4955}
4956
4957macro_rules! contract_post_namespace_to_mod {
4960 ($result:expr) => {{
4961 let _contract_result = &$result;
4962 }};
4963}
4964
4965macro_rules! contract_namespace_to_mod {
4967 ($input:expr, $body:expr) => {{
4968 contract_pre_namespace_to_mod!($input);
4969 let _contract_result = $body;
4970 contract_post_namespace_to_mod!(_contract_result);
4971 _contract_result
4972 }};
4973}
4974
4975macro_rules! contract_pre_operator_to_trait {
4978 () => {{}};
4979 ($input:expr) => {{
4980 let _pv_x = &$input;
4981 }};
4982}
4983
4984macro_rules! contract_post_operator_to_trait {
4987 ($result:expr) => {{
4988 let _contract_result = &$result;
4989 }};
4990}
4991
4992macro_rules! contract_operator_to_trait {
4994 ($input:expr, $body:expr) => {{
4995 contract_pre_operator_to_trait!($input);
4996 let _contract_result = $body;
4997 contract_post_operator_to_trait!(_contract_result);
4998 _contract_result
4999 }};
5000}
5001
5002macro_rules! contract_pre_current_path {
5008 () => {{}};
5009 ($input:expr) => {{
5010 let _pv_x = &$input;
5011 debug_assert!(
5012 _pv_x.iter().all(|v| v.is_finite()),
5013 "Contract current_path: precondition violated — x.iter().all(|v| v.is_finite())"
5014 );
5015 debug_assert!(
5016 _pv_x.len() > 0,
5017 "Contract current_path: precondition violated — x.len() > 0"
5018 );
5019 }};
5020}
5021
5022macro_rules! contract_pre_speedup_bound {
5025 () => {{}};
5026 ($input:expr) => {{
5027 let _pv_x = &$input;
5028 debug_assert!(
5029 _pv_x.iter().all(|v| v.is_finite()),
5030 "Contract speedup_bound: precondition violated — x.iter().all(|v| v.is_finite())"
5031 );
5032 debug_assert!(
5033 _pv_x.len() > 0,
5034 "Contract speedup_bound: precondition violated — x.len() > 0"
5035 );
5036 }};
5037}
5038
5039macro_rules! contract_pre_target_path {
5042 () => {{}};
5043 ($input:expr) => {{
5044 let _pv_x = &$input;
5045 debug_assert!(_pv_x.iter().all(|v| v.is_finite()),
5046 "Contract target_path: precondition violated — x.iter().all(|v| v.is_finite())");
5047 debug_assert!(_pv_x.len() > 0,
5048 "Contract target_path: precondition violated — x.len() > 0");
5049 }};
5050}
5051
5052macro_rules! contract_pre_l1_tiling {
5058 () => {{}};
5059 ($input:expr) => {{
5060 let _pv_input = &$input;
5061 debug_assert!(
5062 _pv_input.len() > 0,
5063 "Contract l1_tiling: precondition violated — input.len() > 0"
5064 );
5065 debug_assert!(
5066 _pv_input.iter().all(|v| v.is_finite()),
5067 "Contract l1_tiling: precondition violated — input.iter().all(|v| v.is_finite())"
5068 );
5069 }};
5070}
5071
5072macro_rules! contract_pre_rayon_overhead {
5075 () => {{}};
5076 ($input:expr) => {{
5077 let _pv_input = &$input;
5078 debug_assert!(
5079 _pv_input.len() > 0,
5080 "Contract rayon_overhead: precondition violated — input.len() > 0"
5081 );
5082 debug_assert!(
5083 _pv_input.iter().all(|v| v.is_finite()),
5084 "Contract rayon_overhead: precondition violated — input.iter().all(|v| v.is_finite())"
5085 );
5086 }};
5087}
5088
5089macro_rules! contract_pre_cross_entropy {
5095 () => {{}};
5096 ($input:expr) => {{
5097 let _pv_logits = &$input;
5098 debug_assert!(
5099 _pv_logits.len() > 0,
5100 "Contract cross_entropy: precondition violated — logits.len() > 0"
5101 );
5102 debug_assert!(
5103 _pv_logits.iter().all(|v| v.is_finite()),
5104 "Contract cross_entropy: precondition violated — logits.iter().all(|v| v.is_finite())"
5105 );
5106 }};
5107}
5108
5109macro_rules! contract_post_cross_entropy {
5112 ($result:expr) => {{
5113 let _contract_result = &$result;
5114 debug_assert!(
5115 _contract_result.is_finite(),
5116 "Contract cross_entropy: postcondition violated — result.is_finite()"
5117 );
5118 debug_assert!(
5119 *_contract_result >= 0.0,
5120 "Contract cross_entropy: postcondition violated — result >= 0.0"
5121 );
5122 }};
5123}
5124
5125macro_rules! contract_cross_entropy {
5127 ($input:expr, $body:expr) => {{
5128 contract_pre_cross_entropy!($input);
5129 let _contract_result = $body;
5130 contract_post_cross_entropy!(_contract_result);
5131 _contract_result
5132 }};
5133}
5134
5135macro_rules! contract_pre_log_softmax {
5138 () => {{}};
5139 ($input:expr) => {{
5140 let _pv_x = &$input;
5141 debug_assert!(_pv_x.iter().all(|v| v.is_finite()),
5142 "Contract log_softmax: precondition violated — x.iter().all(|v| v.is_finite())");
5143 debug_assert!(_pv_x.len() > 0,
5144 "Contract log_softmax: precondition violated — x.len() > 0");
5145 }};
5146}
5147
5148macro_rules! contract_pre_device_dispatch {
5154 () => {{}};
5155 ($input:expr) => {{
5156 let _contract_input = &$input;
5157 }};
5158}
5159
5160macro_rules! contract_pre_gpu_forward {
5163 () => {{}};
5164 ($input:expr) => {{
5165 let _contract_input = &$input;
5166 }};
5167}
5168
5169macro_rules! contract_pre_weight_roundtrip {
5172 () => {{}};
5173 ($input:expr) => {{
5174 let _pv_weights = &$input;
5175 debug_assert!(
5176 _pv_weights.len() > 0,
5177 "Contract weight_roundtrip: precondition violated — weights.len() > 0"
5178 );
5179 }};
5180}
5181
5182macro_rules! contract_pre_host_transpilation {
5188 () => {{}};
5189 ($input:expr) => {{
5190 let _contract_input = &$input;
5191 }};
5192}
5193
5194macro_rules! contract_post_host_transpilation {
5197 ($result:expr) => {{
5198 let _contract_result = &$result;
5199 }};
5200}
5201
5202macro_rules! contract_host_transpilation {
5204 ($input:expr, $body:expr) => {{
5205 contract_pre_host_transpilation!($input);
5206 let _contract_result = $body;
5207 contract_post_host_transpilation!(_contract_result);
5208 _contract_result
5209 }};
5210}
5211
5212macro_rules! contract_pre_kernel_ffi {
5215 () => {{}};
5216 ($input:expr) => {{
5217 let _contract_input = &$input;
5218 }};
5219}
5220
5221macro_rules! contract_post_kernel_ffi {
5224 ($result:expr) => {{
5225 let _contract_result = &$result;
5226 }};
5227}
5228
5229macro_rules! contract_kernel_ffi {
5231 ($input:expr, $body:expr) => {{
5232 contract_pre_kernel_ffi!($input);
5233 let _contract_result = $body;
5234 contract_post_kernel_ffi!(_contract_result);
5235 _contract_result
5236 }};
5237}
5238
5239macro_rules! contract_pre_qualifier_preservation {
5242 () => {{}};
5243 ($input:expr) => {{
5244 let _contract_input = &$input;
5245 }};
5246}
5247
5248macro_rules! contract_post_qualifier_preservation {
5251 ($result:expr) => {{
5252 let _contract_result = &$result;
5253 }};
5254}
5255
5256macro_rules! contract_qualifier_preservation {
5258 ($input:expr, $body:expr) => {{
5259 contract_pre_qualifier_preservation!($input);
5260 let _contract_result = $body;
5261 contract_post_qualifier_preservation!(_contract_result);
5262 _contract_result
5263 }};
5264}
5265
5266macro_rules! contract_pre_kahn_sort {
5272 () => {{}};
5273 ($input:expr) => {{
5274 let _contract_input = &$input;
5275 }};
5276}
5277
5278macro_rules! contract_pre_topological_sort {
5281 () => {{}};
5282 ($input:expr) => {{
5283 let _contract_input = &$input;
5284 }};
5285}
5286
5287macro_rules! contract_pre_config_validity {
5293 () => {{}};
5294 ($input:expr) => {{
5295 let _contract_input = &$input;
5296 }};
5297}
5298
5299macro_rules! contract_pre_serialize_roundtrip {
5302 () => {{}};
5303 ($input:expr) => {{
5304 let _contract_input = &$input;
5305 }};
5306}
5307
5308macro_rules! contract_pre_include_resolution {
5314 () => {{}};
5315 ($input:expr) => {{
5316 let _contract_input = &$input;
5317 }};
5318}
5319
5320macro_rules! contract_pre_transpile_dispatch {
5323 () => {{}};
5324 ($input:expr) => {{
5325 let _contract_input = &$input;
5326 }};
5327}
5328
5329macro_rules! contract_pre_type_preservation {
5332 () => {{}};
5333 ($input:expr) => {{
5334 let _contract_input = &$input;
5335 }};
5336}
5337
5338macro_rules! contract_pre_gini_impurity {
5344 () => {{}};
5345 ($input:expr) => {{
5346 let _pv_input = &$input;
5347 debug_assert!(
5348 _pv_input.len() > 0,
5349 "Contract gini_impurity: precondition violated — input.len() > 0"
5350 );
5351 debug_assert!(
5352 _pv_input.iter().all(|v| v.is_finite()),
5353 "Contract gini_impurity: precondition violated — input.iter().all(|v| v.is_finite())"
5354 );
5355 }};
5356}
5357
5358macro_rules! contract_pre_gini_split {
5361 () => {{}};
5362 ($input:expr) => {{
5363 let _pv_input = &$input;
5364 debug_assert!(
5365 _pv_input.len() > 0,
5366 "Contract gini_split: precondition violated — input.len() > 0"
5367 );
5368 debug_assert!(
5369 _pv_input.iter().all(|v| v.is_finite()),
5370 "Contract gini_split: precondition violated — input.iter().all(|v| v.is_finite())"
5371 );
5372 }};
5373}
5374
5375macro_rules! contract_pre_mse_split {
5378 () => {{}};
5379 ($input:expr) => {{
5380 let _pv_input = &$input;
5381 debug_assert!(
5382 _pv_input.len() > 0,
5383 "Contract mse_split: precondition violated — input.len() > 0"
5384 );
5385 debug_assert!(
5386 _pv_input.iter().all(|v| v.is_finite()),
5387 "Contract mse_split: precondition violated — input.iter().all(|v| v.is_finite())"
5388 );
5389 }};
5390}
5391
5392macro_rules! contract_pre_prediction {
5395 () => {{}};
5396 ($input:expr) => {{
5397 let _pv_input = &$input;
5398 debug_assert!(
5399 _pv_input.len() > 0,
5400 "Contract prediction: precondition violated — input.len() > 0"
5401 );
5402 debug_assert!(
5403 _pv_input.iter().all(|v| v.is_finite()),
5404 "Contract prediction: precondition violated — input.iter().all(|v| v.is_finite())"
5405 );
5406 }};
5407}
5408
5409macro_rules! contract_pre_delta_computation {
5415 () => {{}};
5416 ($input:expr) => {{
5417 let _pv_signature = &$input;
5418 }};
5419}
5420
5421macro_rules! contract_pre_patch_apply {
5424 () => {{}};
5425 ($input:expr) => {{
5426 let _pv_delta = &$input;
5427 }};
5428}
5429
5430macro_rules! contract_pre_rolling_checksum {
5433 () => {{}};
5434 ($input:expr) => {{
5435 let _pv_window = &$input;
5436 }};
5437}
5438
5439macro_rules! contract_pre_display_format {
5445 () => {{}};
5446 ($input:expr) => {{
5447 let _contract_input = &$input;
5448 }};
5449}
5450
5451macro_rules! contract_post_display_format {
5454 ($result:expr) => {{
5455 let _contract_result = &$result;
5456 }};
5457}
5458
5459macro_rules! contract_display_format {
5461 ($input:expr, $body:expr) => {{
5462 contract_pre_display_format!($input);
5463 let _contract_result = $body;
5464 contract_post_display_format!(_contract_result);
5465 _contract_result
5466 }};
5467}
5468
5469macro_rules! contract_pre_render {
5472 () => {{}};
5473 ($input:expr) => {{
5474 let _contract_input = &$input;
5475 }};
5476}
5477
5478macro_rules! contract_post_render {
5481 ($result:expr) => {{
5482 let _contract_result = &$result;
5483 }};
5484}
5485
5486macro_rules! contract_render {
5488 ($input:expr, $body:expr) => {{
5489 contract_pre_render!($input);
5490 let _contract_result = $body;
5491 contract_post_render!(_contract_result);
5492 _contract_result
5493 }};
5494}
5495
5496macro_rules! contract_pre_gradient_allreduce {
5502 () => {{}};
5503 ($input:expr) => {{
5504 let _pv_params = &$input;
5505 debug_assert!(
5506 _pv_params.len() > 0,
5507 "Contract gradient_allreduce: precondition violated — params.len() > 0"
5508 );
5509 }};
5510}
5511
5512macro_rules! contract_pre_lora_gradient_size {
5515 () => {{}};
5516 ($input:expr) => {{
5517 let _pv_grad_output = &$input;
5518 debug_assert!(_pv_grad_output.len() > 0,
5519 "Contract lora_gradient_size: precondition violated — grad_output.len() > 0");
5520 debug_assert!(_pv_grad_output.iter().all(|v| v.is_finite()),
5521 "Contract lora_gradient_size: precondition violated — grad_output.iter().all(|v| v.is_finite())");
5522 }};
5523}
5524
5525macro_rules! contract_pre_sharding {
5528 () => {{}};
5529 ($input:expr) => {{
5530 let _pv_input = &$input;
5531 debug_assert!(
5532 _pv_input.len() > 0,
5533 "Contract sharding: precondition violated — input.len() > 0"
5534 );
5535 debug_assert!(
5536 _pv_input.iter().all(|v| v.is_finite()),
5537 "Contract sharding: precondition violated — input.iter().all(|v| v.is_finite())"
5538 );
5539 }};
5540}
5541
5542macro_rules! contract_pre_swiglu_ffn {
5545 () => {{}};
5546 ($input:expr) => {{
5547 let _pv_input = &$input;
5548 debug_assert!(
5549 _pv_input.len() > 0,
5550 "Contract swiglu_ffn: precondition violated — input.len() > 0"
5551 );
5552 debug_assert!(
5553 _pv_input.iter().all(|v| v.is_finite()),
5554 "Contract swiglu_ffn: precondition violated — input.iter().all(|v| v.is_finite())"
5555 );
5556 }};
5557}
5558
5559macro_rules! contract_pre_weighted_loss {
5562 () => {{}};
5563 ($input:expr) => {{
5564 let _pv_predicted = &$input;
5565 debug_assert!(
5566 _pv_predicted.len() > 0,
5567 "Contract weighted_loss: precondition violated — predicted.len() > 0"
5568 );
5569 }};
5570}
5571
5572macro_rules! contract_pre_build_integrity {
5578 () => {{}};
5579 ($input:expr) => {{
5580 let _contract_input = &$input;
5581 }};
5582}
5583
5584macro_rules! contract_pre_distribution_delivery {
5587 () => {{}};
5588 ($input:expr) => {{
5589 let _contract_input = &$input;
5590 }};
5591}
5592
5593macro_rules! contract_pre_dpo_loss {
5599 () => {{}};
5600 ($input:expr) => {{
5601 let _pv_predicted = &$input;
5602 debug_assert!(
5603 _pv_predicted.len() > 0,
5604 "Contract dpo_loss: precondition violated — predicted.len() > 0"
5605 );
5606 }};
5607}
5608
5609macro_rules! contract_pre_implicit_reward {
5612 () => {{}};
5613 ($input:expr) => {{
5614 let _pv_predicted = &$input;
5615 debug_assert!(
5616 _pv_predicted.len() > 0,
5617 "Contract implicit_reward: precondition violated — predicted.len() > 0"
5618 );
5619 }};
5620}
5621
5622macro_rules! contract_pre_log_ratio {
5625 () => {{}};
5626 ($input:expr) => {{
5627 let _pv_predicted = &$input;
5628 debug_assert!(
5629 _pv_predicted.len() > 0,
5630 "Contract log_ratio: precondition violated — predicted.len() > 0"
5631 );
5632 }};
5633}
5634
5635macro_rules! contract_pre_classify_drift {
5641 () => {{}};
5642 ($input:expr) => {{
5643 let _pv_x = &$input;
5644 }};
5645}
5646
5647macro_rules! contract_pre_min_samples_guard {
5650 () => {{}};
5651 ($input:expr) => {{
5652 let _pv_params = &$input;
5653 debug_assert!(
5654 _pv_params.len() > 0,
5655 "Contract min_samples_guard: precondition violated — params.len() > 0"
5656 );
5657 }};
5658}
5659
5660macro_rules! contract_pre_performance_drift {
5663 () => {{}};
5664 ($input:expr) => {{
5665 let _pv_input = &$input;
5666 debug_assert!(
5667 _pv_input.len() > 0,
5668 "Contract performance_drift: precondition violated — input.len() > 0"
5669 );
5670 }};
5671}
5672
5673macro_rules! contract_pre_univariate_drift {
5676 () => {{}};
5677 ($input:expr) => {{
5678 let _pv_input = &$input;
5679 debug_assert!(
5680 _pv_input.len() > 0,
5681 "Contract univariate_drift: precondition violated — input.len() > 0"
5682 );
5683 }};
5684}
5685
5686macro_rules! contract_pre_dropout_eval {
5692 () => {{}};
5693 ($input:expr) => {{
5694 let _pv_x = &$input;
5695 debug_assert!(
5696 _pv_x.iter().all(|v| v.is_finite()),
5697 "Contract dropout_eval: precondition violated — x.iter().all(|v| v.is_finite())"
5698 );
5699 debug_assert!(
5700 _pv_x.len() > 0,
5701 "Contract dropout_eval: precondition violated — x.len() > 0"
5702 );
5703 }};
5704}
5705
5706macro_rules! contract_pre_dropout_train {
5709 () => {{}};
5710 ($input:expr) => {{
5711 let _pv_x = &$input;
5712 debug_assert!(
5713 _pv_x.iter().all(|v| v.is_finite()),
5714 "Contract dropout_train: precondition violated — x.iter().all(|v| v.is_finite())"
5715 );
5716 debug_assert!(
5717 _pv_x.len() > 0,
5718 "Contract dropout_train: precondition violated — x.len() > 0"
5719 );
5720 }};
5721}
5722
5723macro_rules! contract_pre_embedding_lookup {
5729 () => {{}};
5730 ($input:expr) => {{
5731 let _pv_indices = &$input;
5732 debug_assert!(
5733 _pv_indices.len() > 0,
5734 "Contract embedding_lookup: precondition violated — indices.len() > 0"
5735 );
5736 }};
5737}
5738
5739macro_rules! contract_pre_embedding_norm {
5742 () => {{}};
5743 ($input:expr) => {{
5744 let _pv_input = &$input;
5745 debug_assert!(
5746 _pv_input.iter().all(|v| v.is_finite()),
5747 "Contract embedding_norm: precondition violated — input.iter().all(|v| v.is_finite())"
5748 );
5749 debug_assert!(
5750 _pv_input.len() > 0,
5751 "Contract embedding_norm: precondition violated — input.len() > 0"
5752 );
5753 }};
5754}
5755
5756macro_rules! contract_pre_logit_temperature {
5759 () => {{}};
5760 ($input:expr) => {{
5761 let _pv_indices = &$input;
5762 debug_assert!(
5763 _pv_indices.len() > 0,
5764 "Contract logit_temperature: precondition violated — indices.len() > 0"
5765 );
5766 }};
5767}
5768
5769macro_rules! contract_pre_tied_weights {
5772 () => {{}};
5773 ($input:expr) => {{
5774 let _pv_indices = &$input;
5775 debug_assert!(
5776 _pv_indices.len() > 0,
5777 "Contract tied_weights: precondition violated — indices.len() > 0"
5778 );
5779 }};
5780}
5781
5782macro_rules! contract_pre_unembedding_projection {
5785 () => {{}};
5786 ($input:expr) => {{
5787 let _pv_indices = &$input;
5788 debug_assert!(
5789 _pv_indices.len() > 0,
5790 "Contract unembedding_projection: precondition violated — indices.len() > 0"
5791 );
5792 }};
5793}
5794
5795macro_rules! contract_pre_vocabulary_bounds {
5798 () => {{}};
5799 ($input:expr) => {{
5800 let _pv_input = &$input;
5801 debug_assert!(
5802 _pv_input.len() > 0,
5803 "Contract vocabulary_bounds: precondition violated — input.len() > 0"
5804 );
5805 }};
5806}
5807
5808macro_rules! contract_pre_embedding_lookup {
5814 () => {{}};
5815 ($input:expr) => {{
5816 let _pv_token_ids = &$input;
5817 }};
5818}
5819
5820macro_rules! contract_post_embedding_lookup {
5823 ($result:expr) => {{
5824 let _contract_result = &$result;
5825 debug_assert!(_contract_result.iter().all(|v| v.is_finite()), "Contract embedding_lookup: postcondition violated — result.iter().all(|v| v.is_finite())");
5826 }};
5827}
5828
5829macro_rules! contract_embedding_lookup {
5831 ($input:expr, $body:expr) => {{
5832 contract_pre_embedding_lookup!($input);
5833 let _contract_result = $body;
5834 contract_post_embedding_lookup!(_contract_result);
5835 _contract_result
5836 }};
5837}
5838
5839macro_rules! contract_pre_cls_pooling {
5845 () => {{}};
5846 ($input:expr) => {{
5847 let _pv_input = &$input;
5848 debug_assert!(
5849 _pv_input.len() > 0,
5850 "Contract cls_pooling: precondition violated — input.len() > 0"
5851 );
5852 }};
5853}
5854
5855macro_rules! contract_pre_encoder_layer {
5858 () => {{}};
5859 ($input:expr) => {{
5860 let _pv_input = &$input;
5861 debug_assert!(
5862 _pv_input.len() > 0,
5863 "Contract encoder_layer: precondition violated — input.len() > 0"
5864 );
5865 }};
5866}
5867
5868macro_rules! contract_pre_emit_posix {
5874 () => {{}};
5875 ($input:expr) => {{
5876 let _contract_input = &$input;
5877 debug_assert!(
5878 !_contract_input.is_empty(),
5879 "Contract emit_posix: precondition violated — !input.is_empty()"
5880 );
5881 }};
5882}
5883
5884macro_rules! contract_pre_emit_purified {
5887 () => {{}};
5888 ($input:expr) => {{
5889 let _contract_input = &$input;
5890 debug_assert!(
5891 !_contract_input.is_empty(),
5892 "Contract emit_purified: precondition violated — !input.is_empty()"
5893 );
5894 }};
5895}
5896
5897macro_rules! contract_pre_roundtrip {
5900 () => {{}};
5901 ($input:expr) => {{
5902 let _contract_input = &$input;
5903 debug_assert!(
5904 !_contract_input.is_empty(),
5905 "Contract roundtrip: precondition violated — !input.is_empty()"
5906 );
5907 }};
5908}
5909
5910macro_rules! contract_pre_decode {
5916 () => {{}};
5917 ($input:expr) => {{
5918 let _pv_bitstream = &$input;
5919 debug_assert!(
5920 _pv_bitstream.len() > 0,
5921 "Contract decode: precondition violated — bitstream.len() > 0"
5922 );
5923 }};
5924}
5925
5926macro_rules! contract_pre_encode {
5929 () => {{}};
5930 ($input:expr) => {{
5931 let _pv_frame = &$input;
5932 }};
5933}
5934
5935macro_rules! contract_pre_encoder_resolution {
5938 () => {{}};
5939 ($input:expr) => {{
5940 let _contract_input = &$input;
5941 }};
5942}
5943
5944macro_rules! contract_pre_send {
5950 () => {{}};
5951 ($input:expr) => {{
5952 let _pv_conn = &$input;
5953 debug_assert!(
5954 _pv_conn.is_active(),
5955 "Contract send: precondition violated — conn.is_active()"
5956 );
5957 }};
5958}
5959
5960macro_rules! contract_pre_send_error_propagation {
5963 () => {{}};
5964 ($input:expr) => {{
5965 let _pv_send_result = &$input;
5966 debug_assert!(
5967 _pv_send_result.is_err(),
5968 "Contract send_error_propagation: precondition violated — send_result.is_err()"
5969 );
5970 }};
5971}
5972
5973macro_rules! contract_pre_error_handling {
5979 () => {{}};
5980 ($input:expr) => {{
5981 let _contract_input = &$input;
5982 }};
5983}
5984
5985macro_rules! contract_post_error_handling {
5988 ($result:expr) => {{
5989 let _contract_result = &$result;
5990 }};
5991}
5992
5993macro_rules! contract_error_handling {
5995 ($input:expr, $body:expr) => {{
5996 contract_pre_error_handling!($input);
5997 let _contract_result = $body;
5998 contract_post_error_handling!(_contract_result);
5999 _contract_result
6000 }};
6001}
6002
6003macro_rules! contract_pre_action_ordering {
6009 () => {{}};
6010 ($input:expr) => {{
6011 let _pv_rule = &$input;
6012 }};
6013}
6014
6015macro_rules! contract_pre_cooldown_deduplication {
6018 () => {{}};
6019 ($input:expr) => {{
6020 let _pv_rule = &$input;
6021 }};
6022}
6023
6024macro_rules! contract_pre_trigger_dispatch_completeness {
6027 () => {{}};
6028 ($input:expr) => {{
6029 let _contract_input = &$input;
6030 }};
6031}
6032
6033macro_rules! contract_pre_atomic_write {
6039 () => {{}};
6040 ($input:expr) => {{
6041 let _contract_input = &$input;
6042 }};
6043}
6044
6045macro_rules! contract_pre_jidoka_stop {
6048 () => {{}};
6049 ($input:expr) => {{
6050 let _contract_input = &$input;
6051 }};
6052}
6053
6054macro_rules! contract_pre_f16_to_f32_bias {
6060 () => {{}};
6061 ($input:expr) => {{
6062 let _pv_input = &$input;
6063 debug_assert!(
6064 _pv_input.len() > 0,
6065 "Contract f16_to_f32_bias: precondition violated — input.len() > 0"
6066 );
6067 }};
6068}
6069
6070macro_rules! contract_pre_roundtrip {
6073 () => {{}};
6074 ($input:expr) => {{
6075 let _pv_input = &$input;
6076 debug_assert!(
6077 _pv_input.len() > 0,
6078 "Contract roundtrip: precondition violated — input.len() > 0"
6079 );
6080 }};
6081}
6082
6083macro_rules! contract_pre_flash_attention {
6089 () => {{}};
6090 ($input:expr) => {{
6091 let _pv_q = &$input;
6092 debug_assert!(
6093 _pv_q.len() > 0,
6094 "Contract flash_attention: precondition violated — q.len() > 0"
6095 );
6096 }};
6097}
6098
6099macro_rules! contract_pre_element_count {
6105 () => {{}};
6106 ($input:expr) => {{
6107 let _pv_input = &$input;
6108 debug_assert!(
6109 _pv_input.len() > 0,
6110 "Contract element_count: precondition violated — input.len() > 0"
6111 );
6112 }};
6113}
6114
6115macro_rules! contract_pre_identity_1d {
6118 () => {{}};
6119 ($input:expr) => {{
6120 let _pv_input = &$input;
6121 debug_assert!(
6122 _pv_input.len() > 0,
6123 "Contract identity_1d: precondition violated — input.len() > 0"
6124 );
6125 debug_assert!(
6126 _pv_input.iter().all(|v| v.is_finite()),
6127 "Contract identity_1d: precondition violated — input.iter().all(|v| v.is_finite())"
6128 );
6129 }};
6130}
6131
6132macro_rules! contract_pre_name_bijection {
6135 () => {{}};
6136 ($input:expr) => {{
6137 let _pv_input = &$input;
6138 debug_assert!(
6139 _pv_input.len() > 0,
6140 "Contract name_bijection: precondition violated — input.len() > 0"
6141 );
6142 }};
6143}
6144
6145macro_rules! contract_pre_transpose_involution {
6148 () => {{}};
6149 ($input:expr) => {{
6150 let _pv_a = &$input;
6151 debug_assert!(
6152 _pv_a.len() > 0,
6153 "Contract transpose_involution: precondition violated — a.len() > 0"
6154 );
6155 }};
6156}
6157
6158macro_rules! contract_pre_e4m3_encode {
6164 () => {{}};
6165 ($input:expr) => {{
6166 let _pv_input = &$input;
6167 debug_assert!(
6168 _pv_input.len() > 0,
6169 "Contract e4m3_encode: precondition violated — input.len() > 0"
6170 );
6171 }};
6172}
6173
6174macro_rules! contract_pre_e5m2_encode {
6177 () => {{}};
6178 ($input:expr) => {{
6179 let _pv_input = &$input;
6180 debug_assert!(
6181 _pv_input.len() > 0,
6182 "Contract e5m2_encode: precondition violated — input.len() > 0"
6183 );
6184 }};
6185}
6186
6187macro_rules! contract_pre_roundtrip {
6190 () => {{}};
6191 ($input:expr) => {{
6192 let _pv_input = &$input;
6193 debug_assert!(
6194 _pv_input.len() > 0,
6195 "Contract roundtrip: precondition violated — input.len() > 0"
6196 );
6197 }};
6198}
6199
6200macro_rules! contract_pre_fused_qkv {
6206 () => {{}};
6207 ($input:expr) => {{
6208 let _pv_a = &$input;
6209 debug_assert!(_pv_a.len() > 0, "Contract fused_qkv: precondition violated — a.len() > 0");
6210 }};
6211}
6212
6213macro_rules! contract_pre_separate_qkv {
6216 () => {{}};
6217 ($input:expr) => {{
6218 let _pv_a = &$input;
6219 debug_assert!(
6220 _pv_a.len() > 0,
6221 "Contract separate_qkv: precondition violated — a.len() > 0"
6222 );
6223 }};
6224}
6225
6226macro_rules! contract_pre_shared_q8_qkv {
6229 () => {{}};
6230 ($input:expr) => {{
6231 let _pv_a = &$input;
6232 debug_assert!(
6233 _pv_a.len() > 0,
6234 "Contract shared_q8_qkv: precondition violated — a.len() > 0"
6235 );
6236 }};
6237}
6238
6239macro_rules! contract_pre_decay {
6245 () => {{}};
6246 ($input:expr) => {{
6247 let _pv_x = &$input;
6248 debug_assert!(
6249 _pv_x.iter().all(|v| v.is_finite()),
6250 "Contract decay: precondition violated — x.iter().all(|v| v.is_finite())"
6251 );
6252 debug_assert!(_pv_x.len() > 0, "Contract decay: precondition violated — x.len() > 0");
6253 }};
6254}
6255
6256macro_rules! contract_pre_delta {
6259 () => {{}};
6260 ($input:expr) => {{
6261 let _pv_input = &$input;
6262 debug_assert!(
6263 _pv_input.len() > 0,
6264 "Contract delta: precondition violated — input.len() > 0"
6265 );
6266 debug_assert!(
6267 _pv_input.iter().all(|v| v.is_finite()),
6268 "Contract delta: precondition violated — input.iter().all(|v| v.is_finite())"
6269 );
6270 }};
6271}
6272
6273macro_rules! contract_pre_output {
6276 () => {{}};
6277 ($input:expr) => {{
6278 let _pv_input = &$input;
6279 debug_assert!(
6280 _pv_input.len() > 0,
6281 "Contract output: precondition violated — input.len() > 0"
6282 );
6283 debug_assert!(
6284 _pv_input.iter().all(|v| v.is_finite()),
6285 "Contract output: precondition violated — input.iter().all(|v| v.is_finite())"
6286 );
6287 }};
6288}
6289
6290macro_rules! contract_pre_read {
6293 () => {{}};
6294 ($input:expr) => {{
6295 let _pv_input = &$input;
6296 debug_assert!(
6297 _pv_input.len() > 0,
6298 "Contract read: precondition violated — input.len() > 0"
6299 );
6300 debug_assert!(
6301 _pv_input.iter().all(|v| v.is_finite()),
6302 "Contract read: precondition violated — input.iter().all(|v| v.is_finite())"
6303 );
6304 }};
6305}
6306
6307macro_rules! contract_pre_write {
6310 () => {{}};
6311 ($input:expr) => {{
6312 let _pv_input = &$input;
6313 debug_assert!(
6314 _pv_input.len() > 0,
6315 "Contract write: precondition violated — input.len() > 0"
6316 );
6317 debug_assert!(
6318 _pv_input.iter().all(|v| v.is_finite()),
6319 "Contract write: precondition violated — input.iter().all(|v| v.is_finite())"
6320 );
6321 }};
6322}
6323
6324macro_rules! contract_pre_gradient_boost {
6330 () => {{}};
6331 ($input:expr) => {{
6332 let _pv_grad_output = &$input;
6333 debug_assert!(_pv_grad_output.len() > 0,
6334 "Contract gradient_boost: precondition violated — grad_output.len() > 0");
6335 debug_assert!(_pv_grad_output.iter().all(|v| v.is_finite()),
6336 "Contract gradient_boost: precondition violated — grad_output.iter().all(|v| v.is_finite())");
6337 }};
6338}
6339
6340macro_rules! contract_pre_negative_gradient {
6343 () => {{}};
6344 ($input:expr) => {{
6345 let _pv_grad_output = &$input;
6346 debug_assert!(_pv_grad_output.len() > 0,
6347 "Contract negative_gradient: precondition violated — grad_output.len() > 0");
6348 debug_assert!(_pv_grad_output.iter().all(|v| v.is_finite()),
6349 "Contract negative_gradient: precondition violated — grad_output.iter().all(|v| v.is_finite())");
6350 }};
6351}
6352
6353macro_rules! contract_pre_predict {
6356 () => {{}};
6357 ($input:expr) => {{
6358 let _pv_input = &$input;
6359 debug_assert!(
6360 _pv_input.len() > 0,
6361 "Contract predict: precondition violated — input.len() > 0"
6362 );
6363 debug_assert!(
6364 _pv_input.iter().all(|v| v.is_finite()),
6365 "Contract predict: precondition violated — input.iter().all(|v| v.is_finite())"
6366 );
6367 }};
6368}
6369
6370macro_rules! contract_pre_training_loss {
6373 () => {{}};
6374 ($input:expr) => {{
6375 let _pv_predicted = &$input;
6376 debug_assert!(
6377 _pv_predicted.len() > 0,
6378 "Contract training_loss: precondition violated — predicted.len() > 0"
6379 );
6380 }};
6381}
6382
6383macro_rules! contract_pre_gelu {
6389 () => {{}};
6390 ($input:expr) => {{
6391 let _pv_x = &$input;
6392 debug_assert!(
6393 _pv_x.iter().all(|v| v.is_finite()),
6394 "Contract gelu: precondition violated — x.iter().all(|v| v.is_finite())"
6395 );
6396 debug_assert!(_pv_x.len() > 0, "Contract gelu: precondition violated — x.len() > 0");
6397 }};
6398}
6399
6400macro_rules! contract_pre_gelu_tanh_approx {
6403 () => {{}};
6404 ($input:expr) => {{
6405 let _pv_x = &$input;
6406 debug_assert!(
6407 _pv_x.iter().all(|v| v.is_finite()),
6408 "Contract gelu_tanh_approx: precondition violated — x.iter().all(|v| v.is_finite())"
6409 );
6410 debug_assert!(
6411 _pv_x.len() > 0,
6412 "Contract gelu_tanh_approx: precondition violated — x.len() > 0"
6413 );
6414 }};
6415}
6416
6417macro_rules! contract_pre_backward_a_gemm {
6423 () => {{}};
6424 ($input:expr) => {{
6425 let _pv_a = &$input;
6426 debug_assert!(
6427 _pv_a.len() > 0,
6428 "Contract backward_a_gemm: precondition violated — a.len() > 0"
6429 );
6430 }};
6431}
6432
6433macro_rules! contract_pre_backward_b_gemm {
6436 () => {{}};
6437 ($input:expr) => {{
6438 let _pv_a = &$input;
6439 debug_assert!(
6440 _pv_a.len() > 0,
6441 "Contract backward_b_gemm: precondition violated — a.len() > 0"
6442 );
6443 }};
6444}
6445
6446macro_rules! contract_pre_shared_memory_per_tile {
6449 () => {{}};
6450 ($input:expr) => {{
6451 let _pv_a = &$input;
6452 debug_assert!(
6453 _pv_a.len() > 0,
6454 "Contract shared_memory_per_tile: precondition violated — a.len() > 0"
6455 );
6456 }};
6457}
6458
6459macro_rules! contract_pre_tiled_gemm_arithmetic_intensity {
6462 () => {{}};
6463 ($input:expr) => {{
6464 let _pv_a = &$input;
6465 debug_assert!(
6466 _pv_a.len() > 0,
6467 "Contract tiled_gemm_arithmetic_intensity: precondition violated — a.len() > 0"
6468 );
6469 }};
6470}
6471
6472macro_rules! contract_pre_unrolled_instruction_ratio {
6475 () => {{}};
6476 ($input:expr) => {{
6477 let _pv_a = &$input;
6478 debug_assert!(
6479 _pv_a.len() > 0,
6480 "Contract unrolled_instruction_ratio: precondition violated — a.len() > 0"
6481 );
6482 }};
6483}
6484
6485macro_rules! contract_pre_autoregressive_generation {
6491 () => {{}};
6492 ($input:expr) => {{
6493 let _contract_input = &$input;
6494 }};
6495}
6496
6497macro_rules! contract_pre_alignment_enforcement {
6503 () => {{}};
6504 ($input:expr) => {{
6505 let _contract_input = &$input;
6506 }};
6507}
6508
6509macro_rules! contract_post_alignment_enforcement {
6512 ($result:expr) => {{
6513 let _contract_result = &$result;
6514 }};
6515}
6516
6517macro_rules! contract_alignment_enforcement {
6519 ($input:expr, $body:expr) => {{
6520 contract_pre_alignment_enforcement!($input);
6521 let _contract_result = $body;
6522 contract_post_alignment_enforcement!(_contract_result);
6523 _contract_result
6524 }};
6525}
6526
6527macro_rules! contract_pre_magic_validation {
6530 () => {{}};
6531 ($input:expr) => {{
6532 let _contract_input = &$input;
6533 }};
6534}
6535
6536macro_rules! contract_post_magic_validation {
6539 ($result:expr) => {{
6540 let _contract_result = &$result;
6541 }};
6542}
6543
6544macro_rules! contract_magic_validation {
6546 ($input:expr, $body:expr) => {{
6547 contract_pre_magic_validation!($input);
6548 let _contract_result = $body;
6549 contract_post_magic_validation!(_contract_result);
6550 _contract_result
6551 }};
6552}
6553
6554macro_rules! contract_pre_metadata_kv_safety {
6557 () => {{}};
6558 ($input:expr) => {{
6559 let _contract_input = &$input;
6560 }};
6561}
6562
6563macro_rules! contract_post_metadata_kv_safety {
6566 ($result:expr) => {{
6567 let _contract_result = &$result;
6568 }};
6569}
6570
6571macro_rules! contract_metadata_kv_safety {
6573 ($input:expr, $body:expr) => {{
6574 contract_pre_metadata_kv_safety!($input);
6575 let _contract_result = $body;
6576 contract_post_metadata_kv_safety!(_contract_result);
6577 _contract_result
6578 }};
6579}
6580
6581macro_rules! contract_pre_tensor_metadata_integrity {
6584 () => {{}};
6585 ($input:expr) => {{
6586 let _pv_header = &$input;
6587 }};
6588}
6589
6590macro_rules! contract_post_tensor_metadata_integrity {
6593 ($result:expr) => {{
6594 let _contract_result = &$result;
6595 }};
6596}
6597
6598macro_rules! contract_tensor_metadata_integrity {
6600 ($input:expr, $body:expr) => {{
6601 contract_pre_tensor_metadata_integrity!($input);
6602 let _contract_result = $body;
6603 contract_post_tensor_metadata_integrity!(_contract_result);
6604 _contract_result
6605 }};
6606}
6607
6608macro_rules! contract_pre_version_compatibility {
6611 () => {{}};
6612 ($input:expr) => {{
6613 let _contract_input = &$input;
6614 }};
6615}
6616
6617macro_rules! contract_post_version_compatibility {
6620 ($result:expr) => {{
6621 let _contract_result = &$result;
6622 }};
6623}
6624
6625macro_rules! contract_version_compatibility {
6627 ($input:expr, $body:expr) => {{
6628 contract_pre_version_compatibility!($input);
6629 let _contract_result = $body;
6630 contract_post_version_compatibility!(_contract_result);
6631 _contract_result
6632 }};
6633}
6634
6635macro_rules! contract_pre_binomial_link {
6641 () => {{}};
6642 ($input:expr) => {{
6643 let _pv_input = &$input;
6644 debug_assert!(
6645 _pv_input.len() > 0,
6646 "Contract binomial_link: precondition violated — input.len() > 0"
6647 );
6648 debug_assert!(
6649 _pv_input.iter().all(|v| v.is_finite()),
6650 "Contract binomial_link: precondition violated — input.iter().all(|v| v.is_finite())"
6651 );
6652 }};
6653}
6654
6655macro_rules! contract_pre_gamma_link {
6658 () => {{}};
6659 ($input:expr) => {{
6660 let _pv_input = &$input;
6661 debug_assert!(
6662 _pv_input.len() > 0,
6663 "Contract gamma_link: precondition violated — input.len() > 0"
6664 );
6665 debug_assert!(
6666 _pv_input.iter().all(|v| v.is_finite()),
6667 "Contract gamma_link: precondition violated — input.iter().all(|v| v.is_finite())"
6668 );
6669 }};
6670}
6671
6672macro_rules! contract_pre_irls_fit {
6675 () => {{}};
6676 ($input:expr) => {{
6677 let _pv_input = &$input;
6678 debug_assert!(
6679 _pv_input.len() > 0,
6680 "Contract irls_fit: precondition violated — input.len() > 0"
6681 );
6682 debug_assert!(
6683 _pv_input.iter().all(|v| v.is_finite()),
6684 "Contract irls_fit: precondition violated — input.iter().all(|v| v.is_finite())"
6685 );
6686 }};
6687}
6688
6689macro_rules! contract_pre_poisson_link {
6692 () => {{}};
6693 ($input:expr) => {{
6694 let _pv_input = &$input;
6695 debug_assert!(
6696 _pv_input.len() > 0,
6697 "Contract poisson_link: precondition violated — input.len() > 0"
6698 );
6699 debug_assert!(
6700 _pv_input.iter().all(|v| v.is_finite()),
6701 "Contract poisson_link: precondition violated — input.iter().all(|v| v.is_finite())"
6702 );
6703 }};
6704}
6705
6706macro_rules! contract_pre_gcn_aggregate {
6712 () => {{}};
6713 ($input:expr) => {{
6714 let _contract_input = &$input;
6715 }};
6716}
6717
6718macro_rules! contract_pre_global_max_pool {
6721 () => {{}};
6722 ($input:expr) => {{
6723 let _contract_input = &$input;
6724 }};
6725}
6726
6727macro_rules! contract_pre_global_mean_pool {
6730 () => {{}};
6731 ($input:expr) => {{
6732 let _contract_input = &$input;
6733 }};
6734}
6735
6736macro_rules! contract_pre_message_passing {
6739 () => {{}};
6740 ($input:expr) => {{
6741 let _contract_input = &$input;
6742 }};
6743}
6744
6745macro_rules! contract_pre_adaptive_sampling {
6751 () => {{}};
6752 ($input:expr) => {{
6753 let _pv_x = &$input;
6754 }};
6755}
6756
6757macro_rules! contract_pre_trace_capture {
6760 () => {{}};
6761 ($input:expr) => {{
6762 let _contract_input = &$input;
6763 }};
6764}
6765
6766macro_rules! contract_pre_trace_validate {
6769 () => {{}};
6770 ($input:expr) => {{
6771 let _contract_input = &$input;
6772 }};
6773}
6774
6775macro_rules! contract_pre_context_health {
6781 () => {{}};
6782 ($input:expr) => {{
6783 let _pv_input = &$input;
6784 debug_assert!(
6785 _pv_input.len() > 0,
6786 "Contract context_health: precondition violated — input.len() > 0"
6787 );
6788 }};
6789}
6790
6791macro_rules! contract_pre_cuda_graph_guard {
6794 () => {{}};
6795 ($input:expr) => {{
6796 let _contract_input = &$input;
6797 }};
6798}
6799
6800macro_rules! contract_pre_culink_skip {
6803 () => {{}};
6804 ($input:expr) => {{
6805 let _pv_input = &$input;
6806 debug_assert!(
6807 _pv_input.len() > 0,
6808 "Contract culink_skip: precondition violated — input.len() > 0"
6809 );
6810 }};
6811}
6812
6813macro_rules! contract_pre_fp8_architecture_guard {
6816 () => {{}};
6817 ($input:expr) => {{
6818 let _pv_input = &$input;
6819 debug_assert!(
6820 _pv_input.len() > 0,
6821 "Contract fp8_architecture_guard: precondition violated — input.len() > 0"
6822 );
6823 }};
6824}
6825
6826macro_rules! contract_pre_decode_audio {
6832 () => {{}};
6833 ($input:expr) => {{
6834 let _pv_packet = &$input;
6835 }};
6836}
6837
6838macro_rules! contract_pre_decode_video {
6841 () => {{}};
6842 ($input:expr) => {{
6843 let _pv_packet = &$input;
6844 }};
6845}
6846
6847macro_rules! contract_pre_brick_ordering {
6853 () => {{}};
6854 ($input:expr) => {{
6855 let _pv_input = &$input;
6856 debug_assert!(
6857 _pv_input.len() > 0,
6858 "Contract brick_ordering: precondition violated — input.len() > 0"
6859 );
6860 }};
6861}
6862
6863macro_rules! contract_pre_graph_disable {
6866 () => {{}};
6867 ($input:expr) => {{
6868 let _pv_input = &$input;
6869 debug_assert!(
6870 _pv_input.len() > 0,
6871 "Contract graph_disable: precondition violated — input.len() > 0"
6872 );
6873 }};
6874}
6875
6876macro_rules! contract_pre_report_completeness {
6879 () => {{}};
6880 ($input:expr) => {{
6881 let _pv_input = &$input;
6882 debug_assert!(
6883 _pv_input.len() > 0,
6884 "Contract report_completeness: precondition violated — input.len() > 0"
6885 );
6886 }};
6887}
6888
6889macro_rules! contract_pre_report_denominator {
6892 () => {{}};
6893 ($input:expr) => {{
6894 let _pv_input = &$input;
6895 debug_assert!(
6896 _pv_input.len() > 0,
6897 "Contract report_denominator: precondition violated — input.len() > 0"
6898 );
6899 }};
6900}
6901
6902macro_rules! contract_pre_report_fidelity {
6905 () => {{}};
6906 ($input:expr) => {{
6907 let _pv_input = &$input;
6908 debug_assert!(
6909 _pv_input.len() > 0,
6910 "Contract report_fidelity: precondition violated — input.len() > 0"
6911 );
6912 }};
6913}
6914
6915macro_rules! contract_pre_report_metadata {
6918 () => {{}};
6919 ($input:expr) => {{
6920 let _pv_input = &$input;
6921 debug_assert!(
6922 _pv_input.len() > 0,
6923 "Contract report_metadata: precondition violated — input.len() > 0"
6924 );
6925 }};
6926}
6927
6928macro_rules! contract_pre_sync_verification {
6931 () => {{}};
6932 ($input:expr) => {{
6933 let _pv_input = &$input;
6934 debug_assert!(
6935 _pv_input.len() > 0,
6936 "Contract sync_verification: precondition violated — input.len() > 0"
6937 );
6938 }};
6939}
6940
6941macro_rules! contract_pre_token_accounting {
6944 () => {{}};
6945 ($input:expr) => {{
6946 let _pv_input = &$input;
6947 debug_assert!(
6948 _pv_input.len() > 0,
6949 "Contract token_accounting: precondition violated — input.len() > 0"
6950 );
6951 }};
6952}
6953
6954macro_rules! contract_pre_wall_coverage {
6957 () => {{}};
6958 ($input:expr) => {{
6959 let _pv_input = &$input;
6960 debug_assert!(
6961 _pv_input.len() > 0,
6962 "Contract wall_coverage: precondition violated — input.len() > 0"
6963 );
6964 }};
6965}
6966
6967macro_rules! contract_pre_backend_priority {
6973 () => {{}};
6974 ($input:expr) => {{
6975 let _pv_input = &$input;
6976 debug_assert!(
6977 _pv_input.len() > 0,
6978 "Contract backend_priority: precondition violated — input.len() > 0"
6979 );
6980 }};
6981}
6982
6983macro_rules! contract_pre_bandwidth_bound_theorem {
6986 () => {{}};
6987 ($input:expr) => {{
6988 let _pv_input = &$input;
6989 debug_assert!(
6990 _pv_input.len() > 0,
6991 "Contract bandwidth_bound_theorem: precondition violated — input.len() > 0"
6992 );
6993 }};
6994}
6995
6996macro_rules! contract_pre_jit_compilation_correctness {
6999 () => {{}};
7000 ($input:expr) => {{
7001 let _pv_input = &$input;
7002 debug_assert!(
7003 _pv_input.len() > 0,
7004 "Contract jit_compilation_correctness: precondition violated — input.len() > 0"
7005 );
7006 }};
7007}
7008
7009macro_rules! contract_pre_multi_backend_parity {
7012 () => {{}};
7013 ($input:expr) => {{
7014 let _pv_input = &$input;
7015 debug_assert!(
7016 _pv_input.len() > 0,
7017 "Contract multi_backend_parity: precondition violated — input.len() > 0"
7018 );
7019 }};
7020}
7021
7022macro_rules! contract_pre_pcie_overhead {
7028 () => {{}};
7029 ($input:expr) => {{
7030 let _pv_input = &$input;
7031 debug_assert!(
7032 _pv_input.len() > 0,
7033 "Contract pcie_overhead: precondition violated — input.len() > 0"
7034 );
7035 }};
7036}
7037
7038macro_rules! contract_pre_throughput_target {
7041 () => {{}};
7042 ($input:expr) => {{
7043 let _pv_input = &$input;
7044 debug_assert!(
7045 _pv_input.len() > 0,
7046 "Contract throughput_target: precondition violated — input.len() > 0"
7047 );
7048 }};
7049}
7050
7051macro_rules! contract_pre_gqa {
7057 () => {{}};
7058 ($input:expr) => {{
7059 let _pv_q = &$input;
7060 debug_assert!(_pv_q.len() > 0, "Contract gqa: precondition violated — q.len() > 0");
7061 }};
7062}
7063
7064macro_rules! contract_pre_betweenness {
7070 () => {{}};
7071 ($input:expr) => {{
7072 let _contract_input = &$input;
7073 }};
7074}
7075
7076macro_rules! contract_pre_closeness {
7079 () => {{}};
7080 ($input:expr) => {{
7081 let _contract_input = &$input;
7082 }};
7083}
7084
7085macro_rules! contract_pre_degree {
7088 () => {{}};
7089 ($input:expr) => {{
7090 let _contract_input = &$input;
7091 }};
7092}
7093
7094macro_rules! contract_pre_eigenvector {
7097 () => {{}};
7098 ($input:expr) => {{
7099 let _contract_input = &$input;
7100 }};
7101}
7102
7103macro_rules! contract_pre_harmonic {
7106 () => {{}};
7107 ($input:expr) => {{
7108 let _contract_input = &$input;
7109 }};
7110}
7111
7112macro_rules! contract_pre_katz {
7115 () => {{}};
7116 ($input:expr) => {{
7117 let _contract_input = &$input;
7118 }};
7119}
7120
7121macro_rules! contract_pre_bm25_scoring {
7127 () => {{}};
7128 ($input:expr) => {{
7129 let _contract_input = &$input;
7130 }};
7131}
7132
7133macro_rules! contract_post_bm25_scoring {
7136 ($result:expr) => {{
7137 let _contract_result = &$result;
7138 }};
7139}
7140
7141macro_rules! contract_bm25_scoring {
7143 ($input:expr, $body:expr) => {{
7144 contract_pre_bm25_scoring!($input);
7145 let _contract_result = $body;
7146 contract_post_bm25_scoring!(_contract_result);
7147 _contract_result
7148 }};
7149}
7150
7151macro_rules! contract_pre_csr_construction {
7154 () => {{}};
7155 ($input:expr) => {{
7156 let _contract_input = &$input;
7157 }};
7158}
7159
7160macro_rules! contract_post_csr_construction {
7163 ($result:expr) => {{
7164 let _contract_result = &$result;
7165 }};
7166}
7167
7168macro_rules! contract_csr_construction {
7170 ($input:expr, $body:expr) => {{
7171 contract_pre_csr_construction!($input);
7172 let _contract_result = $body;
7173 contract_post_csr_construction!(_contract_result);
7174 _contract_result
7175 }};
7176}
7177
7178macro_rules! contract_pre_fts5_consistency {
7181 () => {{}};
7182 ($input:expr) => {{
7183 let _pv_doc = &$input;
7184 }};
7185}
7186
7187macro_rules! contract_post_fts5_consistency {
7190 ($result:expr) => {{
7191 let _contract_result = &$result;
7192 }};
7193}
7194
7195macro_rules! contract_fts5_consistency {
7197 ($input:expr, $body:expr) => {{
7198 contract_pre_fts5_consistency!($input);
7199 let _contract_result = $body;
7200 contract_post_fts5_consistency!(_contract_result);
7201 _contract_result
7202 }};
7203}
7204
7205macro_rules! contract_pre_pagerank_convergence {
7208 () => {{}};
7209 ($input:expr) => {{
7210 let _pv_x = &$input;
7211 }};
7212}
7213
7214macro_rules! contract_post_pagerank_convergence {
7217 ($result:expr) => {{
7218 let _contract_result = &$result;
7219 }};
7220}
7221
7222macro_rules! contract_pagerank_convergence {
7224 ($input:expr, $body:expr) => {{
7225 contract_pre_pagerank_convergence!($input);
7226 let _contract_result = $body;
7227 contract_post_pagerank_convergence!(_contract_result);
7228 _contract_result
7229 }};
7230}
7231
7232macro_rules! contract_pre_sqlite_roundtrip {
7235 () => {{}};
7236 ($input:expr) => {{
7237 let _contract_input = &$input;
7238 }};
7239}
7240
7241macro_rules! contract_post_sqlite_roundtrip {
7244 ($result:expr) => {{
7245 let _contract_result = &$result;
7246 }};
7247}
7248
7249macro_rules! contract_sqlite_roundtrip {
7251 ($input:expr, $body:expr) => {{
7252 contract_pre_sqlite_roundtrip!($input);
7253 let _contract_result = $body;
7254 contract_post_sqlite_roundtrip!(_contract_result);
7255 _contract_result
7256 }};
7257}
7258
7259macro_rules! contract_pre_bfs_correctness {
7265 () => {{}};
7266 ($input:expr) => {{
7267 let _contract_input = &$input;
7268 }};
7269}
7270
7271macro_rules! contract_pre_pagerank_convergence {
7274 () => {{}};
7275 ($input:expr) => {{
7276 let _pv_x = &$input;
7277 }};
7278}
7279
7280macro_rules! contract_pre_cors_negotiation {
7286 () => {{}};
7287 ($input:expr) => {{
7288 let _contract_input = &$input;
7289 }};
7290}
7291
7292macro_rules! contract_post_cors_negotiation {
7295 ($result:expr) => {{
7296 let _contract_result = &$result;
7297 }};
7298}
7299
7300macro_rules! contract_cors_negotiation {
7302 ($input:expr, $body:expr) => {{
7303 contract_pre_cors_negotiation!($input);
7304 let _contract_result = $body;
7305 contract_post_cors_negotiation!(_contract_result);
7306 _contract_result
7307 }};
7308}
7309
7310macro_rules! contract_pre_error_envelope_preservation {
7313 () => {{}};
7314 ($input:expr) => {{
7315 let _contract_input = &$input;
7316 }};
7317}
7318
7319macro_rules! contract_post_error_envelope_preservation {
7322 ($result:expr) => {{
7323 let _contract_result = &$result;
7324 }};
7325}
7326
7327macro_rules! contract_error_envelope_preservation {
7329 ($input:expr, $body:expr) => {{
7330 contract_pre_error_envelope_preservation!($input);
7331 let _contract_result = $body;
7332 contract_post_error_envelope_preservation!(_contract_result);
7333 _contract_result
7334 }};
7335}
7336
7337macro_rules! contract_pre_request_response_schema {
7340 () => {{}};
7341 ($input:expr) => {{
7342 let _contract_input = &$input;
7343 }};
7344}
7345
7346macro_rules! contract_post_request_response_schema {
7349 ($result:expr) => {{
7350 let _contract_result = &$result;
7351 }};
7352}
7353
7354macro_rules! contract_request_response_schema {
7356 ($input:expr, $body:expr) => {{
7357 contract_pre_request_response_schema!($input);
7358 let _contract_result = $body;
7359 contract_post_request_response_schema!(_contract_result);
7360 _contract_result
7361 }};
7362}
7363
7364macro_rules! contract_pre_timeout_honoring {
7367 () => {{}};
7368 ($input:expr) => {{
7369 let _contract_input = &$input;
7370 }};
7371}
7372
7373macro_rules! contract_post_timeout_honoring {
7376 ($result:expr) => {{
7377 let _contract_result = &$result;
7378 }};
7379}
7380
7381macro_rules! contract_timeout_honoring {
7383 ($input:expr, $body:expr) => {{
7384 contract_pre_timeout_honoring!($input);
7385 let _contract_result = $body;
7386 contract_post_timeout_honoring!(_contract_result);
7387 _contract_result
7388 }};
7389}
7390
7391macro_rules! contract_pre_body_schema_compliance {
7397 () => {{}};
7398 ($input:expr) => {{
7399 let _contract_input = &$input;
7400 }};
7401}
7402
7403macro_rules! contract_post_body_schema_compliance {
7406 ($result:expr) => {{
7407 let _contract_result = &$result;
7408 }};
7409}
7410
7411macro_rules! contract_body_schema_compliance {
7413 ($input:expr, $body:expr) => {{
7414 contract_pre_body_schema_compliance!($input);
7415 let _contract_result = $body;
7416 contract_post_body_schema_compliance!(_contract_result);
7417 _contract_result
7418 }};
7419}
7420
7421macro_rules! contract_pre_max_tokens_cap {
7424 () => {{}};
7425 ($input:expr) => {{
7426 let _contract_input = &$input;
7427 }};
7428}
7429
7430macro_rules! contract_post_max_tokens_cap {
7433 ($result:expr) => {{
7434 let _contract_result = &$result;
7435 }};
7436}
7437
7438macro_rules! contract_max_tokens_cap {
7440 ($input:expr, $body:expr) => {{
7441 contract_pre_max_tokens_cap!($input);
7442 let _contract_result = $body;
7443 contract_post_max_tokens_cap!(_contract_result);
7444 _contract_result
7445 }};
7446}
7447
7448macro_rules! contract_pre_response_schema {
7451 () => {{}};
7452 ($input:expr) => {{
7453 let _contract_input = &$input;
7454 }};
7455}
7456
7457macro_rules! contract_post_response_schema {
7460 ($result:expr) => {{
7461 let _contract_result = &$result;
7462 }};
7463}
7464
7465macro_rules! contract_response_schema {
7467 ($input:expr, $body:expr) => {{
7468 contract_pre_response_schema!($input);
7469 let _contract_result = $body;
7470 contract_post_response_schema!(_contract_result);
7471 _contract_result
7472 }};
7473}
7474
7475macro_rules! contract_pre_thinking_block_strip {
7478 () => {{}};
7479 ($input:expr) => {{
7480 let _contract_input = &$input;
7481 }};
7482}
7483
7484macro_rules! contract_post_thinking_block_strip {
7487 ($result:expr) => {{
7488 let _contract_result = &$result;
7489 }};
7490}
7491
7492macro_rules! contract_thinking_block_strip {
7494 ($input:expr, $body:expr) => {{
7495 contract_pre_thinking_block_strip!($input);
7496 let _contract_result = $body;
7497 contract_post_thinking_block_strip!(_contract_result);
7498 _contract_result
7499 }};
7500}
7501
7502macro_rules! contract_pre_tool_format_fidelity {
7505 () => {{}};
7506 ($input:expr) => {{
7507 let _pv_tools = &$input;
7508 debug_assert!(
7509 _pv_tools.len() > 0,
7510 "Contract tool_format_fidelity: precondition violated — tools.len() > 0"
7511 );
7512 }};
7513}
7514
7515macro_rules! contract_post_tool_format_fidelity {
7518 ($result:expr) => {{
7519 let _contract_result = &$result;
7520 }};
7521}
7522
7523macro_rules! contract_tool_format_fidelity {
7525 ($input:expr, $body:expr) => {{
7526 contract_pre_tool_format_fidelity!($input);
7527 let _contract_result = $body;
7528 contract_post_tool_format_fidelity!(_contract_result);
7529 _contract_result
7530 }};
7531}
7532
7533macro_rules! contract_pre_error_propagation {
7539 () => {{}};
7540 ($input:expr) => {{
7541 let _contract_input = &$input;
7542 }};
7543}
7544
7545macro_rules! contract_post_error_propagation {
7548 ($result:expr) => {{
7549 let _contract_result = &$result;
7550 }};
7551}
7552
7553macro_rules! contract_error_propagation {
7555 ($input:expr, $body:expr) => {{
7556 contract_pre_error_propagation!($input);
7557 let _contract_result = $body;
7558 contract_post_error_propagation!(_contract_result);
7559 _contract_result
7560 }};
7561}
7562
7563macro_rules! contract_pre_lru_cache_eviction {
7566 () => {{}};
7567 ($input:expr) => {{
7568 let _contract_input = &$input;
7569 }};
7570}
7571
7572macro_rules! contract_post_lru_cache_eviction {
7575 ($result:expr) => {{
7576 let _contract_result = &$result;
7577 }};
7578}
7579
7580macro_rules! contract_lru_cache_eviction {
7582 ($input:expr, $body:expr) => {{
7583 contract_pre_lru_cache_eviction!($input);
7584 let _contract_result = $body;
7585 contract_post_lru_cache_eviction!(_contract_result);
7586 _contract_result
7587 }};
7588}
7589
7590macro_rules! contract_pre_multi_tier_routing {
7593 () => {{}};
7594 ($input:expr) => {{
7595 let _contract_input = &$input;
7596 }};
7597}
7598
7599macro_rules! contract_post_multi_tier_routing {
7602 ($result:expr) => {{
7603 let _contract_result = &$result;
7604 }};
7605}
7606
7607macro_rules! contract_multi_tier_routing {
7609 ($input:expr, $body:expr) => {{
7610 contract_pre_multi_tier_routing!($input);
7611 let _contract_result = $body;
7612 contract_post_multi_tier_routing!(_contract_result);
7613 _contract_result
7614 }};
7615}
7616
7617macro_rules! contract_pre_request_construction {
7620 () => {{}};
7621 ($input:expr) => {{
7622 let _contract_input = &$input;
7623 }};
7624}
7625
7626macro_rules! contract_post_request_construction {
7629 ($result:expr) => {{
7630 let _contract_result = &$result;
7631 }};
7632}
7633
7634macro_rules! contract_request_construction {
7636 ($input:expr, $body:expr) => {{
7637 contract_pre_request_construction!($input);
7638 let _contract_result = $body;
7639 contract_post_request_construction!(_contract_result);
7640 _contract_result
7641 }};
7642}
7643
7644macro_rules! contract_pre_response_parsing {
7647 () => {{}};
7648 ($input:expr) => {{
7649 let _contract_input = &$input;
7650 }};
7651}
7652
7653macro_rules! contract_post_response_parsing {
7656 ($result:expr) => {{
7657 let _contract_result = &$result;
7658 }};
7659}
7660
7661macro_rules! contract_response_parsing {
7663 ($input:expr, $body:expr) => {{
7664 contract_pre_response_parsing!($input);
7665 let _contract_result = $body;
7666 contract_post_response_parsing!(_contract_result);
7667 _contract_result
7668 }};
7669}
7670
7671macro_rules! contract_pre_ssrf_prevention {
7674 () => {{}};
7675 ($input:expr) => {{
7676 let _contract_input = &$input;
7677 }};
7678}
7679
7680macro_rules! contract_post_ssrf_prevention {
7683 ($result:expr) => {{
7684 let _contract_result = &$result;
7685 }};
7686}
7687
7688macro_rules! contract_ssrf_prevention {
7690 ($input:expr, $body:expr) => {{
7691 contract_pre_ssrf_prevention!($input);
7692 let _contract_result = $body;
7693 contract_post_ssrf_prevention!(_contract_result);
7694 _contract_result
7695 }};
7696}
7697
7698macro_rules! contract_pre_url_validation {
7701 () => {{}};
7702 ($input:expr) => {{
7703 let _contract_input = &$input;
7704 }};
7705}
7706
7707macro_rules! contract_post_url_validation {
7710 ($result:expr) => {{
7711 let _contract_result = &$result;
7712 }};
7713}
7714
7715macro_rules! contract_url_validation {
7717 ($input:expr, $body:expr) => {{
7718 contract_pre_url_validation!($input);
7719 let _contract_result = $body;
7720 contract_post_url_validation!(_contract_result);
7721 _contract_result
7722 }};
7723}
7724
7725macro_rules! contract_pre_conv1d_causal {
7731 () => {{}};
7732 ($input:expr) => {{
7733 let _pv_a = &$input;
7734 debug_assert!(
7735 _pv_a.len() > 0,
7736 "Contract conv1d_causal: precondition violated — a.len() > 0"
7737 );
7738 }};
7739}
7740
7741macro_rules! contract_pre_head_grouping {
7744 () => {{}};
7745 ($input:expr) => {{
7746 let _pv_input = &$input;
7747 debug_assert!(
7748 _pv_input.len() > 0,
7749 "Contract head_grouping: precondition violated — input.len() > 0"
7750 );
7751 debug_assert!(
7752 _pv_input.iter().all(|v| v.is_finite()),
7753 "Contract head_grouping: precondition violated — input.iter().all(|v| v.is_finite())"
7754 );
7755 }};
7756}
7757
7758macro_rules! contract_pre_hybrid_dispatch {
7761 () => {{}};
7762 ($input:expr) => {{
7763 let _pv_input = &$input;
7764 debug_assert!(_pv_input.len() > 0,
7765 "Contract hybrid_dispatch: precondition violated — input.len() > 0");
7766 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
7767 "Contract hybrid_dispatch: precondition violated — input.iter().all(|v| v.is_finite())");
7768 }};
7769}
7770
7771macro_rules! contract_pre_linear_associativity {
7774 () => {{}};
7775 ($input:expr) => {{
7776 let _pv_input = &$input;
7777 debug_assert!(_pv_input.len() > 0,
7778 "Contract linear_associativity: precondition violated — input.len() > 0");
7779 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
7780 "Contract linear_associativity: precondition violated — input.iter().all(|v| v.is_finite())");
7781 }};
7782}
7783
7784macro_rules! contract_pre_linear_no_softmax {
7787 () => {{}};
7788 ($input:expr) => {{
7789 let _pv_x = &$input;
7790 debug_assert!(
7791 _pv_x.iter().all(|v| v.is_finite()),
7792 "Contract linear_no_softmax: precondition violated — x.iter().all(|v| v.is_finite())"
7793 );
7794 debug_assert!(
7795 _pv_x.len() > 0,
7796 "Contract linear_no_softmax: precondition violated — x.len() > 0"
7797 );
7798 }};
7799}
7800
7801macro_rules! contract_pre_linear_shapes {
7804 () => {{}};
7805 ($input:expr) => {{
7806 let _pv_input = &$input;
7807 debug_assert!(
7808 _pv_input.len() > 0,
7809 "Contract linear_shapes: precondition violated — input.len() > 0"
7810 );
7811 debug_assert!(
7812 _pv_input.iter().all(|v| v.is_finite()),
7813 "Contract linear_shapes: precondition violated — input.iter().all(|v| v.is_finite())"
7814 );
7815 }};
7816}
7817
7818macro_rules! contract_pre_fastica {
7824 () => {{}};
7825 ($input:expr) => {{
7826 let _pv_a = &$input;
7827 debug_assert!(_pv_a.len() > 0, "Contract fastica: precondition violated — a.len() > 0");
7828 }};
7829}
7830
7831macro_rules! contract_pre_mixing {
7834 () => {{}};
7835 ($input:expr) => {{
7836 let _pv_a = &$input;
7837 debug_assert!(_pv_a.len() > 0, "Contract mixing: precondition violated — a.len() > 0");
7838 }};
7839}
7840
7841macro_rules! contract_pre_unmixing {
7844 () => {{}};
7845 ($input:expr) => {{
7846 let _pv_a = &$input;
7847 debug_assert!(_pv_a.len() > 0, "Contract unmixing: precondition violated — a.len() > 0");
7848 }};
7849}
7850
7851macro_rules! contract_pre_decode_step {
7857 () => {{}};
7858 ($input:expr) => {{
7859 let _pv_input = &$input;
7860 debug_assert!(
7861 _pv_input.len() > 0,
7862 "Contract decode_step: precondition violated — input.len() > 0"
7863 );
7864 }};
7865}
7866
7867macro_rules! contract_pre_hybrid_layer_schedule {
7870 () => {{}};
7871 ($input:expr) => {{
7872 let _contract_input = &$input;
7873 }};
7874}
7875
7876macro_rules! contract_pre_kv_cache_growth {
7879 () => {{}};
7880 ($input:expr) => {{
7881 let _pv_q = &$input;
7882 debug_assert!(
7883 _pv_q.len() > 0,
7884 "Contract kv_cache_growth: precondition violated — q.len() > 0"
7885 );
7886 }};
7887}
7888
7889macro_rules! contract_pre_layer_composition {
7892 () => {{}};
7893 ($input:expr) => {{
7894 let _pv_indices = &$input;
7895 debug_assert!(
7896 _pv_indices.len() > 0,
7897 "Contract layer_composition: precondition violated — indices.len() > 0"
7898 );
7899 }};
7900}
7901
7902macro_rules! contract_pre_prefill_phase {
7905 () => {{}};
7906 ($input:expr) => {{
7907 let _contract_input = &$input;
7908 }};
7909}
7910
7911macro_rules! contract_pre_residual_stream {
7914 () => {{}};
7915 ($input:expr) => {{
7916 let _contract_input = &$input;
7917 }};
7918}
7919
7920macro_rules! contract_pre_decode_step {
7926 () => {{}};
7927 ($input:expr) => {{
7928 let _contract_input = &$input;
7929 }};
7930}
7931
7932macro_rules! contract_pre_prefill_phase {
7935 () => {{}};
7936 ($input:expr) => {{
7937 let _pv_tokens = &$input;
7938 debug_assert!(
7939 _pv_tokens.len() > 0,
7940 "Contract prefill_phase: precondition violated — tokens.len() > 0"
7941 );
7942 }};
7943}
7944
7945macro_rules! contract_pre_sampling_temperature {
7948 () => {{}};
7949 ($input:expr) => {{
7950 let _pv_logits = &$input;
7951 }};
7952}
7953
7954macro_rules! contract_pre_dequant_dot {
7960 () => {{}};
7961 ($input:expr) => {{
7962 let _pv_a = &$input;
7963 debug_assert!(_pv_a.len() > 0,
7964 "Contract dequant_dot: precondition violated — a.len() > 0");
7965 }};
7966}
7967
7968macro_rules! contract_pre_per_row_scale {
7971 () => {{}};
7972 ($input:expr) => {{
7973 let _pv_input = &$input;
7974 debug_assert!(
7975 _pv_input.len() > 0,
7976 "Contract per_row_scale: precondition violated — input.len() > 0"
7977 );
7978 }};
7979}
7980
7981macro_rules! contract_pre_quantize {
7984 () => {{}};
7985 ($input:expr) => {{
7986 let _pv_input = &$input;
7987 debug_assert!(
7988 _pv_input.len() > 0,
7989 "Contract quantize: precondition violated — input.len() > 0"
7990 );
7991 }};
7992}
7993
7994macro_rules! contract_pre_iterator {
8000 () => {{}};
8001 ($input:expr) => {{
8002 let _pv_input = &$input;
8003 debug_assert!(
8004 _pv_input.len() > 0,
8005 "Contract iterator: precondition violated — input.len() > 0"
8006 );
8007 }};
8008}
8009
8010macro_rules! contract_pre_fusion_decision_registry {
8016 () => {{}};
8017 ($input:expr) => {{
8018 let _contract_input = &$input;
8019 }};
8020}
8021
8022macro_rules! contract_pre_fusion_performance {
8025 () => {{}};
8026 ($input:expr) => {{
8027 let _pv_benchmark = &$input;
8028 }};
8029}
8030
8031macro_rules! contract_pre_identity {
8034 () => {{}};
8035 ($input:expr) => {{
8036 let _pv_q = &$input;
8037 debug_assert!(_pv_q.len() > 0, "Contract identity: precondition violated — q.len() > 0");
8038 }};
8039}
8040
8041macro_rules! contract_pre_bsum_budget {
8047 () => {{}};
8048 ($input:expr) => {{
8049 let _pv_input = &$input;
8050 debug_assert!(
8051 _pv_input.len() > 0,
8052 "Contract bsum_budget: precondition violated — input.len() > 0"
8053 );
8054 }};
8055}
8056
8057macro_rules! contract_pre_per_layer_decomposition {
8060 () => {{}};
8061 ($input:expr) => {{
8062 let _pv_indices = &$input;
8063 debug_assert!(
8064 _pv_indices.len() > 0,
8065 "Contract per_layer_decomposition: precondition violated — indices.len() > 0"
8066 );
8067 }};
8068}
8069
8070macro_rules! contract_pre_per_token_launches {
8073 () => {{}};
8074 ($input:expr) => {{
8075 let _pv_input = &$input;
8076 debug_assert!(
8077 _pv_input.len() > 0,
8078 "Contract per_token_launches: precondition violated — input.len() > 0"
8079 );
8080 }};
8081}
8082
8083macro_rules! contract_pre_assignment {
8089 () => {{}};
8090 ($input:expr) => {{
8091 let _pv_input = &$input;
8092 debug_assert!(
8093 _pv_input.len() > 0,
8094 "Contract assignment: precondition violated — input.len() > 0"
8095 );
8096 debug_assert!(
8097 _pv_input.iter().all(|v| v.is_finite()),
8098 "Contract assignment: precondition violated — input.iter().all(|v| v.is_finite())"
8099 );
8100 }};
8101}
8102
8103macro_rules! contract_pre_objective {
8106 () => {{}};
8107 ($input:expr) => {{
8108 let _pv_input = &$input;
8109 debug_assert!(
8110 _pv_input.len() > 0,
8111 "Contract objective: precondition violated — input.len() > 0"
8112 );
8113 debug_assert!(
8114 _pv_input.iter().all(|v| v.is_finite()),
8115 "Contract objective: precondition violated — input.iter().all(|v| v.is_finite())"
8116 );
8117 }};
8118}
8119
8120macro_rules! contract_pre_update {
8123 () => {{}};
8124 ($input:expr) => {{
8125 let _pv_input = &$input;
8126 debug_assert!(
8127 _pv_input.len() > 0,
8128 "Contract update: precondition violated — input.len() > 0"
8129 );
8130 debug_assert!(
8131 _pv_input.iter().all(|v| v.is_finite()),
8132 "Contract update: precondition violated — input.iter().all(|v| v.is_finite())"
8133 );
8134 }};
8135}
8136
8137macro_rules! contract_pre_batched_serial_equivalence {
8143 () => {{}};
8144 ($input:expr) => {{
8145 let _contract_input = &$input;
8146 }};
8147}
8148
8149macro_rules! contract_pre_fused_kernel {
8152 () => {{}};
8153 ($input:expr) => {{
8154 let _contract_input = &$input;
8155 }};
8156}
8157
8158macro_rules! contract_pre_page_shape {
8161 () => {{}};
8162 ($input:expr) => {{
8163 let _contract_input = &$input;
8164 }};
8165}
8166
8167macro_rules! contract_pre_prefill_incremental {
8170 () => {{}};
8171 ($input:expr) => {{
8172 let _contract_input = &$input;
8173 }};
8174}
8175
8176macro_rules! contract_pre_bias_absence {
8182 () => {{}};
8183 ($input:expr) => {{
8184 let _contract_input = &$input;
8185 }};
8186}
8187
8188macro_rules! contract_pre_hybrid_accounting {
8191 () => {{}};
8192 ($input:expr) => {{
8193 let _contract_input = &$input;
8194 }};
8195}
8196
8197macro_rules! contract_pre_per_token_per_layer {
8200 () => {{}};
8201 ($input:expr) => {{
8202 let _pv_input = &$input;
8203 debug_assert!(
8204 _pv_input.len() > 0,
8205 "Contract per_token_per_layer: precondition violated — input.len() > 0"
8206 );
8207 }};
8208}
8209
8210macro_rules! contract_pre_total_kv_memory {
8213 () => {{}};
8214 ($input:expr) => {{
8215 let _contract_input = &$input;
8216 }};
8217}
8218
8219macro_rules! contract_pre_zero_input_identity {
8222 () => {{}};
8223 ($input:expr) => {{
8224 let _contract_input = &$input;
8225 }};
8226}
8227
8228macro_rules! contract_pre_cosine_parity_gate {
8234 () => {{}};
8235 ($input:expr) => {{
8236 let _pv_cpu_logits = &$input;
8237 debug_assert!(
8238 _pv_cpu_logits.len() > 0,
8239 "Contract cosine_parity_gate: precondition violated — cpu_logits.len() > 0"
8240 );
8241 }};
8242}
8243
8244macro_rules! contract_pre_identity {
8247 () => {{}};
8248 ($input:expr) => {{
8249 let _pv_x = &$input;
8250 }};
8251}
8252
8253macro_rules! contract_pre_layer_parity {
8256 () => {{}};
8257 ($input:expr) => {{
8258 let _pv_cpu_output = &$input;
8259 }};
8260}
8261
8262macro_rules! contract_pre_layernorm {
8268 () => {{}};
8269 ($input:expr) => {{
8270 let _pv_x = &$input;
8271 debug_assert!(_pv_x.len() > 0, "Contract layernorm: precondition violated — x.len() > 0");
8272 debug_assert!(
8273 _pv_x.iter().all(|v| v.is_finite()),
8274 "Contract layernorm: precondition violated — x.iter().all(|v| v.is_finite())"
8275 );
8276 }};
8277}
8278
8279macro_rules! contract_post_layernorm {
8282 ($result:expr) => {{
8283 let _contract_result = &$result;
8284 debug_assert!(
8285 _contract_result.iter().all(|v| v.is_finite()),
8286 "Contract layernorm: postcondition violated — result.iter().all(|v| v.is_finite())"
8287 );
8288 }};
8289}
8290
8291macro_rules! contract_layernorm {
8293 ($input:expr, $body:expr) => {{
8294 contract_pre_layernorm!($input);
8295 let _contract_result = $body;
8296 contract_post_layernorm!(_contract_result);
8297 _contract_result
8298 }};
8299}
8300
8301macro_rules! contract_pre_statistics {
8304 () => {{}};
8305 ($input:expr) => {{
8306 let _pv_input = &$input;
8307 debug_assert!(
8308 _pv_input.iter().all(|v| v.is_finite()),
8309 "Contract statistics: precondition violated — input.iter().all(|v| v.is_finite())"
8310 );
8311 debug_assert!(
8312 _pv_input.len() > 0,
8313 "Contract statistics: precondition violated — input.len() > 0"
8314 );
8315 }};
8316}
8317
8318macro_rules! contract_pre_line_search {
8324 () => {{}};
8325 ($input:expr) => {{
8326 let _pv_params = &$input;
8327 debug_assert!(
8328 _pv_params.len() > 0,
8329 "Contract line_search: precondition violated — params.len() > 0"
8330 );
8331 }};
8332}
8333
8334macro_rules! contract_pre_secant_condition {
8337 () => {{}};
8338 ($input:expr) => {{
8339 let _pv_params = &$input;
8340 debug_assert!(
8341 _pv_params.len() > 0,
8342 "Contract secant_condition: precondition violated — params.len() > 0"
8343 );
8344 }};
8345}
8346
8347macro_rules! contract_pre_two_loop_recursion {
8350 () => {{}};
8351 ($input:expr) => {{
8352 let _pv_params = &$input;
8353 debug_assert!(
8354 _pv_params.len() > 0,
8355 "Contract two_loop_recursion: precondition violated — params.len() > 0"
8356 );
8357 }};
8358}
8359
8360macro_rules! contract_pre_position_embedding {
8366 () => {{}};
8367 ($input:expr) => {{
8368 let _pv_indices = &$input;
8369 debug_assert!(
8370 _pv_indices.len() > 0,
8371 "Contract position_embedding: precondition violated — indices.len() > 0"
8372 );
8373 }};
8374}
8375
8376macro_rules! contract_pre_logistic_predict_proba {
8382 () => {{}};
8383 ($input:expr) => {{
8384 let _pv_input = &$input;
8385 debug_assert!(_pv_input.len() > 0,
8386 "Contract logistic_predict_proba: precondition violated — input.len() > 0");
8387 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
8388 "Contract logistic_predict_proba: precondition violated — input.iter().all(|v| v.is_finite())");
8389 }};
8390}
8391
8392macro_rules! contract_pre_ols_fit {
8395 () => {{}};
8396 ($input:expr) => {{
8397 let _pv_input = &$input;
8398 debug_assert!(
8399 _pv_input.len() > 0,
8400 "Contract ols_fit: precondition violated — input.len() > 0"
8401 );
8402 debug_assert!(
8403 _pv_input.iter().all(|v| v.is_finite()),
8404 "Contract ols_fit: precondition violated — input.iter().all(|v| v.is_finite())"
8405 );
8406 }};
8407}
8408
8409macro_rules! contract_pre_ols_predict {
8412 () => {{}};
8413 ($input:expr) => {{
8414 let _pv_input = &$input;
8415 debug_assert!(
8416 _pv_input.len() > 0,
8417 "Contract ols_predict: precondition violated — input.len() > 0"
8418 );
8419 debug_assert!(
8420 _pv_input.iter().all(|v| v.is_finite()),
8421 "Contract ols_predict: precondition violated — input.iter().all(|v| v.is_finite())"
8422 );
8423 }};
8424}
8425
8426macro_rules! contract_pre_r_squared_training {
8429 () => {{}};
8430 ($input:expr) => {{
8431 let _pv_input = &$input;
8432 debug_assert!(_pv_input.len() > 0,
8433 "Contract r_squared_training: precondition violated — input.len() > 0");
8434 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
8435 "Contract r_squared_training: precondition violated — input.iter().all(|v| v.is_finite())");
8436 }};
8437}
8438
8439macro_rules! contract_pre_linear_probe {
8445 () => {{}};
8446 ($input:expr) => {{
8447 let _pv_input = &$input;
8448 debug_assert!(
8449 _pv_input.len() > 0,
8450 "Contract linear_probe: precondition violated — input.len() > 0"
8451 );
8452 }};
8453}
8454
8455macro_rules! contract_pre_linear_forward {
8461 () => {{}};
8462 ($input:expr) => {{
8463 let _pv_a = &$input;
8464 debug_assert!(
8465 _pv_a.len() > 0,
8466 "Contract linear_forward: precondition violated — a.len() > 0"
8467 );
8468 }};
8469}
8470
8471macro_rules! contract_pre_linear_no_bias {
8474 () => {{}};
8475 ($input:expr) => {{
8476 let _pv_a = &$input;
8477 debug_assert!(
8478 _pv_a.len() > 0,
8479 "Contract linear_no_bias: precondition violated — a.len() > 0"
8480 );
8481 }};
8482}
8483
8484macro_rules! contract_pre_dare_unbiased {
8490 () => {{}};
8491 ($input:expr) => {{
8492 let _pv_input = &$input;
8493 debug_assert!(
8494 _pv_input.len() > 0,
8495 "Contract dare_unbiased: precondition violated — input.len() > 0"
8496 );
8497 debug_assert!(
8498 _pv_input.iter().all(|v| v.is_finite()),
8499 "Contract dare_unbiased: precondition violated — input.iter().all(|v| v.is_finite())"
8500 );
8501 }};
8502}
8503
8504macro_rules! contract_pre_eckart_young {
8507 () => {{}};
8508 ($input:expr) => {{
8509 let _pv_input = &$input;
8510 debug_assert!(
8511 _pv_input.len() > 0,
8512 "Contract eckart_young: precondition violated — input.len() > 0"
8513 );
8514 debug_assert!(
8515 _pv_input.iter().all(|v| v.is_finite()),
8516 "Contract eckart_young: precondition violated — input.iter().all(|v| v.is_finite())"
8517 );
8518 }};
8519}
8520
8521macro_rules! contract_pre_lora_shape {
8524 () => {{}};
8525 ($input:expr) => {{
8526 let _pv_input = &$input;
8527 debug_assert!(
8528 _pv_input.len() > 0,
8529 "Contract lora_shape: precondition violated — input.len() > 0"
8530 );
8531 debug_assert!(
8532 _pv_input.iter().all(|v| v.is_finite()),
8533 "Contract lora_shape: precondition violated — input.iter().all(|v| v.is_finite())"
8534 );
8535 }};
8536}
8537
8538macro_rules! contract_pre_shape_preservation {
8541 () => {{}};
8542 ($input:expr) => {{
8543 let _pv_input = &$input;
8544 debug_assert!(_pv_input.len() > 0,
8545 "Contract shape_preservation: precondition violated — input.len() > 0");
8546 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
8547 "Contract shape_preservation: precondition violated — input.iter().all(|v| v.is_finite())");
8548 }};
8549}
8550
8551macro_rules! contract_pre_task_vector {
8554 () => {{}};
8555 ($input:expr) => {{
8556 let _pv_input = &$input;
8557 debug_assert!(
8558 _pv_input.len() > 0,
8559 "Contract task_vector: precondition violated — input.len() > 0"
8560 );
8561 debug_assert!(
8562 _pv_input.iter().all(|v| v.is_finite()),
8563 "Contract task_vector: precondition violated — input.iter().all(|v| v.is_finite())"
8564 );
8565 }};
8566}
8567
8568macro_rules! contract_pre_lora_forward {
8574 () => {{}};
8575 ($input:expr) => {{
8576 let _pv_x = &$input;
8577 }};
8578}
8579
8580macro_rules! contract_post_lora_forward {
8583 ($result:expr) => {{
8584 let _contract_result = &$result;
8585 }};
8586}
8587
8588macro_rules! contract_lora_forward {
8590 ($input:expr, $body:expr) => {{
8591 contract_pre_lora_forward!($input);
8592 let _contract_result = $body;
8593 contract_post_lora_forward!(_contract_result);
8594 _contract_result
8595 }};
8596}
8597
8598macro_rules! contract_pre_bce {
8607 () => {{}};
8608 ($input:expr) => {{
8609 let _pv_predicted = &$input;
8610 debug_assert!(
8611 _pv_predicted.len() > 0,
8612 "Contract bce: precondition violated — predicted.len() > 0"
8613 );
8614 }};
8615}
8616
8617macro_rules! contract_pre_huber {
8620 () => {{}};
8621 ($input:expr) => {{
8622 let _pv_predicted = &$input;
8623 debug_assert!(
8624 _pv_predicted.len() > 0,
8625 "Contract huber: precondition violated — predicted.len() > 0"
8626 );
8627 }};
8628}
8629
8630macro_rules! contract_pre_l1_loss {
8633 () => {{}};
8634 ($input:expr) => {{
8635 let _pv_predicted = &$input;
8636 debug_assert!(
8637 _pv_predicted.len() > 0,
8638 "Contract l1_loss: precondition violated — predicted.len() > 0"
8639 );
8640 }};
8641}
8642
8643macro_rules! contract_pre_mse_loss {
8646 () => {{}};
8647 ($input:expr) => {{
8648 let _pv_predicted = &$input;
8649 debug_assert!(
8650 _pv_predicted.len() > 0,
8651 "Contract mse_loss: precondition violated — predicted.len() > 0"
8652 );
8653 }};
8654}
8655
8656macro_rules! contract_pre_nll {
8659 () => {{}};
8660 ($input:expr) => {{
8661 let _pv_predicted = &$input;
8662 debug_assert!(
8663 _pv_predicted.len() > 0,
8664 "Contract nll: precondition violated — predicted.len() > 0"
8665 );
8666 }};
8667}
8668
8669macro_rules! contract_pre_smooth_l1 {
8672 () => {{}};
8673 ($input:expr) => {{
8674 let _pv_predicted = &$input;
8675 debug_assert!(
8676 _pv_predicted.len() > 0,
8677 "Contract smooth_l1: precondition violated — predicted.len() > 0"
8678 );
8679 }};
8680}
8681
8682macro_rules! contract_pre_matmul {
8688 () => {{}};
8689 ($input:expr) => {{
8690 let _pv_a = &$input;
8691 }};
8692}
8693
8694macro_rules! contract_post_matmul {
8697 ($result:expr) => {{
8698 let _contract_result = &$result;
8699 debug_assert!(
8700 _contract_result.iter().all(|v| v.is_finite()),
8701 "Contract matmul: postcondition violated — result.iter().all(|v| v.is_finite())"
8702 );
8703 }};
8704}
8705
8706macro_rules! contract_matmul {
8708 ($input:expr, $body:expr) => {{
8709 contract_pre_matmul!($input);
8710 let _contract_result = $body;
8711 contract_post_matmul!(_contract_result);
8712 _contract_result
8713 }};
8714}
8715
8716macro_rules! contract_pre_quantized_dot {
8719 () => {{}};
8720 ($input:expr) => {{
8721 let _pv_input = &$input;
8722 debug_assert!(
8723 _pv_input.len() > 0,
8724 "Contract quantized_dot: precondition violated — input.len() > 0"
8725 );
8726 }};
8727}
8728
8729macro_rules! contract_pre_batch_request_ordering {
8735 () => {{}};
8736 ($input:expr) => {{
8737 let _contract_input = &$input;
8738 }};
8739}
8740
8741macro_rules! contract_post_batch_request_ordering {
8744 ($result:expr) => {{
8745 let _contract_result = &$result;
8746 }};
8747}
8748
8749macro_rules! contract_batch_request_ordering {
8751 ($input:expr, $body:expr) => {{
8752 contract_pre_batch_request_ordering!($input);
8753 let _contract_result = $body;
8754 contract_post_batch_request_ordering!(_contract_result);
8755 _contract_result
8756 }};
8757}
8758
8759macro_rules! contract_pre_cancellation_safety {
8762 () => {{}};
8763 ($input:expr) => {{
8764 let _contract_input = &$input;
8765 }};
8766}
8767
8768macro_rules! contract_post_cancellation_safety {
8771 ($result:expr) => {{
8772 let _contract_result = &$result;
8773 }};
8774}
8775
8776macro_rules! contract_cancellation_safety {
8778 ($input:expr, $body:expr) => {{
8779 contract_pre_cancellation_safety!($input);
8780 let _contract_result = $body;
8781 contract_post_cancellation_safety!(_contract_result);
8782 _contract_result
8783 }};
8784}
8785
8786macro_rules! contract_pre_error_code_mapping {
8789 () => {{}};
8790 ($input:expr) => {{
8791 let _contract_input = &$input;
8792 }};
8793}
8794
8795macro_rules! contract_post_error_code_mapping {
8798 ($result:expr) => {{
8799 let _contract_result = &$result;
8800 }};
8801}
8802
8803macro_rules! contract_error_code_mapping {
8805 ($input:expr, $body:expr) => {{
8806 contract_pre_error_code_mapping!($input);
8807 let _contract_result = $body;
8808 contract_post_error_code_mapping!(_contract_result);
8809 _contract_result
8810 }};
8811}
8812
8813macro_rules! contract_pre_jsonrpc_framing {
8816 () => {{}};
8817 ($input:expr) => {{
8818 let _contract_input = &$input;
8819 }};
8820}
8821
8822macro_rules! contract_post_jsonrpc_framing {
8825 ($result:expr) => {{
8826 let _contract_result = &$result;
8827 }};
8828}
8829
8830macro_rules! contract_jsonrpc_framing {
8832 ($input:expr, $body:expr) => {{
8833 contract_pre_jsonrpc_framing!($input);
8834 let _contract_result = $body;
8835 contract_post_jsonrpc_framing!(_contract_result);
8836 _contract_result
8837 }};
8838}
8839
8840macro_rules! contract_pre_payload_limits {
8843 () => {{}};
8844 ($input:expr) => {{
8845 let _contract_input = &$input;
8846 }};
8847}
8848
8849macro_rules! contract_post_payload_limits {
8852 ($result:expr) => {{
8853 let _contract_result = &$result;
8854 }};
8855}
8856
8857macro_rules! contract_payload_limits {
8859 ($input:expr, $body:expr) => {{
8860 contract_pre_payload_limits!($input);
8861 let _contract_result = $body;
8862 contract_post_payload_limits!(_contract_result);
8863 _contract_result
8864 }};
8865}
8866
8867macro_rules! contract_pre_protocol_version_negotiation {
8870 () => {{}};
8871 ($input:expr) => {{
8872 let _contract_input = &$input;
8873 }};
8874}
8875
8876macro_rules! contract_post_protocol_version_negotiation {
8879 ($result:expr) => {{
8880 let _contract_result = &$result;
8881 }};
8882}
8883
8884macro_rules! contract_protocol_version_negotiation {
8886 ($input:expr, $body:expr) => {{
8887 contract_pre_protocol_version_negotiation!($input);
8888 let _contract_result = $body;
8889 contract_post_protocol_version_negotiation!(_contract_result);
8890 _contract_result
8891 }};
8892}
8893
8894macro_rules! contract_pre_session_lifecycle {
8897 () => {{}};
8898 ($input:expr) => {{
8899 let _contract_input = &$input;
8900 }};
8901}
8902
8903macro_rules! contract_post_session_lifecycle {
8906 ($result:expr) => {{
8907 let _contract_result = &$result;
8908 }};
8909}
8910
8911macro_rules! contract_session_lifecycle {
8913 ($input:expr, $body:expr) => {{
8914 contract_pre_session_lifecycle!($input);
8915 let _contract_result = $body;
8916 contract_post_session_lifecycle!(_contract_result);
8917 _contract_result
8918 }};
8919}
8920
8921macro_rules! contract_pre_tool_dispatch_integrity {
8924 () => {{}};
8925 ($input:expr) => {{
8926 let _contract_input = &$input;
8927 }};
8928}
8929
8930macro_rules! contract_post_tool_dispatch_integrity {
8933 ($result:expr) => {{
8934 let _contract_result = &$result;
8935 }};
8936}
8937
8938macro_rules! contract_tool_dispatch_integrity {
8940 ($input:expr, $body:expr) => {{
8941 contract_pre_tool_dispatch_integrity!($input);
8942 let _contract_result = $body;
8943 contract_post_tool_dispatch_integrity!(_contract_result);
8944 _contract_result
8945 }};
8946}
8947
8948macro_rules! contract_pre_transport_abstraction {
8951 () => {{}};
8952 ($input:expr) => {{
8953 let _contract_input = &$input;
8954 }};
8955}
8956
8957macro_rules! contract_post_transport_abstraction {
8960 ($result:expr) => {{
8961 let _contract_result = &$result;
8962 }};
8963}
8964
8965macro_rules! contract_transport_abstraction {
8967 ($input:expr, $body:expr) => {{
8968 contract_pre_transport_abstraction!($input);
8969 let _contract_result = $body;
8970 contract_post_transport_abstraction!(_contract_result);
8971 _contract_result
8972 }};
8973}
8974
8975macro_rules! contract_pre_error_mapping_lossless {
8981 () => {{}};
8982 ($input:expr) => {{
8983 let _contract_input = &$input;
8984 }};
8985}
8986
8987macro_rules! contract_post_error_mapping_lossless {
8990 ($result:expr) => {{
8991 let _contract_result = &$result;
8992 }};
8993}
8994
8995macro_rules! contract_error_mapping_lossless {
8997 ($input:expr, $body:expr) => {{
8998 contract_pre_error_mapping_lossless!($input);
8999 let _contract_result = $body;
9000 contract_post_error_mapping_lossless!(_contract_result);
9001 _contract_result
9002 }};
9003}
9004
9005macro_rules! contract_pre_idempotency {
9008 () => {{}};
9009 ($input:expr) => {{
9010 let _contract_input = &$input;
9011 }};
9012}
9013
9014macro_rules! contract_post_idempotency {
9017 ($result:expr) => {{
9018 let _contract_result = &$result;
9019 }};
9020}
9021
9022macro_rules! contract_idempotency {
9024 ($input:expr, $body:expr) => {{
9025 contract_pre_idempotency!($input);
9026 let _contract_result = $body;
9027 contract_post_idempotency!(_contract_result);
9028 _contract_result
9029 }};
9030}
9031
9032macro_rules! contract_pre_session_lifecycle {
9035 () => {{}};
9036 ($input:expr) => {{
9037 let _contract_input = &$input;
9038 }};
9039}
9040
9041macro_rules! contract_post_session_lifecycle {
9044 ($result:expr) => {{
9045 let _contract_result = &$result;
9046 }};
9047}
9048
9049macro_rules! contract_session_lifecycle {
9051 ($input:expr, $body:expr) => {{
9052 contract_pre_session_lifecycle!($input);
9053 let _contract_result = $body;
9054 contract_post_session_lifecycle!(_contract_result);
9055 _contract_result
9056 }};
9057}
9058
9059macro_rules! contract_pre_tool_schema_fidelity {
9062 () => {{}};
9063 ($input:expr) => {{
9064 let _contract_input = &$input;
9065 }};
9066}
9067
9068macro_rules! contract_post_tool_schema_fidelity {
9071 ($result:expr) => {{
9072 let _contract_result = &$result;
9073 }};
9074}
9075
9076macro_rules! contract_tool_schema_fidelity {
9078 ($input:expr, $body:expr) => {{
9079 contract_pre_tool_schema_fidelity!($input);
9080 let _contract_result = $body;
9081 contract_post_tool_schema_fidelity!(_contract_result);
9082 _contract_result
9083 }};
9084}
9085
9086macro_rules! contract_pre_error_mapping {
9092 () => {{}};
9093 ($input:expr) => {{
9094 let _contract_input = &$input;
9095 }};
9096}
9097
9098macro_rules! contract_pre_idempotency_classification {
9101 () => {{}};
9102 ($input:expr) => {{
9103 let _contract_input = &$input;
9104 }};
9105}
9106
9107macro_rules! contract_pre_session_state_machine {
9110 () => {{}};
9111 ($input:expr) => {{
9112 let _contract_input = &$input;
9113 }};
9114}
9115
9116macro_rules! contract_pre_tool_schema_fidelity {
9119 () => {{}};
9120 ($input:expr) => {{
9121 let _pv_tool = &$input;
9122 }};
9123}
9124
9125macro_rules! contract_pre_codec_dispatch {
9131 () => {{}};
9132 ($input:expr) => {{
9133 let _contract_input = &$input;
9134 }};
9135}
9136
9137macro_rules! contract_pre_encode_decode_roundtrip {
9140 () => {{}};
9141 ($input:expr) => {{
9142 let _contract_input = &$input;
9143 }};
9144}
9145
9146macro_rules! contract_pre_frame_integrity {
9149 () => {{}};
9150 ($input:expr) => {{
9151 let _contract_input = &$input;
9152 }};
9153}
9154
9155macro_rules! contract_pre_bounds_safety {
9161 () => {{}};
9162 ($input:expr) => {{
9163 let _pv_input = &$input;
9164 debug_assert!(
9165 _pv_input.len() > 0,
9166 "Contract bounds_safety: precondition violated — input.len() > 0"
9167 );
9168 }};
9169}
9170
9171macro_rules! contract_pre_drop_safety {
9174 () => {{}};
9175 ($input:expr) => {{
9176 let _pv_input = &$input;
9177 debug_assert!(
9178 _pv_input.len() > 0,
9179 "Contract drop_safety: precondition violated — input.len() > 0"
9180 );
9181 }};
9182}
9183
9184macro_rules! contract_pre_escape_analysis {
9187 () => {{}};
9188 ($input:expr) => {{
9189 let _pv_input = &$input;
9190 debug_assert!(
9191 _pv_input.len() > 0,
9192 "Contract escape_analysis: precondition violated — input.len() > 0"
9193 );
9194 }};
9195}
9196
9197macro_rules! contract_pre_lifetime_safety {
9200 () => {{}};
9201 ($input:expr) => {{
9202 let _pv_input = &$input;
9203 debug_assert!(
9204 _pv_input.len() > 0,
9205 "Contract lifetime_safety: precondition violated — input.len() > 0"
9206 );
9207 }};
9208}
9209
9210macro_rules! contract_pre_ownership_invariant {
9213 () => {{}};
9214 ($input:expr) => {{
9215 let _pv_input = &$input;
9216 debug_assert!(
9217 _pv_input.len() > 0,
9218 "Contract ownership_invariant: precondition violated — input.len() > 0"
9219 );
9220 }};
9221}
9222
9223macro_rules! contract_pre_use_after_move {
9226 () => {{}};
9227 ($input:expr) => {{
9228 let _pv_input = &$input;
9229 debug_assert!(
9230 _pv_input.len() > 0,
9231 "Contract use_after_move: precondition violated — input.len() > 0"
9232 );
9233 }};
9234}
9235
9236macro_rules! contract_pre_arena_lifecycle {
9242 () => {{}};
9243 ($input:expr) => {{
9244 let _contract_input = &$input;
9245 }};
9246}
9247
9248macro_rules! contract_post_arena_lifecycle {
9251 ($result:expr) => {{
9252 let _contract_result = &$result;
9253 }};
9254}
9255
9256macro_rules! contract_arena_lifecycle {
9258 ($input:expr, $body:expr) => {{
9259 contract_pre_arena_lifecycle!($input);
9260 let _contract_result = $body;
9261 contract_post_arena_lifecycle!(_contract_result);
9262 _contract_result
9263 }};
9264}
9265
9266macro_rules! contract_pre_index_memory_budget {
9269 () => {{}};
9270 ($input:expr) => {{
9271 let _contract_input = &$input;
9272 }};
9273}
9274
9275macro_rules! contract_post_index_memory_budget {
9278 ($result:expr) => {{
9279 let _contract_result = &$result;
9280 }};
9281}
9282
9283macro_rules! contract_index_memory_budget {
9285 ($input:expr, $body:expr) => {{
9286 contract_pre_index_memory_budget!($input);
9287 let _contract_result = $body;
9288 contract_post_index_memory_budget!(_contract_result);
9289 _contract_result
9290 }};
9291}
9292
9293macro_rules! contract_pre_lru_eviction_correctness {
9296 () => {{}};
9297 ($input:expr) => {{
9298 let _contract_input = &$input;
9299 }};
9300}
9301
9302macro_rules! contract_post_lru_eviction_correctness {
9305 ($result:expr) => {{
9306 let _contract_result = &$result;
9307 }};
9308}
9309
9310macro_rules! contract_lru_eviction_correctness {
9312 ($input:expr, $body:expr) => {{
9313 contract_pre_lru_eviction_correctness!($input);
9314 let _contract_result = $body;
9315 contract_post_lru_eviction_correctness!(_contract_result);
9316 _contract_result
9317 }};
9318}
9319
9320macro_rules! contract_pre_best_monotone {
9326 () => {{}};
9327 ($input:expr) => {{
9328 let _pv_params = &$input;
9329 debug_assert!(
9330 _pv_params.len() > 0,
9331 "Contract best_monotone: precondition violated — params.len() > 0"
9332 );
9333 }};
9334}
9335
9336macro_rules! contract_pre_ga_crossover {
9339 () => {{}};
9340 ($input:expr) => {{
9341 let _pv_params = &$input;
9342 debug_assert!(
9343 _pv_params.len() > 0,
9344 "Contract ga_crossover: precondition violated — params.len() > 0"
9345 );
9346 }};
9347}
9348
9349macro_rules! contract_pre_pso_velocity {
9352 () => {{}};
9353 ($input:expr) => {{
9354 let _pv_params = &$input;
9355 debug_assert!(
9356 _pv_params.len() > 0,
9357 "Contract pso_velocity: precondition violated — params.len() > 0"
9358 );
9359 }};
9360}
9361
9362macro_rules! contract_pre_sa_acceptance {
9365 () => {{}};
9366 ($input:expr) => {{
9367 let _pv_params = &$input;
9368 debug_assert!(
9369 _pv_params.len() > 0,
9370 "Contract sa_acceptance: precondition violated — params.len() > 0"
9371 );
9372 }};
9373}
9374
9375macro_rules! contract_pre_accuracy {
9381 () => {{}};
9382 ($input:expr) => {{
9383 let _pv_input = &$input;
9384 debug_assert!(
9385 _pv_input.len() > 0,
9386 "Contract accuracy: precondition violated — input.len() > 0"
9387 );
9388 debug_assert!(
9389 _pv_input.iter().all(|v| v.is_finite()),
9390 "Contract accuracy: precondition violated — input.iter().all(|v| v.is_finite())"
9391 );
9392 }};
9393}
9394
9395macro_rules! contract_pre_confusion_matrix {
9398 () => {{}};
9399 ($input:expr) => {{
9400 let _pv_input = &$input;
9401 debug_assert!(_pv_input.len() > 0,
9402 "Contract confusion_matrix: precondition violated — input.len() > 0");
9403 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
9404 "Contract confusion_matrix: precondition violated — input.iter().all(|v| v.is_finite())");
9405 }};
9406}
9407
9408macro_rules! contract_pre_f1_score {
9411 () => {{}};
9412 ($input:expr) => {{
9413 let _pv_input = &$input;
9414 debug_assert!(
9415 _pv_input.len() > 0,
9416 "Contract f1_score: precondition violated — input.len() > 0"
9417 );
9418 debug_assert!(
9419 _pv_input.iter().all(|v| v.is_finite()),
9420 "Contract f1_score: precondition violated — input.iter().all(|v| v.is_finite())"
9421 );
9422 }};
9423}
9424
9425macro_rules! contract_pre_precision {
9428 () => {{}};
9429 ($input:expr) => {{
9430 let _pv_input = &$input;
9431 debug_assert!(
9432 _pv_input.len() > 0,
9433 "Contract precision: precondition violated — input.len() > 0"
9434 );
9435 debug_assert!(
9436 _pv_input.iter().all(|v| v.is_finite()),
9437 "Contract precision: precondition violated — input.iter().all(|v| v.is_finite())"
9438 );
9439 }};
9440}
9441
9442macro_rules! contract_pre_recall {
9445 () => {{}};
9446 ($input:expr) => {{
9447 let _pv_input = &$input;
9448 debug_assert!(
9449 _pv_input.len() > 0,
9450 "Contract recall: precondition violated — input.len() > 0"
9451 );
9452 debug_assert!(
9453 _pv_input.iter().all(|v| v.is_finite()),
9454 "Contract recall: precondition violated — input.iter().all(|v| v.is_finite())"
9455 );
9456 }};
9457}
9458
9459macro_rules! contract_pre_inertia {
9465 () => {{}};
9466 ($input:expr) => {{
9467 let _contract_input = &$input;
9468 }};
9469}
9470
9471macro_rules! contract_pre_silhouette_coefficient {
9474 () => {{}};
9475 ($input:expr) => {{
9476 let _contract_input = &$input;
9477 }};
9478}
9479
9480macro_rules! contract_pre_silhouette_score {
9483 () => {{}};
9484 ($input:expr) => {{
9485 let _contract_input = &$input;
9486 }};
9487}
9488
9489macro_rules! contract_pre_hit_at_k {
9495 () => {{}};
9496 ($input:expr) => {{
9497 let _pv_input = &$input;
9498 debug_assert!(
9499 _pv_input.len() > 0,
9500 "Contract hit_at_k: precondition violated — input.len() > 0"
9501 );
9502 }};
9503}
9504
9505macro_rules! contract_pre_mrr {
9508 () => {{}};
9509 ($input:expr) => {{
9510 let _pv_input = &$input;
9511 debug_assert!(_pv_input.len() > 0,
9512 "Contract mrr: precondition violated — input.len() > 0");
9513 }};
9514}
9515
9516macro_rules! contract_pre_ndcg_at_k {
9519 () => {{}};
9520 ($input:expr) => {{
9521 let _pv_input = &$input;
9522 debug_assert!(
9523 _pv_input.len() > 0,
9524 "Contract ndcg_at_k: precondition violated — input.len() > 0"
9525 );
9526 }};
9527}
9528
9529macro_rules! contract_pre_reciprocal_rank {
9532 () => {{}};
9533 ($input:expr) => {{
9534 let _pv_input = &$input;
9535 debug_assert!(
9536 _pv_input.len() > 0,
9537 "Contract reciprocal_rank: precondition violated — input.len() > 0"
9538 );
9539 }};
9540}
9541
9542macro_rules! contract_pre_mae {
9548 () => {{}};
9549 ($input:expr) => {{
9550 let _pv_predicted = &$input;
9551 debug_assert!(
9552 _pv_predicted.len() > 0,
9553 "Contract mae: precondition violated — predicted.len() > 0"
9554 );
9555 }};
9556}
9557
9558macro_rules! contract_pre_mse {
9561 () => {{}};
9562 ($input:expr) => {{
9563 let _pv_input = &$input;
9564 debug_assert!(_pv_input.len() > 0,
9565 "Contract mse: precondition violated — input.len() > 0");
9566 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
9567 "Contract mse: precondition violated — input.iter().all(|v| v.is_finite())");
9568 }};
9569}
9570
9571macro_rules! contract_pre_r_squared {
9574 () => {{}};
9575 ($input:expr) => {{
9576 let _pv_input = &$input;
9577 debug_assert!(
9578 _pv_input.len() > 0,
9579 "Contract r_squared: precondition violated — input.len() > 0"
9580 );
9581 debug_assert!(
9582 _pv_input.iter().all(|v| v.is_finite()),
9583 "Contract r_squared: precondition violated — input.iter().all(|v| v.is_finite())"
9584 );
9585 }};
9586}
9587
9588macro_rules! contract_pre_rmse {
9591 () => {{}};
9592 ($input:expr) => {{
9593 let _pv_input = &$input;
9594 debug_assert!(
9595 _pv_input.len() > 0,
9596 "Contract rmse: precondition violated — input.len() > 0"
9597 );
9598 debug_assert!(
9599 _pv_input.iter().all(|v| v.is_finite()),
9600 "Contract rmse: precondition violated — input.iter().all(|v| v.is_finite())"
9601 );
9602 }};
9603}
9604
9605macro_rules! contract_pre_bounds {
9611 () => {{}};
9612 ($input:expr) => {{
9613 let _pv_input = &$input;
9614 debug_assert!(
9615 _pv_input.len() > 0,
9616 "Contract bounds: precondition violated — input.len() > 0"
9617 );
9618 }};
9619}
9620
9621macro_rules! contract_pre_cross_constraint {
9624 () => {{}};
9625 ($input:expr) => {{
9626 let _pv_input = &$input;
9627 debug_assert!(
9628 _pv_input.len() > 0,
9629 "Contract cross_constraint: precondition violated — input.len() > 0"
9630 );
9631 }};
9632}
9633
9634macro_rules! contract_pre_divisibility {
9637 () => {{}};
9638 ($input:expr) => {{
9639 let _pv_input = &$input;
9640 debug_assert!(
9641 _pv_input.len() > 0,
9642 "Contract divisibility: precondition violated — input.len() > 0"
9643 );
9644 }};
9645}
9646
9647macro_rules! contract_pre_non_degeneracy {
9650 () => {{}};
9651 ($input:expr) => {{
9652 let _pv_input = &$input;
9653 debug_assert!(
9654 _pv_input.len() > 0,
9655 "Contract non_degeneracy: precondition violated — input.len() > 0"
9656 );
9657 }};
9658}
9659
9660macro_rules! contract_pre_ordering {
9663 () => {{}};
9664 ($input:expr) => {{
9665 let _pv_input = &$input;
9666 debug_assert!(
9667 _pv_input.len() > 0,
9668 "Contract ordering: precondition violated — input.len() > 0"
9669 );
9670 }};
9671}
9672
9673macro_rules! contract_pre_apr_tokenizer_embedding {
9679 () => {{}};
9680 ($input:expr) => {{
9681 let _pv_x = &$input;
9682 }};
9683}
9684
9685macro_rules! contract_post_apr_tokenizer_embedding {
9688 ($result:expr) => {{
9689 let _contract_result = &$result;
9690 }};
9691}
9692
9693macro_rules! contract_apr_tokenizer_embedding {
9695 ($input:expr, $body:expr) => {{
9696 contract_pre_apr_tokenizer_embedding!($input);
9697 let _contract_result = $body;
9698 contract_post_apr_tokenizer_embedding!(_contract_result);
9699 _contract_result
9700 }};
9701}
9702
9703macro_rules! contract_pre_export_fidelity {
9706 () => {{}};
9707 ($input:expr) => {{
9708 let _contract_input = &$input;
9709 }};
9710}
9711
9712macro_rules! contract_post_export_fidelity {
9715 ($result:expr) => {{
9716 let _contract_result = &$result;
9717 }};
9718}
9719
9720macro_rules! contract_export_fidelity {
9722 ($input:expr, $body:expr) => {{
9723 contract_pre_export_fidelity!($input);
9724 let _contract_result = $body;
9725 contract_post_export_fidelity!(_contract_result);
9726 _contract_result
9727 }};
9728}
9729
9730macro_rules! contract_pre_format_conversion_roundtrip {
9733 () => {{}};
9734 ($input:expr) => {{
9735 let _contract_input = &$input;
9736 }};
9737}
9738
9739macro_rules! contract_post_format_conversion_roundtrip {
9742 ($result:expr) => {{
9743 let _contract_result = &$result;
9744 }};
9745}
9746
9747macro_rules! contract_format_conversion_roundtrip {
9749 ($input:expr, $body:expr) => {{
9750 contract_pre_format_conversion_roundtrip!($input);
9751 let _contract_result = $body;
9752 contract_post_format_conversion_roundtrip!(_contract_result);
9753 _contract_result
9754 }};
9755}
9756
9757macro_rules! contract_pre_import_integrity {
9760 () => {{}};
9761 ($input:expr) => {{
9762 let _contract_input = &$input;
9763 }};
9764}
9765
9766macro_rules! contract_post_import_integrity {
9769 ($result:expr) => {{
9770 let _contract_result = &$result;
9771 }};
9772}
9773
9774macro_rules! contract_import_integrity {
9776 ($input:expr, $body:expr) => {{
9777 contract_pre_import_integrity!($input);
9778 let _contract_result = $body;
9779 contract_post_import_integrity!(_contract_result);
9780 _contract_result
9781 }};
9782}
9783
9784macro_rules! contract_pre_merge_weight_algebra {
9787 () => {{}};
9788 ($input:expr) => {{
9789 let _pv_models = &$input;
9790 debug_assert!(
9791 _pv_models.len() >= 2,
9792 "Contract merge_weight_algebra: precondition violated — models.len() >= 2"
9793 );
9794 }};
9795}
9796
9797macro_rules! contract_post_merge_weight_algebra {
9800 ($result:expr) => {{
9801 let _contract_result = &$result;
9802 }};
9803}
9804
9805macro_rules! contract_merge_weight_algebra {
9807 ($input:expr, $body:expr) => {{
9808 contract_pre_merge_weight_algebra!($input);
9809 let _contract_result = $body;
9810 contract_post_merge_weight_algebra!(_contract_result);
9811 _contract_result
9812 }};
9813}
9814
9815macro_rules! contract_pre_quantization_bounds {
9818 () => {{}};
9819 ($input:expr) => {{
9820 let _contract_input = &$input;
9821 }};
9822}
9823
9824macro_rules! contract_post_quantization_bounds {
9827 ($result:expr) => {{
9828 let _contract_result = &$result;
9829 }};
9830}
9831
9832macro_rules! contract_quantization_bounds {
9834 ($input:expr, $body:expr) => {{
9835 contract_pre_quantization_bounds!($input);
9836 let _contract_result = $body;
9837 contract_post_quantization_bounds!(_contract_result);
9838 _contract_result
9839 }};
9840}
9841
9842macro_rules! contract_pre_config_bounds_check {
9848 () => {{}};
9849 ($input:expr) => {{
9850 let _pv_input = &$input;
9851 debug_assert!(
9852 _pv_input.len() > 0,
9853 "Contract config_bounds_check: precondition violated — input.len() > 0"
9854 );
9855 }};
9856}
9857
9858macro_rules! contract_pre_grade_assignment {
9864 () => {{}};
9865 ($input:expr) => {{
9866 let _pv_x = &$input;
9867 }};
9868}
9869
9870macro_rules! contract_pre_mqs_scoring {
9873 () => {{}};
9874 ($input:expr) => {{
9875 let _contract_input = &$input;
9876 }};
9877}
9878
9879macro_rules! contract_pre_regression_detection {
9882 () => {{}};
9883 ($input:expr) => {{
9884 let _contract_input = &$input;
9885 }};
9886}
9887
9888macro_rules! contract_pre_cpu_utilization {
9894 () => {{}};
9895 ($input:expr) => {{
9896 let _contract_input = &$input;
9897 }};
9898}
9899
9900macro_rules! contract_pre_history_persistence {
9903 () => {{}};
9904 ($input:expr) => {{
9905 let _contract_input = &$input;
9906 }};
9907}
9908
9909macro_rules! contract_pre_memory_usage {
9912 () => {{}};
9913 ($input:expr) => {{
9914 let _contract_input = &$input;
9915 }};
9916}
9917
9918macro_rules! contract_pre_mqs_composite {
9924 () => {{}};
9925 ($input:expr) => {{
9926 let _pv_input = &$input;
9927 debug_assert!(
9928 _pv_input.len() > 0,
9929 "Contract mqs_composite: precondition violated — input.len() > 0"
9930 );
9931 debug_assert!(
9932 _pv_input.iter().all(|v| v.is_finite()),
9933 "Contract mqs_composite: precondition violated — input.iter().all(|v| v.is_finite())"
9934 );
9935 }};
9936}
9937
9938macro_rules! contract_pre_mqs_deterministic {
9941 () => {{}};
9942 ($input:expr) => {{
9943 let _pv_input = &$input;
9944 debug_assert!(_pv_input.len() > 0,
9945 "Contract mqs_deterministic: precondition violated — input.len() > 0");
9946 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
9947 "Contract mqs_deterministic: precondition violated — input.iter().all(|v| v.is_finite())");
9948 }};
9949}
9950
9951macro_rules! contract_pre_mqs_grade {
9954 () => {{}};
9955 ($input:expr) => {{
9956 let _pv_grad_output = &$input;
9957 debug_assert!(_pv_grad_output.len() > 0,
9958 "Contract mqs_grade: precondition violated — grad_output.len() > 0");
9959 debug_assert!(_pv_grad_output.iter().all(|v| v.is_finite()),
9960 "Contract mqs_grade: precondition violated — grad_output.iter().all(|v| v.is_finite())");
9961 }};
9962}
9963
9964macro_rules! contract_pre_mqs_pass_rate {
9967 () => {{}};
9968 ($input:expr) => {{
9969 let _pv_input = &$input;
9970 debug_assert!(
9971 _pv_input.len() > 0,
9972 "Contract mqs_pass_rate: precondition violated — input.len() > 0"
9973 );
9974 debug_assert!(
9975 _pv_input.iter().all(|v| v.is_finite()),
9976 "Contract mqs_pass_rate: precondition violated — input.iter().all(|v| v.is_finite())"
9977 );
9978 }};
9979}
9980
9981macro_rules! contract_pre_mqs_composite {
9987 () => {{}};
9988 ($input:expr) => {{
9989 let _pv_x = &$input;
9990 }};
9991}
9992
9993macro_rules! contract_post_mqs_composite {
9996 ($result:expr) => {{
9997 let _contract_result = &$result;
9998 }};
9999}
10000
10001macro_rules! contract_mqs_composite {
10003 ($input:expr, $body:expr) => {{
10004 contract_pre_mqs_composite!($input);
10005 let _contract_result = $body;
10006 contract_post_mqs_composite!(_contract_result);
10007 _contract_result
10008 }};
10009}
10010
10011macro_rules! contract_pre_mqs_deterministic {
10014 () => {{}};
10015 ($input:expr) => {{
10016 let _contract_input = &$input;
10017 }};
10018}
10019
10020macro_rules! contract_post_mqs_deterministic {
10023 ($result:expr) => {{
10024 let _contract_result = &$result;
10025 }};
10026}
10027
10028macro_rules! contract_mqs_deterministic {
10030 ($input:expr, $body:expr) => {{
10031 contract_pre_mqs_deterministic!($input);
10032 let _contract_result = $body;
10033 contract_post_mqs_deterministic!(_contract_result);
10034 _contract_result
10035 }};
10036}
10037
10038macro_rules! contract_pre_mqs_grade {
10041 () => {{}};
10042 ($input:expr) => {{
10043 let _pv_x = &$input;
10044 }};
10045}
10046
10047macro_rules! contract_post_mqs_grade {
10050 ($result:expr) => {{
10051 let _contract_result = &$result;
10052 }};
10053}
10054
10055macro_rules! contract_mqs_grade {
10057 ($input:expr, $body:expr) => {{
10058 contract_pre_mqs_grade!($input);
10059 let _contract_result = $body;
10060 contract_post_mqs_grade!(_contract_result);
10061 _contract_result
10062 }};
10063}
10064
10065macro_rules! contract_pre_class_prior {
10071 () => {{}};
10072 ($input:expr) => {{
10073 let _pv_input = &$input;
10074 debug_assert!(
10075 _pv_input.len() > 0,
10076 "Contract class_prior: precondition violated — input.len() > 0"
10077 );
10078 debug_assert!(
10079 _pv_input.iter().all(|v| v.is_finite()),
10080 "Contract class_prior: precondition violated — input.iter().all(|v| v.is_finite())"
10081 );
10082 }};
10083}
10084
10085macro_rules! contract_pre_gaussian_likelihood {
10088 () => {{}};
10089 ($input:expr) => {{
10090 let _pv_input = &$input;
10091 debug_assert!(_pv_input.len() > 0,
10092 "Contract gaussian_likelihood: precondition violated — input.len() > 0");
10093 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
10094 "Contract gaussian_likelihood: precondition violated — input.iter().all(|v| v.is_finite())");
10095 }};
10096}
10097
10098macro_rules! contract_pre_log_posterior {
10101 () => {{}};
10102 ($input:expr) => {{
10103 let _pv_input = &$input;
10104 debug_assert!(
10105 _pv_input.len() > 0,
10106 "Contract log_posterior: precondition violated — input.len() > 0"
10107 );
10108 debug_assert!(
10109 _pv_input.iter().all(|v| v.is_finite()),
10110 "Contract log_posterior: precondition violated — input.iter().all(|v| v.is_finite())"
10111 );
10112 }};
10113}
10114
10115macro_rules! contract_pre_connect_lifecycle {
10121 () => {{}};
10122 ($input:expr) => {{
10123 let _contract_input = &$input;
10124 }};
10125}
10126
10127macro_rules! contract_pre_send_isolation {
10130 () => {{}};
10131 ($input:expr) => {{
10132 let _pv_data = &$input;
10133 debug_assert!(
10134 _pv_data.len() > 0,
10135 "Contract send_isolation: precondition violated — data.len() > 0"
10136 );
10137 }};
10138}
10139
10140macro_rules! contract_pre_layer_cache_hit {
10146 () => {{}};
10147 ($input:expr) => {{
10148 let _contract_input = &$input;
10149 }};
10150}
10151
10152macro_rules! contract_pre_layer_ordering {
10155 () => {{}};
10156 ($input:expr) => {{
10157 let _pv_layers = &$input;
10158 debug_assert!(
10159 _pv_layers.len() > 0,
10160 "Contract layer_ordering: precondition violated — layers.len() > 0"
10161 );
10162 }};
10163}
10164
10165macro_rules! contract_pre_manifest_digest_consistency {
10168 () => {{}};
10169 ($input:expr) => {{
10170 let _pv_manifest = &$input;
10171 }};
10172}
10173
10174macro_rules! contract_pre_reproducible_build {
10177 () => {{}};
10178 ($input:expr) => {{
10179 let _contract_input = &$input;
10180 }};
10181}
10182
10183macro_rules! contract_pre_online_normalizer {
10189 () => {{}};
10190 ($input:expr) => {{
10191 let _pv_x = &$input;
10192 debug_assert!(
10193 _pv_x.iter().all(|v| v.is_finite()),
10194 "Contract online_normalizer: precondition violated — x.iter().all(|v| v.is_finite())"
10195 );
10196 debug_assert!(
10197 _pv_x.len() > 0,
10198 "Contract online_normalizer: precondition violated — x.len() > 0"
10199 );
10200 }};
10201}
10202
10203macro_rules! contract_pre_standard_softmax {
10206 () => {{}};
10207 ($input:expr) => {{
10208 let _pv_x = &$input;
10209 debug_assert!(
10210 _pv_x.iter().all(|v| v.is_finite()),
10211 "Contract standard_softmax: precondition violated — x.iter().all(|v| v.is_finite())"
10212 );
10213 debug_assert!(
10214 _pv_x.len() > 0,
10215 "Contract standard_softmax: precondition violated — x.len() > 0"
10216 );
10217 }};
10218}
10219
10220macro_rules! contract_pre_cg_minimize {
10226 () => {{}};
10227 ($input:expr) => {{
10228 let _pv_params = &$input;
10229 debug_assert!(
10230 _pv_params.len() > 0,
10231 "Contract cg_minimize: precondition violated — params.len() > 0"
10232 );
10233 }};
10234}
10235
10236macro_rules! contract_pre_convergence {
10239 () => {{}};
10240 ($input:expr) => {{
10241 let _pv_params = &$input;
10242 debug_assert!(
10243 _pv_params.len() > 0,
10244 "Contract convergence: precondition violated — params.len() > 0"
10245 );
10246 }};
10247}
10248
10249macro_rules! contract_pre_line_search {
10252 () => {{}};
10253 ($input:expr) => {{
10254 let _pv_params = &$input;
10255 debug_assert!(
10256 _pv_params.len() > 0,
10257 "Contract line_search: precondition violated — params.len() > 0"
10258 );
10259 }};
10260}
10261
10262macro_rules! contract_pre_pull_resolve {
10268 () => {{}};
10269 ($input:expr) => {{
10270 let _contract_input = &$input;
10271 }};
10272}
10273
10274macro_rules! contract_pre_registry_list {
10277 () => {{}};
10278 ($input:expr) => {{
10279 let _contract_input = &$input;
10280 }};
10281}
10282
10283macro_rules! contract_pre_run_tracking {
10286 () => {{}};
10287 ($input:expr) => {{
10288 let _contract_input = &$input;
10289 }};
10290}
10291
10292macro_rules! contract_pre_block_allocation {
10298 () => {{}};
10299 ($input:expr) => {{
10300 let _pv_q = &$input;
10301 debug_assert!(
10302 _pv_q.len() > 0,
10303 "Contract block_allocation: precondition violated — q.len() > 0"
10304 );
10305 }};
10306}
10307
10308macro_rules! contract_pre_block_table_lookup {
10311 () => {{}};
10312 ($input:expr) => {{
10313 let _pv_q = &$input;
10314 debug_assert!(
10315 _pv_q.len() > 0,
10316 "Contract block_table_lookup: precondition violated — q.len() > 0"
10317 );
10318 }};
10319}
10320
10321macro_rules! contract_pre_copy_on_write {
10324 () => {{}};
10325 ($input:expr) => {{
10326 let _pv_q = &$input;
10327 debug_assert!(
10328 _pv_q.len() > 0,
10329 "Contract copy_on_write: precondition violated — q.len() > 0"
10330 );
10331 }};
10332}
10333
10334macro_rules! contract_pre_block_allocation {
10340 () => {{}};
10341 ($input:expr) => {{
10342 let _pv_q = &$input;
10343 debug_assert!(
10344 _pv_q.len() > 0,
10345 "Contract block_allocation: precondition violated — q.len() > 0"
10346 );
10347 }};
10348}
10349
10350macro_rules! contract_pre_block_table_invariant {
10353 () => {{}};
10354 ($input:expr) => {{
10355 let _pv_q = &$input;
10356 debug_assert!(
10357 _pv_q.len() > 0,
10358 "Contract block_table_invariant: precondition violated — q.len() > 0"
10359 );
10360 }};
10361}
10362
10363macro_rules! contract_pre_fragmentation_free {
10366 () => {{}};
10367 ($input:expr) => {{
10368 let _pv_q = &$input;
10369 debug_assert!(
10370 _pv_q.len() > 0,
10371 "Contract fragmentation_free: precondition violated — q.len() > 0"
10372 );
10373 }};
10374}
10375
10376macro_rules! contract_pre_graph_compatibility {
10379 () => {{}};
10380 ($input:expr) => {{
10381 let _contract_input = &$input;
10382 }};
10383}
10384
10385macro_rules! contract_pre_paged_contiguous_equivalence {
10388 () => {{}};
10389 ($input:expr) => {{
10390 let _contract_input = &$input;
10391 }};
10392}
10393
10394macro_rules! contract_pre_slot_mapping {
10397 () => {{}};
10398 ($input:expr) => {{
10399 let _pv_q = &$input;
10400 debug_assert!(
10401 _pv_q.len() > 0,
10402 "Contract slot_mapping: precondition violated — q.len() > 0"
10403 );
10404 }};
10405}
10406
10407macro_rules! contract_pre_bfs {
10413 () => {{}};
10414 ($input:expr) => {{
10415 let _contract_input = &$input;
10416 }};
10417}
10418
10419macro_rules! contract_pre_pagerank {
10422 () => {{}};
10423 ($input:expr) => {{
10424 let _pv_x = &$input;
10425 }};
10426}
10427
10428macro_rules! contract_pre_pagerank {
10434 () => {{}};
10435 ($input:expr) => {{
10436 let _contract_input = &$input;
10437 }};
10438}
10439
10440macro_rules! contract_pre_power_iteration {
10443 () => {{}};
10444 ($input:expr) => {{
10445 let _contract_input = &$input;
10446 }};
10447}
10448
10449macro_rules! contract_pre_lex {
10455 () => {{}};
10456 ($input:expr) => {{
10457 let _pv_input = &$input;
10458 debug_assert!(_pv_input.len() > 0,
10459 "Contract lex: precondition violated — input.len() > 0");
10460 }};
10461}
10462
10463macro_rules! contract_pre_parse {
10466 () => {{}};
10467 ($input:expr) => {{
10468 let _pv_input = &$input;
10469 debug_assert!(
10470 _pv_input.len() > 0,
10471 "Contract parse: precondition violated — input.len() > 0"
10472 );
10473 }};
10474}
10475
10476macro_rules! contract_pre_semantic_analyze {
10479 () => {{}};
10480 ($input:expr) => {{
10481 let _pv_input = &$input;
10482 debug_assert!(
10483 _pv_input.len() > 0,
10484 "Contract semantic_analyze: precondition violated — input.len() > 0"
10485 );
10486 }};
10487}
10488
10489macro_rules! contract_pre_block_scoping {
10495 () => {{}};
10496 ($input:expr) => {{
10497 let _contract_input = &$input;
10498 }};
10499}
10500
10501macro_rules! contract_pre_parse_correctness {
10504 () => {{}};
10505 ($input:expr) => {{
10506 let _contract_input = &$input;
10507 }};
10508}
10509
10510macro_rules! contract_pre_transpile_roundtrip {
10513 () => {{}};
10514 ($input:expr) => {{
10515 let _contract_input = &$input;
10516 }};
10517}
10518
10519macro_rules! contract_pre_explained_variance {
10525 () => {{}};
10526 ($input:expr) => {{
10527 let _pv_input = &$input;
10528 debug_assert!(_pv_input.len() > 0,
10529 "Contract explained_variance: precondition violated — input.len() > 0");
10530 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
10531 "Contract explained_variance: precondition violated — input.iter().all(|v| v.is_finite())");
10532 }};
10533}
10534
10535macro_rules! contract_pre_pca_transform {
10538 () => {{}};
10539 ($input:expr) => {{
10540 let _pv_a = &$input;
10541 debug_assert!(
10542 _pv_a.len() > 0,
10543 "Contract pca_transform: precondition violated — a.len() > 0"
10544 );
10545 }};
10546}
10547
10548macro_rules! contract_pre_reconstruction {
10551 () => {{}};
10552 ($input:expr) => {{
10553 let _pv_a = &$input;
10554 debug_assert!(
10555 _pv_a.len() > 0,
10556 "Contract reconstruction: precondition violated — a.len() > 0"
10557 );
10558 }};
10559}
10560
10561macro_rules! contract_pre_concrete_instance {
10567 () => {{}};
10568 ($input:expr) => {{
10569 let _pv_grad_output = &$input;
10570 debug_assert!(_pv_grad_output.len() > 0,
10571 "Contract concrete_instance: precondition violated — grad_output.len() > 0");
10572 debug_assert!(_pv_grad_output.iter().all(|v| v.is_finite()),
10573 "Contract concrete_instance: precondition violated — grad_output.iter().all(|v| v.is_finite())");
10574 }};
10575}
10576
10577macro_rules! contract_pre_efficiency_grade {
10580 () => {{}};
10581 ($input:expr) => {{
10582 let _pv_grad_output = &$input;
10583 debug_assert!(_pv_grad_output.len() > 0,
10584 "Contract efficiency_grade: precondition violated — grad_output.len() > 0");
10585 debug_assert!(_pv_grad_output.iter().all(|v| v.is_finite()),
10586 "Contract efficiency_grade: precondition violated — grad_output.iter().all(|v| v.is_finite())");
10587 }};
10588}
10589
10590macro_rules! contract_pre_llamacpp_parity {
10593 () => {{}};
10594 ($input:expr) => {{
10595 let _pv_grad_output = &$input;
10596 debug_assert!(_pv_grad_output.len() > 0,
10597 "Contract llamacpp_parity: precondition violated — grad_output.len() > 0");
10598 debug_assert!(_pv_grad_output.iter().all(|v| v.is_finite()),
10599 "Contract llamacpp_parity: precondition violated — grad_output.iter().all(|v| v.is_finite())");
10600 }};
10601}
10602
10603macro_rules! contract_pre_ollama_parity {
10606 () => {{}};
10607 ($input:expr) => {{
10608 let _pv_grad_output = &$input;
10609 debug_assert!(_pv_grad_output.len() > 0,
10610 "Contract ollama_parity: precondition violated — grad_output.len() > 0");
10611 debug_assert!(_pv_grad_output.iter().all(|v| v.is_finite()),
10612 "Contract ollama_parity: precondition violated — grad_output.iter().all(|v| v.is_finite())");
10613 }};
10614}
10615
10616macro_rules! contract_pre_vllm_parity {
10619 () => {{}};
10620 ($input:expr) => {{
10621 let _pv_grad_output = &$input;
10622 debug_assert!(_pv_grad_output.len() > 0,
10623 "Contract vllm_parity: precondition violated — grad_output.len() > 0");
10624 debug_assert!(_pv_grad_output.iter().all(|v| v.is_finite()),
10625 "Contract vllm_parity: precondition violated — grad_output.iter().all(|v| v.is_finite())");
10626 }};
10627}
10628
10629macro_rules! contract_pre_identity {
10635 () => {{}};
10636 ($input:expr) => {{
10637 let _contract_input = &$input;
10638 }};
10639}
10640
10641macro_rules! contract_pre_lifecycle_state_machine {
10647 () => {{}};
10648 ($input:expr) => {{
10649 let _contract_input = &$input;
10650 }};
10651}
10652
10653macro_rules! contract_pre_permission_scoping {
10656 () => {{}};
10657 ($input:expr) => {{
10658 let _pv_plugin = &$input;
10659 }};
10660}
10661
10662macro_rules! contract_pre_schema_validation {
10665 () => {{}};
10666 ($input:expr) => {{
10667 let _pv_schema = &$input;
10668 }};
10669}
10670
10671macro_rules! contract_pre_baseline_integrity {
10677 () => {{}};
10678 ($input:expr) => {{
10679 let _contract_input = &$input;
10680 }};
10681}
10682
10683macro_rules! contract_post_baseline_integrity {
10686 ($result:expr) => {{
10687 let _contract_result = &$result;
10688 }};
10689}
10690
10691macro_rules! contract_baseline_integrity {
10693 ($input:expr, $body:expr) => {{
10694 contract_pre_baseline_integrity!($input);
10695 let _contract_result = $body;
10696 contract_post_baseline_integrity!(_contract_result);
10697 _contract_result
10698 }};
10699}
10700
10701macro_rules! contract_pre_contract_immutability {
10704 () => {{}};
10705 ($input:expr) => {{
10706 let _pv_x = &$input;
10707 }};
10708}
10709
10710macro_rules! contract_post_contract_immutability {
10713 ($result:expr) => {{
10714 let _contract_result = &$result;
10715 }};
10716}
10717
10718macro_rules! contract_contract_immutability {
10720 ($input:expr, $body:expr) => {{
10721 contract_pre_contract_immutability!($input);
10722 let _contract_result = $body;
10723 contract_post_contract_immutability!(_contract_result);
10724 _contract_result
10725 }};
10726}
10727
10728macro_rules! contract_pre_falsification_completeness {
10731 () => {{}};
10732 ($input:expr) => {{
10733 let _contract_input = &$input;
10734 }};
10735}
10736
10737macro_rules! contract_post_falsification_completeness {
10740 ($result:expr) => {{
10741 let _contract_result = &$result;
10742 }};
10743}
10744
10745macro_rules! contract_falsification_completeness {
10747 ($input:expr, $body:expr) => {{
10748 contract_pre_falsification_completeness!($input);
10749 let _contract_result = $body;
10750 contract_post_falsification_completeness!(_contract_result);
10751 _contract_result
10752 }};
10753}
10754
10755macro_rules! contract_pre_monotonic_ledger {
10758 () => {{}};
10759 ($input:expr) => {{
10760 let _contract_input = &$input;
10761 }};
10762}
10763
10764macro_rules! contract_post_monotonic_ledger {
10767 ($result:expr) => {{
10768 let _contract_result = &$result;
10769 }};
10770}
10771
10772macro_rules! contract_monotonic_ledger {
10774 ($input:expr, $body:expr) => {{
10775 contract_pre_monotonic_ledger!($input);
10776 let _contract_result = $body;
10777 contract_post_monotonic_ledger!(_contract_result);
10778 _contract_result
10779 }};
10780}
10781
10782macro_rules! contract_pre_profile_determinism {
10785 () => {{}};
10786 ($input:expr) => {{
10787 let _contract_input = &$input;
10788 }};
10789}
10790
10791macro_rules! contract_post_profile_determinism {
10794 ($result:expr) => {{
10795 let _contract_result = &$result;
10796 }};
10797}
10798
10799macro_rules! contract_profile_determinism {
10801 ($input:expr, $body:expr) => {{
10802 contract_pre_profile_determinism!($input);
10803 let _contract_result = $body;
10804 contract_post_profile_determinism!(_contract_result);
10805 _contract_result
10806 }};
10807}
10808
10809macro_rules! contract_pre_rescue_bound {
10812 () => {{}};
10813 ($input:expr) => {{
10814 let _contract_input = &$input;
10815 }};
10816}
10817
10818macro_rules! contract_post_rescue_bound {
10821 ($result:expr) => {{
10822 let _contract_result = &$result;
10823 }};
10824}
10825
10826macro_rules! contract_rescue_bound {
10828 ($input:expr, $body:expr) => {{
10829 contract_pre_rescue_bound!($input);
10830 let _contract_result = $body;
10831 contract_post_rescue_bound!(_contract_result);
10832 _contract_result
10833 }};
10834}
10835
10836macro_rules! contract_pre_subcontracting_soundness {
10839 () => {{}};
10840 ($input:expr) => {{
10841 let _contract_input = &$input;
10842 }};
10843}
10844
10845macro_rules! contract_post_subcontracting_soundness {
10848 ($result:expr) => {{
10849 let _contract_result = &$result;
10850 }};
10851}
10852
10853macro_rules! contract_subcontracting_soundness {
10855 ($input:expr, $body:expr) => {{
10856 contract_pre_subcontracting_soundness!($input);
10857 let _contract_result = $body;
10858 contract_post_subcontracting_soundness!(_contract_result);
10859 _contract_result
10860 }};
10861}
10862
10863macro_rules! contract_pre_minmax_scaler {
10869 () => {{}};
10870 ($input:expr) => {{
10871 let _pv_input = &$input;
10872 debug_assert!(
10873 _pv_input.iter().all(|v| v.is_finite()),
10874 "Contract minmax_scaler: precondition violated — input.iter().all(|v| v.is_finite())"
10875 );
10876 debug_assert!(
10877 _pv_input.len() > 0,
10878 "Contract minmax_scaler: precondition violated — input.len() > 0"
10879 );
10880 }};
10881}
10882
10883macro_rules! contract_pre_robust_scaler {
10886 () => {{}};
10887 ($input:expr) => {{
10888 let _pv_input = &$input;
10889 debug_assert!(
10890 _pv_input.iter().all(|v| v.is_finite()),
10891 "Contract robust_scaler: precondition violated — input.iter().all(|v| v.is_finite())"
10892 );
10893 debug_assert!(
10894 _pv_input.len() > 0,
10895 "Contract robust_scaler: precondition violated — input.len() > 0"
10896 );
10897 }};
10898}
10899
10900macro_rules! contract_pre_standard_scaler {
10903 () => {{}};
10904 ($input:expr) => {{
10905 let _pv_input = &$input;
10906 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
10907 "Contract standard_scaler: precondition violated — input.iter().all(|v| v.is_finite())");
10908 debug_assert!(_pv_input.len() > 0,
10909 "Contract standard_scaler: precondition violated — input.len() > 0");
10910 }};
10911}
10912
10913macro_rules! contract_pre_assertion_evaluation {
10919 () => {{}};
10920 ($input:expr) => {{
10921 let _pv_x = &$input;
10922 }};
10923}
10924
10925macro_rules! contract_pre_coverage_collection {
10928 () => {{}};
10929 ($input:expr) => {{
10930 let _contract_input = &$input;
10931 }};
10932}
10933
10934macro_rules! contract_pre_playbook_state_machine {
10937 () => {{}};
10938 ($input:expr) => {{
10939 let _contract_input = &$input;
10940 }};
10941}
10942
10943macro_rules! contract_pre_retry_assertion {
10946 () => {{}};
10947 ($input:expr) => {{
10948 let _contract_input = &$input;
10949 }};
10950}
10951
10952macro_rules! contract_pre_soft_assertion_collection {
10955 () => {{}};
10956 ($input:expr) => {{
10957 let _contract_input = &$input;
10958 }};
10959}
10960
10961macro_rules! contract_pre_test_result_reporting {
10964 () => {{}};
10965 ($input:expr) => {{
10966 let _contract_input = &$input;
10967 }};
10968}
10969
10970macro_rules! contract_pre_backoff_jitter {
10976 () => {{}};
10977 ($input:expr) => {{
10978 let _contract_input = &$input;
10979 }};
10980}
10981
10982macro_rules! contract_post_cost_budget {
10985 ($result:expr) => {{
10986 let _contract_result = &$result;
10987 }};
10988}
10989
10990macro_rules! contract_pre_failover_cascade {
10993 () => {{}};
10994 ($input:expr) => {{
10995 let _pv_providers = &$input;
10996 debug_assert!(
10997 _pv_providers.len() > 0,
10998 "Contract failover_cascade: precondition violated — providers.len() > 0"
10999 );
11000 }};
11001}
11002
11003macro_rules! contract_pre_privacy_enforcement {
11006 () => {{}};
11007 ($input:expr) => {{
11008 let _pv_request = &$input;
11009 }};
11010}
11011
11012macro_rules! contract_post_privacy_enforcement {
11015 ($result:expr) => {{
11016 let _contract_result = &$result;
11017 }};
11018}
11019
11020macro_rules! contract_privacy_enforcement {
11022 ($input:expr, $body:expr) => {{
11023 contract_pre_privacy_enforcement!($input);
11024 let _contract_result = $body;
11025 contract_post_privacy_enforcement!(_contract_result);
11026 _contract_result
11027 }};
11028}
11029
11030macro_rules! contract_pre_jit_compilation_success {
11036 () => {{}};
11037 ($input:expr) => {{
11038 let _pv_input = &$input;
11039 debug_assert!(_pv_input.len() > 0,
11040 "Contract jit_compilation_success: precondition violated — input.len() > 0");
11041 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
11042 "Contract jit_compilation_success: precondition violated — input.iter().all(|v| v.is_finite())");
11043 }};
11044}
11045
11046macro_rules! contract_pre_no_hardcoded_targets {
11049 () => {{}};
11050 ($input:expr) => {{
11051 let _pv_input = &$input;
11052 debug_assert!(_pv_input.len() > 0,
11053 "Contract no_hardcoded_targets: precondition violated — input.len() > 0");
11054 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
11055 "Contract no_hardcoded_targets: precondition violated — input.iter().all(|v| v.is_finite())");
11056 }};
11057}
11058
11059macro_rules! contract_pre_target_parity {
11062 () => {{}};
11063 ($input:expr) => {{
11064 let _pv_input = &$input;
11065 debug_assert!(
11066 _pv_input.len() > 0,
11067 "Contract target_parity: precondition violated — input.len() > 0"
11068 );
11069 debug_assert!(
11070 _pv_input.iter().all(|v| v.is_finite()),
11071 "Contract target_parity: precondition violated — input.iter().all(|v| v.is_finite())"
11072 );
11073 }};
11074}
11075
11076macro_rules! contract_pre_bsum {
11082 () => {{}};
11083 ($input:expr) => {{
11084 let _pv_input = &$input;
11085 debug_assert!(
11086 _pv_input.len() > 0,
11087 "Contract bsum: precondition violated — input.len() > 0"
11088 );
11089 }};
11090}
11091
11092macro_rules! contract_pre_dequantization {
11095 () => {{}};
11096 ($input:expr) => {{
11097 let _pv_input = &$input;
11098 debug_assert!(
11099 _pv_input.len() > 0,
11100 "Contract dequantization: precondition violated — input.len() > 0"
11101 );
11102 }};
11103}
11104
11105macro_rules! contract_pre_q4k_superblock {
11108 () => {{}};
11109 ($input:expr) => {{
11110 let _pv_input = &$input;
11111 debug_assert!(
11112 _pv_input.len() > 0,
11113 "Contract q4k_superblock: precondition violated — input.len() > 0"
11114 );
11115 }};
11116}
11117
11118macro_rules! contract_pre_q6k_superblock {
11121 () => {{}};
11122 ($input:expr) => {{
11123 let _pv_input = &$input;
11124 debug_assert!(
11125 _pv_input.len() > 0,
11126 "Contract q6k_superblock: precondition violated — input.len() > 0"
11127 );
11128 }};
11129}
11130
11131macro_rules! contract_pre_total_bytes {
11134 () => {{}};
11135 ($input:expr) => {{
11136 let _pv_input = &$input;
11137 debug_assert!(
11138 _pv_input.len() > 0,
11139 "Contract total_bytes: precondition violated — input.len() > 0"
11140 );
11141 }};
11142}
11143
11144macro_rules! contract_pre_qk_norm_load {
11150 () => {{}};
11151 ($input:expr) => {{
11152 let _pv_input = &$input;
11153 debug_assert!(
11154 _pv_input.iter().all(|v| v.is_finite()),
11155 "Contract qk_norm_load: precondition violated — input.iter().all(|v| v.is_finite())"
11156 );
11157 debug_assert!(
11158 _pv_input.len() > 0,
11159 "Contract qk_norm_load: precondition violated — input.len() > 0"
11160 );
11161 }};
11162}
11163
11164macro_rules! contract_pre_qk_rmsnorm {
11170 () => {{}};
11171 ($input:expr) => {{
11172 let _pv_input = &$input;
11173 debug_assert!(
11174 _pv_input.iter().all(|v| v.is_finite()),
11175 "Contract qk_rmsnorm: precondition violated — input.iter().all(|v| v.is_finite())"
11176 );
11177 debug_assert!(
11178 _pv_input.len() > 0,
11179 "Contract qk_rmsnorm: precondition violated — input.len() > 0"
11180 );
11181 }};
11182}
11183
11184macro_rules! contract_pre_effective_batch_size {
11190 () => {{}};
11191 ($input:expr) => {{
11192 let _pv_params = &$input;
11193 debug_assert!(
11194 _pv_params.len() > 0,
11195 "Contract effective_batch_size: precondition violated — params.len() > 0"
11196 );
11197 }};
11198}
11199
11200macro_rules! contract_pre_epoch_count_imbalanced {
11203 () => {{}};
11204 ($input:expr) => {{
11205 let _pv_params = &$input;
11206 debug_assert!(
11207 _pv_params.len() > 0,
11208 "Contract epoch_count_imbalanced: precondition violated — params.len() > 0"
11209 );
11210 }};
11211}
11212
11213macro_rules! contract_pre_gradient_clip_bound {
11216 () => {{}};
11217 ($input:expr) => {{
11218 let _pv_params = &$input;
11219 debug_assert!(
11220 _pv_params.len() > 0,
11221 "Contract gradient_clip_bound: precondition violated — params.len() > 0"
11222 );
11223 }};
11224}
11225
11226macro_rules! contract_pre_learning_rate_scaling {
11229 () => {{}};
11230 ($input:expr) => {{
11231 let _pv_params = &$input;
11232 debug_assert!(
11233 _pv_params.len() > 0,
11234 "Contract learning_rate_scaling: precondition violated — params.len() > 0"
11235 );
11236 }};
11237}
11238
11239macro_rules! contract_pre_lora_alpha_ratio {
11242 () => {{}};
11243 ($input:expr) => {{
11244 let _pv_params = &$input;
11245 debug_assert!(
11246 _pv_params.len() > 0,
11247 "Contract lora_alpha_ratio: precondition violated — params.len() > 0"
11248 );
11249 }};
11250}
11251
11252macro_rules! contract_pre_seq_len_from_data {
11255 () => {{}};
11256 ($input:expr) => {{
11257 let _pv_params = &$input;
11258 debug_assert!(
11259 _pv_params.len() > 0,
11260 "Contract seq_len_from_data: precondition violated — params.len() > 0"
11261 );
11262 }};
11263}
11264
11265macro_rules! contract_pre_warmup_fraction {
11268 () => {{}};
11269 ($input:expr) => {{
11270 let _pv_params = &$input;
11271 debug_assert!(
11272 _pv_params.len() > 0,
11273 "Contract warmup_fraction: precondition violated — params.len() > 0"
11274 );
11275 }};
11276}
11277
11278macro_rules! contract_pre_gate_composition {
11284 () => {{}};
11285 ($input:expr) => {{
11286 let _contract_input = &$input;
11287 }};
11288}
11289
11290macro_rules! contract_pre_validate_index {
11293 () => {{}};
11294 ($input:expr) => {{
11295 let _contract_input = &$input;
11296 }};
11297}
11298
11299macro_rules! contract_pre_validate_size {
11302 () => {{}};
11303 ($input:expr) => {{
11304 let _contract_input = &$input;
11305 }};
11306}
11307
11308macro_rules! contract_pre_alpha_scaling {
11314 () => {{}};
11315 ($input:expr) => {{
11316 let _pv_input = &$input;
11317 debug_assert!(
11318 _pv_input.len() > 0,
11319 "Contract alpha_scaling: precondition violated — input.len() > 0"
11320 );
11321 }};
11322}
11323
11324macro_rules! contract_pre_bytes_per_param {
11327 () => {{}};
11328 ($input:expr) => {{
11329 let _pv_input = &$input;
11330 debug_assert!(
11331 _pv_input.len() > 0,
11332 "Contract bytes_per_param: precondition violated — input.len() > 0"
11333 );
11334 }};
11335}
11336
11337macro_rules! contract_pre_dropout_expectation {
11340 () => {{}};
11341 ($input:expr) => {{
11342 let _pv_x = &$input;
11343 debug_assert!(_pv_x.iter().all(|v| v.is_finite()),
11344 "Contract dropout_expectation: precondition violated — x.iter().all(|v| v.is_finite())");
11345 debug_assert!(_pv_x.len() > 0,
11346 "Contract dropout_expectation: precondition violated — x.len() > 0");
11347 }};
11348}
11349
11350macro_rules! contract_pre_size_ordering {
11353 () => {{}};
11354 ($input:expr) => {{
11355 let _pv_input = &$input;
11356 debug_assert!(
11357 _pv_input.len() > 0,
11358 "Contract size_ordering: precondition violated — input.len() > 0"
11359 );
11360 }};
11361}
11362
11363macro_rules! contract_pre_bsum_decomposition {
11369 () => {{}};
11370 ($input:expr) => {{
11371 let _pv_activations = &$input;
11372 }};
11373}
11374
11375macro_rules! contract_pre_format_isolation {
11378 () => {{}};
11379 ($input:expr) => {{
11380 let _contract_input = &$input;
11381 }};
11382}
11383
11384macro_rules! contract_pre_identity {
11387 () => {{}};
11388 ($input:expr) => {{
11389 let _pv_input = &$input;
11390 debug_assert!(
11391 _pv_input.len() > 0,
11392 "Contract identity: precondition violated — input.len() > 0"
11393 );
11394 }};
11395}
11396
11397macro_rules! contract_pre_simd_scalar_equivalence {
11400 () => {{}};
11401 ($input:expr) => {{
11402 let _pv_data = &$input;
11403 }};
11404}
11405
11406macro_rules! contract_pre_contract_composition {
11412 () => {{}};
11413 ($input:expr) => {{
11414 let _pv_indices = &$input;
11415 debug_assert!(
11416 _pv_indices.len() > 0,
11417 "Contract contract_composition: precondition violated — indices.len() > 0"
11418 );
11419 }};
11420}
11421
11422macro_rules! contract_pre_flops_per_token {
11425 () => {{}};
11426 ($input:expr) => {{
11427 let _pv_input = &$input;
11428 debug_assert!(
11429 _pv_input.len() > 0,
11430 "Contract flops_per_token: precondition violated — input.len() > 0"
11431 );
11432 }};
11433}
11434
11435macro_rules! contract_pre_memory_breakdown {
11438 () => {{}};
11439 ($input:expr) => {{
11440 let _pv_input = &$input;
11441 debug_assert!(
11442 _pv_input.len() > 0,
11443 "Contract memory_breakdown: precondition violated — input.len() > 0"
11444 );
11445 }};
11446}
11447
11448macro_rules! contract_pre_model_parameter_count {
11451 () => {{}};
11452 ($input:expr) => {{
11453 let _pv_input = &$input;
11454 debug_assert!(
11455 _pv_input.len() > 0,
11456 "Contract model_parameter_count: precondition violated — input.len() > 0"
11457 );
11458 }};
11459}
11460
11461macro_rules! contract_pre_throughput_model {
11464 () => {{}};
11465 ($input:expr) => {{
11466 let _pv_input = &$input;
11467 debug_assert!(
11468 _pv_input.len() > 0,
11469 "Contract throughput_model: precondition violated — input.len() > 0"
11470 );
11471 }};
11472}
11473
11474macro_rules! contract_pre_verification_ladder {
11477 () => {{}};
11478 ($input:expr) => {{
11479 let _pv_input = &$input;
11480 debug_assert!(
11481 _pv_input.len() > 0,
11482 "Contract verification_ladder: precondition violated — input.len() > 0"
11483 );
11484 }};
11485}
11486
11487macro_rules! contract_pre_head_dim_consistency {
11493 () => {{}};
11494 ($input:expr) => {{
11495 let _pv_input = &$input;
11496 debug_assert!(
11497 _pv_input.len() > 0,
11498 "Contract head_dim_consistency: precondition violated — input.len() > 0"
11499 );
11500 }};
11501}
11502
11503macro_rules! contract_pre_kv_projection_shape {
11506 () => {{}};
11507 ($input:expr) => {{
11508 let _pv_input = &$input;
11509 debug_assert!(
11510 _pv_input.len() > 0,
11511 "Contract kv_projection_shape: precondition violated — input.len() > 0"
11512 );
11513 }};
11514}
11515
11516macro_rules! contract_pre_o_projection_transpose {
11519 () => {{}};
11520 ($input:expr) => {{
11521 let _pv_a = &$input;
11522 debug_assert!(
11523 _pv_a.len() > 0,
11524 "Contract o_projection_transpose: precondition violated — a.len() > 0"
11525 );
11526 }};
11527}
11528
11529macro_rules! contract_pre_q_projection_shape {
11532 () => {{}};
11533 ($input:expr) => {{
11534 let _pv_input = &$input;
11535 debug_assert!(
11536 _pv_input.len() > 0,
11537 "Contract q_projection_shape: precondition violated — input.len() > 0"
11538 );
11539 }};
11540}
11541
11542macro_rules! contract_pre_rope_frequency {
11545 () => {{}};
11546 ($input:expr) => {{
11547 let _pv_indices = &$input;
11548 debug_assert!(
11549 _pv_indices.len() > 0,
11550 "Contract rope_frequency: precondition violated — indices.len() > 0"
11551 );
11552 }};
11553}
11554
11555macro_rules! contract_pre_swiglu_ratio {
11558 () => {{}};
11559 ($input:expr) => {{
11560 let _pv_input = &$input;
11561 debug_assert!(
11562 _pv_input.len() > 0,
11563 "Contract swiglu_ratio: precondition violated — input.len() > 0"
11564 );
11565 }};
11566}
11567
11568macro_rules! contract_pre_kv_projection {
11574 () => {{}};
11575 ($input:expr) => {{
11576 let _contract_input = &$input;
11577 }};
11578}
11579
11580macro_rules! contract_pre_q_projection {
11583 () => {{}};
11584 ($input:expr) => {{
11585 let _contract_input = &$input;
11586 }};
11587}
11588
11589macro_rules! contract_pre_swiglu_expansion {
11592 () => {{}};
11593 ($input:expr) => {{
11594 let _contract_input = &$input;
11595 }};
11596}
11597
11598macro_rules! contract_pre_total_parameters {
11601 () => {{}};
11602 ($input:expr) => {{
11603 let _contract_input = &$input;
11604 }};
11605}
11606
11607macro_rules! contract_pre_contract_composition {
11613 () => {{}};
11614 ($input:expr) => {{
11615 let _pv_indices = &$input;
11616 debug_assert!(
11617 _pv_indices.len() > 0,
11618 "Contract contract_composition: precondition violated — indices.len() > 0"
11619 );
11620 }};
11621}
11622
11623macro_rules! contract_pre_flops_per_token {
11626 () => {{}};
11627 ($input:expr) => {{
11628 let _pv_input = &$input;
11629 debug_assert!(
11630 _pv_input.len() > 0,
11631 "Contract flops_per_token: precondition violated — input.len() > 0"
11632 );
11633 }};
11634}
11635
11636macro_rules! contract_pre_memory_breakdown {
11639 () => {{}};
11640 ($input:expr) => {{
11641 let _pv_input = &$input;
11642 debug_assert!(
11643 _pv_input.len() > 0,
11644 "Contract memory_breakdown: precondition violated — input.len() > 0"
11645 );
11646 }};
11647}
11648
11649macro_rules! contract_pre_model_parameter_count {
11652 () => {{}};
11653 ($input:expr) => {{
11654 let _pv_input = &$input;
11655 debug_assert!(
11656 _pv_input.len() > 0,
11657 "Contract model_parameter_count: precondition violated — input.len() > 0"
11658 );
11659 }};
11660}
11661
11662macro_rules! contract_pre_throughput_model {
11665 () => {{}};
11666 ($input:expr) => {{
11667 let _pv_input = &$input;
11668 debug_assert!(
11669 _pv_input.len() > 0,
11670 "Contract throughput_model: precondition violated — input.len() > 0"
11671 );
11672 }};
11673}
11674
11675macro_rules! contract_pre_verification_ladder {
11678 () => {{}};
11679 ($input:expr) => {{
11680 let _pv_input = &$input;
11681 debug_assert!(
11682 _pv_input.len() > 0,
11683 "Contract verification_ladder: precondition violated — input.len() > 0"
11684 );
11685 }};
11686}
11687
11688macro_rules! contract_pre_head_dim_consistency {
11694 () => {{}};
11695 ($input:expr) => {{
11696 let _pv_input = &$input;
11697 debug_assert!(
11698 _pv_input.len() > 0,
11699 "Contract head_dim_consistency: precondition violated — input.len() > 0"
11700 );
11701 }};
11702}
11703
11704macro_rules! contract_pre_kv_projection_shape {
11707 () => {{}};
11708 ($input:expr) => {{
11709 let _pv_input = &$input;
11710 debug_assert!(
11711 _pv_input.len() > 0,
11712 "Contract kv_projection_shape: precondition violated — input.len() > 0"
11713 );
11714 }};
11715}
11716
11717macro_rules! contract_pre_o_projection_transpose {
11720 () => {{}};
11721 ($input:expr) => {{
11722 let _pv_a = &$input;
11723 debug_assert!(
11724 _pv_a.len() > 0,
11725 "Contract o_projection_transpose: precondition violated — a.len() > 0"
11726 );
11727 }};
11728}
11729
11730macro_rules! contract_pre_q_projection_shape {
11733 () => {{}};
11734 ($input:expr) => {{
11735 let _pv_input = &$input;
11736 debug_assert!(
11737 _pv_input.len() > 0,
11738 "Contract q_projection_shape: precondition violated — input.len() > 0"
11739 );
11740 }};
11741}
11742
11743macro_rules! contract_pre_rope_frequency {
11746 () => {{}};
11747 ($input:expr) => {{
11748 let _pv_indices = &$input;
11749 debug_assert!(
11750 _pv_indices.len() > 0,
11751 "Contract rope_frequency: precondition violated — indices.len() > 0"
11752 );
11753 }};
11754}
11755
11756macro_rules! contract_pre_swiglu_ratio {
11759 () => {{}};
11760 ($input:expr) => {{
11761 let _pv_input = &$input;
11762 debug_assert!(
11763 _pv_input.len() > 0,
11764 "Contract swiglu_ratio: precondition violated — input.len() > 0"
11765 );
11766 }};
11767}
11768
11769macro_rules! contract_pre_contract_composition {
11775 () => {{}};
11776 ($input:expr) => {{
11777 let _pv_indices = &$input;
11778 debug_assert!(
11779 _pv_indices.len() > 0,
11780 "Contract contract_composition: precondition violated — indices.len() > 0"
11781 );
11782 }};
11783}
11784
11785macro_rules! contract_pre_flops_per_token {
11788 () => {{}};
11789 ($input:expr) => {{
11790 let _pv_input = &$input;
11791 debug_assert!(
11792 _pv_input.len() > 0,
11793 "Contract flops_per_token: precondition violated — input.len() > 0"
11794 );
11795 }};
11796}
11797
11798macro_rules! contract_pre_memory_breakdown {
11801 () => {{}};
11802 ($input:expr) => {{
11803 let _pv_input = &$input;
11804 debug_assert!(
11805 _pv_input.len() > 0,
11806 "Contract memory_breakdown: precondition violated — input.len() > 0"
11807 );
11808 }};
11809}
11810
11811macro_rules! contract_pre_model_parameter_count {
11814 () => {{}};
11815 ($input:expr) => {{
11816 let _pv_input = &$input;
11817 debug_assert!(
11818 _pv_input.len() > 0,
11819 "Contract model_parameter_count: precondition violated — input.len() > 0"
11820 );
11821 }};
11822}
11823
11824macro_rules! contract_pre_throughput_model {
11827 () => {{}};
11828 ($input:expr) => {{
11829 let _pv_input = &$input;
11830 debug_assert!(
11831 _pv_input.len() > 0,
11832 "Contract throughput_model: precondition violated — input.len() > 0"
11833 );
11834 }};
11835}
11836
11837macro_rules! contract_pre_verification_ladder {
11840 () => {{}};
11841 ($input:expr) => {{
11842 let _pv_input = &$input;
11843 debug_assert!(
11844 _pv_input.len() > 0,
11845 "Contract verification_ladder: precondition violated — input.len() > 0"
11846 );
11847 }};
11848}
11849
11850macro_rules! contract_pre_activation_magnitude {
11856 () => {{}};
11857 ($input:expr) => {{
11858 let _pv_x = &$input;
11859 debug_assert!(_pv_x.iter().all(|v| v.is_finite()),
11860 "Contract activation_magnitude: precondition violated — x.iter().all(|v| v.is_finite())");
11861 debug_assert!(_pv_x.len() > 0,
11862 "Contract activation_magnitude: precondition violated — x.len() > 0");
11863 }};
11864}
11865
11866macro_rules! contract_pre_attention_sublayer {
11869 () => {{}};
11870 ($input:expr) => {{
11871 let _pv_q = &$input;
11872 debug_assert!(
11873 _pv_q.len() > 0,
11874 "Contract attention_sublayer: precondition violated — q.len() > 0"
11875 );
11876 }};
11877}
11878
11879macro_rules! contract_pre_ffn_sublayer {
11882 () => {{}};
11883 ($input:expr) => {{
11884 let _pv_input = &$input;
11885 debug_assert!(
11886 _pv_input.len() > 0,
11887 "Contract ffn_sublayer: precondition violated — input.len() > 0"
11888 );
11889 }};
11890}
11891
11892macro_rules! contract_pre_gdn_sublayer {
11895 () => {{}};
11896 ($input:expr) => {{
11897 let _pv_input = &$input;
11898 debug_assert!(
11899 _pv_input.len() > 0,
11900 "Contract gdn_sublayer: precondition violated — input.len() > 0"
11901 );
11902 }};
11903}
11904
11905macro_rules! contract_pre_gradient_flow {
11908 () => {{}};
11909 ($input:expr) => {{
11910 let _pv_grad_output = &$input;
11911 debug_assert!(_pv_grad_output.len() > 0,
11912 "Contract gradient_flow: precondition violated — grad_output.len() > 0");
11913 debug_assert!(_pv_grad_output.iter().all(|v| v.is_finite()),
11914 "Contract gradient_flow: precondition violated — grad_output.iter().all(|v| v.is_finite())");
11915 }};
11916}
11917
11918macro_rules! contract_pre_hybrid_block {
11921 () => {{}};
11922 ($input:expr) => {{
11923 let _pv_input = &$input;
11924 debug_assert!(
11925 _pv_input.len() > 0,
11926 "Contract hybrid_block: precondition violated — input.len() > 0"
11927 );
11928 }};
11929}
11930
11931macro_rules! contract_pre_kv_projection_shape {
11937 () => {{}};
11938 ($input:expr) => {{
11939 let _pv_input = &$input;
11940 debug_assert!(
11941 _pv_input.len() > 0,
11942 "Contract kv_projection_shape: precondition violated — input.len() > 0"
11943 );
11944 }};
11945}
11946
11947macro_rules! contract_pre_o_projection_transpose {
11950 () => {{}};
11951 ($input:expr) => {{
11952 let _pv_a = &$input;
11953 debug_assert!(
11954 _pv_a.len() > 0,
11955 "Contract o_projection_transpose: precondition violated — a.len() > 0"
11956 );
11957 }};
11958}
11959
11960macro_rules! contract_pre_q_projection_shape {
11963 () => {{}};
11964 ($input:expr) => {{
11965 let _pv_input = &$input;
11966 debug_assert!(
11967 _pv_input.len() > 0,
11968 "Contract q_projection_shape: precondition violated — input.len() > 0"
11969 );
11970 }};
11971}
11972
11973macro_rules! contract_pre_rope_frequency {
11976 () => {{}};
11977 ($input:expr) => {{
11978 let _pv_indices = &$input;
11979 debug_assert!(
11980 _pv_indices.len() > 0,
11981 "Contract rope_frequency: precondition violated — indices.len() > 0"
11982 );
11983 }};
11984}
11985
11986macro_rules! contract_pre_swiglu_ratio {
11989 () => {{}};
11990 ($input:expr) => {{
11991 let _pv_input = &$input;
11992 debug_assert!(
11993 _pv_input.len() > 0,
11994 "Contract swiglu_ratio: precondition violated — input.len() > 0"
11995 );
11996 }};
11997}
11998
11999macro_rules! contract_pre_active_parameter_count {
12005 () => {{}};
12006 ($input:expr) => {{
12007 let _pv_input = &$input;
12008 debug_assert!(
12009 _pv_input.len() > 0,
12010 "Contract active_parameter_count: precondition violated — input.len() > 0"
12011 );
12012 }};
12013}
12014
12015macro_rules! contract_pre_contract_composition {
12018 () => {{}};
12019 ($input:expr) => {{
12020 let _pv_indices = &$input;
12021 debug_assert!(
12022 _pv_indices.len() > 0,
12023 "Contract contract_composition: precondition violated — indices.len() > 0"
12024 );
12025 }};
12026}
12027
12028macro_rules! contract_pre_flops_per_token {
12031 () => {{}};
12032 ($input:expr) => {{
12033 let _pv_input = &$input;
12034 debug_assert!(
12035 _pv_input.len() > 0,
12036 "Contract flops_per_token: precondition violated — input.len() > 0"
12037 );
12038 }};
12039}
12040
12041macro_rules! contract_pre_memory_breakdown {
12044 () => {{}};
12045 ($input:expr) => {{
12046 let _pv_input = &$input;
12047 debug_assert!(
12048 _pv_input.len() > 0,
12049 "Contract memory_breakdown: precondition violated — input.len() > 0"
12050 );
12051 }};
12052}
12053
12054macro_rules! contract_pre_model_parameter_count {
12057 () => {{}};
12058 ($input:expr) => {{
12059 let _pv_input = &$input;
12060 debug_assert!(
12061 _pv_input.len() > 0,
12062 "Contract model_parameter_count: precondition violated — input.len() > 0"
12063 );
12064 }};
12065}
12066
12067macro_rules! contract_pre_throughput_model {
12070 () => {{}};
12071 ($input:expr) => {{
12072 let _pv_input = &$input;
12073 debug_assert!(
12074 _pv_input.len() > 0,
12075 "Contract throughput_model: precondition violated — input.len() > 0"
12076 );
12077 }};
12078}
12079
12080macro_rules! contract_pre_verification_ladder {
12083 () => {{}};
12084 ($input:expr) => {{
12085 let _pv_input = &$input;
12086 debug_assert!(
12087 _pv_input.len() > 0,
12088 "Contract verification_ladder: precondition violated — input.len() > 0"
12089 );
12090 }};
12091}
12092
12093macro_rules! contract_pre_kv_projection_shape {
12099 () => {{}};
12100 ($input:expr) => {{
12101 let _pv_input = &$input;
12102 debug_assert!(
12103 _pv_input.len() > 0,
12104 "Contract kv_projection_shape: precondition violated — input.len() > 0"
12105 );
12106 }};
12107}
12108
12109macro_rules! contract_pre_moe_expert_shape {
12112 () => {{}};
12113 ($input:expr) => {{
12114 let _pv_input = &$input;
12115 debug_assert!(
12116 _pv_input.len() > 0,
12117 "Contract moe_expert_shape: precondition violated — input.len() > 0"
12118 );
12119 }};
12120}
12121
12122macro_rules! contract_pre_moe_router_shape {
12125 () => {{}};
12126 ($input:expr) => {{
12127 let _pv_a = &$input;
12128 debug_assert!(
12129 _pv_a.len() > 0,
12130 "Contract moe_router_shape: precondition violated — a.len() > 0"
12131 );
12132 }};
12133}
12134
12135macro_rules! contract_pre_o_projection_transpose {
12138 () => {{}};
12139 ($input:expr) => {{
12140 let _pv_a = &$input;
12141 debug_assert!(
12142 _pv_a.len() > 0,
12143 "Contract o_projection_transpose: precondition violated — a.len() > 0"
12144 );
12145 }};
12146}
12147
12148macro_rules! contract_pre_q_projection_shape {
12151 () => {{}};
12152 ($input:expr) => {{
12153 let _pv_input = &$input;
12154 debug_assert!(
12155 _pv_input.len() > 0,
12156 "Contract q_projection_shape: precondition violated — input.len() > 0"
12157 );
12158 }};
12159}
12160
12161macro_rules! contract_pre_rope_frequency {
12164 () => {{}};
12165 ($input:expr) => {{
12166 let _pv_indices = &$input;
12167 debug_assert!(
12168 _pv_indices.len() > 0,
12169 "Contract rope_frequency: precondition violated — indices.len() > 0"
12170 );
12171 }};
12172}
12173
12174macro_rules! contract_pre_swiglu_ratio {
12177 () => {{}};
12178 ($input:expr) => {{
12179 let _pv_input = &$input;
12180 debug_assert!(
12181 _pv_input.len() > 0,
12182 "Contract swiglu_ratio: precondition violated — input.len() > 0"
12183 );
12184 }};
12185}
12186
12187macro_rules! contract_pre_embed_insert {
12193 () => {{}};
12194 ($input:expr) => {{
12195 let _contract_input = &$input;
12196 }};
12197}
12198
12199macro_rules! contract_pre_metric_correctness {
12202 () => {{}};
12203 ($input:expr) => {{
12204 let _contract_input = &$input;
12205 }};
12206}
12207
12208macro_rules! contract_pre_retrieve_rank {
12211 () => {{}};
12212 ($input:expr) => {{
12213 let _contract_input = &$input;
12214 }};
12215}
12216
12217macro_rules! contract_pre_bootstrap_sample {
12223 () => {{}};
12224 ($input:expr) => {{
12225 let _pv_params = &$input;
12226 debug_assert!(
12227 _pv_params.len() > 0,
12228 "Contract bootstrap_sample: precondition violated — params.len() > 0"
12229 );
12230 }};
12231}
12232
12233macro_rules! contract_pre_ensemble_size {
12236 () => {{}};
12237 ($input:expr) => {{
12238 let _pv_input = &$input;
12239 debug_assert!(
12240 _pv_input.len() > 0,
12241 "Contract ensemble_size: precondition violated — input.len() > 0"
12242 );
12243 debug_assert!(
12244 _pv_input.iter().all(|v| v.is_finite()),
12245 "Contract ensemble_size: precondition violated — input.iter().all(|v| v.is_finite())"
12246 );
12247 }};
12248}
12249
12250macro_rules! contract_pre_majority_vote {
12253 () => {{}};
12254 ($input:expr) => {{
12255 let _pv_input = &$input;
12256 debug_assert!(
12257 _pv_input.len() > 0,
12258 "Contract majority_vote: precondition violated — input.len() > 0"
12259 );
12260 debug_assert!(
12261 _pv_input.iter().all(|v| v.is_finite()),
12262 "Contract majority_vote: precondition violated — input.iter().all(|v| v.is_finite())"
12263 );
12264 }};
12265}
12266
12267macro_rules! contract_pre_predict {
12270 () => {{}};
12271 ($input:expr) => {{
12272 let _pv_input = &$input;
12273 debug_assert!(
12274 _pv_input.len() > 0,
12275 "Contract predict: precondition violated — input.len() > 0"
12276 );
12277 debug_assert!(
12278 _pv_input.iter().all(|v| v.is_finite()),
12279 "Contract predict: precondition violated — input.iter().all(|v| v.is_finite())"
12280 );
12281 }};
12282}
12283
12284macro_rules! contract_pre_expand_recipe {
12290 () => {{}};
12291 ($input:expr) => {{
12292 let _contract_input = &$input;
12293 }};
12294}
12295
12296macro_rules! contract_pre_validate_input_type {
12299 () => {{}};
12300 ($input:expr) => {{
12301 let _contract_input = &$input;
12302 }};
12303}
12304
12305macro_rules! contract_pre_validate_inputs {
12308 () => {{}};
12309 ($input:expr) => {{
12310 let _pv_inputs = &$input;
12311 debug_assert!(
12312 _pv_inputs.len() > 0,
12313 "Contract validate_inputs: precondition violated — inputs.len() > 0"
12314 );
12315 }};
12316}
12317
12318macro_rules! contract_pre_format_iso_timestamp {
12324 () => {{}};
12325 ($input:expr) => {{
12326 let _contract_input = &$input;
12327 }};
12328}
12329
12330macro_rules! contract_post_format_iso_timestamp {
12333 ($result:expr) => {{
12334 let _contract_result = &$result;
12335 }};
12336}
12337
12338macro_rules! contract_format_iso_timestamp {
12340 ($input:expr, $body:expr) => {{
12341 contract_pre_format_iso_timestamp!($input);
12342 let _contract_result = $body;
12343 contract_post_format_iso_timestamp!(_contract_result);
12344 _contract_result
12345 }};
12346}
12347
12348macro_rules! contract_pre_format_semver {
12351 () => {{}};
12352 ($input:expr) => {{
12353 let _contract_input = &$input;
12354 }};
12355}
12356
12357macro_rules! contract_post_format_semver {
12360 ($result:expr) => {{
12361 let _contract_result = &$result;
12362 }};
12363}
12364
12365macro_rules! contract_format_semver {
12367 ($input:expr, $body:expr) => {{
12368 contract_pre_format_semver!($input);
12369 let _contract_result = $body;
12370 contract_post_format_semver!(_contract_result);
12371 _contract_result
12372 }};
12373}
12374
12375macro_rules! contract_pre_format_ticket_id {
12378 () => {{}};
12379 ($input:expr) => {{
12380 let _contract_input = &$input;
12381 }};
12382}
12383
12384macro_rules! contract_post_format_ticket_id {
12387 ($result:expr) => {{
12388 let _contract_result = &$result;
12389 }};
12390}
12391
12392macro_rules! contract_format_ticket_id {
12394 ($input:expr, $body:expr) => {{
12395 contract_pre_format_ticket_id!($input);
12396 let _contract_result = $body;
12397 contract_post_format_ticket_id!(_contract_result);
12398 _contract_result
12399 }};
12400}
12401
12402macro_rules! contract_pre_pull_idempotency {
12408 () => {{}};
12409 ($input:expr) => {{
12410 let _contract_input = &$input;
12411 }};
12412}
12413
12414macro_rules! contract_pre_run_lifecycle {
12417 () => {{}};
12418 ($input:expr) => {{
12419 let _contract_input = &$input;
12420 }};
12421}
12422
12423macro_rules! contract_pre_draw_bounds {
12429 () => {{}};
12430 ($input:expr) => {{
12431 let _contract_input = &$input;
12432 }};
12433}
12434
12435macro_rules! contract_pre_layout_area_conservation {
12438 () => {{}};
12439 ($input:expr) => {{
12440 let _pv_x = &$input;
12441 }};
12442}
12443
12444macro_rules! contract_pre_line_connectivity {
12447 () => {{}};
12448 ($input:expr) => {{
12449 let _contract_input = &$input;
12450 }};
12451}
12452
12453macro_rules! contract_pre_embedding_insert {
12459 () => {{}};
12460 ($input:expr) => {{
12461 let _pv_embedding = &$input;
12462 }};
12463}
12464
12465macro_rules! contract_pre_metric_bounds {
12468 () => {{}};
12469 ($input:expr) => {{
12470 let _pv_relevant = &$input;
12471 }};
12472}
12473
12474macro_rules! contract_pre_retrieval_ranking {
12477 () => {{}};
12478 ($input:expr) => {{
12479 let _contract_input = &$input;
12480 }};
12481}
12482
12483macro_rules! contract_pre_rmsnorm {
12489 () => {{}};
12490 ($input:expr) => {{
12491 let _pv_x = &$input;
12492 debug_assert!(_pv_x.len() > 0, "Contract rmsnorm: precondition violated — x.len() > 0");
12493 debug_assert!(
12494 _pv_x.iter().all(|v| v.is_finite()),
12495 "Contract rmsnorm: precondition violated — x.iter().all(|v| v.is_finite())"
12496 );
12497 }};
12498}
12499
12500macro_rules! contract_post_rmsnorm {
12503 ($result:expr) => {{
12504 let _contract_result = &$result;
12505 debug_assert!(
12506 _contract_result.iter().all(|v| v.is_finite()),
12507 "Contract rmsnorm: postcondition violated — result.iter().all(|v| v.is_finite())"
12508 );
12509 }};
12510}
12511
12512macro_rules! contract_rmsnorm {
12514 ($input:expr, $body:expr) => {{
12515 contract_pre_rmsnorm!($input);
12516 let _contract_result = $body;
12517 contract_post_rmsnorm!(_contract_result);
12518 _contract_result
12519 }};
12520}
12521
12522macro_rules! contract_pre_bandwidth_ceiling {
12528 () => {{}};
12529 ($input:expr) => {{
12530 let _pv_input = &$input;
12531 debug_assert!(
12532 _pv_input.len() > 0,
12533 "Contract bandwidth_ceiling: precondition violated — input.len() > 0"
12534 );
12535 }};
12536}
12537
12538macro_rules! contract_pre_compute_ceiling {
12541 () => {{}};
12542 ($input:expr) => {{
12543 let _pv_input = &$input;
12544 debug_assert!(
12545 _pv_input.len() > 0,
12546 "Contract compute_ceiling: precondition violated — input.len() > 0"
12547 );
12548 }};
12549}
12550
12551macro_rules! contract_pre_model_bytes {
12554 () => {{}};
12555 ($input:expr) => {{
12556 let _pv_input = &$input;
12557 debug_assert!(
12558 _pv_input.len() > 0,
12559 "Contract model_bytes: precondition violated — input.len() > 0"
12560 );
12561 }};
12562}
12563
12564macro_rules! contract_pre_throughput_bound {
12567 () => {{}};
12568 ($input:expr) => {{
12569 let _pv_input = &$input;
12570 debug_assert!(
12571 _pv_input.len() > 0,
12572 "Contract throughput_bound: precondition violated — input.len() > 0"
12573 );
12574 }};
12575}
12576
12577macro_rules! contract_pre_base_frequency {
12583 () => {{}};
12584 ($input:expr) => {{
12585 let _pv_indices = &$input;
12586 debug_assert!(
12587 _pv_indices.len() > 0,
12588 "Contract base_frequency: precondition violated — indices.len() > 0"
12589 );
12590 }};
12591}
12592
12593macro_rules! contract_pre_linear_interpolation {
12596 () => {{}};
12597 ($input:expr) => {{
12598 let _pv_indices = &$input;
12599 debug_assert!(
12600 _pv_indices.len() > 0,
12601 "Contract linear_interpolation: precondition violated — indices.len() > 0"
12602 );
12603 }};
12604}
12605
12606macro_rules! contract_pre_ntk_scaled_base {
12609 () => {{}};
12610 ($input:expr) => {{
12611 let _pv_indices = &$input;
12612 debug_assert!(
12613 _pv_indices.len() > 0,
12614 "Contract ntk_scaled_base: precondition violated — indices.len() > 0"
12615 );
12616 }};
12617}
12618
12619macro_rules! contract_pre_rotation_matrix {
12622 () => {{}};
12623 ($input:expr) => {{
12624 let _pv_indices = &$input;
12625 debug_assert!(
12626 _pv_indices.len() > 0,
12627 "Contract rotation_matrix: precondition violated — indices.len() > 0"
12628 );
12629 }};
12630}
12631
12632macro_rules! contract_pre_yarn_mixed_frequency {
12635 () => {{}};
12636 ($input:expr) => {{
12637 let _pv_indices = &$input;
12638 debug_assert!(
12639 _pv_indices.len() > 0,
12640 "Contract yarn_mixed_frequency: precondition violated — indices.len() > 0"
12641 );
12642 }};
12643}
12644
12645macro_rules! contract_pre_yarn_ramp {
12648 () => {{}};
12649 ($input:expr) => {{
12650 let _pv_indices = &$input;
12651 debug_assert!(
12652 _pv_indices.len() > 0,
12653 "Contract yarn_ramp: precondition violated — indices.len() > 0"
12654 );
12655 }};
12656}
12657
12658macro_rules! contract_pre_rope {
12664 () => {{}};
12665 ($input:expr) => {{
12666 let _pv_x = &$input;
12667 debug_assert!(_pv_x.len() > 0, "Contract rope: precondition violated — x.len() > 0");
12668 debug_assert!(
12669 _pv_x.len() % 2 == 0,
12670 "Contract rope: precondition violated — x.len() % 2 == 0"
12671 );
12672 }};
12673}
12674
12675macro_rules! contract_post_rope {
12678 ($result:expr) => {{
12679 let _contract_result = &$result;
12680 debug_assert!(
12681 _contract_result.iter().all(|v| v.is_finite()),
12682 "Contract rope: postcondition violated — result.iter().all(|v| v.is_finite())"
12683 );
12684 }};
12685}
12686
12687macro_rules! contract_rope {
12689 ($input:expr, $body:expr) => {{
12690 contract_pre_rope!($input);
12691 let _contract_result = $body;
12692 contract_post_rope!(_contract_result);
12693 _contract_result
12694 }};
12695}
12696
12697macro_rules! contract_pre_format_parity {
12703 () => {{}};
12704 ($input:expr) => {{
12705 let _pv_input = &$input;
12706 debug_assert!(
12707 _pv_input.len() > 0,
12708 "Contract format_parity: precondition violated — input.len() > 0"
12709 );
12710 }};
12711}
12712
12713macro_rules! contract_pre_dtype_consistency {
12719 () => {{}};
12720 ($input:expr) => {{
12721 let _contract_input = &$input;
12722 }};
12723}
12724
12725macro_rules! contract_post_dtype_consistency {
12728 ($result:expr) => {{
12729 let _contract_result = &$result;
12730 }};
12731}
12732
12733macro_rules! contract_dtype_consistency {
12735 ($input:expr, $body:expr) => {{
12736 contract_pre_dtype_consistency!($input);
12737 let _contract_result = $body;
12738 contract_post_dtype_consistency!(_contract_result);
12739 _contract_result
12740 }};
12741}
12742
12743macro_rules! contract_pre_header_size_validation {
12746 () => {{}};
12747 ($input:expr) => {{
12748 let _contract_input = &$input;
12749 }};
12750}
12751
12752macro_rules! contract_post_header_size_validation {
12755 ($result:expr) => {{
12756 let _contract_result = &$result;
12757 }};
12758}
12759
12760macro_rules! contract_header_size_validation {
12762 ($input:expr, $body:expr) => {{
12763 contract_pre_header_size_validation!($input);
12764 let _contract_result = $body;
12765 contract_post_header_size_validation!(_contract_result);
12766 _contract_result
12767 }};
12768}
12769
12770macro_rules! contract_pre_mmap_zero_copy {
12773 () => {{}};
12774 ($input:expr) => {{
12775 let _contract_input = &$input;
12776 }};
12777}
12778
12779macro_rules! contract_post_mmap_zero_copy {
12782 ($result:expr) => {{
12783 let _contract_result = &$result;
12784 }};
12785}
12786
12787macro_rules! contract_mmap_zero_copy {
12789 ($input:expr, $body:expr) => {{
12790 contract_pre_mmap_zero_copy!($input);
12791 let _contract_result = $body;
12792 contract_post_mmap_zero_copy!(_contract_result);
12793 _contract_result
12794 }};
12795}
12796
12797macro_rules! contract_pre_no_overlap_invariant {
12800 () => {{}};
12801 ($input:expr) => {{
12802 let _contract_input = &$input;
12803 }};
12804}
12805
12806macro_rules! contract_post_no_overlap_invariant {
12809 ($result:expr) => {{
12810 let _contract_result = &$result;
12811 }};
12812}
12813
12814macro_rules! contract_no_overlap_invariant {
12816 ($input:expr, $body:expr) => {{
12817 contract_pre_no_overlap_invariant!($input);
12818 let _contract_result = $body;
12819 contract_post_no_overlap_invariant!(_contract_result);
12820 _contract_result
12821 }};
12822}
12823
12824macro_rules! contract_pre_tensor_offset_bounds {
12827 () => {{}};
12828 ($input:expr) => {{
12829 let _contract_input = &$input;
12830 }};
12831}
12832
12833macro_rules! contract_post_tensor_offset_bounds {
12836 ($result:expr) => {{
12837 let _contract_result = &$result;
12838 }};
12839}
12840
12841macro_rules! contract_tensor_offset_bounds {
12843 ($input:expr, $body:expr) => {{
12844 contract_pre_tensor_offset_bounds!($input);
12845 let _contract_result = $body;
12846 contract_post_tensor_offset_bounds!(_contract_result);
12847 _contract_result
12848 }};
12849}
12850
12851macro_rules! contract_pre_classify_filesystem {
12857 () => {{}};
12858 ($input:expr) => {{
12859 let _pv_source = &$input;
12860 debug_assert!(
12861 !_pv_source.is_empty(),
12862 "Contract classify_filesystem: precondition violated — !source.is_empty()"
12863 );
12864 debug_assert!(
12865 _pv_source.len() <= 1_000_000,
12866 "Contract classify_filesystem: precondition violated — source.len() <= 1_000_000"
12867 );
12868 }};
12869}
12870
12871macro_rules! contract_pre_classify_injection {
12874 () => {{}};
12875 ($input:expr) => {{
12876 let _pv_source = &$input;
12877 debug_assert!(
12878 !_pv_source.is_empty(),
12879 "Contract classify_injection: precondition violated — !source.is_empty()"
12880 );
12881 debug_assert!(
12882 _pv_source.len() <= 1_000_000,
12883 "Contract classify_injection: precondition violated — source.len() <= 1_000_000"
12884 );
12885 }};
12886}
12887
12888macro_rules! contract_pre_classify_secrets {
12891 () => {{}};
12892 ($input:expr) => {{
12893 let _pv_source = &$input;
12894 debug_assert!(
12895 !_pv_source.is_empty(),
12896 "Contract classify_secrets: precondition violated — !source.is_empty()"
12897 );
12898 debug_assert!(
12899 _pv_source.len() <= 1_000_000,
12900 "Contract classify_secrets: precondition violated — source.len() <= 1_000_000"
12901 );
12902 }};
12903}
12904
12905macro_rules! contract_pre_lint_shell {
12908 () => {{}};
12909 ($input:expr) => {{
12910 let _contract_input = &$input;
12911 }};
12912}
12913
12914macro_rules! contract_pre_greedy {
12920 () => {{}};
12921 ($input:expr) => {{
12922 let _pv_input = &$input;
12923 debug_assert!(
12924 _pv_input.len() > 0,
12925 "Contract greedy: precondition violated — input.len() > 0"
12926 );
12927 }};
12928}
12929
12930macro_rules! contract_pre_temperature {
12933 () => {{}};
12934 ($input:expr) => {{
12935 let _pv_input = &$input;
12936 debug_assert!(
12937 _pv_input.len() > 0,
12938 "Contract temperature: precondition violated — input.len() > 0"
12939 );
12940 }};
12941}
12942
12943macro_rules! contract_pre_top_k {
12946 () => {{}};
12947 ($input:expr) => {{
12948 let _pv_input = &$input;
12949 debug_assert!(
12950 _pv_input.len() > 0,
12951 "Contract top_k: precondition violated — input.len() > 0"
12952 );
12953 }};
12954}
12955
12956macro_rules! contract_pre_top_p {
12959 () => {{}};
12960 ($input:expr) => {{
12961 let _pv_input = &$input;
12962 debug_assert!(
12963 _pv_input.len() > 0,
12964 "Contract top_p: precondition violated — input.len() > 0"
12965 );
12966 }};
12967}
12968
12969macro_rules! contract_pre_filesystem_isolation {
12975 () => {{}};
12976 ($input:expr) => {{
12977 let _pv_config = &$input;
12978 }};
12979}
12980
12981macro_rules! contract_pre_network_isolation {
12984 () => {{}};
12985 ($input:expr) => {{
12986 let _pv_config = &$input;
12987 }};
12988}
12989
12990macro_rules! contract_pre_overlay_capture {
12993 () => {{}};
12994 ($input:expr) => {{
12995 let _pv_overlay = &$input;
12996 }};
12997}
12998
12999macro_rules! contract_pre_geometric_mean {
13005 () => {{}};
13006 ($input:expr) => {{
13007 let _pv_input = &$input;
13008 debug_assert!(
13009 _pv_input.len() > 0,
13010 "Contract geometric_mean: precondition violated — input.len() > 0"
13011 );
13012 debug_assert!(
13013 _pv_input.iter().all(|v| v.is_finite()),
13014 "Contract geometric_mean: precondition violated — input.iter().all(|v| v.is_finite())"
13015 );
13016 }};
13017}
13018
13019macro_rules! contract_post_geometric_mean {
13022 ($result:expr) => {{
13023 let _contract_result = &$result;
13024 debug_assert!(
13025 *_contract_result >= 0.0 && *_contract_result <= 100.0,
13026 "Contract geometric_mean: postcondition violated — result >= 0.0 && result <= 100.0"
13027 );
13028 }};
13029}
13030
13031macro_rules! contract_geometric_mean {
13033 ($input:expr, $body:expr) => {{
13034 contract_pre_geometric_mean!($input);
13035 let _contract_result = $body;
13036 contract_post_geometric_mean!(_contract_result);
13037 _contract_result
13038 }};
13039}
13040
13041macro_rules! contract_pre_grade_from_score {
13044 () => {{}};
13045 ($input:expr) => {{
13046 let _pv_grad_output = &$input;
13047 debug_assert!(_pv_grad_output.len() > 0,
13048 "Contract grade_from_score: precondition violated — grad_output.len() > 0");
13049 debug_assert!(_pv_grad_output.iter().all(|v| v.is_finite()),
13050 "Contract grade_from_score: precondition violated — grad_output.iter().all(|v| v.is_finite())");
13051 }};
13052}
13053
13054macro_rules! contract_post_grade_from_score {
13057 ($result:expr) => {{
13058 let _contract_result = &$result;
13059 }};
13060}
13061
13062macro_rules! contract_grade_from_score {
13064 ($input:expr, $body:expr) => {{
13065 contract_pre_grade_from_score!($input);
13066 let _contract_result = $body;
13067 contract_post_grade_from_score!(_contract_result);
13068 _contract_result
13069 }};
13070}
13071
13072macro_rules! contract_pre_drift_detection {
13078 () => {{}};
13079 ($input:expr) => {{
13080 let _contract_input = &$input;
13081 }};
13082}
13083
13084macro_rules! contract_pre_ephemeral_cleanup {
13087 () => {{}};
13088 ($input:expr) => {{
13089 let _pv_secret = &$input;
13090 }};
13091}
13092
13093macro_rules! contract_pre_provider_dispatch {
13096 () => {{}};
13097 ($input:expr) => {{
13098 let _pv_ref = &$input;
13099 }};
13100}
13101
13102macro_rules! contract_pre_comprehension_equivalence {
13108 () => {{}};
13109 ($input:expr) => {{
13110 let _pv_input = &$input;
13111 debug_assert!(
13112 _pv_input.len() > 0,
13113 "Contract comprehension_equivalence: precondition violated — input.len() > 0"
13114 );
13115 }};
13116}
13117
13118macro_rules! contract_pre_control_flow_equivalence {
13121 () => {{}};
13122 ($input:expr) => {{
13123 let _pv_input = &$input;
13124 debug_assert!(
13125 _pv_input.len() > 0,
13126 "Contract control_flow_equivalence: precondition violated — input.len() > 0"
13127 );
13128 }};
13129}
13130
13131macro_rules! contract_pre_expression_equivalence {
13134 () => {{}};
13135 ($input:expr) => {{
13136 let _pv_input = &$input;
13137 debug_assert!(
13138 _pv_input.len() > 0,
13139 "Contract expression_equivalence: precondition violated — input.len() > 0"
13140 );
13141 }};
13142}
13143
13144macro_rules! contract_pre_observational_equivalence {
13147 () => {{}};
13148 ($input:expr) => {{
13149 let _pv_input = &$input;
13150 debug_assert!(
13151 _pv_input.len() > 0,
13152 "Contract observational_equivalence: precondition violated — input.len() > 0"
13153 );
13154 }};
13155}
13156
13157macro_rules! contract_pre_statement_equivalence {
13160 () => {{}};
13161 ($input:expr) => {{
13162 let _pv_input = &$input;
13163 debug_assert!(
13164 _pv_input.len() > 0,
13165 "Contract statement_equivalence: precondition violated — input.len() > 0"
13166 );
13167 }};
13168}
13169
13170macro_rules! contract_pre_deserialize {
13176 () => {{}};
13177 ($input:expr) => {{
13178 let _pv_bytes = &$input;
13179 debug_assert!(
13180 _pv_bytes.len() > 0,
13181 "Contract deserialize: precondition violated — bytes.len() > 0"
13182 );
13183 }};
13184}
13185
13186macro_rules! contract_pre_serialize {
13189 () => {{}};
13190 ($input:expr) => {{
13191 let _contract_input = &$input;
13192 }};
13193}
13194
13195macro_rules! contract_pre_serialization {
13201 () => {{}};
13202 ($input:expr) => {{
13203 let _pv_input = &$input;
13204 debug_assert!(
13205 _pv_input.len() > 0,
13206 "Contract serialization: precondition violated — input.len() > 0"
13207 );
13208 debug_assert!(
13209 _pv_input.iter().all(|v| v.is_finite()),
13210 "Contract serialization: precondition violated — input.iter().all(|v| v.is_finite())"
13211 );
13212 }};
13213}
13214
13215macro_rules! contract_pre_age_filter {
13221 () => {{}};
13222 ($input:expr) => {{
13223 let _contract_input = &$input;
13224 }};
13225}
13226
13227macro_rules! contract_post_age_filter {
13230 ($result:expr) => {{
13231 let _contract_result = &$result;
13232 }};
13233}
13234
13235macro_rules! contract_age_filter {
13237 ($input:expr, $body:expr) => {{
13238 contract_pre_age_filter!($input);
13239 let _contract_result = $body;
13240 contract_post_age_filter!(_contract_result);
13241 _contract_result
13242 }};
13243}
13244
13245macro_rules! contract_pre_append_only {
13248 () => {{}};
13249 ($input:expr) => {{
13250 let _contract_input = &$input;
13251 }};
13252}
13253
13254macro_rules! contract_post_append_only {
13257 ($result:expr) => {{
13258 let _contract_result = &$result;
13259 }};
13260}
13261
13262macro_rules! contract_append_only {
13264 ($input:expr, $body:expr) => {{
13265 contract_pre_append_only!($input);
13266 let _contract_result = $body;
13267 contract_post_append_only!(_contract_result);
13268 _contract_result
13269 }};
13270}
13271
13272macro_rules! contract_pre_jsonl_roundtrip {
13275 () => {{}};
13276 ($input:expr) => {{
13277 let _pv_messages = &$input;
13278 debug_assert!(
13279 _pv_messages.len() > 0,
13280 "Contract jsonl_roundtrip: precondition violated — messages.len() > 0"
13281 );
13282 }};
13283}
13284
13285macro_rules! contract_post_jsonl_roundtrip {
13288 ($result:expr) => {{
13289 let _contract_result = &$result;
13290 }};
13291}
13292
13293macro_rules! contract_jsonl_roundtrip {
13295 ($input:expr, $body:expr) => {{
13296 contract_pre_jsonl_roundtrip!($input);
13297 let _contract_result = $body;
13298 contract_post_jsonl_roundtrip!(_contract_result);
13299 _contract_result
13300 }};
13301}
13302
13303macro_rules! contract_pre_manifest_serde {
13306 () => {{}};
13307 ($input:expr) => {{
13308 let _pv_manifest = &$input;
13309 }};
13310}
13311
13312macro_rules! contract_post_manifest_serde {
13315 ($result:expr) => {{
13316 let _contract_result = &$result;
13317 }};
13318}
13319
13320macro_rules! contract_manifest_serde {
13322 ($input:expr, $body:expr) => {{
13323 contract_pre_manifest_serde!($input);
13324 let _contract_result = $body;
13325 contract_post_manifest_serde!(_contract_result);
13326 _contract_result
13327 }};
13328}
13329
13330macro_rules! contract_pre_entropy {
13336 () => {{}};
13337 ($input:expr) => {{
13338 let _pv_input = &$input;
13339 debug_assert!(
13340 _pv_input.len() > 0,
13341 "Contract entropy: precondition violated — input.len() > 0"
13342 );
13343 debug_assert!(
13344 _pv_input.iter().all(|v| v.is_finite()),
13345 "Contract entropy: precondition violated — input.iter().all(|v| v.is_finite())"
13346 );
13347 }};
13348}
13349
13350macro_rules! contract_pre_uniform_entropy {
13353 () => {{}};
13354 ($input:expr) => {{
13355 let _pv_input = &$input;
13356 debug_assert!(_pv_input.len() > 0,
13357 "Contract uniform_entropy: precondition violated — input.len() > 0");
13358 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
13359 "Contract uniform_entropy: precondition violated — input.iter().all(|v| v.is_finite())");
13360 }};
13361}
13362
13363macro_rules! contract_pre_config_validation {
13369 () => {{}};
13370 ($input:expr) => {{
13371 let _contract_input = &$input;
13372 }};
13373}
13374
13375macro_rules! contract_pre_parser_correctness {
13378 () => {{}};
13379 ($input:expr) => {{
13380 let _pv_input = &$input;
13381 debug_assert!(
13382 _pv_input.len() <= 1_048_576,
13383 "Contract parser_correctness: precondition violated — input.len() <= 1_048_576"
13384 );
13385 }};
13386}
13387
13388macro_rules! contract_pre_startup_budget {
13391 () => {{}};
13392 ($input:expr) => {{
13393 let _contract_input = &$input;
13394 }};
13395}
13396
13397macro_rules! contract_pre_sigmoid {
13403 () => {{}};
13404 ($input:expr) => {{
13405 let _pv_x = &$input;
13406 debug_assert!(
13407 _pv_x.iter().all(|v| v.is_finite()),
13408 "Contract sigmoid: precondition violated — x.iter().all(|v| v.is_finite())"
13409 );
13410 debug_assert!(_pv_x.len() > 0, "Contract sigmoid: precondition violated — x.len() > 0");
13411 }};
13412}
13413
13414macro_rules! contract_pre_silu {
13417 () => {{}};
13418 ($input:expr) => {{
13419 let _pv_x = &$input;
13420 debug_assert!(
13421 _pv_x.iter().all(|v| v.is_finite()),
13422 "Contract silu: precondition violated — x.iter().all(|v| v.is_finite())"
13423 );
13424 debug_assert!(_pv_x.len() > 0, "Contract silu: precondition violated — x.len() > 0");
13425 }};
13426}
13427
13428macro_rules! contract_pre_audit_trail {
13434 () => {{}};
13435 ($input:expr) => {{
13436 let _contract_input = &$input;
13437 }};
13438}
13439
13440macro_rules! contract_pre_step_determinism {
13443 () => {{}};
13444 ($input:expr) => {{
13445 let _pv_x = &$input;
13446 }};
13447}
13448
13449macro_rules! contract_pre_time_advancement {
13452 () => {{}};
13453 ($input:expr) => {{
13454 let _pv_x = &$input;
13455 }};
13456}
13457
13458macro_rules! contract_pre_audit_completeness {
13464 () => {{}};
13465 ($input:expr) => {{
13466 let _contract_input = &$input;
13467 }};
13468}
13469
13470macro_rules! contract_pre_simulate_convergence {
13473 () => {{}};
13474 ($input:expr) => {{
13475 let _pv_params = &$input;
13476 }};
13477}
13478
13479macro_rules! contract_pre_step_monotonicity {
13482 () => {{}};
13483 ($input:expr) => {{
13484 let _pv_x = &$input;
13485 }};
13486}
13487
13488macro_rules! contract_pre_attention_sparsity {
13494 () => {{}};
13495 ($input:expr) => {{
13496 let _pv_q = &$input;
13497 debug_assert!(
13498 _pv_q.len() > 0,
13499 "Contract attention_sparsity: precondition violated — q.len() > 0"
13500 );
13501 }};
13502}
13503
13504macro_rules! contract_pre_causal_window_mask {
13507 () => {{}};
13508 ($input:expr) => {{
13509 let _pv_q = &$input;
13510 debug_assert!(
13511 _pv_q.len() > 0,
13512 "Contract causal_window_mask: precondition violated — q.len() > 0"
13513 );
13514 }};
13515}
13516
13517macro_rules! contract_pre_effective_context {
13520 () => {{}};
13521 ($input:expr) => {{
13522 let _pv_q = &$input;
13523 debug_assert!(
13524 _pv_q.len() > 0,
13525 "Contract effective_context: precondition violated — q.len() > 0"
13526 );
13527 }};
13528}
13529
13530macro_rules! contract_pre_multi_layer_receptive_field {
13533 () => {{}};
13534 ($input:expr) => {{
13535 let _pv_q = &$input;
13536 debug_assert!(
13537 _pv_q.len() > 0,
13538 "Contract multi_layer_receptive_field: precondition violated — q.len() > 0"
13539 );
13540 }};
13541}
13542
13543macro_rules! contract_pre_window_mask {
13546 () => {{}};
13547 ($input:expr) => {{
13548 let _pv_q = &$input;
13549 debug_assert!(_pv_q.len() > 0,
13550 "Contract window_mask: precondition violated — q.len() > 0");
13551 }};
13552}
13553
13554macro_rules! contract_pre_softmax {
13560 () => {{}};
13561 ($input:expr) => {{
13562 let _pv_x = &$input;
13563 debug_assert!(_pv_x.len() > 0, "Contract softmax: precondition violated — x.len() > 0");
13564 debug_assert!(
13565 _pv_x.iter().all(|v| v.is_finite()),
13566 "Contract softmax: precondition violated — x.iter().all(|v| v.is_finite())"
13567 );
13568 }};
13569}
13570
13571macro_rules! contract_post_softmax {
13574 ($result:expr) => {{
13575 let _contract_result = &$result;
13576 debug_assert!(_contract_result.iter().all(|v| *v > 0.0), "Contract softmax: postcondition violated — result.iter().all(|v| *v > 0.0)");
13577 debug_assert!((_contract_result.iter().sum::<f32>() - 1.0).abs() < 1e-5, "Contract softmax: postcondition violated — (result.iter().sum::<f32>() - 1.0).abs() < 1e-5");
13578 }};
13579}
13580
13581macro_rules! contract_softmax {
13583 ($input:expr, $body:expr) => {{
13584 contract_pre_softmax!($input);
13585 let _contract_result = $body;
13586 contract_post_softmax!(_contract_result);
13587 _contract_result
13588 }};
13589}
13590
13591macro_rules! contract_pre_token_bounds {
13600 () => {{}};
13601 ($input:expr) => {{
13602 let _pv_input = &$input;
13603 debug_assert!(
13604 _pv_input.len() > 0,
13605 "Contract token_bounds: precondition violated — input.len() > 0"
13606 );
13607 }};
13608}
13609
13610macro_rules! contract_pre_acceptance_probability {
13616 () => {{}};
13617 ($input:expr) => {{
13618 let _pv_input = &$input;
13619 debug_assert!(
13620 _pv_input.len() > 0,
13621 "Contract acceptance_probability: precondition violated — input.len() > 0"
13622 );
13623 }};
13624}
13625
13626macro_rules! contract_pre_output_equivalence {
13629 () => {{}};
13630 ($input:expr) => {{
13631 let _pv_input = &$input;
13632 debug_assert!(
13633 _pv_input.len() > 0,
13634 "Contract output_equivalence: precondition violated — input.len() > 0"
13635 );
13636 }};
13637}
13638
13639macro_rules! contract_pre_token_acceptance {
13642 () => {{}};
13643 ($input:expr) => {{
13644 let _pv_input = &$input;
13645 debug_assert!(
13646 _pv_input.len() > 0,
13647 "Contract token_acceptance: precondition violated — input.len() > 0"
13648 );
13649 }};
13650}
13651
13652macro_rules! contract_pre_selective_gate {
13658 () => {{}};
13659 ($input:expr) => {{
13660 let _pv_input = &$input;
13661 debug_assert!(
13662 _pv_input.len() > 0,
13663 "Contract selective_gate: precondition violated — input.len() > 0"
13664 );
13665 debug_assert!(
13666 _pv_input.iter().all(|v| v.is_finite()),
13667 "Contract selective_gate: precondition violated — input.iter().all(|v| v.is_finite())"
13668 );
13669 }};
13670}
13671
13672macro_rules! contract_pre_ssm_discretize {
13675 () => {{}};
13676 ($input:expr) => {{
13677 let _pv_x = &$input;
13678 debug_assert!(
13679 _pv_x.iter().all(|v| v.is_finite()),
13680 "Contract ssm_discretize: precondition violated — x.iter().all(|v| v.is_finite())"
13681 );
13682 debug_assert!(
13683 _pv_x.len() > 0,
13684 "Contract ssm_discretize: precondition violated — x.len() > 0"
13685 );
13686 }};
13687}
13688
13689macro_rules! contract_pre_ssm_scan {
13692 () => {{}};
13693 ($input:expr) => {{
13694 let _pv_input = &$input;
13695 debug_assert!(
13696 _pv_input.len() > 0,
13697 "Contract ssm_scan: precondition violated — input.len() > 0"
13698 );
13699 debug_assert!(
13700 _pv_input.iter().all(|v| v.is_finite()),
13701 "Contract ssm_scan: precondition violated — input.iter().all(|v| v.is_finite())"
13702 );
13703 }};
13704}
13705
13706macro_rules! contract_pre_event_store_append_only {
13712 () => {{}};
13713 ($input:expr) => {{
13714 let _contract_input = &$input;
13715 }};
13716}
13717
13718macro_rules! contract_post_event_store_append_only {
13721 ($result:expr) => {{
13722 let _contract_result = &$result;
13723 }};
13724}
13725
13726macro_rules! contract_event_store_append_only {
13728 ($input:expr, $body:expr) => {{
13729 contract_pre_event_store_append_only!($input);
13730 let _contract_result = $body;
13731 contract_post_event_store_append_only!(_contract_result);
13732 _contract_result
13733 }};
13734}
13735
13736macro_rules! contract_pre_refactor_transitions {
13739 () => {{}};
13740 ($input:expr) => {{
13741 let _contract_input = &$input;
13742 }};
13743}
13744
13745macro_rules! contract_post_refactor_transitions {
13748 ($result:expr) => {{
13749 let _contract_result = &$result;
13750 }};
13751}
13752
13753macro_rules! contract_refactor_transitions {
13755 ($input:expr, $body:expr) => {{
13756 contract_pre_refactor_transitions!($input);
13757 let _contract_result = $body;
13758 contract_post_refactor_transitions!(_contract_result);
13759 _contract_result
13760 }};
13761}
13762
13763macro_rules! contract_pre_snapshot_recovery {
13766 () => {{}};
13767 ($input:expr) => {{
13768 let _contract_input = &$input;
13769 }};
13770}
13771
13772macro_rules! contract_post_snapshot_recovery {
13775 ($result:expr) => {{
13776 let _contract_result = &$result;
13777 }};
13778}
13779
13780macro_rules! contract_snapshot_recovery {
13782 ($input:expr, $body:expr) => {{
13783 contract_pre_snapshot_recovery!($input);
13784 let _contract_result = $body;
13785 contract_post_snapshot_recovery!(_contract_result);
13786 _contract_result
13787 }};
13788}
13789
13790macro_rules! contract_pre_closure_completeness {
13796 () => {{}};
13797 ($input:expr) => {{
13798 let _pv_entry = &$input;
13799 }};
13800}
13801
13802macro_rules! contract_pre_derivation_determinism {
13805 () => {{}};
13806 ($input:expr) => {{
13807 let _pv_d = &$input;
13808 }};
13809}
13810
13811macro_rules! contract_pre_far_archive_roundtrip {
13814 () => {{}};
13815 ($input:expr) => {{
13816 let _pv_dir = &$input;
13817 debug_assert!(
13818 _pv_dir.is__pv_dir(),
13819 "Contract far_archive_roundtrip: precondition violated — dir.is_dir()"
13820 );
13821 }};
13822}
13823
13824macro_rules! contract_pre_gc_safety {
13827 () => {{}};
13828 ($input:expr) => {{
13829 let _pv_x = &$input;
13830 }};
13831}
13832
13833macro_rules! contract_pre_purity_monotonicity {
13836 () => {{}};
13837 ($input:expr) => {{
13838 let _pv_d = &$input;
13839 }};
13840}
13841
13842macro_rules! contract_pre_tpot_definition {
13848 () => {{}};
13849 ($input:expr) => {{
13850 let _pv_input = &$input;
13851 debug_assert!(_pv_input.len() > 0,
13852 "Contract tpot_definition: precondition violated — input.len() > 0");
13853 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
13854 "Contract tpot_definition: precondition violated — input.iter().all(|v| v.is_finite())");
13855 }};
13856}
13857
13858macro_rules! contract_pre_decision_function {
13864 () => {{}};
13865 ($input:expr) => {{
13866 let _pv_input = &$input;
13867 debug_assert!(_pv_input.len() > 0,
13868 "Contract decision_function: precondition violated — input.len() > 0");
13869 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
13870 "Contract decision_function: precondition violated — input.iter().all(|v| v.is_finite())");
13871 }};
13872}
13873
13874macro_rules! contract_pre_hinge_loss {
13877 () => {{}};
13878 ($input:expr) => {{
13879 let _pv_predicted = &$input;
13880 debug_assert!(
13881 _pv_predicted.len() > 0,
13882 "Contract hinge_loss: precondition violated — predicted.len() > 0"
13883 );
13884 }};
13885}
13886
13887macro_rules! contract_pre_margin {
13890 () => {{}};
13891 ($input:expr) => {{
13892 let _pv_input = &$input;
13893 debug_assert!(
13894 _pv_input.len() > 0,
13895 "Contract margin: precondition violated — input.len() > 0"
13896 );
13897 debug_assert!(
13898 _pv_input.iter().all(|v| v.is_finite()),
13899 "Contract margin: precondition violated — input.iter().all(|v| v.is_finite())"
13900 );
13901 }};
13902}
13903
13904macro_rules! contract_pre_svm_predict {
13907 () => {{}};
13908 ($input:expr) => {{
13909 let _pv_input = &$input;
13910 debug_assert!(
13911 _pv_input.len() > 0,
13912 "Contract svm_predict: precondition violated — input.len() > 0"
13913 );
13914 debug_assert!(
13915 _pv_input.iter().all(|v| v.is_finite()),
13916 "Contract svm_predict: precondition violated — input.iter().all(|v| v.is_finite())"
13917 );
13918 }};
13919}
13920
13921macro_rules! contract_pre_silu {
13927 () => {{}};
13928 ($input:expr) => {{
13929 let _pv_x = &$input;
13930 debug_assert!(
13931 _pv_x.iter().all(|v| v.is_finite()),
13932 "Contract silu: precondition violated — x.iter().all(|v| v.is_finite())"
13933 );
13934 debug_assert!(_pv_x.len() > 0, "Contract silu: precondition violated — x.len() > 0");
13935 }};
13936}
13937
13938macro_rules! contract_pre_swiglu {
13941 () => {{}};
13942 ($input:expr) => {{
13943 let _pv_x = &$input;
13944 debug_assert!(_pv_x.len() > 0, "Contract swiglu: precondition violated — x.len() > 0");
13945 debug_assert!(
13946 _pv_x.iter().all(|v| v.is_finite()),
13947 "Contract swiglu: precondition violated — x.iter().all(|v| v.is_finite())"
13948 );
13949 }};
13950}
13951
13952macro_rules! contract_post_swiglu {
13955 ($result:expr) => {{
13956 let _contract_result = &$result;
13957 debug_assert!(
13958 _contract_result.iter().all(|v| v.is_finite()),
13959 "Contract swiglu: postcondition violated — result.iter().all(|v| v.is_finite())"
13960 );
13961 }};
13962}
13963
13964macro_rules! contract_swiglu {
13966 ($input:expr, $body:expr) => {{
13967 contract_pre_swiglu!($input);
13968 let _contract_result = $body;
13969 contract_post_swiglu!(_contract_result);
13970 _contract_result
13971 }};
13972}
13973
13974macro_rules! contract_pre_health_check_retry {
13980 () => {{}};
13981 ($input:expr) => {{
13982 let _pv_hc = &$input;
13983 }};
13984}
13985
13986macro_rules! contract_pre_pipeline_dag_execution {
13989 () => {{}};
13990 ($input:expr) => {{
13991 let _pv_stages = &$input;
13992 debug_assert!(
13993 _pv_stages.len() > 0,
13994 "Contract pipeline_dag_execution: precondition violated — stages.len() > 0"
13995 );
13996 }};
13997}
13998
13999macro_rules! contract_pre_quality_gate_enforcement {
14002 () => {{}};
14003 ($input:expr) => {{
14004 let _pv_gate = &$input;
14005 }};
14006}
14007
14008macro_rules! contract_pre_task_status_terminal {
14011 () => {{}};
14012 ($input:expr) => {{
14013 let _contract_input = &$input;
14014 }};
14015}
14016
14017macro_rules! contract_pre_calculate_tdg {
14023 () => {{}};
14024 ($input:expr) => {{
14025 let _contract_input = &$input;
14026 }};
14027}
14028
14029macro_rules! contract_post_calculate_tdg {
14032 ($result:expr) => {{
14033 let _contract_result = &$result;
14034 debug_assert!(
14035 *_contract_result >= 0.0 && *_contract_result <= 100.0,
14036 "Contract calculate_tdg: postcondition violated — result >= 0.0 && result <= 100.0"
14037 );
14038 }};
14039}
14040
14041macro_rules! contract_calculate_tdg {
14043 ($input:expr, $body:expr) => {{
14044 contract_pre_calculate_tdg!($input);
14045 let _contract_result = $body;
14046 contract_post_calculate_tdg!(_contract_result);
14047 _contract_result
14048 }};
14049}
14050
14051macro_rules! contract_pre_letter_grade {
14054 () => {{}};
14055 ($input:expr) => {{
14056 let _pv_grad_output = &$input;
14057 debug_assert!(_pv_grad_output.len() > 0,
14058 "Contract letter_grade: precondition violated — grad_output.len() > 0");
14059 debug_assert!(_pv_grad_output.iter().all(|v| v.is_finite()),
14060 "Contract letter_grade: precondition violated — grad_output.iter().all(|v| v.is_finite())");
14061 }};
14062}
14063
14064macro_rules! contract_post_letter_grade {
14067 ($result:expr) => {{
14068 let _contract_result = &$result;
14069 }};
14070}
14071
14072macro_rules! contract_letter_grade {
14074 ($input:expr, $body:expr) => {{
14075 contract_pre_letter_grade!($input);
14076 let _contract_result = $body;
14077 contract_post_letter_grade!(_contract_result);
14078 _contract_result
14079 }};
14080}
14081
14082macro_rules! contract_pre_architecture_delta {
14088 () => {{}};
14089 ($input:expr) => {{
14090 let _pv_input = &$input;
14091 debug_assert!(_pv_input.len() > 0,
14092 "Contract architecture_delta: precondition violated — input.len() > 0");
14093 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
14094 "Contract architecture_delta: precondition violated — input.iter().all(|v| v.is_finite())");
14095 }};
14096}
14097
14098macro_rules! contract_pre_parameter_decomposition {
14101 () => {{}};
14102 ($input:expr) => {{
14103 let _pv_indices = &$input;
14104 debug_assert!(
14105 _pv_indices.len() > 0,
14106 "Contract parameter_decomposition: precondition violated — indices.len() > 0"
14107 );
14108 }};
14109}
14110
14111macro_rules! contract_pre_quantization_bytes {
14114 () => {{}};
14115 ($input:expr) => {{
14116 let _pv_input = &$input;
14117 debug_assert!(
14118 _pv_input.len() > 0,
14119 "Contract quantization_bytes: precondition violated — input.len() > 0"
14120 );
14121 }};
14122}
14123
14124macro_rules! contract_pre_tensor_count {
14127 () => {{}};
14128 ($input:expr) => {{
14129 let _pv_input = &$input;
14130 debug_assert!(
14131 _pv_input.len() > 0,
14132 "Contract tensor_count: precondition violated — input.len() > 0"
14133 );
14134 debug_assert!(
14135 _pv_input.iter().all(|v| v.is_finite()),
14136 "Contract tensor_count: precondition violated — input.iter().all(|v| v.is_finite())"
14137 );
14138 }};
14139}
14140
14141macro_rules! contract_pre_tied_embeddings {
14144 () => {{}};
14145 ($input:expr) => {{
14146 let _pv_indices = &$input;
14147 debug_assert!(
14148 _pv_indices.len() > 0,
14149 "Contract tied_embeddings: precondition violated — indices.len() > 0"
14150 );
14151 }};
14152}
14153
14154macro_rules! contract_pre_identity {
14160 () => {{}};
14161 ($input:expr) => {{
14162 let _pv_a = &$input;
14163 debug_assert!(_pv_a.len() > 0, "Contract identity: precondition violated — a.len() > 0");
14164 }};
14165}
14166
14167macro_rules! contract_pre_quant_dispatch_exhaustiveness {
14170 () => {{}};
14171 ($input:expr) => {{
14172 let _contract_input = &$input;
14173 }};
14174}
14175
14176macro_rules! contract_pre_transpose_invariant {
14179 () => {{}};
14180 ($input:expr) => {{
14181 let _contract_input = &$input;
14182 }};
14183}
14184
14185macro_rules! contract_pre_validated_tensor_construction {
14188 () => {{}};
14189 ($input:expr) => {{
14190 let _pv_data = &$input;
14191 debug_assert!(
14192 _pv_data.len() > 0,
14193 "Contract validated_tensor_construction: precondition violated — data.len() > 0"
14194 );
14195 }};
14196}
14197
14198macro_rules! contract_pre_architecture_normalization {
14204 () => {{}};
14205 ($input:expr) => {{
14206 let _pv_input = &$input;
14207 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
14208 "Contract architecture_normalization: precondition violated — input.iter().all(|v| v.is_finite())");
14209 debug_assert!(_pv_input.len() > 0,
14210 "Contract architecture_normalization: precondition violated — input.len() > 0");
14211 }};
14212}
14213
14214macro_rules! contract_pre_name_resolution {
14217 () => {{}};
14218 ($input:expr) => {{
14219 let _pv_input = &$input;
14220 debug_assert!(_pv_input.len() > 0,
14221 "Contract name_resolution: precondition violated — input.len() > 0");
14222 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
14223 "Contract name_resolution: precondition violated — input.iter().all(|v| v.is_finite())");
14224 }};
14225}
14226
14227macro_rules! contract_pre_identity {
14233 () => {{}};
14234 ($input:expr) => {{
14235 let _pv_a = &$input;
14236 debug_assert!(_pv_a.len() > 0, "Contract identity: precondition violated — a.len() > 0");
14237 }};
14238}
14239
14240macro_rules! contract_pre_gqa_grouping {
14246 () => {{}};
14247 ($input:expr) => {{
14248 let _pv_q = &$input;
14249 debug_assert!(
14250 _pv_q.len() > 0,
14251 "Contract gqa_grouping: precondition violated — q.len() > 0"
14252 );
14253 }};
14254}
14255
14256macro_rules! contract_pre_lm_head {
14259 () => {{}};
14260 ($input:expr) => {{
14261 let _pv_input = &$input;
14262 debug_assert!(
14263 _pv_input.len() > 0,
14264 "Contract lm_head: precondition violated — input.len() > 0"
14265 );
14266 debug_assert!(
14267 _pv_input.iter().all(|v| v.is_finite()),
14268 "Contract lm_head: precondition violated — input.iter().all(|v| v.is_finite())"
14269 );
14270 }};
14271}
14272
14273macro_rules! contract_pre_qkv_projection {
14276 () => {{}};
14277 ($input:expr) => {{
14278 let _pv_input = &$input;
14279 debug_assert!(
14280 _pv_input.len() > 0,
14281 "Contract qkv_projection: precondition violated — input.len() > 0"
14282 );
14283 debug_assert!(
14284 _pv_input.iter().all(|v| v.is_finite()),
14285 "Contract qkv_projection: precondition violated — input.iter().all(|v| v.is_finite())"
14286 );
14287 }};
14288}
14289
14290macro_rules! contract_pre_residual {
14293 () => {{}};
14294 ($input:expr) => {{
14295 let _pv_input = &$input;
14296 debug_assert!(
14297 _pv_input.len() > 0,
14298 "Contract residual: precondition violated — input.len() > 0"
14299 );
14300 debug_assert!(
14301 _pv_input.iter().all(|v| v.is_finite()),
14302 "Contract residual: precondition violated — input.iter().all(|v| v.is_finite())"
14303 );
14304 }};
14305}
14306
14307macro_rules! contract_pre_swiglu_shape {
14310 () => {{}};
14311 ($input:expr) => {{
14312 let _pv_input = &$input;
14313 debug_assert!(
14314 _pv_input.len() > 0,
14315 "Contract swiglu_shape: precondition violated — input.len() > 0"
14316 );
14317 debug_assert!(
14318 _pv_input.iter().all(|v| v.is_finite()),
14319 "Contract swiglu_shape: precondition violated — input.iter().all(|v| v.is_finite())"
14320 );
14321 }};
14322}
14323
14324macro_rules! contract_pre_lock_order_invariant {
14330 () => {{}};
14331 ($input:expr) => {{
14332 let _contract_input = &$input;
14333 }};
14334}
14335
14336macro_rules! contract_post_lock_order_invariant {
14339 ($result:expr) => {{
14340 let _contract_result = &$result;
14341 }};
14342}
14343
14344macro_rules! contract_lock_order_invariant {
14346 ($input:expr, $body:expr) => {{
14347 contract_pre_lock_order_invariant!($input);
14348 let _contract_result = $body;
14349 contract_post_lock_order_invariant!(_contract_result);
14350 _contract_result
14351 }};
14352}
14353
14354macro_rules! contract_pre_race_freedom {
14357 () => {{}};
14358 ($input:expr) => {{
14359 let _contract_input = &$input;
14360 }};
14361}
14362
14363macro_rules! contract_post_race_freedom {
14366 ($result:expr) => {{
14367 let _contract_result = &$result;
14368 }};
14369}
14370
14371macro_rules! contract_race_freedom {
14373 ($input:expr, $body:expr) => {{
14374 contract_pre_race_freedom!($input);
14375 let _contract_result = $body;
14376 contract_post_race_freedom!(_contract_result);
14377 _contract_result
14378 }};
14379}
14380
14381macro_rules! contract_pre_tied_lm_head {
14387 () => {{}};
14388 ($input:expr) => {{
14389 let _pv_indices = &$input;
14390 debug_assert!(
14391 _pv_indices.len() > 0,
14392 "Contract tied_lm_head: precondition violated — indices.len() > 0"
14393 );
14394 }};
14395}
14396
14397macro_rules! contract_pre_identity {
14403 () => {{}};
14404 ($input:expr) => {{
14405 let _pv_a = &$input;
14406 debug_assert!(_pv_a.len() > 0, "Contract identity: precondition violated — a.len() > 0");
14407 }};
14408}
14409
14410macro_rules! contract_pre_byte_encoder_coverage {
14416 () => {{}};
14417 ($input:expr) => {{
14418 let _contract_input = &$input;
14419 }};
14420}
14421
14422macro_rules! contract_pre_identity {
14425 () => {{}};
14426 ($input:expr) => {{
14427 let _contract_input = &$input;
14428 debug_assert!(
14429 !_contract_input.is_empty(),
14430 "Contract identity: precondition violated — !input.is_empty()"
14431 );
14432 }};
14433}
14434
14435macro_rules! contract_pre_roundtrip_encoding {
14438 () => {{}};
14439 ($input:expr) => {{
14440 let _contract_input = &$input;
14441 }};
14442}
14443
14444macro_rules! contract_pre_deterministic_encode {
14450 () => {{}};
14451 ($input:expr) => {{
14452 let _contract_input = &$input;
14453 }};
14454}
14455
14456macro_rules! contract_post_deterministic_encode {
14459 ($result:expr) => {{
14460 let _contract_result = &$result;
14461 }};
14462}
14463
14464macro_rules! contract_deterministic_encode {
14466 ($input:expr, $body:expr) => {{
14467 contract_pre_deterministic_encode!($input);
14468 let _contract_result = $body;
14469 contract_post_deterministic_encode!(_contract_result);
14470 _contract_result
14471 }};
14472}
14473
14474macro_rules! contract_pre_empty_input {
14477 () => {{}};
14478 ($input:expr) => {{
14479 let _contract_input = &$input;
14480 }};
14481}
14482
14483macro_rules! contract_post_empty_input {
14486 ($result:expr) => {{
14487 let _contract_result = &$result;
14488 }};
14489}
14490
14491macro_rules! contract_empty_input {
14493 ($input:expr, $body:expr) => {{
14494 contract_pre_empty_input!($input);
14495 let _contract_result = $body;
14496 contract_post_empty_input!(_contract_result);
14497 _contract_result
14498 }};
14499}
14500
14501macro_rules! contract_pre_roundtrip {
14504 () => {{}};
14505 ($input:expr) => {{
14506 let _contract_input = &$input;
14507 }};
14508}
14509
14510macro_rules! contract_post_roundtrip {
14513 ($result:expr) => {{
14514 let _contract_result = &$result;
14515 }};
14516}
14517
14518macro_rules! contract_roundtrip {
14520 ($input:expr, $body:expr) => {{
14521 contract_pre_roundtrip!($input);
14522 let _contract_result = $body;
14523 contract_post_roundtrip!(_contract_result);
14524 _contract_result
14525 }};
14526}
14527
14528macro_rules! contract_pre_thread_safety {
14531 () => {{}};
14532 ($input:expr) => {{
14533 let _contract_input = &$input;
14534 }};
14535}
14536
14537macro_rules! contract_post_thread_safety {
14540 ($result:expr) => {{
14541 let _contract_result = &$result;
14542 }};
14543}
14544
14545macro_rules! contract_thread_safety {
14547 ($input:expr, $body:expr) => {{
14548 contract_pre_thread_safety!($input);
14549 let _contract_result = $body;
14550 contract_post_thread_safety!(_contract_result);
14551 _contract_result
14552 }};
14553}
14554
14555macro_rules! contract_pre_vocab_size_bound {
14558 () => {{}};
14559 ($input:expr) => {{
14560 let _contract_input = &$input;
14561 }};
14562}
14563
14564macro_rules! contract_post_vocab_size_bound {
14567 ($result:expr) => {{
14568 let _contract_result = &$result;
14569 }};
14570}
14571
14572macro_rules! contract_vocab_size_bound {
14574 ($input:expr, $body:expr) => {{
14575 contract_pre_vocab_size_bound!($input);
14576 let _contract_result = $body;
14577 contract_post_vocab_size_bound!(_contract_result);
14578 _contract_result
14579 }};
14580}
14581
14582macro_rules! contract_pre_otel_format {
14588 () => {{}};
14589 ($input:expr) => {{
14590 let _contract_input = &$input;
14591 }};
14592}
14593
14594macro_rules! contract_pre_trace_capture {
14597 () => {{}};
14598 ($input:expr) => {{
14599 let _contract_input = &$input;
14600 }};
14601}
14602
14603macro_rules! contract_pre_trace_comparison {
14606 () => {{}};
14607 ($input:expr) => {{
14608 let _pv_golden = &$input;
14609 debug_assert!(
14610 _pv_golden.len() > 0,
14611 "Contract trace_comparison: precondition violated — golden.len() > 0"
14612 );
14613 }};
14614}
14615
14616macro_rules! contract_pre_metric_monotonicity {
14622 () => {{}};
14623 ($input:expr) => {{
14624 let _contract_input = &$input;
14625 }};
14626}
14627
14628macro_rules! contract_post_metric_monotonicity {
14631 ($result:expr) => {{
14632 let _contract_result = &$result;
14633 }};
14634}
14635
14636macro_rules! contract_metric_monotonicity {
14638 ($input:expr, $body:expr) => {{
14639 contract_pre_metric_monotonicity!($input);
14640 let _contract_result = $body;
14641 contract_post_metric_monotonicity!(_contract_result);
14642 _contract_result
14643 }};
14644}
14645
14646macro_rules! contract_pre_renacer_backward_compat {
14649 () => {{}};
14650 ($input:expr) => {{
14651 let _contract_input = &$input;
14652 }};
14653}
14654
14655macro_rules! contract_post_renacer_backward_compat {
14658 ($result:expr) => {{
14659 let _contract_result = &$result;
14660 }};
14661}
14662
14663macro_rules! contract_renacer_backward_compat {
14665 ($input:expr, $body:expr) => {{
14666 contract_pre_renacer_backward_compat!($input);
14667 let _contract_result = $body;
14668 contract_post_renacer_backward_compat!(_contract_result);
14669 _contract_result
14670 }};
14671}
14672
14673macro_rules! contract_pre_span_parentage {
14676 () => {{}};
14677 ($input:expr) => {{
14678 let _contract_input = &$input;
14679 }};
14680}
14681
14682macro_rules! contract_post_span_parentage {
14685 ($result:expr) => {{
14686 let _contract_result = &$result;
14687 }};
14688}
14689
14690macro_rules! contract_span_parentage {
14692 ($input:expr, $body:expr) => {{
14693 contract_pre_span_parentage!($input);
14694 let _contract_result = $body;
14695 contract_post_span_parentage!(_contract_result);
14696 _contract_result
14697 }};
14698}
14699
14700macro_rules! contract_pre_ema_loss {
14706 () => {{}};
14707 ($input:expr) => {{
14708 let _pv_predicted = &$input;
14709 debug_assert!(
14710 _pv_predicted.len() > 0,
14711 "Contract ema_loss: precondition violated — predicted.len() > 0"
14712 );
14713 }};
14714}
14715
14716macro_rules! contract_pre_val_split {
14719 () => {{}};
14720 ($input:expr) => {{
14721 let _pv_input = &$input;
14722 debug_assert!(
14723 _pv_input.len() > 0,
14724 "Contract val_split: precondition violated — input.len() > 0"
14725 );
14726 debug_assert!(
14727 _pv_input.iter().all(|v| v.is_finite()),
14728 "Contract val_split: precondition violated — input.iter().all(|v| v.is_finite())"
14729 );
14730 }};
14731}
14732
14733macro_rules! contract_pre_warmup_lr {
14736 () => {{}};
14737 ($input:expr) => {{
14738 let _pv_params = &$input;
14739 debug_assert!(
14740 _pv_params.len() > 0,
14741 "Contract warmup_lr: precondition violated — params.len() > 0"
14742 );
14743 }};
14744}
14745
14746macro_rules! contract_pre_parse_soundness {
14752 () => {{}};
14753 ($input:expr) => {{
14754 let _contract_input = &$input;
14755 }};
14756}
14757
14758macro_rules! contract_pre_transpile_determinism {
14761 () => {{}};
14762 ($input:expr) => {{
14763 let _contract_input = &$input;
14764 }};
14765}
14766
14767macro_rules! contract_pre_type_preservation {
14770 () => {{}};
14771 ($input:expr) => {{
14772 let _contract_input = &$input;
14773 }};
14774}
14775
14776macro_rules! contract_pre_ast_to_program {
14782 () => {{}};
14783 ($input:expr) => {{
14784 let _contract_input = &$input;
14785 }};
14786}
14787
14788macro_rules! contract_pre_pipeline_composition {
14791 () => {{}};
14792 ($input:expr) => {{
14793 let _pv_stages = &$input;
14794 debug_assert!(
14795 _pv_stages.len() > 0,
14796 "Contract pipeline_composition: precondition violated — stages.len() > 0"
14797 );
14798 }};
14799}
14800
14801macro_rules! contract_pre_transpile_determinism {
14804 () => {{}};
14805 ($input:expr) => {{
14806 let _contract_input = &$input;
14807 }};
14808}
14809
14810macro_rules! contract_pre_semantic_equivalence {
14816 () => {{}};
14817 ($input:expr) => {{
14818 let _contract_input = &$input;
14819 }};
14820}
14821
14822macro_rules! contract_post_semantic_equivalence {
14825 ($result:expr) => {{
14826 let _contract_result = &$result;
14827 }};
14828}
14829
14830macro_rules! contract_semantic_equivalence {
14832 ($input:expr, $body:expr) => {{
14833 contract_pre_semantic_equivalence!($input);
14834 let _contract_result = $body;
14835 contract_post_semantic_equivalence!(_contract_result);
14836 _contract_result
14837 }};
14838}
14839
14840macro_rules! contract_pre_transpile_determinism {
14843 () => {{}};
14844 ($input:expr) => {{
14845 let _contract_input = &$input;
14846 }};
14847}
14848
14849macro_rules! contract_post_transpile_determinism {
14852 ($result:expr) => {{
14853 let _contract_result = &$result;
14854 }};
14855}
14856
14857macro_rules! contract_transpile_determinism {
14859 ($input:expr, $body:expr) => {{
14860 contract_pre_transpile_determinism!($input);
14861 let _contract_result = $body;
14862 contract_post_transpile_determinism!(_contract_result);
14863 _contract_result
14864 }};
14865}
14866
14867macro_rules! contract_pre_type_preservation {
14870 () => {{}};
14871 ($input:expr) => {{
14872 let _contract_input = &$input;
14873 }};
14874}
14875
14876macro_rules! contract_post_type_preservation {
14879 ($result:expr) => {{
14880 let _contract_result = &$result;
14881 }};
14882}
14883
14884macro_rules! contract_type_preservation {
14886 ($input:expr, $body:expr) => {{
14887 contract_pre_type_preservation!($input);
14888 let _contract_result = $body;
14889 contract_post_type_preservation!(_contract_result);
14890 _contract_result
14891 }};
14892}
14893
14894macro_rules! contract_pre_transpose {
14900 () => {{}};
14901 ($input:expr) => {{
14902 let _pv_a = &$input;
14903 debug_assert!(_pv_a.len() > 0, "Contract transpose: precondition violated — a.len() > 0");
14904 }};
14905}
14906
14907macro_rules! contract_pre_event_dispatch {
14913 () => {{}};
14914 ($input:expr) => {{
14915 let _contract_input = &$input;
14916 }};
14917}
14918
14919macro_rules! contract_pre_render_cycle_correctness {
14922 () => {{}};
14923 ($input:expr) => {{
14924 let _pv_buffer = &$input;
14925 }};
14926}
14927
14928macro_rules! contract_pre_terminal_restore {
14931 () => {{}};
14932 ($input:expr) => {{
14933 let _contract_input = &$input;
14934 }};
14935}
14936
14937macro_rules! contract_pre_widget_lifecycle {
14940 () => {{}};
14941 ($input:expr) => {{
14942 let _contract_input = &$input;
14943 }};
14944}
14945
14946macro_rules! contract_pre_adaptive_degradation {
14952 () => {{}};
14953 ($input:expr) => {{
14954 let _contract_input = &$input;
14955 }};
14956}
14957
14958macro_rules! contract_post_adaptive_degradation {
14961 ($result:expr) => {{
14962 let _contract_result = &$result;
14963 }};
14964}
14965
14966macro_rules! contract_adaptive_degradation {
14968 ($input:expr, $body:expr) => {{
14969 contract_pre_adaptive_degradation!($input);
14970 let _contract_result = $body;
14971 contract_post_adaptive_degradation!(_contract_result);
14972 _contract_result
14973 }};
14974}
14975
14976macro_rules! contract_pre_brick_budget_enforcement {
14979 () => {{}};
14980 ($input:expr) => {{
14981 let _pv_house = &$input;
14982 }};
14983}
14984
14985macro_rules! contract_post_brick_budget_enforcement {
14988 ($result:expr) => {{
14989 let _contract_result = &$result;
14990 }};
14991}
14992
14993macro_rules! contract_brick_budget_enforcement {
14995 ($input:expr, $body:expr) => {{
14996 contract_pre_brick_budget_enforcement!($input);
14997 let _contract_result = $body;
14998 contract_post_brick_budget_enforcement!(_contract_result);
14999 _contract_result
15000 }};
15001}
15002
15003macro_rules! contract_post_cost_display_invariants {
15006 ($result:expr) => {{
15007 let _contract_result = &$result;
15008 }};
15009}
15010
15011macro_rules! contract_pre_panel_layout_nonoverlap {
15014 () => {{}};
15015 ($input:expr) => {{
15016 let _pv_panels = &$input;
15017 debug_assert!(
15018 _pv_panels.len() == 6,
15019 "Contract panel_layout_nonoverlap: precondition violated — panels.len() == 6"
15020 );
15021 }};
15022}
15023
15024macro_rules! contract_post_panel_layout_nonoverlap {
15027 ($result:expr) => {{
15028 let _contract_result = &$result;
15029 }};
15030}
15031
15032macro_rules! contract_panel_layout_nonoverlap {
15034 ($input:expr, $body:expr) => {{
15035 contract_pre_panel_layout_nonoverlap!($input);
15036 let _contract_result = $body;
15037 contract_post_panel_layout_nonoverlap!(_contract_result);
15038 _contract_result
15039 }};
15040}
15041
15042macro_rules! contract_post_sandbox_violation_visibility {
15045 ($result:expr) => {{
15046 let _contract_result = &$result;
15047 }};
15048}
15049
15050macro_rules! contract_post_statusbar_state_display {
15053 ($result:expr) => {{
15054 let _contract_result = &$result;
15055 }};
15056}
15057
15058macro_rules! contract_pre_streaming_token_ordering {
15061 () => {{}};
15062 ($input:expr) => {{
15063 let _pv_x = &$input;
15064 }};
15065}
15066
15067macro_rules! contract_post_streaming_token_ordering {
15070 ($result:expr) => {{
15071 let _contract_result = &$result;
15072 }};
15073}
15074
15075macro_rules! contract_streaming_token_ordering {
15077 ($input:expr, $body:expr) => {{
15078 contract_pre_streaming_token_ordering!($input);
15079 let _contract_result = $body;
15080 contract_post_streaming_token_ordering!(_contract_result);
15081 _contract_result
15082 }};
15083}
15084
15085macro_rules! contract_pre_tool_progress_monotonic {
15088 () => {{}};
15089 ($input:expr) => {{
15090 let _pv_tool_calls = &$input;
15091 debug_assert!(
15092 _pv_tool_calls.len() > 0,
15093 "Contract tool_progress_monotonic: precondition violated — tool_calls.len() > 0"
15094 );
15095 }};
15096}
15097
15098macro_rules! contract_post_tool_progress_monotonic {
15101 ($result:expr) => {{
15102 let _contract_result = &$result;
15103 }};
15104}
15105
15106macro_rules! contract_tool_progress_monotonic {
15108 ($input:expr, $body:expr) => {{
15109 contract_pre_tool_progress_monotonic!($input);
15110 let _contract_result = $body;
15111 contract_post_tool_progress_monotonic!(_contract_result);
15112 _contract_result
15113 }};
15114}
15115
15116macro_rules! contract_pre_cellbuffer_bounds {
15122 () => {{}};
15123 ($input:expr) => {{
15124 let _contract_input = &$input;
15125 }};
15126}
15127
15128macro_rules! contract_post_cellbuffer_bounds {
15131 ($result:expr) => {{
15132 let _contract_result = &$result;
15133 }};
15134}
15135
15136macro_rules! contract_cellbuffer_bounds {
15138 ($input:expr, $body:expr) => {{
15139 contract_pre_cellbuffer_bounds!($input);
15140 let _contract_result = $body;
15141 contract_post_cellbuffer_bounds!(_contract_result);
15142 _contract_result
15143 }};
15144}
15145
15146macro_rules! contract_pre_color_mode_fallback {
15149 () => {{}};
15150 ($input:expr) => {{
15151 let _contract_input = &$input;
15152 }};
15153}
15154
15155macro_rules! contract_post_color_mode_fallback {
15158 ($result:expr) => {{
15159 let _contract_result = &$result;
15160 }};
15161}
15162
15163macro_rules! contract_color_mode_fallback {
15165 ($input:expr, $body:expr) => {{
15166 contract_pre_color_mode_fallback!($input);
15167 let _contract_result = $body;
15168 contract_post_color_mode_fallback!(_contract_result);
15169 _contract_result
15170 }};
15171}
15172
15173macro_rules! contract_pre_diff_renderer_correctness {
15176 () => {{}};
15177 ($input:expr) => {{
15178 let _pv_prev = &$input;
15179 }};
15180}
15181
15182macro_rules! contract_post_diff_renderer_correctness {
15185 ($result:expr) => {{
15186 let _contract_result = &$result;
15187 }};
15188}
15189
15190macro_rules! contract_diff_renderer_correctness {
15192 ($input:expr, $body:expr) => {{
15193 contract_pre_diff_renderer_correctness!($input);
15194 let _contract_result = $body;
15195 contract_post_diff_renderer_correctness!(_contract_result);
15196 _contract_result
15197 }};
15198}
15199
15200macro_rules! contract_pre_dirty_tracking {
15203 () => {{}};
15204 ($input:expr) => {{
15205 let _pv_dirty_mask = &$input;
15206 }};
15207}
15208
15209macro_rules! contract_post_dirty_tracking {
15212 ($result:expr) => {{
15213 let _contract_result = &$result;
15214 }};
15215}
15216
15217macro_rules! contract_dirty_tracking {
15219 ($input:expr, $body:expr) => {{
15220 contract_pre_dirty_tracking!($input);
15221 let _contract_result = $body;
15222 contract_post_dirty_tracking!(_contract_result);
15223 _contract_result
15224 }};
15225}
15226
15227macro_rules! contract_pre_resize_safety {
15230 () => {{}};
15231 ($input:expr) => {{
15232 let _contract_input = &$input;
15233 }};
15234}
15235
15236macro_rules! contract_post_resize_safety {
15239 ($result:expr) => {{
15240 let _contract_result = &$result;
15241 }};
15242}
15243
15244macro_rules! contract_resize_safety {
15246 ($input:expr, $body:expr) => {{
15247 contract_pre_resize_safety!($input);
15248 let _contract_result = $body;
15249 contract_post_resize_safety!(_contract_result);
15250 _contract_result
15251 }};
15252}
15253
15254macro_rules! contract_pre_unicode_width {
15257 () => {{}};
15258 ($input:expr) => {{
15259 let _contract_input = &$input;
15260 }};
15261}
15262
15263macro_rules! contract_post_unicode_width {
15266 ($result:expr) => {{
15267 let _contract_result = &$result;
15268 }};
15269}
15270
15271macro_rules! contract_unicode_width {
15273 ($input:expr, $body:expr) => {{
15274 contract_pre_unicode_width!($input);
15275 let _contract_result = $body;
15276 contract_post_unicode_width!(_contract_result);
15277 _contract_result
15278 }};
15279}
15280
15281macro_rules! contract_pre_zero_alloc_render {
15284 () => {{}};
15285 ($input:expr) => {{
15286 let _pv_buffer = &$input;
15287 }};
15288}
15289
15290macro_rules! contract_post_zero_alloc_render {
15293 ($result:expr) => {{
15294 let _contract_result = &$result;
15295 debug_assert!(allocator_count_during_render == 0, "Contract zero_alloc_render: postcondition violated — allocator_count_during_render == 0");
15296 }};
15297}
15298
15299macro_rules! contract_zero_alloc_render {
15301 ($input:expr, $body:expr) => {{
15302 contract_pre_zero_alloc_render!($input);
15303 let _contract_result = $body;
15304 contract_post_zero_alloc_render!(_contract_result);
15305 _contract_result
15306 }};
15307}
15308
15309macro_rules! contract_pre_container_preservation {
15315 () => {{}};
15316 ($input:expr) => {{
15317 let _pv_input = &$input;
15318 debug_assert!(
15319 _pv_input.len() > 0,
15320 "Contract container_preservation: precondition violated — input.len() > 0"
15321 );
15322 }};
15323}
15324
15325macro_rules! contract_pre_copy_semantics {
15328 () => {{}};
15329 ($input:expr) => {{
15330 let _pv_input = &$input;
15331 debug_assert!(
15332 _pv_input.len() > 0,
15333 "Contract copy_semantics: precondition violated — input.len() > 0"
15334 );
15335 }};
15336}
15337
15338macro_rules! contract_pre_numeric_semantics {
15341 () => {{}};
15342 ($input:expr) => {{
15343 let _pv_input = &$input;
15344 debug_assert!(
15345 _pv_input.len() > 0,
15346 "Contract numeric_semantics: precondition violated — input.len() > 0"
15347 );
15348 }};
15349}
15350
15351macro_rules! contract_pre_type_inference {
15354 () => {{}};
15355 ($input:expr) => {{
15356 let _pv_input = &$input;
15357 debug_assert!(
15358 _pv_input.len() > 0,
15359 "Contract type_inference: precondition violated — input.len() > 0"
15360 );
15361 }};
15362}
15363
15364macro_rules! contract_pre_type_map {
15367 () => {{}};
15368 ($input:expr) => {{
15369 let _pv_input = &$input;
15370 debug_assert!(
15371 _pv_input.len() > 0,
15372 "Contract type_map: precondition violated — input.len() > 0"
15373 );
15374 }};
15375}
15376
15377macro_rules! contract_pre_density_gate {
15383 () => {{}};
15384 ($input:expr) => {{
15385 let _pv_input = &$input;
15386 debug_assert!(
15387 _pv_input.len() > 0,
15388 "Contract density_gate: precondition violated — input.len() > 0"
15389 );
15390 debug_assert!(
15391 _pv_input.iter().all(|v| v.is_finite()),
15392 "Contract density_gate: precondition violated — input.iter().all(|v| v.is_finite())"
15393 );
15394 }};
15395}
15396
15397macro_rules! contract_pre_l2_norm_nondegeneracy {
15400 () => {{}};
15401 ($input:expr) => {{
15402 let _pv_input = &$input;
15403 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
15404 "Contract l2_norm_nondegeneracy: precondition violated — input.iter().all(|v| v.is_finite())");
15405 debug_assert!(_pv_input.len() > 0,
15406 "Contract l2_norm_nondegeneracy: precondition violated — input.len() > 0");
15407 }};
15408}
15409
15410macro_rules! contract_pre_nan_inf_rejection {
15413 () => {{}};
15414 ($input:expr) => {{
15415 let _pv_input = &$input;
15416 debug_assert!(_pv_input.len() > 0,
15417 "Contract nan_inf_rejection: precondition violated — input.len() > 0");
15418 debug_assert!(_pv_input.iter().all(|v| v.is_finite()),
15419 "Contract nan_inf_rejection: precondition violated — input.iter().all(|v| v.is_finite())");
15420 }};
15421}
15422
15423macro_rules! contract_pre_generator_coverage {
15429 () => {{}};
15430 ($input:expr) => {{
15431 let _pv_strategy = &$input;
15432 }};
15433}
15434
15435macro_rules! contract_pre_mutation_soundness {
15438 () => {{}};
15439 ($input:expr) => {{
15440 let _contract_input = &$input;
15441 }};
15442}
15443
15444macro_rules! contract_pre_oracle_verdict {
15447 () => {{}};
15448 ($input:expr) => {{
15449 let _contract_input = &$input;
15450 }};
15451}
15452
15453macro_rules! contract_pre_layout_treemap {
15459 () => {{}};
15460 ($input:expr) => {{
15461 let _pv_nodes = &$input;
15462 debug_assert!(
15463 _pv_nodes.len() > 0,
15464 "Contract layout_treemap: precondition violated — nodes.len() > 0"
15465 );
15466 }};
15467}
15468
15469macro_rules! contract_pre_primitive_bounds {
15472 () => {{}};
15473 ($input:expr) => {{
15474 let _contract_input = &$input;
15475 }};
15476}
15477
15478macro_rules! contract_pre_render_output {
15481 () => {{}};
15482 ($input:expr) => {{
15483 let _contract_input = &$input;
15484 }};
15485}
15486
15487macro_rules! contract_pre_identity {
15496 () => {{}};
15497 ($input:expr) => {{
15498 let _pv_x = &$input;
15499 }};
15500}
15501
15502macro_rules! contract_pre_checkpoint_verification {
15508 () => {{}};
15509 ($input:expr) => {{
15510 let _pv_contract = &$input;
15511 }};
15512}
15513
15514macro_rules! contract_post_checkpoint_verification {
15517 ($result:expr) => {{
15518 let _contract_result = &$result;
15519 }};
15520}
15521
15522macro_rules! contract_checkpoint_verification {
15524 ($input:expr, $body:expr) => {{
15525 contract_pre_checkpoint_verification!($input);
15526 let _contract_result = $body;
15527 contract_post_checkpoint_verification!(_contract_result);
15528 _contract_result
15529 }};
15530}
15531
15532macro_rules! contract_pre_contract_profile {
15535 () => {{}};
15536 ($input:expr) => {{
15537 let _pv_x = &$input;
15538 }};
15539}
15540
15541macro_rules! contract_post_contract_profile {
15544 ($result:expr) => {{
15545 let _contract_result = &$result;
15546 }};
15547}
15548
15549macro_rules! contract_contract_profile {
15551 ($input:expr, $body:expr) => {{
15552 contract_pre_contract_profile!($input);
15553 let _contract_result = $body;
15554 contract_post_contract_profile!(_contract_result);
15555 _contract_result
15556 }};
15557}
15558
15559macro_rules! contract_pre_falsifiable_claim {
15562 () => {{}};
15563 ($input:expr) => {{
15564 let _pv_claim = &$input;
15565 }};
15566}
15567
15568macro_rules! contract_post_falsifiable_claim {
15571 ($result:expr) => {{
15572 let _contract_result = &$result;
15573 }};
15574}
15575
15576macro_rules! contract_falsifiable_claim {
15578 ($input:expr, $body:expr) => {{
15579 contract_pre_falsifiable_claim!($input);
15580 let _contract_result = $body;
15581 contract_post_falsifiable_claim!(_contract_result);
15582 _contract_result
15583 }};
15584}
15585
15586macro_rules! contract_pre_meyer_triad {
15589 () => {{}};
15590 ($input:expr) => {{
15591 let _pv_x = &$input;
15592 }};
15593}
15594
15595macro_rules! contract_post_meyer_triad {
15598 ($result:expr) => {{
15599 let _contract_result = &$result;
15600 }};
15601}
15602
15603macro_rules! contract_meyer_triad {
15605 ($input:expr, $body:expr) => {{
15606 contract_pre_meyer_triad!($input);
15607 let _contract_result = $body;
15608 contract_post_meyer_triad!(_contract_result);
15609 _contract_result
15610 }};
15611}
15612
15613macro_rules! contract_pre_override_accountability {
15616 () => {{}};
15617 ($input:expr) => {{
15618 let _contract_input = &$input;
15619 }};
15620}
15621
15622macro_rules! contract_post_override_accountability {
15625 ($result:expr) => {{
15626 let _contract_result = &$result;
15627 }};
15628}
15629
15630macro_rules! contract_override_accountability {
15632 ($input:expr, $body:expr) => {{
15633 contract_pre_override_accountability!($input);
15634 let _contract_result = $body;
15635 contract_post_override_accountability!(_contract_result);
15636 _contract_result
15637 }};
15638}
15639
15640macro_rules! contract_pre_rescue_protocol {
15643 () => {{}};
15644 ($input:expr) => {{
15645 let _contract_input = &$input;
15646 }};
15647}
15648
15649macro_rules! contract_post_rescue_protocol {
15652 ($result:expr) => {{
15653 let _contract_result = &$result;
15654 }};
15655}
15656
15657macro_rules! contract_rescue_protocol {
15659 ($input:expr, $body:expr) => {{
15660 contract_pre_rescue_protocol!($input);
15661 let _contract_result = $body;
15662 contract_post_rescue_protocol!(_contract_result);
15663 _contract_result
15664 }};
15665}
15666
15667macro_rules! contract_pre_work_lifecycle {
15670 () => {{}};
15671 ($input:expr) => {{
15672 let _pv_x = &$input;
15673 }};
15674}
15675
15676macro_rules! contract_post_work_lifecycle {
15679 ($result:expr) => {{
15680 let _contract_result = &$result;
15681 }};
15682}
15683
15684macro_rules! contract_work_lifecycle {
15686 ($input:expr, $body:expr) => {{
15687 contract_pre_work_lifecycle!($input);
15688 let _contract_result = $body;
15689 contract_post_work_lifecycle!(_contract_result);
15690 _contract_result
15691 }};
15692}
15693
15694