Skip to main content

batuta/
generated_contracts.rs

1// Auto-generated contract assertions from YAML — DO NOT EDIT.
2// Zero cost in release builds (debug_assert!).
3// Regenerate: pv codegen contracts/ -o src/generated_contracts.rs
4// Include:   #[macro_use] #[allow(unused_macros)] mod generated_contracts;
5
6// Auto-generated from contracts/absolute-position-v1.yaml — DO NOT EDIT
7// Contract: absolute-position-v1
8
9/// Preconditions for equation `absolute_position_add`.
10/// Domain-specific. Call: `contract_pre_absolute_position_add!(slice_expr)`
11macro_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
22// Auto-generated from contracts/activation-kernel-v1.yaml — DO NOT EDIT
23// Contract: activation-kernel-v1
24
25/// Preconditions for equation `gelu`.
26/// Domain-specific. Call: `contract_pre_gelu!(slice_expr)`
27macro_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
39/// Preconditions for equation `relu`.
40/// Domain-specific. Call: `contract_pre_relu!(slice_expr)`
41macro_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
53/// Preconditions for equation `silu`.
54/// Domain-specific. Call: `contract_pre_silu!(slice_expr)`
55macro_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
67// Auto-generated from contracts/active-learning-v1.yaml — DO NOT EDIT
68// Contract: active-learning-v1
69
70/// Preconditions for equation `entropy_score`.
71/// Domain-specific. Call: `contract_pre_entropy_score!(slice_expr)`
72macro_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
87/// Preconditions for equation `margin_score`.
88/// Domain-specific. Call: `contract_pre_margin_score!(slice_expr)`
89macro_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
104/// Preconditions for equation `qbc_score`.
105/// Domain-specific. Call: `contract_pre_qbc_score!(slice_expr)`
106macro_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
121/// Preconditions for equation `uncertainty_score`.
122/// Domain-specific. Call: `contract_pre_uncertainty_score!(slice_expr)`
123macro_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
134// Auto-generated from contracts/adamw-kernel-v1.yaml — DO NOT EDIT
135// Contract: adamw-kernel-v1
136
137/// Preconditions for equation `adam_moments`.
138/// Domain-specific. Call: `contract_pre_adam_moments!(slice_expr)`
139macro_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
150/// Preconditions for equation `adam_variance`.
151/// Domain-specific. Call: `contract_pre_adam_variance!(slice_expr)`
152macro_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
163/// Preconditions for equation `bias_correction`.
164/// Domain-specific. Call: `contract_pre_bias_correction!(slice_expr)`
165macro_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
176/// Preconditions for equation `weight_update`.
177/// Domain-specific. Call: `contract_pre_weight_update!(slice_expr)`
178macro_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
189// Auto-generated from contracts/agent-loop-v1.yaml — DO NOT EDIT
190// Contract: agent-loop-v1
191
192/// Preconditions for equation `context_compaction`.
193/// Call at function entry: `contract_pre_context_compaction!(input_expr)`
194macro_rules! contract_pre_context_compaction {
195    () => {{}};
196    ($input:expr) => {{
197        let _contract_input = &$input;
198    }};
199}
200
201/// Postconditions for equation `context_compaction`.
202/// Call before return: `contract_post_context_compaction!(result_expr)`
203macro_rules! contract_post_context_compaction {
204    ($result:expr) => {{
205        let _contract_result = &$result;
206    }};
207}
208
209/// Combined pre+post contract for equation `context_compaction`.
210macro_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
219/// Postconditions for equation `hook_ordering`.
220/// Call before return: `contract_post_hook_ordering!(result_expr)`
221macro_rules! contract_post_hook_ordering {
222    ($result:expr) => {{
223        let _contract_result = &$result;
224    }};
225}
226
227/// Preconditions for equation `loop_termination`.
228/// Domain-specific. Call: `contract_pre_loop_termination!(slice_expr)`
229macro_rules! contract_pre_loop_termination {
230    () => {{}};
231    ($input:expr) => {{
232        let _pv_x = &$input;
233    }};
234}
235
236/// Postconditions for equation `loop_termination`.
237/// Call before return: `contract_post_loop_termination!(result_expr)`
238macro_rules! contract_post_loop_termination {
239    ($result:expr) => {{
240        let _contract_result = &$result;
241    }};
242}
243
244/// Combined pre+post contract for equation `loop_termination`.
245macro_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
254/// Postconditions for equation `parallel_tool_safety`.
255/// Call before return: `contract_post_parallel_tool_safety!(result_expr)`
256macro_rules! contract_post_parallel_tool_safety {
257    ($result:expr) => {{
258        let _contract_result = &$result;
259    }};
260}
261
262/// Preconditions for equation `sandbox_enforcement`.
263/// Domain-specific. Call: `contract_pre_sandbox_enforcement!(slice_expr)`
264macro_rules! contract_pre_sandbox_enforcement {
265    () => {{}};
266    ($input:expr) => {{
267        let _pv_manifest = &$input;
268    }};
269}
270
271/// Postconditions for equation `sandbox_enforcement`.
272/// Call before return: `contract_post_sandbox_enforcement!(result_expr)`
273macro_rules! contract_post_sandbox_enforcement {
274    ($result:expr) => {{
275        let _contract_result = &$result;
276    }};
277}
278
279/// Combined pre+post contract for equation `sandbox_enforcement`.
280macro_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
289/// Postconditions for equation `session_crash_recovery`.
290/// Call before return: `contract_post_session_crash_recovery!(result_expr)`
291macro_rules! contract_post_session_crash_recovery {
292    ($result:expr) => {{
293        let _contract_result = &$result;
294    }};
295}
296
297/// Postconditions for equation `state_machine`.
298/// Call before return: `contract_post_state_machine!(result_expr)`
299macro_rules! contract_post_state_machine {
300    ($result:expr) => {{
301        let _contract_result = &$result;
302    }};
303}
304
305// Auto-generated from contracts/agent-orchestration-v1.yaml — DO NOT EDIT
306// Contract: agent-orchestration-v1
307
308/// Preconditions for equation `daemon_lifecycle`.
309/// Domain-specific. Call: `contract_pre_daemon_lifecycle!(slice_expr)`
310macro_rules! contract_pre_daemon_lifecycle {
311    () => {{}};
312    ($input:expr) => {{
313        let _pv_config = &$input;
314    }};
315}
316
317/// Preconditions for equation `error_classification`.
318/// Call at function entry: `contract_pre_error_classification!(input_expr)`
319macro_rules! contract_pre_error_classification {
320    () => {{}};
321    ($input:expr) => {{
322        let _contract_input = &$input;
323    }};
324}
325
326/// Preconditions for equation `manager_registration`.
327/// Call at function entry: `contract_pre_manager_registration!(input_expr)`
328macro_rules! contract_pre_manager_registration {
329    () => {{}};
330    ($input:expr) => {{
331        let _contract_input = &$input;
332    }};
333}
334
335/// Preconditions for equation `red_metrics`.
336/// Call at function entry: `contract_pre_red_metrics!(input_expr)`
337macro_rules! contract_pre_red_metrics {
338    () => {{}};
339    ($input:expr) => {{
340        let _contract_input = &$input;
341    }};
342}
343
344/// Preconditions for equation `restart_policy`.
345/// Domain-specific. Call: `contract_pre_restart_policy!(slice_expr)`
346macro_rules! contract_pre_restart_policy {
347    () => {{}};
348    ($input:expr) => {{
349        let _pv_BackoffConfig = &$input;
350    }};
351}
352
353/// Preconditions for equation `signal_handling`.
354/// Call at function entry: `contract_pre_signal_handling!(input_expr)`
355macro_rules! contract_pre_signal_handling {
356    () => {{}};
357    ($input:expr) => {{
358        let _contract_input = &$input;
359    }};
360}
361
362// Auto-generated from contracts/agent-ux-v1.yaml — DO NOT EDIT
363// Contract: agent-ux-v1
364
365/// Preconditions for equation `brick_verification`.
366/// Domain-specific. Call: `contract_pre_brick_verification!(slice_expr)`
367macro_rules! contract_pre_brick_verification {
368    () => {{}};
369    ($input:expr) => {{
370        let _pv_brick = &$input;
371    }};
372}
373
374/// Postconditions for equation `brick_verification`.
375/// Call before return: `contract_post_brick_verification!(result_expr)`
376macro_rules! contract_post_brick_verification {
377    ($result:expr) => {{
378        let _contract_result = &$result;
379    }};
380}
381
382/// Combined pre+post contract for equation `brick_verification`.
383macro_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
392/// Preconditions for equation `contrast_accessibility`.
393/// Call at function entry: `contract_pre_contrast_accessibility!(input_expr)`
394macro_rules! contract_pre_contrast_accessibility {
395    () => {{}};
396    ($input:expr) => {{
397        let _contract_input = &$input;
398    }};
399}
400
401/// Postconditions for equation `contrast_accessibility`.
402/// Call before return: `contract_post_contrast_accessibility!(result_expr)`
403macro_rules! contract_post_contrast_accessibility {
404    ($result:expr) => {{
405        let _contract_result = &$result;
406    }};
407}
408
409/// Combined pre+post contract for equation `contrast_accessibility`.
410macro_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
419/// Postconditions for equation `cost_display_accuracy`.
420/// Call before return: `contract_post_cost_display_accuracy!(result_expr)`
421macro_rules! contract_post_cost_display_accuracy {
422    ($result:expr) => {{
423        let _contract_result = &$result;
424    }};
425}
426
427/// Preconditions for equation `frame_budget`.
428/// Domain-specific. Call: `contract_pre_frame_budget!(slice_expr)`
429macro_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
440/// Postconditions for equation `frame_budget`.
441/// Call before return: `contract_post_frame_budget!(result_expr)`
442macro_rules! contract_post_frame_budget {
443    ($result:expr) => {{
444        let _contract_result = &$result;
445    }};
446}
447
448/// Combined pre+post contract for equation `frame_budget`.
449macro_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
458/// Preconditions for equation `layout_correctness`.
459/// Call at function entry: `contract_pre_layout_correctness!(input_expr)`
460macro_rules! contract_pre_layout_correctness {
461    () => {{}};
462    ($input:expr) => {{
463        let _contract_input = &$input;
464    }};
465}
466
467/// Preconditions for equation `pixel_coverage`.
468/// Call at function entry: `contract_pre_pixel_coverage!(input_expr)`
469macro_rules! contract_pre_pixel_coverage {
470    () => {{}};
471    ($input:expr) => {{
472        let _contract_input = &$input;
473    }};
474}
475
476/// Postconditions for equation `pixel_coverage`.
477/// Call before return: `contract_post_pixel_coverage!(result_expr)`
478macro_rules! contract_post_pixel_coverage {
479    ($result:expr) => {{
480        let _contract_result = &$result;
481    }};
482}
483
484/// Combined pre+post contract for equation `pixel_coverage`.
485macro_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
494/// Preconditions for equation `streaming_responsiveness`.
495/// Domain-specific. Call: `contract_pre_streaming_responsiveness!(slice_expr)`
496macro_rules! contract_pre_streaming_responsiveness {
497    () => {{}};
498    ($input:expr) => {{
499        let _pv_provider = &$input;
500    }};
501}
502
503/// Postconditions for equation `streaming_responsiveness`.
504/// Call before return: `contract_post_streaming_responsiveness!(result_expr)`
505macro_rules! contract_post_streaming_responsiveness {
506    ($result:expr) => {{
507        let _contract_result = &$result;
508    }};
509}
510
511/// Combined pre+post contract for equation `streaming_responsiveness`.
512macro_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
521// Auto-generated from contracts/alibi-kernel-v1.yaml — DO NOT EDIT
522// Contract: alibi-kernel-v1
523
524/// Preconditions for equation `alibi_bias`.
525/// Domain-specific. Call: `contract_pre_alibi_bias!(slice_expr)`
526macro_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
537/// Preconditions for equation `alibi_slopes`.
538/// Domain-specific. Call: `contract_pre_alibi_slopes!(slice_expr)`
539macro_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
550// Auto-generated from contracts/apr-architecture-schema-v1.yaml — DO NOT EDIT
551// Contract: apr-architecture-schema-v1
552
553/// Preconditions for equation `architecture_config_invariants`.
554/// Call at function entry: `contract_pre_architecture_config_invariants!(input_expr)`
555macro_rules! contract_pre_architecture_config_invariants {
556    () => {{}};
557    ($input:expr) => {{
558        let _contract_input = &$input;
559    }};
560}
561
562/// Postconditions for equation `architecture_config_invariants`.
563/// Call before return: `contract_post_architecture_config_invariants!(result_expr)`
564macro_rules! contract_post_architecture_config_invariants {
565    ($result:expr) => {{
566        let _contract_result = &$result;
567    }};
568}
569
570/// Combined pre+post contract for equation `architecture_config_invariants`.
571macro_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
580/// Preconditions for equation `attention_tensor_shapes`.
581/// Domain-specific. Call: `contract_pre_attention_tensor_shapes!(slice_expr)`
582macro_rules! contract_pre_attention_tensor_shapes {
583    () => {{}};
584    ($input:expr) => {{
585        let _pv_x = &$input;
586    }};
587}
588
589/// Postconditions for equation `attention_tensor_shapes`.
590/// Call before return: `contract_post_attention_tensor_shapes!(result_expr)`
591macro_rules! contract_post_attention_tensor_shapes {
592    ($result:expr) => {{
593        let _contract_result = &$result;
594    }};
595}
596
597/// Combined pre+post contract for equation `attention_tensor_shapes`.
598macro_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
607/// Preconditions for equation `embedding_tensor_shapes`.
608/// Call at function entry: `contract_pre_embedding_tensor_shapes!(input_expr)`
609macro_rules! contract_pre_embedding_tensor_shapes {
610    () => {{}};
611    ($input:expr) => {{
612        let _contract_input = &$input;
613    }};
614}
615
616/// Postconditions for equation `embedding_tensor_shapes`.
617/// Call before return: `contract_post_embedding_tensor_shapes!(result_expr)`
618macro_rules! contract_post_embedding_tensor_shapes {
619    ($result:expr) => {{
620        let _contract_result = &$result;
621    }};
622}
623
624/// Combined pre+post contract for equation `embedding_tensor_shapes`.
625macro_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
634/// Preconditions for equation `ffn_tensor_shapes`.
635/// Domain-specific. Call: `contract_pre_ffn_tensor_shapes!(slice_expr)`
636macro_rules! contract_pre_ffn_tensor_shapes {
637    () => {{}};
638    ($input:expr) => {{
639        let _pv_x = &$input;
640    }};
641}
642
643/// Postconditions for equation `ffn_tensor_shapes`.
644/// Call before return: `contract_post_ffn_tensor_shapes!(result_expr)`
645macro_rules! contract_post_ffn_tensor_shapes {
646    ($result:expr) => {{
647        let _contract_result = &$result;
648    }};
649}
650
651/// Combined pre+post contract for equation `ffn_tensor_shapes`.
652macro_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
661/// Preconditions for equation `normalization_tensor_shapes`.
662/// Domain-specific. Call: `contract_pre_normalization_tensor_shapes!(slice_expr)`
663macro_rules! contract_pre_normalization_tensor_shapes {
664    () => {{}};
665    ($input:expr) => {{
666        let _pv_x = &$input;
667    }};
668}
669
670/// Postconditions for equation `normalization_tensor_shapes`.
671/// Call before return: `contract_post_normalization_tensor_shapes!(result_expr)`
672macro_rules! contract_post_normalization_tensor_shapes {
673    ($result:expr) => {{
674        let _contract_result = &$result;
675    }};
676}
677
678/// Combined pre+post contract for equation `normalization_tensor_shapes`.
679macro_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
688/// Preconditions for equation `rope_position_encoding`.
689/// Domain-specific. Call: `contract_pre_rope_position_encoding!(slice_expr)`
690macro_rules! contract_pre_rope_position_encoding {
691    () => {{}};
692    ($input:expr) => {{
693        let _pv_config = &$input;
694    }};
695}
696
697/// Postconditions for equation `rope_position_encoding`.
698/// Call before return: `contract_post_rope_position_encoding!(result_expr)`
699macro_rules! contract_post_rope_position_encoding {
700    ($result:expr) => {{
701        let _contract_result = &$result;
702    }};
703}
704
705/// Combined pre+post contract for equation `rope_position_encoding`.
706macro_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
715/// Preconditions for equation `total_tensor_count`.
716/// Call at function entry: `contract_pre_total_tensor_count!(input_expr)`
717macro_rules! contract_pre_total_tensor_count {
718    () => {{}};
719    ($input:expr) => {{
720        let _contract_input = &$input;
721    }};
722}
723
724/// Postconditions for equation `total_tensor_count`.
725/// Call before return: `contract_post_total_tensor_count!(result_expr)`
726macro_rules! contract_post_total_tensor_count {
727    ($result:expr) => {{
728        let _contract_result = &$result;
729    }};
730}
731
732/// Combined pre+post contract for equation `total_tensor_count`.
733macro_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
742// Auto-generated from contracts/apr-chat-session-v1.yaml — DO NOT EDIT
743// Contract: apr-chat-session-v1
744
745/// Preconditions for equation `chat_template_application`.
746/// Call at function entry: `contract_pre_chat_template_application!(input_expr)`
747macro_rules! contract_pre_chat_template_application {
748    () => {{}};
749    ($input:expr) => {{
750        let _contract_input = &$input;
751    }};
752}
753
754/// Postconditions for equation `chat_template_application`.
755/// Call before return: `contract_post_chat_template_application!(result_expr)`
756macro_rules! contract_post_chat_template_application {
757    ($result:expr) => {{
758        let _contract_result = &$result;
759    }};
760}
761
762/// Combined pre+post contract for equation `chat_template_application`.
763macro_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
772/// Preconditions for equation `kv_cache_management`.
773/// Domain-specific. Call: `contract_pre_kv_cache_management!(slice_expr)`
774macro_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
785/// Postconditions for equation `kv_cache_management`.
786/// Call before return: `contract_post_kv_cache_management!(result_expr)`
787macro_rules! contract_post_kv_cache_management {
788    ($result:expr) => {{
789        let _contract_result = &$result;
790    }};
791}
792
793/// Combined pre+post contract for equation `kv_cache_management`.
794macro_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
803/// Preconditions for equation `session_persistence`.
804/// Call at function entry: `contract_pre_session_persistence!(input_expr)`
805macro_rules! contract_pre_session_persistence {
806    () => {{}};
807    ($input:expr) => {{
808        let _contract_input = &$input;
809    }};
810}
811
812/// Postconditions for equation `session_persistence`.
813/// Call before return: `contract_post_session_persistence!(result_expr)`
814macro_rules! contract_post_session_persistence {
815    ($result:expr) => {{
816        let _contract_result = &$result;
817    }};
818}
819
820/// Combined pre+post contract for equation `session_persistence`.
821macro_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
830/// Preconditions for equation `session_state_machine`.
831/// Call at function entry: `contract_pre_session_state_machine!(input_expr)`
832macro_rules! contract_pre_session_state_machine {
833    () => {{}};
834    ($input:expr) => {{
835        let _contract_input = &$input;
836    }};
837}
838
839/// Postconditions for equation `session_state_machine`.
840/// Call before return: `contract_post_session_state_machine!(result_expr)`
841macro_rules! contract_post_session_state_machine {
842    ($result:expr) => {{
843        let _contract_result = &$result;
844    }};
845}
846
847/// Combined pre+post contract for equation `session_state_machine`.
848macro_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
857// Auto-generated from contracts/apr-checkpoint-v1.yaml — DO NOT EDIT
858// Contract: apr-checkpoint-v1
859
860/// Preconditions for equation `load_checkpoint`.
861/// Domain-specific. Call: `contract_pre_load_checkpoint!(slice_expr)`
862macro_rules! contract_pre_load_checkpoint {
863    () => {{}};
864    ($input:expr) => {{
865        let _pv_path = &$input;
866    }};
867}
868
869/// Postconditions for equation `load_checkpoint`.
870/// Call before return: `contract_post_load_checkpoint!(result_expr)`
871macro_rules! contract_post_load_checkpoint {
872    ($result:expr) => {{
873        let _contract_result = &$result;
874    }};
875}
876
877/// Combined pre+post contract for equation `load_checkpoint`.
878macro_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
887/// Preconditions for equation `save_checkpoint`.
888/// Domain-specific. Call: `contract_pre_save_checkpoint!(slice_expr)`
889macro_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
900/// Postconditions for equation `save_checkpoint`.
901/// Call before return: `contract_post_save_checkpoint!(result_expr)`
902macro_rules! contract_post_save_checkpoint {
903    ($result:expr) => {{
904        let _contract_result = &$result;
905    }};
906}
907
908/// Combined pre+post contract for equation `save_checkpoint`.
909macro_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
918// Auto-generated from contracts/apr-cli-operations-v1.yaml — DO NOT EDIT
919// Contract: apr-cli-operations-v1
920
921/// Preconditions for equation `concurrent_model_access`.
922/// Domain-specific. Call: `contract_pre_concurrent_model_access!(slice_expr)`
923macro_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
934/// Postconditions for equation `concurrent_model_access`.
935/// Call before return: `contract_post_concurrent_model_access!(result_expr)`
936macro_rules! contract_post_concurrent_model_access {
937    ($result:expr) => {{
938        let _contract_result = &$result;
939    }};
940}
941
942/// Combined pre+post contract for equation `concurrent_model_access`.
943macro_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
952/// Preconditions for equation `inference_determinism`.
953/// Call at function entry: `contract_pre_inference_determinism!(input_expr)`
954macro_rules! contract_pre_inference_determinism {
955    () => {{}};
956    ($input:expr) => {{
957        let _contract_input = &$input;
958    }};
959}
960
961/// Postconditions for equation `inference_determinism`.
962/// Call before return: `contract_post_inference_determinism!(result_expr)`
963macro_rules! contract_post_inference_determinism {
964    ($result:expr) => {{
965        let _contract_result = &$result;
966    }};
967}
968
969/// Combined pre+post contract for equation `inference_determinism`.
970macro_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
979/// Preconditions for equation `progress_reporting`.
980/// Call at function entry: `contract_pre_progress_reporting!(input_expr)`
981macro_rules! contract_pre_progress_reporting {
982    () => {{}};
983    ($input:expr) => {{
984        let _contract_input = &$input;
985    }};
986}
987
988/// Postconditions for equation `progress_reporting`.
989/// Call before return: `contract_post_progress_reporting!(result_expr)`
990macro_rules! contract_post_progress_reporting {
991    ($result:expr) => {{
992        let _contract_result = &$result;
993    }};
994}
995
996/// Combined pre+post contract for equation `progress_reporting`.
997macro_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
1006/// Preconditions for equation `resource_cleanup`.
1007/// Call at function entry: `contract_pre_resource_cleanup!(input_expr)`
1008macro_rules! contract_pre_resource_cleanup {
1009    () => {{}};
1010    ($input:expr) => {{
1011        let _contract_input = &$input;
1012    }};
1013}
1014
1015/// Postconditions for equation `resource_cleanup`.
1016/// Call before return: `contract_post_resource_cleanup!(result_expr)`
1017macro_rules! contract_post_resource_cleanup {
1018    ($result:expr) => {{
1019        let _contract_result = &$result;
1020    }};
1021}
1022
1023/// Combined pre+post contract for equation `resource_cleanup`.
1024macro_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
1033/// Preconditions for equation `side_effect_classification`.
1034/// Call at function entry: `contract_pre_side_effect_classification!(input_expr)`
1035macro_rules! contract_pre_side_effect_classification {
1036    () => {{}};
1037    ($input:expr) => {{
1038        let _contract_input = &$input;
1039    }};
1040}
1041
1042/// Postconditions for equation `side_effect_classification`.
1043/// Call before return: `contract_post_side_effect_classification!(result_expr)`
1044macro_rules! contract_post_side_effect_classification {
1045    ($result:expr) => {{
1046        let _contract_result = &$result;
1047    }};
1048}
1049
1050/// Combined pre+post contract for equation `side_effect_classification`.
1051macro_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
1060/// Preconditions for equation `tokenizer_consistency`.
1061/// Call at function entry: `contract_pre_tokenizer_consistency!(input_expr)`
1062macro_rules! contract_pre_tokenizer_consistency {
1063    () => {{}};
1064    ($input:expr) => {{
1065        let _contract_input = &$input;
1066    }};
1067}
1068
1069/// Postconditions for equation `tokenizer_consistency`.
1070/// Call before return: `contract_post_tokenizer_consistency!(result_expr)`
1071macro_rules! contract_post_tokenizer_consistency {
1072    ($result:expr) => {{
1073        let _contract_result = &$result;
1074    }};
1075}
1076
1077/// Combined pre+post contract for equation `tokenizer_consistency`.
1078macro_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
1087// Auto-generated from contracts/apr-cli-v1.yaml — DO NOT EDIT
1088// Contract: apr-cli-v1
1089
1090/// Preconditions for equation `command_parse_determinism`.
1091/// Call at function entry: `contract_pre_command_parse_determinism!(input_expr)`
1092macro_rules! contract_pre_command_parse_determinism {
1093    () => {{}};
1094    ($input:expr) => {{
1095        let _contract_input = &$input;
1096    }};
1097}
1098
1099/// Postconditions for equation `command_parse_determinism`.
1100/// Call before return: `contract_post_command_parse_determinism!(result_expr)`
1101macro_rules! contract_post_command_parse_determinism {
1102    ($result:expr) => {{
1103        let _contract_result = &$result;
1104    }};
1105}
1106
1107/// Combined pre+post contract for equation `command_parse_determinism`.
1108macro_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
1117/// Preconditions for equation `contract_gate_enforcement`.
1118/// Call at function entry: `contract_pre_contract_gate_enforcement!(input_expr)`
1119macro_rules! contract_pre_contract_gate_enforcement {
1120    () => {{}};
1121    ($input:expr) => {{
1122        let _contract_input = &$input;
1123    }};
1124}
1125
1126/// Postconditions for equation `contract_gate_enforcement`.
1127/// Call before return: `contract_post_contract_gate_enforcement!(result_expr)`
1128macro_rules! contract_post_contract_gate_enforcement {
1129    ($result:expr) => {{
1130        let _contract_result = &$result;
1131    }};
1132}
1133
1134/// Combined pre+post contract for equation `contract_gate_enforcement`.
1135macro_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
1144/// Preconditions for equation `model_path_resolution`.
1145/// Call at function entry: `contract_pre_model_path_resolution!(input_expr)`
1146macro_rules! contract_pre_model_path_resolution {
1147    () => {{}};
1148    ($input:expr) => {{
1149        let _contract_input = &$input;
1150    }};
1151}
1152
1153/// Postconditions for equation `model_path_resolution`.
1154/// Call before return: `contract_post_model_path_resolution!(result_expr)`
1155macro_rules! contract_post_model_path_resolution {
1156    ($result:expr) => {{
1157        let _contract_result = &$result;
1158    }};
1159}
1160
1161/// Combined pre+post contract for equation `model_path_resolution`.
1162macro_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
1171/// Preconditions for equation `pipe_stdin_support`.
1172/// Call at function entry: `contract_pre_pipe_stdin_support!(input_expr)`
1173macro_rules! contract_pre_pipe_stdin_support {
1174    () => {{}};
1175    ($input:expr) => {{
1176        let _contract_input = &$input;
1177    }};
1178}
1179
1180/// Postconditions for equation `pipe_stdin_support`.
1181/// Call before return: `contract_post_pipe_stdin_support!(result_expr)`
1182macro_rules! contract_post_pipe_stdin_support {
1183    ($result:expr) => {{
1184        let _contract_result = &$result;
1185    }};
1186}
1187
1188/// Combined pre+post contract for equation `pipe_stdin_support`.
1189macro_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
1198/// Preconditions for equation `tokenizer_training_correctness`.
1199/// Call at function entry: `contract_pre_tokenizer_training_correctness!(input_expr)`
1200macro_rules! contract_pre_tokenizer_training_correctness {
1201    () => {{}};
1202    ($input:expr) => {{
1203        let _contract_input = &$input;
1204    }};
1205}
1206
1207/// Postconditions for equation `tokenizer_training_correctness`.
1208/// Call before return: `contract_post_tokenizer_training_correctness!(result_expr)`
1209macro_rules! contract_post_tokenizer_training_correctness {
1210    ($result:expr) => {{
1211        let _contract_result = &$result;
1212    }};
1213}
1214
1215/// Combined pre+post contract for equation `tokenizer_training_correctness`.
1216macro_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
1225/// Preconditions for equation `training_plan_apply_semantics`.
1226/// Domain-specific. Call: `contract_pre_training_plan_apply_semantics!(slice_expr)`
1227macro_rules! contract_pre_training_plan_apply_semantics {
1228    () => {{}};
1229    ($input:expr) => {{
1230        let _pv_x = &$input;
1231    }};
1232}
1233
1234/// Postconditions for equation `training_plan_apply_semantics`.
1235/// Call before return: `contract_post_training_plan_apply_semantics!(result_expr)`
1236macro_rules! contract_post_training_plan_apply_semantics {
1237    ($result:expr) => {{
1238        let _contract_result = &$result;
1239    }};
1240}
1241
1242/// Combined pre+post contract for equation `training_plan_apply_semantics`.
1243macro_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
1252// Auto-generated from contracts/apr-code-v1.yaml — DO NOT EDIT
1253// Contract: apr-code-v1
1254
1255/// Preconditions for equation `apr_md_compliance`.
1256/// Call at function entry: `contract_pre_apr_md_compliance!(input_expr)`
1257macro_rules! contract_pre_apr_md_compliance {
1258    () => {{}};
1259    ($input:expr) => {{
1260        let _contract_input = &$input;
1261    }};
1262}
1263
1264/// Postconditions for equation `apr_md_compliance`.
1265/// Call before return: `contract_post_apr_md_compliance!(result_expr)`
1266macro_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
1273/// Combined pre+post contract for equation `apr_md_compliance`.
1274macro_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
1283/// Preconditions for equation `apr_model_validity`.
1284/// Domain-specific. Call: `contract_pre_apr_model_validity!(slice_expr)`
1285macro_rules! contract_pre_apr_model_validity {
1286    () => {{}};
1287    ($input:expr) => {{
1288        let _pv_path = &$input;
1289    }};
1290}
1291
1292/// Postconditions for equation `apr_model_validity`.
1293/// Call before return: `contract_post_apr_model_validity!(result_expr)`
1294macro_rules! contract_post_apr_model_validity {
1295    ($result:expr) => {{
1296        let _contract_result = &$result;
1297    }};
1298}
1299
1300/// Combined pre+post contract for equation `apr_model_validity`.
1301macro_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
1310/// Postconditions for equation `no_model_error`.
1311/// Call before return: `contract_post_no_model_error!(result_expr)`
1312macro_rules! contract_post_no_model_error {
1313    ($result:expr) => {{
1314        let _contract_result = &$result;
1315    }};
1316}
1317
1318/// Preconditions for equation `session_integrity`.
1319/// Domain-specific. Call: `contract_pre_session_integrity!(slice_expr)`
1320macro_rules! contract_pre_session_integrity {
1321    () => {{}};
1322    ($input:expr) => {{
1323        let _pv_session = &$input;
1324    }};
1325}
1326
1327/// Postconditions for equation `session_integrity`.
1328/// Call before return: `contract_post_session_integrity!(result_expr)`
1329macro_rules! contract_post_session_integrity {
1330    ($result:expr) => {{
1331        let _contract_result = &$result;
1332    }};
1333}
1334
1335/// Combined pre+post contract for equation `session_integrity`.
1336macro_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
1345/// Preconditions for equation `sovereignty_guarantee`.
1346/// Domain-specific. Call: `contract_pre_sovereignty_guarantee!(slice_expr)`
1347macro_rules! contract_pre_sovereignty_guarantee {
1348    () => {{}};
1349    ($input:expr) => {{
1350        let _pv_x = &$input;
1351    }};
1352}
1353
1354/// Postconditions for equation `sovereignty_guarantee`.
1355/// Call before return: `contract_post_sovereignty_guarantee!(result_expr)`
1356macro_rules! contract_post_sovereignty_guarantee {
1357    ($result:expr) => {{
1358        let _contract_result = &$result;
1359    }};
1360}
1361
1362/// Combined pre+post contract for equation `sovereignty_guarantee`.
1363macro_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
1372/// Preconditions for equation `startup_latency`.
1373/// Domain-specific. Call: `contract_pre_startup_latency!(slice_expr)`
1374macro_rules! contract_pre_startup_latency {
1375    () => {{}};
1376    ($input:expr) => {{
1377        let _pv_project = &$input;
1378    }};
1379}
1380
1381/// Postconditions for equation `startup_latency`.
1382/// Call before return: `contract_post_startup_latency!(result_expr)`
1383macro_rules! contract_post_startup_latency {
1384    ($result:expr) => {{
1385        let _contract_result = &$result;
1386    }};
1387}
1388
1389/// Combined pre+post contract for equation `startup_latency`.
1390macro_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
1399/// Preconditions for equation `tool_safety`.
1400/// Domain-specific. Call: `contract_pre_tool_safety!(slice_expr)`
1401macro_rules! contract_pre_tool_safety {
1402    () => {{}};
1403    ($input:expr) => {{
1404        let _pv_session = &$input;
1405    }};
1406}
1407
1408/// Postconditions for equation `tool_safety`.
1409/// Call before return: `contract_post_tool_safety!(result_expr)`
1410macro_rules! contract_post_tool_safety {
1411    ($result:expr) => {{
1412        let _contract_result = &$result;
1413    }};
1414}
1415
1416/// Combined pre+post contract for equation `tool_safety`.
1417macro_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
1426// Auto-generated from contracts/apr-data-pipeline-v1.yaml — DO NOT EDIT
1427// Contract: apr-data-pipeline-v1
1428
1429/// Preconditions for equation `data_split_determinism`.
1430/// Domain-specific. Call: `contract_pre_data_split_determinism!(slice_expr)`
1431macro_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
1442/// Postconditions for equation `data_split_determinism`.
1443/// Call before return: `contract_post_data_split_determinism!(result_expr)`
1444macro_rules! contract_post_data_split_determinism {
1445    ($result:expr) => {{
1446        let _contract_result = &$result;
1447    }};
1448}
1449
1450/// Combined pre+post contract for equation `data_split_determinism`.
1451macro_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
1460/// Preconditions for equation `data_validation`.
1461/// Domain-specific. Call: `contract_pre_data_validation!(slice_expr)`
1462macro_rules! contract_pre_data_validation {
1463    () => {{}};
1464    ($input:expr) => {{
1465        let _pv_path = &$input;
1466    }};
1467}
1468
1469/// Postconditions for equation `data_validation`.
1470/// Call before return: `contract_post_data_validation!(result_expr)`
1471macro_rules! contract_post_data_validation {
1472    ($result:expr) => {{
1473        let _contract_result = &$result;
1474    }};
1475}
1476
1477/// Combined pre+post contract for equation `data_validation`.
1478macro_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
1487/// Preconditions for equation `preprocessing_idempotency`.
1488/// Call at function entry: `contract_pre_preprocessing_idempotency!(input_expr)`
1489macro_rules! contract_pre_preprocessing_idempotency {
1490    () => {{}};
1491    ($input:expr) => {{
1492        let _contract_input = &$input;
1493    }};
1494}
1495
1496/// Postconditions for equation `preprocessing_idempotency`.
1497/// Call before return: `contract_post_preprocessing_idempotency!(result_expr)`
1498macro_rules! contract_post_preprocessing_idempotency {
1499    ($result:expr) => {{
1500        let _contract_result = &$result;
1501    }};
1502}
1503
1504/// Combined pre+post contract for equation `preprocessing_idempotency`.
1505macro_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
1514/// Preconditions for equation `streaming_data_loader`.
1515/// Domain-specific. Call: `contract_pre_streaming_data_loader!(slice_expr)`
1516macro_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
1527/// Postconditions for equation `streaming_data_loader`.
1528/// Call before return: `contract_post_streaming_data_loader!(result_expr)`
1529macro_rules! contract_post_streaming_data_loader {
1530    ($result:expr) => {{
1531        let _contract_result = &$result;
1532    }};
1533}
1534
1535/// Combined pre+post contract for equation `streaming_data_loader`.
1536macro_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
1545// Auto-generated from contracts/apr-format-invariants-v1.yaml — DO NOT EDIT
1546// Contract: apr-format-invariants-v1
1547
1548/// Preconditions for equation `detect_regression`.
1549/// Domain-specific. Call: `contract_pre_detect_regression!(slice_expr)`
1550macro_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
1561/// Preconditions for equation `format_report`.
1562/// Domain-specific. Call: `contract_pre_format_report!(slice_expr)`
1563macro_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
1574/// Preconditions for equation `parse_playbook`.
1575/// Domain-specific. Call: `contract_pre_parse_playbook!(slice_expr)`
1576macro_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
1587/// Preconditions for equation `serialize_roundtrip`.
1588/// Domain-specific. Call: `contract_pre_serialize_roundtrip!(slice_expr)`
1589macro_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
1600/// Preconditions for equation `validate_schema`.
1601/// Domain-specific. Call: `contract_pre_validate_schema!(slice_expr)`
1602macro_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
1613// Auto-generated from contracts/apr-format-safety-v1.yaml — DO NOT EDIT
1614// Contract: apr-format-safety-v1
1615
1616/// Preconditions for equation `dtype_coercion_safety`.
1617/// Call at function entry: `contract_pre_dtype_coercion_safety!(input_expr)`
1618macro_rules! contract_pre_dtype_coercion_safety {
1619    () => {{}};
1620    ($input:expr) => {{
1621        let _contract_input = &$input;
1622    }};
1623}
1624
1625/// Postconditions for equation `dtype_coercion_safety`.
1626/// Call before return: `contract_post_dtype_coercion_safety!(result_expr)`
1627macro_rules! contract_post_dtype_coercion_safety {
1628    ($result:expr) => {{
1629        let _contract_result = &$result;
1630    }};
1631}
1632
1633/// Combined pre+post contract for equation `dtype_coercion_safety`.
1634macro_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
1643/// Preconditions for equation `header_integrity`.
1644/// Call at function entry: `contract_pre_header_integrity!(input_expr)`
1645macro_rules! contract_pre_header_integrity {
1646    () => {{}};
1647    ($input:expr) => {{
1648        let _contract_input = &$input;
1649    }};
1650}
1651
1652/// Postconditions for equation `header_integrity`.
1653/// Call before return: `contract_post_header_integrity!(result_expr)`
1654macro_rules! contract_post_header_integrity {
1655    ($result:expr) => {{
1656        let _contract_result = &$result;
1657    }};
1658}
1659
1660/// Combined pre+post contract for equation `header_integrity`.
1661macro_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
1670/// Preconditions for equation `magic_byte_validation`.
1671/// Call at function entry: `contract_pre_magic_byte_validation!(input_expr)`
1672macro_rules! contract_pre_magic_byte_validation {
1673    () => {{}};
1674    ($input:expr) => {{
1675        let _contract_input = &$input;
1676    }};
1677}
1678
1679/// Postconditions for equation `magic_byte_validation`.
1680/// Call before return: `contract_post_magic_byte_validation!(result_expr)`
1681macro_rules! contract_post_magic_byte_validation {
1682    ($result:expr) => {{
1683        let _contract_result = &$result;
1684    }};
1685}
1686
1687/// Combined pre+post contract for equation `magic_byte_validation`.
1688macro_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
1697/// Preconditions for equation `provenance_enforcement`.
1698/// Call at function entry: `contract_pre_provenance_enforcement!(input_expr)`
1699macro_rules! contract_pre_provenance_enforcement {
1700    () => {{}};
1701    ($input:expr) => {{
1702        let _contract_input = &$input;
1703    }};
1704}
1705
1706/// Postconditions for equation `provenance_enforcement`.
1707/// Call before return: `contract_post_provenance_enforcement!(result_expr)`
1708macro_rules! contract_post_provenance_enforcement {
1709    ($result:expr) => {{
1710        let _contract_result = &$result;
1711    }};
1712}
1713
1714/// Combined pre+post contract for equation `provenance_enforcement`.
1715macro_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
1724/// Preconditions for equation `strict_import_validation`.
1725/// Call at function entry: `contract_pre_strict_import_validation!(input_expr)`
1726macro_rules! contract_pre_strict_import_validation {
1727    () => {{}};
1728    ($input:expr) => {{
1729        let _contract_input = &$input;
1730    }};
1731}
1732
1733/// Postconditions for equation `strict_import_validation`.
1734/// Call before return: `contract_post_strict_import_validation!(result_expr)`
1735macro_rules! contract_post_strict_import_validation {
1736    ($result:expr) => {{
1737        let _contract_result = &$result;
1738    }};
1739}
1740
1741/// Combined pre+post contract for equation `strict_import_validation`.
1742macro_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
1751/// Preconditions for equation `truncation_detection`.
1752/// Call at function entry: `contract_pre_truncation_detection!(input_expr)`
1753macro_rules! contract_pre_truncation_detection {
1754    () => {{}};
1755    ($input:expr) => {{
1756        let _contract_input = &$input;
1757    }};
1758}
1759
1760/// Postconditions for equation `truncation_detection`.
1761/// Call before return: `contract_post_truncation_detection!(result_expr)`
1762macro_rules! contract_post_truncation_detection {
1763    ($result:expr) => {{
1764        let _contract_result = &$result;
1765    }};
1766}
1767
1768/// Combined pre+post contract for equation `truncation_detection`.
1769macro_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
1778// Auto-generated from contracts/apr-model-discovery-v1.yaml — DO NOT EDIT
1779// Contract: apr-model-discovery-v1
1780
1781/// Preconditions for equation `architecture_extraction`.
1782/// Call at function entry: `contract_pre_architecture_extraction!(input_expr)`
1783macro_rules! contract_pre_architecture_extraction {
1784    () => {{}};
1785    ($input:expr) => {{
1786        let _contract_input = &$input;
1787    }};
1788}
1789
1790/// Postconditions for equation `architecture_extraction`.
1791/// Call before return: `contract_post_architecture_extraction!(result_expr)`
1792macro_rules! contract_post_architecture_extraction {
1793    ($result:expr) => {{
1794        let _contract_result = &$result;
1795    }};
1796}
1797
1798/// Combined pre+post contract for equation `architecture_extraction`.
1799macro_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
1808/// Preconditions for equation `jidoka_validation`.
1809/// Call at function entry: `contract_pre_jidoka_validation!(input_expr)`
1810macro_rules! contract_pre_jidoka_validation {
1811    () => {{}};
1812    ($input:expr) => {{
1813        let _contract_input = &$input;
1814    }};
1815}
1816
1817/// Postconditions for equation `jidoka_validation`.
1818/// Call before return: `contract_post_jidoka_validation!(result_expr)`
1819macro_rules! contract_post_jidoka_validation {
1820    ($result:expr) => {{
1821        let _contract_result = &$result;
1822    }};
1823}
1824
1825/// Combined pre+post contract for equation `jidoka_validation`.
1826macro_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
1835/// Preconditions for equation `no_model_ux`.
1836/// Call at function entry: `contract_pre_no_model_ux!(input_expr)`
1837macro_rules! contract_pre_no_model_ux {
1838    () => {{}};
1839    ($input:expr) => {{
1840        let _contract_input = &$input;
1841    }};
1842}
1843
1844/// Postconditions for equation `no_model_ux`.
1845/// Call before return: `contract_post_no_model_ux!(result_expr)`
1846macro_rules! contract_post_no_model_ux {
1847    ($result:expr) => {{
1848        let _contract_result = &$result;
1849    }};
1850}
1851
1852/// Combined pre+post contract for equation `no_model_ux`.
1853macro_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
1862/// Preconditions for equation `search_order`.
1863/// Call at function entry: `contract_pre_search_order!(input_expr)`
1864macro_rules! contract_pre_search_order {
1865    () => {{}};
1866    ($input:expr) => {{
1867        let _contract_input = &$input;
1868    }};
1869}
1870
1871/// Postconditions for equation `search_order`.
1872/// Call before return: `contract_post_search_order!(result_expr)`
1873macro_rules! contract_post_search_order {
1874    ($result:expr) => {{
1875        let _contract_result = &$result;
1876    }};
1877}
1878
1879/// Combined pre+post contract for equation `search_order`.
1880macro_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
1889/// Preconditions for equation `sort_priority`.
1890/// Domain-specific. Call: `contract_pre_sort_priority!(slice_expr)`
1891macro_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
1902/// Postconditions for equation `sort_priority`.
1903/// Call before return: `contract_post_sort_priority!(result_expr)`
1904macro_rules! contract_post_sort_priority {
1905    ($result:expr) => {{
1906        let _contract_result = &$result;
1907    }};
1908}
1909
1910/// Combined pre+post contract for equation `sort_priority`.
1911macro_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
1920// Auto-generated from contracts/apr-model-lifecycle-v1.yaml — DO NOT EDIT
1921// Contract: apr-model-lifecycle-v1
1922
1923/// Preconditions for equation `export_roundtrip`.
1924/// Domain-specific. Call: `contract_pre_export_roundtrip!(slice_expr)`
1925macro_rules! contract_pre_export_roundtrip {
1926    () => {{}};
1927    ($input:expr) => {{
1928        let _pv_model = &$input;
1929    }};
1930}
1931
1932/// Postconditions for equation `export_roundtrip`.
1933/// Call before return: `contract_post_export_roundtrip!(result_expr)`
1934macro_rules! contract_post_export_roundtrip {
1935    ($result:expr) => {{
1936        let _contract_result = &$result;
1937    }};
1938}
1939
1940/// Combined pre+post contract for equation `export_roundtrip`.
1941macro_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
1950/// Preconditions for equation `import_format_detection`.
1951/// Domain-specific. Call: `contract_pre_import_format_detection!(slice_expr)`
1952macro_rules! contract_pre_import_format_detection {
1953    () => {{}};
1954    ($input:expr) => {{
1955        let _pv_path = &$input;
1956    }};
1957}
1958
1959/// Postconditions for equation `import_format_detection`.
1960/// Call before return: `contract_post_import_format_detection!(result_expr)`
1961macro_rules! contract_post_import_format_detection {
1962    ($result:expr) => {{
1963        let _contract_result = &$result;
1964    }};
1965}
1966
1967/// Combined pre+post contract for equation `import_format_detection`.
1968macro_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
1977/// Preconditions for equation `merge_weight_conservation`.
1978/// Domain-specific. Call: `contract_pre_merge_weight_conservation!(slice_expr)`
1979macro_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
1990/// Postconditions for equation `merge_weight_conservation`.
1991/// Call before return: `contract_post_merge_weight_conservation!(result_expr)`
1992macro_rules! contract_post_merge_weight_conservation {
1993    ($result:expr) => {{
1994        let _contract_result = &$result;
1995    }};
1996}
1997
1998/// Combined pre+post contract for equation `merge_weight_conservation`.
1999macro_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
2008/// Preconditions for equation `pull_cache_integrity`.
2009/// Call at function entry: `contract_pre_pull_cache_integrity!(input_expr)`
2010macro_rules! contract_pre_pull_cache_integrity {
2011    () => {{}};
2012    ($input:expr) => {{
2013        let _contract_input = &$input;
2014    }};
2015}
2016
2017/// Postconditions for equation `pull_cache_integrity`.
2018/// Call before return: `contract_post_pull_cache_integrity!(result_expr)`
2019macro_rules! contract_post_pull_cache_integrity {
2020    ($result:expr) => {{
2021        let _contract_result = &$result;
2022    }};
2023}
2024
2025/// Combined pre+post contract for equation `pull_cache_integrity`.
2026macro_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
2035/// Preconditions for equation `quantize_precision_bound`.
2036/// Domain-specific. Call: `contract_pre_quantize_precision_bound!(slice_expr)`
2037macro_rules! contract_pre_quantize_precision_bound {
2038    () => {{}};
2039    ($input:expr) => {{
2040        let _pv_model = &$input;
2041    }};
2042}
2043
2044/// Postconditions for equation `quantize_precision_bound`.
2045/// Call before return: `contract_post_quantize_precision_bound!(result_expr)`
2046macro_rules! contract_post_quantize_precision_bound {
2047    ($result:expr) => {{
2048        let _contract_result = &$result;
2049    }};
2050}
2051
2052/// Combined pre+post contract for equation `quantize_precision_bound`.
2053macro_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
2062// Auto-generated from contracts/apr-model-qa-v1.yaml — DO NOT EDIT
2063// Contract: apr-model-qa-v1
2064
2065/// Preconditions for equation `canary_regression_detection`.
2066/// Domain-specific. Call: `contract_pre_canary_regression_detection!(slice_expr)`
2067macro_rules! contract_pre_canary_regression_detection {
2068    () => {{}};
2069    ($input:expr) => {{
2070        let _pv_baseline = &$input;
2071    }};
2072}
2073
2074/// Postconditions for equation `canary_regression_detection`.
2075/// Call before return: `contract_post_canary_regression_detection!(result_expr)`
2076macro_rules! contract_post_canary_regression_detection {
2077    ($result:expr) => {{
2078        let _contract_result = &$result;
2079    }};
2080}
2081
2082/// Combined pre+post contract for equation `canary_regression_detection`.
2083macro_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
2092/// Preconditions for equation `lint_model_conventions`.
2093/// Domain-specific. Call: `contract_pre_lint_model_conventions!(slice_expr)`
2094macro_rules! contract_pre_lint_model_conventions {
2095    () => {{}};
2096    ($input:expr) => {{
2097        let _pv_path = &$input;
2098    }};
2099}
2100
2101/// Postconditions for equation `lint_model_conventions`.
2102/// Call before return: `contract_post_lint_model_conventions!(result_expr)`
2103macro_rules! contract_post_lint_model_conventions {
2104    ($result:expr) => {{
2105        let _contract_result = &$result;
2106    }};
2107}
2108
2109/// Combined pre+post contract for equation `lint_model_conventions`.
2110macro_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
2119/// Preconditions for equation `model_integrity_check`.
2120/// Domain-specific. Call: `contract_pre_model_integrity_check!(slice_expr)`
2121macro_rules! contract_pre_model_integrity_check {
2122    () => {{}};
2123    ($input:expr) => {{
2124        let _pv_path = &$input;
2125    }};
2126}
2127
2128/// Postconditions for equation `model_integrity_check`.
2129/// Call before return: `contract_post_model_integrity_check!(result_expr)`
2130macro_rules! contract_post_model_integrity_check {
2131    ($result:expr) => {{
2132        let _contract_result = &$result;
2133    }};
2134}
2135
2136/// Combined pre+post contract for equation `model_integrity_check`.
2137macro_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
2146/// Preconditions for equation `probar_property_tests`.
2147/// Domain-specific. Call: `contract_pre_probar_property_tests!(slice_expr)`
2148macro_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
2159/// Postconditions for equation `probar_property_tests`.
2160/// Call before return: `contract_post_probar_property_tests!(result_expr)`
2161macro_rules! contract_post_probar_property_tests {
2162    ($result:expr) => {{
2163        let _contract_result = &$result;
2164    }};
2165}
2166
2167/// Combined pre+post contract for equation `probar_property_tests`.
2168macro_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
2177/// Preconditions for equation `qa_gate_composition`.
2178/// Call at function entry: `contract_pre_qa_gate_composition!(input_expr)`
2179macro_rules! contract_pre_qa_gate_composition {
2180    () => {{}};
2181    ($input:expr) => {{
2182        let _contract_input = &$input;
2183    }};
2184}
2185
2186/// Postconditions for equation `qa_gate_composition`.
2187/// Call before return: `contract_post_qa_gate_composition!(result_expr)`
2188macro_rules! contract_post_qa_gate_composition {
2189    ($result:expr) => {{
2190        let _contract_result = &$result;
2191    }};
2192}
2193
2194/// Combined pre+post contract for equation `qa_gate_composition`.
2195macro_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
2204// Auto-generated from contracts/apr-serve-v1.yaml — DO NOT EDIT
2205// Contract: apr-serve-v1
2206
2207/// Preconditions for equation `chat_template_dispatch`.
2208/// Domain-specific. Call: `contract_pre_chat_template_dispatch!(slice_expr)`
2209macro_rules! contract_pre_chat_template_dispatch {
2210    () => {{}};
2211    ($input:expr) => {{
2212        let _pv_state = &$input;
2213    }};
2214}
2215
2216/// Postconditions for equation `chat_template_dispatch`.
2217/// Call before return: `contract_post_chat_template_dispatch!(result_expr)`
2218macro_rules! contract_post_chat_template_dispatch {
2219    ($result:expr) => {{
2220        let _contract_result = &$result;
2221    }};
2222}
2223
2224/// Combined pre+post contract for equation `chat_template_dispatch`.
2225macro_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
2234/// Preconditions for equation `concurrent_inference_isolation`.
2235/// Call at function entry: `contract_pre_concurrent_inference_isolation!(input_expr)`
2236macro_rules! contract_pre_concurrent_inference_isolation {
2237    () => {{}};
2238    ($input:expr) => {{
2239        let _contract_input = &$input;
2240    }};
2241}
2242
2243/// Postconditions for equation `concurrent_inference_isolation`.
2244/// Call before return: `contract_post_concurrent_inference_isolation!(result_expr)`
2245macro_rules! contract_post_concurrent_inference_isolation {
2246    ($result:expr) => {{
2247        let _contract_result = &$result;
2248    }};
2249}
2250
2251/// Combined pre+post contract for equation `concurrent_inference_isolation`.
2252macro_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
2261/// Preconditions for equation `format_detection`.
2262/// Call at function entry: `contract_pre_format_detection!(input_expr)`
2263macro_rules! contract_pre_format_detection {
2264    () => {{}};
2265    ($input:expr) => {{
2266        let _contract_input = &$input;
2267    }};
2268}
2269
2270/// Postconditions for equation `format_detection`.
2271/// Call before return: `contract_post_format_detection!(result_expr)`
2272macro_rules! contract_post_format_detection {
2273    ($result:expr) => {{
2274        let _contract_result = &$result;
2275    }};
2276}
2277
2278/// Combined pre+post contract for equation `format_detection`.
2279macro_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
2288/// Preconditions for equation `graceful_shutdown`.
2289/// Call at function entry: `contract_pre_graceful_shutdown!(input_expr)`
2290macro_rules! contract_pre_graceful_shutdown {
2291    () => {{}};
2292    ($input:expr) => {{
2293        let _contract_input = &$input;
2294    }};
2295}
2296
2297/// Postconditions for equation `graceful_shutdown`.
2298/// Call before return: `contract_post_graceful_shutdown!(result_expr)`
2299macro_rules! contract_post_graceful_shutdown {
2300    ($result:expr) => {{
2301        let _contract_result = &$result;
2302    }};
2303}
2304
2305/// Combined pre+post contract for equation `graceful_shutdown`.
2306macro_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
2315/// Preconditions for equation `request_routing`.
2316/// Call at function entry: `contract_pre_request_routing!(input_expr)`
2317macro_rules! contract_pre_request_routing {
2318    () => {{}};
2319    ($input:expr) => {{
2320        let _contract_input = &$input;
2321    }};
2322}
2323
2324/// Postconditions for equation `request_routing`.
2325/// Call before return: `contract_post_request_routing!(result_expr)`
2326macro_rules! contract_post_request_routing {
2327    ($result:expr) => {{
2328        let _contract_result = &$result;
2329    }};
2330}
2331
2332/// Combined pre+post contract for equation `request_routing`.
2333macro_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
2342/// Preconditions for equation `server_lifecycle`.
2343/// Domain-specific. Call: `contract_pre_server_lifecycle!(slice_expr)`
2344macro_rules! contract_pre_server_lifecycle {
2345    () => {{}};
2346    ($input:expr) => {{
2347        let _pv_config = &$input;
2348    }};
2349}
2350
2351/// Postconditions for equation `server_lifecycle`.
2352/// Call before return: `contract_post_server_lifecycle!(result_expr)`
2353macro_rules! contract_post_server_lifecycle {
2354    ($result:expr) => {{
2355        let _contract_result = &$result;
2356    }};
2357}
2358
2359/// Combined pre+post contract for equation `server_lifecycle`.
2360macro_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
2369// Auto-generated from contracts/apr-training-parity-v1.yaml — DO NOT EDIT
2370// Contract: apr-training-parity-v1
2371
2372/// Preconditions for equation `gpu_utilization_gate`.
2373/// Call at function entry: `contract_pre_gpu_utilization_gate!(input_expr)`
2374macro_rules! contract_pre_gpu_utilization_gate {
2375    () => {{}};
2376    ($input:expr) => {{
2377        let _contract_input = &$input;
2378    }};
2379}
2380
2381/// Preconditions for equation `parity_ratio`.
2382/// Call at function entry: `contract_pre_parity_ratio!(input_expr)`
2383macro_rules! contract_pre_parity_ratio {
2384    () => {{}};
2385    ($input:expr) => {{
2386        let _contract_input = &$input;
2387    }};
2388}
2389
2390// Auto-generated from contracts/arch-constraints-v1.yaml — DO NOT EDIT
2391// Contract: arch-constraints-v1
2392
2393/// Preconditions for equation `arch_constraint_lookup`.
2394/// Domain-specific. Call: `contract_pre_arch_constraint_lookup!(slice_expr)`
2395macro_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
2406// Auto-generated from contracts/architecture-requirements-v1.yaml — DO NOT EDIT
2407// Contract: architecture-requirements-v1
2408
2409/// Preconditions for equation `constraint_matrix_exhaustiveness`.
2410/// Domain-specific. Call: `contract_pre_constraint_matrix_exhaustiveness!(slice_expr)`
2411macro_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
2422/// Preconditions for equation `role_mapping`.
2423/// Domain-specific. Call: `contract_pre_role_mapping!(slice_expr)`
2424macro_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
2435/// Preconditions for equation `weight_completeness`.
2436/// Domain-specific. Call: `contract_pre_weight_completeness!(slice_expr)`
2437macro_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
2448// Auto-generated from contracts/arima-v1.yaml — DO NOT EDIT
2449// Contract: arima-v1
2450
2451/// Preconditions for equation `ar_forecast`.
2452/// Domain-specific. Call: `contract_pre_ar_forecast!(slice_expr)`
2453macro_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
2468/// Preconditions for equation `differencing`.
2469/// Domain-specific. Call: `contract_pre_differencing!(slice_expr)`
2470macro_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
2485/// Preconditions for equation `forecast_finite`.
2486/// Domain-specific. Call: `contract_pre_forecast_finite!(slice_expr)`
2487macro_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
2498/// Preconditions for equation `ma_filter`.
2499/// Domain-specific. Call: `contract_pre_ma_filter!(slice_expr)`
2500macro_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
2515// Auto-generated from contracts/async-safety-v1.yaml — DO NOT EDIT
2516// Contract: async-safety-v1
2517
2518/// Preconditions for equation `cancellation_safe`.
2519/// Call at function entry: `contract_pre_cancellation_safe!(input_expr)`
2520macro_rules! contract_pre_cancellation_safe {
2521    () => {{}};
2522    ($input:expr) => {{
2523        let _contract_input = &$input;
2524    }};
2525}
2526
2527/// Postconditions for equation `cancellation_safe`.
2528/// Call before return: `contract_post_cancellation_safe!(result_expr)`
2529macro_rules! contract_post_cancellation_safe {
2530    ($result:expr) => {{
2531        let _contract_result = &$result;
2532    }};
2533}
2534
2535/// Combined pre+post contract for equation `cancellation_safe`.
2536macro_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
2545/// Preconditions for equation `channel_lossless`.
2546/// Call at function entry: `contract_pre_channel_lossless!(input_expr)`
2547macro_rules! contract_pre_channel_lossless {
2548    () => {{}};
2549    ($input:expr) => {{
2550        let _contract_input = &$input;
2551    }};
2552}
2553
2554/// Postconditions for equation `channel_lossless`.
2555/// Call before return: `contract_post_channel_lossless!(result_expr)`
2556macro_rules! contract_post_channel_lossless {
2557    ($result:expr) => {{
2558        let _contract_result = &$result;
2559    }};
2560}
2561
2562/// Combined pre+post contract for equation `channel_lossless`.
2563macro_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
2572/// Preconditions for equation `structured_spawn`.
2573/// Call at function entry: `contract_pre_structured_spawn!(input_expr)`
2574macro_rules! contract_pre_structured_spawn {
2575    () => {{}};
2576    ($input:expr) => {{
2577        let _contract_input = &$input;
2578    }};
2579}
2580
2581/// Postconditions for equation `structured_spawn`.
2582/// Call before return: `contract_post_structured_spawn!(result_expr)`
2583macro_rules! contract_post_structured_spawn {
2584    ($result:expr) => {{
2585        let _contract_result = &$result;
2586    }};
2587}
2588
2589/// Combined pre+post contract for equation `structured_spawn`.
2590macro_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
2599// Auto-generated from contracts/attention-head-extraction-v1.yaml — DO NOT EDIT
2600// Contract: attention-head-extraction-v1
2601
2602/// Preconditions for equation `extract_heads`.
2603/// Domain-specific. Call: `contract_pre_extract_heads!(slice_expr)`
2604macro_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
2615/// Postconditions for equation `extract_heads`.
2616/// Call before return: `contract_post_extract_heads!(result_expr)`
2617macro_rules! contract_post_extract_heads {
2618    ($result:expr) => {{
2619        let _contract_result = &$result;
2620    }};
2621}
2622
2623/// Combined pre+post contract for equation `extract_heads`.
2624macro_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
2633// Auto-generated from contracts/attention-kernel-v1.yaml — DO NOT EDIT
2634// Contract: attention-kernel-v1
2635
2636/// Preconditions for equation `attention`.
2637/// Domain-specific. Call: `contract_pre_attention!(slice_expr)`
2638macro_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
2649/// Postconditions for equation `attention`.
2650/// Call before return: `contract_post_attention!(result_expr)`
2651macro_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
2661/// Combined pre+post contract for equation `attention`.
2662macro_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
2671// Auto-generated from contracts/attention-kernel-v1.yaml — DO NOT EDIT
2672// Contract: attention-kernel-v1
2673
2674/// Preconditions for equation `rmsnorm`.
2675/// Domain-specific. Call: `contract_pre_rmsnorm!(slice_expr)`
2676macro_rules! contract_pre_rmsnorm {
2677    () => {{}};
2678    ($input:expr) => {{
2679        let _pv_x = &$input;
2680    }};
2681}
2682
2683/// Preconditions for equation `rope_rotation`.
2684/// Domain-specific. Call: `contract_pre_rope_rotation!(slice_expr)`
2685macro_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
2696/// Preconditions for equation `scaled_dot_product`.
2697/// Domain-specific. Call: `contract_pre_scaled_dot_product!(slice_expr)`
2698macro_rules! contract_pre_scaled_dot_product {
2699    () => {{}};
2700    ($input:expr) => {{
2701        let _pv_x = &$input;
2702    }};
2703}
2704
2705// Auto-generated from contracts/attention-scaling-v1.yaml — DO NOT EDIT
2706// Contract: attention-scaling-v1
2707
2708/// Preconditions for equation `attention_entropy`.
2709/// Domain-specific. Call: `contract_pre_attention_entropy!(slice_expr)`
2710macro_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
2721/// Preconditions for equation `numerical_stability`.
2722/// Domain-specific. Call: `contract_pre_numerical_stability!(slice_expr)`
2723macro_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
2734/// Preconditions for equation `scaled_dot_product`.
2735/// Domain-specific. Call: `contract_pre_scaled_dot_product!(slice_expr)`
2736macro_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
2747/// Preconditions for equation `score_bound_with_qknorm`.
2748/// Domain-specific. Call: `contract_pre_score_bound_with_qknorm!(slice_expr)`
2749macro_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
2760/// Preconditions for equation `softmax_saturation`.
2761/// Domain-specific. Call: `contract_pre_softmax_saturation!(slice_expr)`
2762macro_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
2777/// Preconditions for equation `variance_preservation`.
2778/// Domain-specific. Call: `contract_pre_variance_preservation!(slice_expr)`
2779macro_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
2790// Auto-generated from contracts/avx2-fma-dot-v1.yaml — DO NOT EDIT
2791// Contract: avx2-fma-dot-v1
2792
2793/// Preconditions for equation `dot_product`.
2794/// Domain-specific. Call: `contract_pre_dot_product!(slice_expr)`
2795macro_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
2804/// Preconditions for equation `fma_accumulation`.
2805/// Domain-specific. Call: `contract_pre_fma_accumulation!(slice_expr)`
2806macro_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
2817// Auto-generated from contracts/backend-dispatch-v1.yaml — DO NOT EDIT
2818// Contract: backend-dispatch-v1
2819
2820/// Preconditions for equation `garbage_oracle`.
2821/// Domain-specific. Call: `contract_pre_garbage_oracle!(slice_expr)`
2822macro_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
2837/// Preconditions for equation `gpu_threshold`.
2838/// Domain-specific. Call: `contract_pre_gpu_threshold!(slice_expr)`
2839macro_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
2854/// Preconditions for equation `qk_norm_score_bound`.
2855/// Domain-specific. Call: `contract_pre_qk_norm_score_bound!(slice_expr)`
2856macro_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
2867/// Preconditions for equation `simd_only_threshold`.
2868/// Domain-specific. Call: `contract_pre_simd_only_threshold!(slice_expr)`
2869macro_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
2880// Auto-generated from contracts/batch-training-v1.yaml — DO NOT EDIT
2881// Contract: batch-training-v1
2882
2883/// Preconditions for equation `batch_loss`.
2884/// Domain-specific. Call: `contract_pre_batch_loss!(slice_expr)`
2885macro_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
2896/// Preconditions for equation `gradient_accumulation`.
2897/// Domain-specific. Call: `contract_pre_gradient_accumulation!(slice_expr)`
2898macro_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
2909/// Preconditions for equation `gradient_clipping`.
2910/// Domain-specific. Call: `contract_pre_gradient_clipping!(slice_expr)`
2911macro_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
2922// Auto-generated from contracts/batched-beam-search-v1.yaml — DO NOT EDIT
2923// Contract: batched-beam-search-v1
2924
2925/// Preconditions for equation `batched_beam_projection`.
2926/// Domain-specific. Call: `contract_pre_batched_beam_projection!(slice_expr)`
2927macro_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
2938/// Preconditions for equation `beam_selection`.
2939/// Domain-specific. Call: `contract_pre_beam_selection!(slice_expr)`
2940macro_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
2951/// Preconditions for equation `sequential_beam_projection`.
2952/// Domain-specific. Call: `contract_pre_sequential_beam_projection!(slice_expr)`
2953macro_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
2964/// Preconditions for equation `termination`.
2965/// Domain-specific. Call: `contract_pre_termination!(slice_expr)`
2966macro_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
2977// Auto-generated from contracts/batchnorm-kernel-v1.yaml — DO NOT EDIT
2978// Contract: batchnorm-kernel-v1
2979
2980/// Preconditions for equation `batchnorm_eval`.
2981/// Domain-specific. Call: `contract_pre_batchnorm_eval!(slice_expr)`
2982macro_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
2997/// Preconditions for equation `batchnorm_train`.
2998/// Domain-specific. Call: `contract_pre_batchnorm_train!(slice_expr)`
2999macro_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
3010/// Preconditions for equation `running_stats`.
3011/// Domain-specific. Call: `contract_pre_running_stats!(slice_expr)`
3012macro_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
3027// Auto-generated from contracts/bayesian-v1.yaml — DO NOT EDIT
3028// Contract: bayesian-v1
3029
3030/// Preconditions for equation `blr_predict`.
3031/// Domain-specific. Call: `contract_pre_blr_predict!(slice_expr)`
3032macro_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
3047/// Preconditions for equation `conjugate_update`.
3048/// Domain-specific. Call: `contract_pre_conjugate_update!(slice_expr)`
3049macro_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
3060/// Preconditions for equation `posterior_predictive`.
3061/// Domain-specific. Call: `contract_pre_posterior_predictive!(slice_expr)`
3062macro_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
3073/// Preconditions for equation `posterior_valid`.
3074/// Domain-specific. Call: `contract_pre_posterior_valid!(slice_expr)`
3075macro_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
3086// Auto-generated from contracts/beacon-dispatch-v1.yaml — DO NOT EDIT
3087// Contract: beacon-dispatch-v1
3088
3089/// Preconditions for equation `bm25_ranking`.
3090/// Domain-specific. Call: `contract_pre_bm25_ranking!(slice_expr)`
3091macro_rules! contract_pre_bm25_ranking {
3092    () => {{}};
3093    ($input:expr) => {{
3094        let _pv_0 = &$input;
3095    }};
3096}
3097
3098/// Preconditions for equation `index_insert_retrieve`.
3099/// Domain-specific. Call: `contract_pre_index_insert_retrieve!(slice_expr)`
3100macro_rules! contract_pre_index_insert_retrieve {
3101    () => {{}};
3102    ($input:expr) => {{
3103        let _pv_doc = &$input;
3104    }};
3105}
3106
3107/// Preconditions for equation `robots_compliance`.
3108/// Domain-specific. Call: `contract_pre_robots_compliance!(slice_expr)`
3109macro_rules! contract_pre_robots_compliance {
3110    () => {{}};
3111    ($input:expr) => {{
3112        let _pv_x = &$input;
3113    }};
3114}
3115
3116/// Preconditions for equation `tokenize_normalization`.
3117/// Call at function entry: `contract_pre_tokenize_normalization!(input_expr)`
3118macro_rules! contract_pre_tokenize_normalization {
3119    () => {{}};
3120    ($input:expr) => {{
3121        let _contract_input = &$input;
3122    }};
3123}
3124
3125/// Postconditions for equation `tokenize_normalization`.
3126/// Call before return: `contract_post_tokenize_normalization!(result_expr)`
3127macro_rules! contract_post_tokenize_normalization {
3128    ($result:expr) => {{
3129        let _contract_result = &$result;
3130    }};
3131}
3132
3133/// Combined pre+post contract for equation `tokenize_normalization`.
3134macro_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
3143// Auto-generated from contracts/bias-add-v1.yaml — DO NOT EDIT
3144// Contract: bias-add-v1
3145
3146/// Preconditions for equation `bias_add`.
3147/// Domain-specific. Call: `contract_pre_bias_add!(slice_expr)`
3148macro_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
3163// Auto-generated from contracts/bidirectional-attention-v1.yaml — DO NOT EDIT
3164// Contract: bidirectional-attention-v1
3165
3166/// Preconditions for equation `bidirectional_attention`.
3167/// Domain-specific. Call: `contract_pre_bidirectional_attention!(slice_expr)`
3168macro_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
3179// Auto-generated from contracts/blake3-state-v1.yaml — DO NOT EDIT
3180// Contract: blake3-state-v1
3181
3182/// Preconditions for equation `composite_hash`.
3183/// Domain-specific. Call: `contract_pre_composite_hash!(slice_expr)`
3184macro_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
3195/// Preconditions for equation `hash_file`.
3196/// Call at function entry: `contract_pre_hash_file!(input_expr)`
3197macro_rules! contract_pre_hash_file {
3198    () => {{}};
3199    ($input:expr) => {{
3200        let _contract_input = &$input;
3201    }};
3202}
3203
3204/// Preconditions for equation `hash_string`.
3205/// Domain-specific. Call: `contract_pre_hash_string!(slice_expr)`
3206macro_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
3221// Auto-generated from contracts/bpe-tokenization-v1.yaml — DO NOT EDIT
3222// Contract: bpe-tokenization-v1
3223
3224/// Preconditions for equation `decode`.
3225/// Domain-specific. Call: `contract_pre_decode!(slice_expr)`
3226macro_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
3237/// Preconditions for equation `encode`.
3238/// Domain-specific. Call: `contract_pre_encode!(slice_expr)`
3239macro_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
3250/// Preconditions for equation `merge_rule`.
3251/// Domain-specific. Call: `contract_pre_merge_rule!(slice_expr)`
3252macro_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
3263// Auto-generated from contracts/builder-pattern-v1.yaml — DO NOT EDIT
3264// Contract: builder-pattern-v1
3265
3266/// Preconditions for equation `builder_pattern`.
3267/// Call at function entry: `contract_pre_builder_pattern!(input_expr)`
3268macro_rules! contract_pre_builder_pattern {
3269    () => {{}};
3270    ($input:expr) => {{
3271        let _contract_input = &$input;
3272    }};
3273}
3274
3275/// Postconditions for equation `builder_pattern`.
3276/// Call before return: `contract_post_builder_pattern!(result_expr)`
3277macro_rules! contract_post_builder_pattern {
3278    ($result:expr) => {{
3279        let _contract_result = &$result;
3280    }};
3281}
3282
3283/// Combined pre+post contract for equation `builder_pattern`.
3284macro_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
3293// Auto-generated from contracts/builder-pattern-v1.yaml — DO NOT EDIT
3294// Contract: builder-pattern-v1
3295
3296/// Preconditions for equation `build`.
3297/// Domain-specific. Call: `contract_pre_build!(slice_expr)`
3298macro_rules! contract_pre_build {
3299    () => {{}};
3300    ($input:expr) => {{
3301        let _pv_builder = &$input;
3302    }};
3303}
3304
3305// Auto-generated from contracts/calibration-v1.yaml — DO NOT EDIT
3306// Contract: calibration-v1
3307
3308/// Preconditions for equation `expected_calibration_error`.
3309/// Domain-specific. Call: `contract_pre_expected_calibration_error!(slice_expr)`
3310macro_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
3321/// Preconditions for equation `isotonic_regression`.
3322/// Domain-specific. Call: `contract_pre_isotonic_regression!(slice_expr)`
3323macro_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
3334/// Preconditions for equation `maximum_calibration_error`.
3335/// Domain-specific. Call: `contract_pre_maximum_calibration_error!(slice_expr)`
3336macro_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
3347/// Preconditions for equation `platt_scaling`.
3348/// Domain-specific. Call: `contract_pre_platt_scaling!(slice_expr)`
3349macro_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
3364/// Preconditions for equation `reliability_diagram`.
3365/// Domain-specific. Call: `contract_pre_reliability_diagram!(slice_expr)`
3366macro_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
3377// Auto-generated from contracts/canary-metrics-schema-v1.yaml — DO NOT EDIT
3378// Contract: canary-metrics-schema-v1
3379
3380/// Preconditions for equation `domain_loss`.
3381/// Call at function entry: `contract_pre_domain_loss!(input_expr)`
3382macro_rules! contract_pre_domain_loss {
3383    () => {{}};
3384    ($input:expr) => {{
3385        let _contract_input = &$input;
3386    }};
3387}
3388
3389/// Preconditions for equation `domain_throughput`.
3390/// Call at function entry: `contract_pre_domain_throughput!(input_expr)`
3391macro_rules! contract_pre_domain_throughput {
3392    () => {{}};
3393    ($input:expr) => {{
3394        let _contract_input = &$input;
3395    }};
3396}
3397
3398/// Preconditions for equation `schema_completeness`.
3399/// Domain-specific. Call: `contract_pre_schema_completeness!(slice_expr)`
3400macro_rules! contract_pre_schema_completeness {
3401    () => {{}};
3402    ($input:expr) => {{
3403        let _pv_x = &$input;
3404    }};
3405}
3406
3407// Auto-generated from contracts/canary-score-gate-v1.yaml — DO NOT EDIT
3408// Contract: canary-score-gate-v1
3409
3410/// Preconditions for equation `parity_gate`.
3411/// Call at function entry: `contract_pre_parity_gate!(input_expr)`
3412macro_rules! contract_pre_parity_gate {
3413    () => {{}};
3414    ($input:expr) => {{
3415        let _contract_input = &$input;
3416    }};
3417}
3418
3419/// Preconditions for equation `throughput_gate`.
3420/// Call at function entry: `contract_pre_throughput_gate!(input_expr)`
3421macro_rules! contract_pre_throughput_gate {
3422    () => {{}};
3423    ($input:expr) => {{
3424        let _contract_input = &$input;
3425    }};
3426}
3427
3428/// Preconditions for equation `vram_gate`.
3429/// Call at function entry: `contract_pre_vram_gate!(input_expr)`
3430macro_rules! contract_pre_vram_gate {
3431    () => {{}};
3432    ($input:expr) => {{
3433        let _contract_input = &$input;
3434    }};
3435}
3436
3437// Auto-generated from contracts/chat-template-v1.yaml — DO NOT EDIT
3438// Contract: chat-template-v1
3439
3440/// Preconditions for equation `appstate_architecture_cache`.
3441/// Domain-specific. Call: `contract_pre_appstate_architecture_cache!(slice_expr)`
3442macro_rules! contract_pre_appstate_architecture_cache {
3443    () => {{}};
3444    ($input:expr) => {{
3445        let _pv_quantized_model = &$input;
3446    }};
3447}
3448
3449/// Postconditions for equation `appstate_architecture_cache`.
3450/// Call before return: `contract_post_appstate_architecture_cache!(result_expr)`
3451macro_rules! contract_post_appstate_architecture_cache {
3452    ($result:expr) => {{
3453        let _contract_result = &$result;
3454    }};
3455}
3456
3457/// Combined pre+post contract for equation `appstate_architecture_cache`.
3458macro_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
3467/// Preconditions for equation `architecture_aware_selection`.
3468/// Call at function entry: `contract_pre_architecture_aware_selection!(input_expr)`
3469macro_rules! contract_pre_architecture_aware_selection {
3470    () => {{}};
3471    ($input:expr) => {{
3472        let _contract_input = &$input;
3473    }};
3474}
3475
3476/// Postconditions for equation `architecture_aware_selection`.
3477/// Call before return: `contract_post_architecture_aware_selection!(result_expr)`
3478macro_rules! contract_post_architecture_aware_selection {
3479    ($result:expr) => {{
3480        let _contract_result = &$result;
3481    }};
3482}
3483
3484/// Combined pre+post contract for equation `architecture_aware_selection`.
3485macro_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
3494/// Preconditions for equation `format_conversation_determinism`.
3495/// Domain-specific. Call: `contract_pre_format_conversation_determinism!(slice_expr)`
3496macro_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
3505/// Postconditions for equation `format_conversation_determinism`.
3506/// Call before return: `contract_post_format_conversation_determinism!(result_expr)`
3507macro_rules! contract_post_format_conversation_determinism {
3508    ($result:expr) => {{
3509        let _contract_result = &$result;
3510    }};
3511}
3512
3513/// Combined pre+post contract for equation `format_conversation_determinism`.
3514macro_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
3523/// Preconditions for equation `thinking_block_suppression`.
3524/// Call at function entry: `contract_pre_thinking_block_suppression!(input_expr)`
3525macro_rules! contract_pre_thinking_block_suppression {
3526    () => {{}};
3527    ($input:expr) => {{
3528        let _contract_input = &$input;
3529    }};
3530}
3531
3532/// Postconditions for equation `thinking_block_suppression`.
3533/// Call before return: `contract_post_thinking_block_suppression!(result_expr)`
3534macro_rules! contract_post_thinking_block_suppression {
3535    ($result:expr) => {{
3536        let _contract_result = &$result;
3537    }};
3538}
3539
3540/// Combined pre+post contract for equation `thinking_block_suppression`.
3541macro_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
3550/// Preconditions for equation `trait_completeness`.
3551/// Call at function entry: `contract_pre_trait_completeness!(input_expr)`
3552macro_rules! contract_pre_trait_completeness {
3553    () => {{}};
3554    ($input:expr) => {{
3555        let _contract_input = &$input;
3556    }};
3557}
3558
3559/// Postconditions for equation `trait_completeness`.
3560/// Call before return: `contract_post_trait_completeness!(result_expr)`
3561macro_rules! contract_post_trait_completeness {
3562    ($result:expr) => {{
3563        let _contract_result = &$result;
3564    }};
3565}
3566
3567/// Combined pre+post contract for equation `trait_completeness`.
3568macro_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
3577// Auto-generated from contracts/classification-finetune-v1.yaml — DO NOT EDIT
3578// Contract: classification-finetune-v1
3579
3580/// Preconditions for equation `classifier_weight_shape`.
3581/// Domain-specific. Call: `contract_pre_classifier_weight_shape!(slice_expr)`
3582macro_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
3593/// Preconditions for equation `label_bounds`.
3594/// Domain-specific. Call: `contract_pre_label_bounds!(slice_expr)`
3595macro_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
3606/// Preconditions for equation `logit_shape`.
3607/// Domain-specific. Call: `contract_pre_logit_shape!(slice_expr)`
3608macro_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
3617/// Preconditions for equation `softmax_sum`.
3618/// Domain-specific. Call: `contract_pre_softmax_sum!(slice_expr)`
3619macro_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
3630// Auto-generated from contracts/classifier-pipeline-v1.yaml — DO NOT EDIT
3631// Contract: classifier-pipeline-v1
3632
3633/// Preconditions for equation `embedding_extraction`.
3634/// Domain-specific. Call: `contract_pre_embedding_extraction!(slice_expr)`
3635macro_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
3646/// Preconditions for equation `evaluation`.
3647/// Call at function entry: `contract_pre_evaluation!(input_expr)`
3648macro_rules! contract_pre_evaluation {
3649    () => {{}};
3650    ($input:expr) => {{
3651        let _contract_input = &$input;
3652    }};
3653}
3654
3655/// Preconditions for equation `linear_probe`.
3656/// Call at function entry: `contract_pre_linear_probe!(input_expr)`
3657macro_rules! contract_pre_linear_probe {
3658    () => {{}};
3659    ($input:expr) => {{
3660        let _contract_input = &$input;
3661    }};
3662}
3663
3664// Auto-generated from contracts/cleanup-safety-v1.yaml — DO NOT EDIT
3665// Contract: cleanup-safety-v1
3666
3667/// Preconditions for equation `duplicate_detection`.
3668/// Call at function entry: `contract_pre_duplicate_detection!(input_expr)`
3669macro_rules! contract_pre_duplicate_detection {
3670    () => {{}};
3671    ($input:expr) => {{
3672        let _contract_input = &$input;
3673    }};
3674}
3675
3676/// Preconditions for equation `outlier_detection`.
3677/// Call at function entry: `contract_pre_outlier_detection!(input_expr)`
3678macro_rules! contract_pre_outlier_detection {
3679    () => {{}};
3680    ($input:expr) => {{
3681        let _contract_input = &$input;
3682    }};
3683}
3684
3685/// Preconditions for equation `scan_completeness`.
3686/// Call at function entry: `contract_pre_scan_completeness!(input_expr)`
3687macro_rules! contract_pre_scan_completeness {
3688    () => {{}};
3689    ($input:expr) => {{
3690        let _contract_input = &$input;
3691    }};
3692}
3693
3694// Auto-generated from contracts/cli-dispatch-v1.yaml — DO NOT EDIT
3695// Contract: cli-dispatch-v1
3696
3697/// Preconditions for equation `dispatch_completeness`.
3698/// Domain-specific. Call: `contract_pre_dispatch_completeness!(slice_expr)`
3699macro_rules! contract_pre_dispatch_completeness {
3700    () => {{}};
3701    ($input:expr) => {{
3702        let _pv_args = &$input;
3703    }};
3704}
3705
3706/// Preconditions for equation `exit_code_semantics`.
3707/// Call at function entry: `contract_pre_exit_code_semantics!(input_expr)`
3708macro_rules! contract_pre_exit_code_semantics {
3709    () => {{}};
3710    ($input:expr) => {{
3711        let _contract_input = &$input;
3712    }};
3713}
3714
3715/// Preconditions for equation `feature_gated_dispatch`.
3716/// Call at function entry: `contract_pre_feature_gated_dispatch!(input_expr)`
3717macro_rules! contract_pre_feature_gated_dispatch {
3718    () => {{}};
3719    ($input:expr) => {{
3720        let _contract_input = &$input;
3721    }};
3722}
3723
3724/// Postconditions for equation `feature_gated_dispatch`.
3725/// Call before return: `contract_post_feature_gated_dispatch!(result_expr)`
3726macro_rules! contract_post_feature_gated_dispatch {
3727    ($result:expr) => {{
3728        let _contract_result = &$result;
3729    }};
3730}
3731
3732/// Combined pre+post contract for equation `feature_gated_dispatch`.
3733macro_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
3742/// Preconditions for equation `idempotent_inspection`.
3743/// Call at function entry: `contract_pre_idempotent_inspection!(input_expr)`
3744macro_rules! contract_pre_idempotent_inspection {
3745    () => {{}};
3746    ($input:expr) => {{
3747        let _contract_input = &$input;
3748    }};
3749}
3750
3751/// Preconditions for equation `output_format_fidelity`.
3752/// Call at function entry: `contract_pre_output_format_fidelity!(input_expr)`
3753macro_rules! contract_pre_output_format_fidelity {
3754    () => {{}};
3755    ($input:expr) => {{
3756        let _contract_input = &$input;
3757    }};
3758}
3759
3760// Auto-generated from contracts/cli-interface-v1.yaml — DO NOT EDIT
3761// Contract: cli-interface-v1
3762
3763/// Preconditions for equation `exit_code_semantics`.
3764/// Call at function entry: `contract_pre_exit_code_semantics!(input_expr)`
3765macro_rules! contract_pre_exit_code_semantics {
3766    () => {{}};
3767    ($input:expr) => {{
3768        let _contract_input = &$input;
3769    }};
3770}
3771
3772/// Postconditions for equation `exit_code_semantics`.
3773/// Call before return: `contract_post_exit_code_semantics!(result_expr)`
3774macro_rules! contract_post_exit_code_semantics {
3775    ($result:expr) => {{
3776        let _contract_result = &$result;
3777    }};
3778}
3779
3780/// Combined pre+post contract for equation `exit_code_semantics`.
3781macro_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
3790/// Preconditions for equation `output_format_fidelity`.
3791/// Call at function entry: `contract_pre_output_format_fidelity!(input_expr)`
3792macro_rules! contract_pre_output_format_fidelity {
3793    () => {{}};
3794    ($input:expr) => {{
3795        let _contract_input = &$input;
3796    }};
3797}
3798
3799/// Postconditions for equation `output_format_fidelity`.
3800/// Call before return: `contract_post_output_format_fidelity!(result_expr)`
3801macro_rules! contract_post_output_format_fidelity {
3802    ($result:expr) => {{
3803        let _contract_result = &$result;
3804    }};
3805}
3806
3807/// Combined pre+post contract for equation `output_format_fidelity`.
3808macro_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
3817/// Preconditions for equation `result_cardinality`.
3818/// Call at function entry: `contract_pre_result_cardinality!(input_expr)`
3819macro_rules! contract_pre_result_cardinality {
3820    () => {{}};
3821    ($input:expr) => {{
3822        let _contract_input = &$input;
3823    }};
3824}
3825
3826/// Postconditions for equation `result_cardinality`.
3827/// Call before return: `contract_post_result_cardinality!(result_expr)`
3828macro_rules! contract_post_result_cardinality {
3829    ($result:expr) => {{
3830        let _contract_result = &$result;
3831    }};
3832}
3833
3834/// Combined pre+post contract for equation `result_cardinality`.
3835macro_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
3844/// Preconditions for equation `timeout_honoring`.
3845/// Call at function entry: `contract_pre_timeout_honoring!(input_expr)`
3846macro_rules! contract_pre_timeout_honoring {
3847    () => {{}};
3848    ($input:expr) => {{
3849        let _contract_input = &$input;
3850    }};
3851}
3852
3853/// Postconditions for equation `timeout_honoring`.
3854/// Call before return: `contract_post_timeout_honoring!(result_expr)`
3855macro_rules! contract_post_timeout_honoring {
3856    ($result:expr) => {{
3857        let _contract_result = &$result;
3858    }};
3859}
3860
3861/// Combined pre+post contract for equation `timeout_honoring`.
3862macro_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
3871// Auto-generated from contracts/cli-lint-v1.yaml — DO NOT EDIT
3872// Contract: cli-lint-v1
3873
3874/// Preconditions for equation `exit_code_dispatch`.
3875/// Domain-specific. Call: `contract_pre_exit_code_dispatch!(slice_expr)`
3876macro_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
3891/// Preconditions for equation `finding_determinism`.
3892/// Call at function entry: `contract_pre_finding_determinism!(input_expr)`
3893macro_rules! contract_pre_finding_determinism {
3894    () => {{}};
3895    ($input:expr) => {{
3896        let _contract_input = &$input;
3897    }};
3898}
3899
3900/// Preconditions for equation `output_format_validity`.
3901/// Call at function entry: `contract_pre_output_format_validity!(input_expr)`
3902macro_rules! contract_pre_output_format_validity {
3903    () => {{}};
3904    ($input:expr) => {{
3905        let _contract_input = &$input;
3906    }};
3907}
3908
3909/// Preconditions for equation `severity_ordering`.
3910/// Domain-specific. Call: `contract_pre_severity_ordering!(slice_expr)`
3911macro_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
3922// Auto-generated from contracts/cli-oracle-v1.yaml — DO NOT EDIT
3923// Contract: cli-oracle-v1
3924
3925/// Preconditions for equation `dispatch_correctness`.
3926/// Call at function entry: `contract_pre_dispatch_correctness!(input_expr)`
3927macro_rules! contract_pre_dispatch_correctness {
3928    () => {{}};
3929    ($input:expr) => {{
3930        let _contract_input = &$input;
3931    }};
3932}
3933
3934/// Preconditions for equation `index_freshness`.
3935/// Call at function entry: `contract_pre_index_freshness!(input_expr)`
3936macro_rules! contract_pre_index_freshness {
3937    () => {{}};
3938    ($input:expr) => {{
3939        let _contract_input = &$input;
3940    }};
3941}
3942
3943/// Preconditions for equation `rag_query_correctness`.
3944/// Domain-specific. Call: `contract_pre_rag_query_correctness!(slice_expr)`
3945macro_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
3956// Auto-generated from contracts/cli-transpile-v1.yaml — DO NOT EDIT
3957// Contract: cli-transpile-v1
3958
3959/// Preconditions for equation `exit_code_dispatch`.
3960/// Domain-specific. Call: `contract_pre_exit_code_dispatch!(slice_expr)`
3961macro_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
3976/// Preconditions for equation `input_validation`.
3977/// Call at function entry: `contract_pre_input_validation!(input_expr)`
3978macro_rules! contract_pre_input_validation {
3979    () => {{}};
3980    ($input:expr) => {{
3981        let _contract_input = &$input;
3982    }};
3983}
3984
3985/// Preconditions for equation `output_validity`.
3986/// Domain-specific. Call: `contract_pre_output_validity!(slice_expr)`
3987macro_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
4002/// Preconditions for equation `transpilation_determinism`.
4003/// Call at function entry: `contract_pre_transpilation_determinism!(input_expr)`
4004macro_rules! contract_pre_transpilation_determinism {
4005    () => {{}};
4006    ($input:expr) => {{
4007        let _contract_input = &$input;
4008    }};
4009}
4010
4011// Auto-generated from contracts/cma-es-kernel-v1.yaml — DO NOT EDIT
4012// Contract: cma-es-kernel-v1
4013
4014/// Preconditions for equation `covariance_update`.
4015/// Domain-specific. Call: `contract_pre_covariance_update!(slice_expr)`
4016macro_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
4027/// Preconditions for equation `mean_update`.
4028/// Domain-specific. Call: `contract_pre_mean_update!(slice_expr)`
4029macro_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
4040/// Preconditions for equation `sample`.
4041/// Domain-specific. Call: `contract_pre_sample!(slice_expr)`
4042macro_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
4053// Auto-generated from contracts/codebert-tokenizer-validation-v1.yaml — DO NOT EDIT
4054// Contract: codebert-tokenizer-validation-v1
4055
4056/// Preconditions for equation `tokenizer_adequacy`.
4057/// Domain-specific. Call: `contract_pre_tokenizer_adequacy!(slice_expr)`
4058macro_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
4069// Auto-generated from contracts/codegen-dispatch-v1.yaml — DO NOT EDIT
4070// Contract: codegen-dispatch-v1
4071
4072/// Preconditions for equation `apply_script`.
4073/// Call at function entry: `contract_pre_apply_script!(input_expr)`
4074macro_rules! contract_pre_apply_script {
4075    () => {{}};
4076    ($input:expr) => {{
4077        let _contract_input = &$input;
4078    }};
4079}
4080
4081/// Preconditions for equation `check_script`.
4082/// Call at function entry: `contract_pre_check_script!(input_expr)`
4083macro_rules! contract_pre_check_script {
4084    () => {{}};
4085    ($input:expr) => {{
4086        let _contract_input = &$input;
4087    }};
4088}
4089
4090/// Preconditions for equation `state_query_script`.
4091/// Call at function entry: `contract_pre_state_query_script!(input_expr)`
4092macro_rules! contract_pre_state_query_script {
4093    () => {{}};
4094    ($input:expr) => {{
4095        let _contract_input = &$input;
4096    }};
4097}
4098
4099// Auto-generated from contracts/columnar-storage-v1.yaml — DO NOT EDIT
4100// Contract: columnar-storage-v1
4101
4102/// Preconditions for equation `insert_get_consistency`.
4103/// Call at function entry: `contract_pre_insert_get_consistency!(input_expr)`
4104macro_rules! contract_pre_insert_get_consistency {
4105    () => {{}};
4106    ($input:expr) => {{
4107        let _contract_input = &$input;
4108    }};
4109}
4110
4111/// Preconditions for equation `query_correctness`.
4112/// Call at function entry: `contract_pre_query_correctness!(input_expr)`
4113macro_rules! contract_pre_query_correctness {
4114    () => {{}};
4115    ($input:expr) => {{
4116        let _contract_input = &$input;
4117    }};
4118}
4119
4120/// Preconditions for equation `wasm_parity`.
4121/// Call at function entry: `contract_pre_wasm_parity!(input_expr)`
4122macro_rules! contract_pre_wasm_parity {
4123    () => {{}};
4124    ($input:expr) => {{
4125        let _contract_input = &$input;
4126    }};
4127}
4128
4129// Auto-generated from contracts/comply-check-v1.yaml — DO NOT EDIT
4130// Contract: comply-check-v1
4131
4132/// Preconditions for equation `aggregate_score`.
4133/// Domain-specific. Call: `contract_pre_aggregate_score!(slice_expr)`
4134macro_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
4145/// Postconditions for equation `aggregate_score`.
4146/// Call before return: `contract_post_aggregate_score!(result_expr)`
4147macro_rules! contract_post_aggregate_score {
4148    ($result:expr) => {{
4149        let _contract_result = &$result;
4150    }};
4151}
4152
4153/// Combined pre+post contract for equation `aggregate_score`.
4154macro_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
4163/// Preconditions for equation `run_checks`.
4164/// Call at function entry: `contract_pre_run_checks!(input_expr)`
4165macro_rules! contract_pre_run_checks {
4166    () => {{}};
4167    ($input:expr) => {{
4168        let _contract_input = &$input;
4169    }};
4170}
4171
4172/// Postconditions for equation `run_checks`.
4173/// Call before return: `contract_post_run_checks!(result_expr)`
4174macro_rules! contract_post_run_checks {
4175    ($result:expr) => {{
4176        let _contract_result = &$result;
4177    }};
4178}
4179
4180/// Combined pre+post contract for equation `run_checks`.
4181macro_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
4190// Auto-generated from contracts/compression-codec-v1.yaml — DO NOT EDIT
4191// Contract: compression-codec-v1
4192
4193/// Preconditions for equation `batch_correctness`.
4194/// Domain-specific. Call: `contract_pre_batch_correctness!(slice_expr)`
4195macro_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
4206/// Preconditions for equation `roundtrip_identity`.
4207/// Domain-specific. Call: `contract_pre_roundtrip_identity!(slice_expr)`
4208macro_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
4219/// Preconditions for equation `simd_scalar_parity`.
4220/// Domain-specific. Call: `contract_pre_simd_scalar_parity!(slice_expr)`
4221macro_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
4232// Auto-generated from contracts/compression-roundtrip-v1.yaml — DO NOT EDIT
4233// Contract: compression-roundtrip-v1
4234
4235/// Preconditions for equation `compression_ratio`.
4236/// Domain-specific. Call: `contract_pre_compression_ratio!(slice_expr)`
4237macro_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
4248/// Preconditions for equation `page_state`.
4249/// Call at function entry: `contract_pre_page_state!(input_expr)`
4250macro_rules! contract_pre_page_state {
4251    () => {{}};
4252    ($input:expr) => {{
4253        let _contract_input = &$input;
4254    }};
4255}
4256
4257/// Preconditions for equation `roundtrip_identity`.
4258/// Domain-specific. Call: `contract_pre_roundtrip_identity!(slice_expr)`
4259macro_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
4270// Auto-generated from contracts/compression-roundtrip-v1.yaml — DO NOT EDIT
4271// Contract: compression-roundtrip-v1
4272
4273/// Preconditions for equation `lz4_roundtrip`.
4274/// Call at function entry: `contract_pre_lz4_roundtrip!(input_expr)`
4275macro_rules! contract_pre_lz4_roundtrip {
4276    () => {{}};
4277    ($input:expr) => {{
4278        let _contract_input = &$input;
4279    }};
4280}
4281
4282/// Postconditions for equation `lz4_roundtrip`.
4283/// Call before return: `contract_post_lz4_roundtrip!(result_expr)`
4284macro_rules! contract_post_lz4_roundtrip {
4285    ($result:expr) => {{
4286        let _contract_result = &$result;
4287    }};
4288}
4289
4290/// Combined pre+post contract for equation `lz4_roundtrip`.
4291macro_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
4300/// Preconditions for equation `sqlite_migration`.
4301/// Call at function entry: `contract_pre_sqlite_migration!(input_expr)`
4302macro_rules! contract_pre_sqlite_migration {
4303    () => {{}};
4304    ($input:expr) => {{
4305        let _contract_input = &$input;
4306    }};
4307}
4308
4309/// Postconditions for equation `sqlite_migration`.
4310/// Call before return: `contract_post_sqlite_migration!(result_expr)`
4311macro_rules! contract_post_sqlite_migration {
4312    ($result:expr) => {{
4313        let _contract_result = &$result;
4314    }};
4315}
4316
4317/// Combined pre+post contract for equation `sqlite_migration`.
4318macro_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
4327// Auto-generated from contracts/compute-parity-v1.yaml — DO NOT EDIT
4328// Contract: compute-parity-v1
4329
4330/// Preconditions for equation `backend_dispatch_complete`.
4331/// Call at function entry: `contract_pre_backend_dispatch_complete!(input_expr)`
4332macro_rules! contract_pre_backend_dispatch_complete {
4333    () => {{}};
4334    ($input:expr) => {{
4335        let _contract_input = &$input;
4336    }};
4337}
4338
4339/// Postconditions for equation `backend_dispatch_complete`.
4340/// Call before return: `contract_post_backend_dispatch_complete!(result_expr)`
4341macro_rules! contract_post_backend_dispatch_complete {
4342    ($result:expr) => {{
4343        let _contract_result = &$result;
4344    }};
4345}
4346
4347/// Combined pre+post contract for equation `backend_dispatch_complete`.
4348macro_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
4357/// Preconditions for equation `gpu_cpu_parity`.
4358/// Call at function entry: `contract_pre_gpu_cpu_parity!(input_expr)`
4359macro_rules! contract_pre_gpu_cpu_parity {
4360    () => {{}};
4361    ($input:expr) => {{
4362        let _contract_input = &$input;
4363    }};
4364}
4365
4366/// Postconditions for equation `gpu_cpu_parity`.
4367/// Call before return: `contract_post_gpu_cpu_parity!(result_expr)`
4368macro_rules! contract_post_gpu_cpu_parity {
4369    ($result:expr) => {{
4370        let _contract_result = &$result;
4371    }};
4372}
4373
4374/// Combined pre+post contract for equation `gpu_cpu_parity`.
4375macro_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
4384/// Preconditions for equation `simd_scalar_parity`.
4385/// Call at function entry: `contract_pre_simd_scalar_parity!(input_expr)`
4386macro_rules! contract_pre_simd_scalar_parity {
4387    () => {{}};
4388    ($input:expr) => {{
4389        let _contract_input = &$input;
4390    }};
4391}
4392
4393/// Postconditions for equation `simd_scalar_parity`.
4394/// Call before return: `contract_post_simd_scalar_parity!(result_expr)`
4395macro_rules! contract_post_simd_scalar_parity {
4396    ($result:expr) => {{
4397        let _contract_result = &$result;
4398    }};
4399}
4400
4401/// Combined pre+post contract for equation `simd_scalar_parity`.
4402macro_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
4411// Auto-generated from contracts/concurrency-safety-v1.yaml — DO NOT EDIT
4412// Contract: concurrency-safety-v1
4413
4414/// Preconditions for equation `channel_lossless`.
4415/// Call at function entry: `contract_pre_channel_lossless!(input_expr)`
4416macro_rules! contract_pre_channel_lossless {
4417    () => {{}};
4418    ($input:expr) => {{
4419        let _contract_input = &$input;
4420    }};
4421}
4422
4423/// Postconditions for equation `channel_lossless`.
4424/// Call before return: `contract_post_channel_lossless!(result_expr)`
4425macro_rules! contract_post_channel_lossless {
4426    ($result:expr) => {{
4427        let _contract_result = &$result;
4428    }};
4429}
4430
4431/// Combined pre+post contract for equation `channel_lossless`.
4432macro_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
4441/// Preconditions for equation `parallel_determinism`.
4442/// Call at function entry: `contract_pre_parallel_determinism!(input_expr)`
4443macro_rules! contract_pre_parallel_determinism {
4444    () => {{}};
4445    ($input:expr) => {{
4446        let _contract_input = &$input;
4447    }};
4448}
4449
4450/// Postconditions for equation `parallel_determinism`.
4451/// Call before return: `contract_post_parallel_determinism!(result_expr)`
4452macro_rules! contract_post_parallel_determinism {
4453    ($result:expr) => {{
4454        let _contract_result = &$result;
4455    }};
4456}
4457
4458/// Combined pre+post contract for equation `parallel_determinism`.
4459macro_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
4468/// Preconditions for equation `task_cancellation_cleanup`.
4469/// Call at function entry: `contract_pre_task_cancellation_cleanup!(input_expr)`
4470macro_rules! contract_pre_task_cancellation_cleanup {
4471    () => {{}};
4472    ($input:expr) => {{
4473        let _contract_input = &$input;
4474    }};
4475}
4476
4477/// Postconditions for equation `task_cancellation_cleanup`.
4478/// Call before return: `contract_post_task_cancellation_cleanup!(result_expr)`
4479macro_rules! contract_post_task_cancellation_cleanup {
4480    ($result:expr) => {{
4481        let _contract_result = &$result;
4482    }};
4483}
4484
4485/// Combined pre+post contract for equation `task_cancellation_cleanup`.
4486macro_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
4495// Auto-generated from contracts/configuration-schema-v1.yaml — DO NOT EDIT
4496// Contract: configuration-schema-v1
4497
4498/// Preconditions for equation `threshold_invariants`.
4499/// Call at function entry: `contract_pre_threshold_invariants!(input_expr)`
4500macro_rules! contract_pre_threshold_invariants {
4501    () => {{}};
4502    ($input:expr) => {{
4503        let _contract_input = &$input;
4504    }};
4505}
4506
4507/// Postconditions for equation `threshold_invariants`.
4508/// Call before return: `contract_post_threshold_invariants!(result_expr)`
4509macro_rules! contract_post_threshold_invariants {
4510    ($result:expr) => {{
4511        let _contract_result = &$result;
4512    }};
4513}
4514
4515/// Combined pre+post contract for equation `threshold_invariants`.
4516macro_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
4525/// Preconditions for equation `unknown_key_rejection`.
4526/// Call at function entry: `contract_pre_unknown_key_rejection!(input_expr)`
4527macro_rules! contract_pre_unknown_key_rejection {
4528    () => {{}};
4529    ($input:expr) => {{
4530        let _contract_input = &$input;
4531    }};
4532}
4533
4534/// Postconditions for equation `unknown_key_rejection`.
4535/// Call before return: `contract_post_unknown_key_rejection!(result_expr)`
4536macro_rules! contract_post_unknown_key_rejection {
4537    ($result:expr) => {{
4538        let _contract_result = &$result;
4539    }};
4540}
4541
4542/// Combined pre+post contract for equation `unknown_key_rejection`.
4543macro_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
4552// Auto-generated from contracts/configuration-v1.yaml — DO NOT EDIT
4553// Contract: configuration-v1
4554
4555/// Preconditions for equation `configuration`.
4556/// Domain-specific. Call: `contract_pre_configuration!(slice_expr)`
4557macro_rules! contract_pre_configuration {
4558    () => {{}};
4559    ($input:expr) => {{
4560        let _pv_path = &$input;
4561    }};
4562}
4563
4564/// Postconditions for equation `configuration`.
4565/// Call before return: `contract_post_configuration!(result_expr)`
4566macro_rules! contract_post_configuration {
4567    ($result:expr) => {{
4568        let _contract_result = &$result;
4569    }};
4570}
4571
4572/// Combined pre+post contract for equation `configuration`.
4573macro_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
4582// Auto-generated from contracts/configuration-v1.yaml — DO NOT EDIT
4583// Contract: configuration-v1
4584
4585/// Preconditions for equation `bfs`.
4586/// Call at function entry: `contract_pre_bfs!(input_expr)`
4587macro_rules! contract_pre_bfs {
4588    () => {{}};
4589    ($input:expr) => {{
4590        let _contract_input = &$input;
4591    }};
4592}
4593
4594// Auto-generated from contracts/configuration-v1.yaml — DO NOT EDIT
4595// Contract: configuration-v1
4596
4597/// Preconditions for equation `connect`.
4598/// Call at function entry: `contract_pre_connect!(input_expr)`
4599macro_rules! contract_pre_connect {
4600    () => {{}};
4601    ($input:expr) => {{
4602        let _contract_input = &$input;
4603    }};
4604}
4605
4606// Auto-generated from contracts/configuration-v1.yaml — DO NOT EDIT
4607// Contract: configuration-v1
4608
4609/// Preconditions for equation `validate_index`.
4610/// Call at function entry: `contract_pre_validate_index!(input_expr)`
4611macro_rules! contract_pre_validate_index {
4612    () => {{}};
4613    ($input:expr) => {{
4614        let _contract_input = &$input;
4615    }};
4616}
4617
4618/// Preconditions for equation `validate_size`.
4619/// Call at function entry: `contract_pre_validate_size!(input_expr)`
4620macro_rules! contract_pre_validate_size {
4621    () => {{}};
4622    ($input:expr) => {{
4623        let _contract_input = &$input;
4624    }};
4625}
4626
4627// Auto-generated from contracts/configuration-v1.yaml — DO NOT EDIT
4628// Contract: configuration-v1
4629
4630// Auto-generated from contracts/configuration-v1.yaml — DO NOT EDIT
4631// Contract: configuration-v1
4632
4633/// Preconditions for equation `insert`.
4634/// Call at function entry: `contract_pre_insert!(input_expr)`
4635macro_rules! contract_pre_insert {
4636    () => {{}};
4637    ($input:expr) => {{
4638        let _contract_input = &$input;
4639    }};
4640}
4641
4642/// Preconditions for equation `query`.
4643/// Call at function entry: `contract_pre_query!(input_expr)`
4644macro_rules! contract_pre_query {
4645    () => {{}};
4646    ($input:expr) => {{
4647        let _contract_input = &$input;
4648    }};
4649}
4650
4651// Auto-generated from contracts/configuration-v1.yaml — DO NOT EDIT
4652// Contract: configuration-v1
4653
4654/// Preconditions for equation `config`.
4655/// Call at function entry: `contract_pre_config!(input_expr)`
4656macro_rules! contract_pre_config {
4657    () => {{}};
4658    ($input:expr) => {{
4659        let _contract_input = &$input;
4660    }};
4661}
4662
4663// Auto-generated from contracts/context-generation-v1.yaml — DO NOT EDIT
4664// Contract: context-generation-v1
4665
4666/// Preconditions for equation `generate_context`.
4667/// Call at function entry: `contract_pre_generate_context!(input_expr)`
4668macro_rules! contract_pre_generate_context {
4669    () => {{}};
4670    ($input:expr) => {{
4671        let _contract_input = &$input;
4672    }};
4673}
4674
4675/// Postconditions for equation `generate_context`.
4676/// Call before return: `contract_post_generate_context!(result_expr)`
4677macro_rules! contract_post_generate_context {
4678    ($result:expr) => {{
4679        let _contract_result = &$result;
4680    }};
4681}
4682
4683/// Combined pre+post contract for equation `generate_context`.
4684macro_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
4693/// Preconditions for equation `index_persistence`.
4694/// Call at function entry: `contract_pre_index_persistence!(input_expr)`
4695macro_rules! contract_pre_index_persistence {
4696    () => {{}};
4697    ($input:expr) => {{
4698        let _contract_input = &$input;
4699    }};
4700}
4701
4702/// Postconditions for equation `index_persistence`.
4703/// Call before return: `contract_post_index_persistence!(result_expr)`
4704macro_rules! contract_post_index_persistence {
4705    ($result:expr) => {{
4706        let _contract_result = &$result;
4707    }};
4708}
4709
4710/// Combined pre+post contract for equation `index_persistence`.
4711macro_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
4720// Auto-generated from contracts/continuous-batching-v1.yaml — DO NOT EDIT
4721// Contract: continuous-batching-v1
4722
4723/// Preconditions for equation `chunked_prefill`.
4724/// Call at function entry: `contract_pre_chunked_prefill!(input_expr)`
4725macro_rules! contract_pre_chunked_prefill {
4726    () => {{}};
4727    ($input:expr) => {{
4728        let _contract_input = &$input;
4729    }};
4730}
4731
4732/// Preconditions for equation `correctness_under_batching`.
4733/// Call at function entry: `contract_pre_correctness_under_batching!(input_expr)`
4734macro_rules! contract_pre_correctness_under_batching {
4735    () => {{}};
4736    ($input:expr) => {{
4737        let _contract_input = &$input;
4738    }};
4739}
4740
4741/// Preconditions for equation `decode_degradation`.
4742/// Domain-specific. Call: `contract_pre_decode_degradation!(slice_expr)`
4743macro_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
4754/// Preconditions for equation `request_state`.
4755/// Call at function entry: `contract_pre_request_state!(input_expr)`
4756macro_rules! contract_pre_request_state {
4757    () => {{}};
4758    ($input:expr) => {{
4759        let _contract_input = &$input;
4760    }};
4761}
4762
4763/// Preconditions for equation `scheduling_fairness`.
4764/// Call at function entry: `contract_pre_scheduling_fairness!(input_expr)`
4765macro_rules! contract_pre_scheduling_fairness {
4766    () => {{}};
4767    ($input:expr) => {{
4768        let _contract_input = &$input;
4769    }};
4770}
4771
4772/// Preconditions for equation `throughput_scaling`.
4773/// Call at function entry: `contract_pre_throughput_scaling!(input_expr)`
4774macro_rules! contract_pre_throughput_scaling {
4775    () => {{}};
4776    ($input:expr) => {{
4777        let _contract_input = &$input;
4778    }};
4779}
4780
4781/// Preconditions for equation `token_budget`.
4782/// Domain-specific. Call: `contract_pre_token_budget!(slice_expr)`
4783macro_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
4794// Auto-generated from contracts/conv1d-kernel-v1.yaml — DO NOT EDIT
4795// Contract: conv1d-kernel-v1
4796
4797/// Preconditions for equation `conv1d`.
4798/// Domain-specific. Call: `contract_pre_conv1d!(slice_expr)`
4799macro_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
4807// Auto-generated from contracts/conversation-generation-v1.yaml — DO NOT EDIT
4808// Contract: conversation-generation-v1
4809
4810/// Preconditions for equation `chatml_format`.
4811/// Domain-specific. Call: `contract_pre_chatml_format!(slice_expr)`
4812macro_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
4823/// Preconditions for equation `conversation_types`.
4824/// Domain-specific. Call: `contract_pre_conversation_types!(slice_expr)`
4825macro_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
4836/// Preconditions for equation `quality_gate`.
4837/// Domain-specific. Call: `contract_pre_quality_gate!(slice_expr)`
4838macro_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
4849// Auto-generated from contracts/cooperative-matrix-gemm-v1.yaml — DO NOT EDIT
4850// Contract: cooperative-matrix-gemm-v1
4851
4852// Auto-generated from contracts/copia-delta-v1.yaml — DO NOT EDIT
4853// Contract: copia-delta-v1
4854
4855/// Preconditions for equation `block_reuse`.
4856/// Domain-specific. Call: `contract_pre_block_reuse!(slice_expr)`
4857macro_rules! contract_pre_block_reuse {
4858    () => {{}};
4859    ($input:expr) => {{
4860        let _pv_old_idx = &$input;
4861    }};
4862}
4863
4864/// Preconditions for equation `delta_correctness`.
4865/// Call at function entry: `contract_pre_delta_correctness!(input_expr)`
4866macro_rules! contract_pre_delta_correctness {
4867    () => {{}};
4868    ($input:expr) => {{
4869        let _contract_input = &$input;
4870    }};
4871}
4872
4873/// Preconditions for equation `identity_sync`.
4874/// Call at function entry: `contract_pre_identity_sync!(input_expr)`
4875macro_rules! contract_pre_identity_sync {
4876    () => {{}};
4877    ($input:expr) => {{
4878        let _contract_input = &$input;
4879    }};
4880}
4881
4882/// Preconditions for equation `transfer_minimality`.
4883/// Domain-specific. Call: `contract_pre_transfer_minimality!(slice_expr)`
4884macro_rules! contract_pre_transfer_minimality {
4885    () => {{}};
4886    ($input:expr) => {{
4887        let _pv_delta = &$input;
4888    }};
4889}
4890
4891// Auto-generated from contracts/cpp-type-preservation-v1.yaml — DO NOT EDIT
4892// Contract: cpp-type-preservation-v1
4893
4894/// Preconditions for equation `class_to_struct`.
4895/// Call at function entry: `contract_pre_class_to_struct!(input_expr)`
4896macro_rules! contract_pre_class_to_struct {
4897    () => {{}};
4898    ($input:expr) => {{
4899        let _contract_input = &$input;
4900    }};
4901}
4902
4903/// Postconditions for equation `class_to_struct`.
4904/// Call before return: `contract_post_class_to_struct!(result_expr)`
4905macro_rules! contract_post_class_to_struct {
4906    ($result:expr) => {{
4907        let _contract_result = &$result;
4908    }};
4909}
4910
4911/// Combined pre+post contract for equation `class_to_struct`.
4912macro_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
4921/// Preconditions for equation `inheritance_to_composition`.
4922/// Call at function entry: `contract_pre_inheritance_to_composition!(input_expr)`
4923macro_rules! contract_pre_inheritance_to_composition {
4924    () => {{}};
4925    ($input:expr) => {{
4926        let _contract_input = &$input;
4927    }};
4928}
4929
4930/// Postconditions for equation `inheritance_to_composition`.
4931/// Call before return: `contract_post_inheritance_to_composition!(result_expr)`
4932macro_rules! contract_post_inheritance_to_composition {
4933    ($result:expr) => {{
4934        let _contract_result = &$result;
4935    }};
4936}
4937
4938/// Combined pre+post contract for equation `inheritance_to_composition`.
4939macro_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
4948/// Preconditions for equation `namespace_to_mod`.
4949/// Call at function entry: `contract_pre_namespace_to_mod!(input_expr)`
4950macro_rules! contract_pre_namespace_to_mod {
4951    () => {{}};
4952    ($input:expr) => {{
4953        let _contract_input = &$input;
4954    }};
4955}
4956
4957/// Postconditions for equation `namespace_to_mod`.
4958/// Call before return: `contract_post_namespace_to_mod!(result_expr)`
4959macro_rules! contract_post_namespace_to_mod {
4960    ($result:expr) => {{
4961        let _contract_result = &$result;
4962    }};
4963}
4964
4965/// Combined pre+post contract for equation `namespace_to_mod`.
4966macro_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
4975/// Preconditions for equation `operator_to_trait`.
4976/// Domain-specific. Call: `contract_pre_operator_to_trait!(slice_expr)`
4977macro_rules! contract_pre_operator_to_trait {
4978    () => {{}};
4979    ($input:expr) => {{
4980        let _pv_x = &$input;
4981    }};
4982}
4983
4984/// Postconditions for equation `operator_to_trait`.
4985/// Call before return: `contract_post_operator_to_trait!(result_expr)`
4986macro_rules! contract_post_operator_to_trait {
4987    ($result:expr) => {{
4988        let _contract_result = &$result;
4989    }};
4990}
4991
4992/// Combined pre+post contract for equation `operator_to_trait`.
4993macro_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
5002// Auto-generated from contracts/cpu-q4k-activation-quant-v1.yaml — DO NOT EDIT
5003// Contract: cpu-q4k-activation-quant-v1
5004
5005/// Preconditions for equation `current_path`.
5006/// Domain-specific. Call: `contract_pre_current_path!(slice_expr)`
5007macro_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
5022/// Preconditions for equation `speedup_bound`.
5023/// Domain-specific. Call: `contract_pre_speedup_bound!(slice_expr)`
5024macro_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
5039/// Preconditions for equation `target_path`.
5040/// Domain-specific. Call: `contract_pre_target_path!(slice_expr)`
5041macro_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
5052// Auto-generated from contracts/cpu-work-stealing-v1.yaml — DO NOT EDIT
5053// Contract: cpu-work-stealing-v1
5054
5055/// Preconditions for equation `l1_tiling`.
5056/// Domain-specific. Call: `contract_pre_l1_tiling!(slice_expr)`
5057macro_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
5072/// Preconditions for equation `rayon_overhead`.
5073/// Domain-specific. Call: `contract_pre_rayon_overhead!(slice_expr)`
5074macro_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
5089// Auto-generated from contracts/cross-entropy-kernel-v1.yaml — DO NOT EDIT
5090// Contract: cross-entropy-kernel-v1
5091
5092/// Preconditions for equation `cross_entropy`.
5093/// Domain-specific. Call: `contract_pre_cross_entropy!(slice_expr)`
5094macro_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
5109/// Postconditions for equation `cross_entropy`.
5110/// Call before return: `contract_post_cross_entropy!(result_expr)`
5111macro_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
5125/// Combined pre+post contract for equation `cross_entropy`.
5126macro_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
5135/// Preconditions for equation `log_softmax`.
5136/// Domain-specific. Call: `contract_pre_log_softmax!(slice_expr)`
5137macro_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
5148// Auto-generated from contracts/cuda-classify-training-v1.yaml — DO NOT EDIT
5149// Contract: cuda-classify-training-v1
5150
5151/// Preconditions for equation `device_dispatch`.
5152/// Call at function entry: `contract_pre_device_dispatch!(input_expr)`
5153macro_rules! contract_pre_device_dispatch {
5154    () => {{}};
5155    ($input:expr) => {{
5156        let _contract_input = &$input;
5157    }};
5158}
5159
5160/// Preconditions for equation `gpu_forward`.
5161/// Call at function entry: `contract_pre_gpu_forward!(input_expr)`
5162macro_rules! contract_pre_gpu_forward {
5163    () => {{}};
5164    ($input:expr) => {{
5165        let _contract_input = &$input;
5166    }};
5167}
5168
5169/// Preconditions for equation `weight_roundtrip`.
5170/// Domain-specific. Call: `contract_pre_weight_roundtrip!(slice_expr)`
5171macro_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
5182// Auto-generated from contracts/cuda-kernel-safety-v1.yaml — DO NOT EDIT
5183// Contract: cuda-kernel-safety-v1
5184
5185/// Preconditions for equation `host_transpilation`.
5186/// Call at function entry: `contract_pre_host_transpilation!(input_expr)`
5187macro_rules! contract_pre_host_transpilation {
5188    () => {{}};
5189    ($input:expr) => {{
5190        let _contract_input = &$input;
5191    }};
5192}
5193
5194/// Postconditions for equation `host_transpilation`.
5195/// Call before return: `contract_post_host_transpilation!(result_expr)`
5196macro_rules! contract_post_host_transpilation {
5197    ($result:expr) => {{
5198        let _contract_result = &$result;
5199    }};
5200}
5201
5202/// Combined pre+post contract for equation `host_transpilation`.
5203macro_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
5212/// Preconditions for equation `kernel_ffi`.
5213/// Call at function entry: `contract_pre_kernel_ffi!(input_expr)`
5214macro_rules! contract_pre_kernel_ffi {
5215    () => {{}};
5216    ($input:expr) => {{
5217        let _contract_input = &$input;
5218    }};
5219}
5220
5221/// Postconditions for equation `kernel_ffi`.
5222/// Call before return: `contract_post_kernel_ffi!(result_expr)`
5223macro_rules! contract_post_kernel_ffi {
5224    ($result:expr) => {{
5225        let _contract_result = &$result;
5226    }};
5227}
5228
5229/// Combined pre+post contract for equation `kernel_ffi`.
5230macro_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
5239/// Preconditions for equation `qualifier_preservation`.
5240/// Call at function entry: `contract_pre_qualifier_preservation!(input_expr)`
5241macro_rules! contract_pre_qualifier_preservation {
5242    () => {{}};
5243    ($input:expr) => {{
5244        let _contract_input = &$input;
5245    }};
5246}
5247
5248/// Postconditions for equation `qualifier_preservation`.
5249/// Call before return: `contract_post_qualifier_preservation!(result_expr)`
5250macro_rules! contract_post_qualifier_preservation {
5251    ($result:expr) => {{
5252        let _contract_result = &$result;
5253    }};
5254}
5255
5256/// Combined pre+post contract for equation `qualifier_preservation`.
5257macro_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
5266// Auto-generated from contracts/dag-ordering-v1.yaml — DO NOT EDIT
5267// Contract: dag-ordering-v1
5268
5269/// Preconditions for equation `kahn_sort`.
5270/// Call at function entry: `contract_pre_kahn_sort!(input_expr)`
5271macro_rules! contract_pre_kahn_sort {
5272    () => {{}};
5273    ($input:expr) => {{
5274        let _contract_input = &$input;
5275    }};
5276}
5277
5278/// Preconditions for equation `topological_sort`.
5279/// Call at function entry: `contract_pre_topological_sort!(input_expr)`
5280macro_rules! contract_pre_topological_sort {
5281    () => {{}};
5282    ($input:expr) => {{
5283        let _contract_input = &$input;
5284    }};
5285}
5286
5287// Auto-generated from contracts/data-feed-v1.yaml — DO NOT EDIT
5288// Contract: data-feed-v1
5289
5290/// Preconditions for equation `config_validity`.
5291/// Call at function entry: `contract_pre_config_validity!(input_expr)`
5292macro_rules! contract_pre_config_validity {
5293    () => {{}};
5294    ($input:expr) => {{
5295        let _contract_input = &$input;
5296    }};
5297}
5298
5299/// Preconditions for equation `serialize_roundtrip`.
5300/// Call at function entry: `contract_pre_serialize_roundtrip!(input_expr)`
5301macro_rules! contract_pre_serialize_roundtrip {
5302    () => {{}};
5303    ($input:expr) => {{
5304        let _contract_input = &$input;
5305    }};
5306}
5307
5308// Auto-generated from contracts/decision-engine-v1.yaml — DO NOT EDIT
5309// Contract: decision-engine-v1
5310
5311/// Preconditions for equation `include_resolution`.
5312/// Call at function entry: `contract_pre_include_resolution!(input_expr)`
5313macro_rules! contract_pre_include_resolution {
5314    () => {{}};
5315    ($input:expr) => {{
5316        let _contract_input = &$input;
5317    }};
5318}
5319
5320/// Preconditions for equation `transpile_dispatch`.
5321/// Call at function entry: `contract_pre_transpile_dispatch!(input_expr)`
5322macro_rules! contract_pre_transpile_dispatch {
5323    () => {{}};
5324    ($input:expr) => {{
5325        let _contract_input = &$input;
5326    }};
5327}
5328
5329/// Preconditions for equation `type_preservation`.
5330/// Call at function entry: `contract_pre_type_preservation!(input_expr)`
5331macro_rules! contract_pre_type_preservation {
5332    () => {{}};
5333    ($input:expr) => {{
5334        let _contract_input = &$input;
5335    }};
5336}
5337
5338// Auto-generated from contracts/decision-tree-v1.yaml — DO NOT EDIT
5339// Contract: decision-tree-v1
5340
5341/// Preconditions for equation `gini_impurity`.
5342/// Domain-specific. Call: `contract_pre_gini_impurity!(slice_expr)`
5343macro_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
5358/// Preconditions for equation `gini_split`.
5359/// Domain-specific. Call: `contract_pre_gini_split!(slice_expr)`
5360macro_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
5375/// Preconditions for equation `mse_split`.
5376/// Domain-specific. Call: `contract_pre_mse_split!(slice_expr)`
5377macro_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
5392/// Preconditions for equation `prediction`.
5393/// Domain-specific. Call: `contract_pre_prediction!(slice_expr)`
5394macro_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
5409// Auto-generated from contracts/delta-sync-v1.yaml — DO NOT EDIT
5410// Contract: delta-sync-v1
5411
5412/// Preconditions for equation `delta_computation`.
5413/// Domain-specific. Call: `contract_pre_delta_computation!(slice_expr)`
5414macro_rules! contract_pre_delta_computation {
5415    () => {{}};
5416    ($input:expr) => {{
5417        let _pv_signature = &$input;
5418    }};
5419}
5420
5421/// Preconditions for equation `patch_apply`.
5422/// Domain-specific. Call: `contract_pre_patch_apply!(slice_expr)`
5423macro_rules! contract_pre_patch_apply {
5424    () => {{}};
5425    ($input:expr) => {{
5426        let _pv_delta = &$input;
5427    }};
5428}
5429
5430/// Preconditions for equation `rolling_checksum`.
5431/// Domain-specific. Call: `contract_pre_rolling_checksum!(slice_expr)`
5432macro_rules! contract_pre_rolling_checksum {
5433    () => {{}};
5434    ($input:expr) => {{
5435        let _pv_window = &$input;
5436    }};
5437}
5438
5439// Auto-generated from contracts/display-format-v1.yaml — DO NOT EDIT
5440// Contract: display-format-v1
5441
5442/// Preconditions for equation `display_format`.
5443/// Call at function entry: `contract_pre_display_format!(input_expr)`
5444macro_rules! contract_pre_display_format {
5445    () => {{}};
5446    ($input:expr) => {{
5447        let _contract_input = &$input;
5448    }};
5449}
5450
5451/// Postconditions for equation `display_format`.
5452/// Call before return: `contract_post_display_format!(result_expr)`
5453macro_rules! contract_post_display_format {
5454    ($result:expr) => {{
5455        let _contract_result = &$result;
5456    }};
5457}
5458
5459/// Combined pre+post contract for equation `display_format`.
5460macro_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
5469/// Preconditions for equation `render`.
5470/// Call at function entry: `contract_pre_render!(input_expr)`
5471macro_rules! contract_pre_render {
5472    () => {{}};
5473    ($input:expr) => {{
5474        let _contract_input = &$input;
5475    }};
5476}
5477
5478/// Postconditions for equation `render`.
5479/// Call before return: `contract_post_render!(result_expr)`
5480macro_rules! contract_post_render {
5481    ($result:expr) => {{
5482        let _contract_result = &$result;
5483    }};
5484}
5485
5486/// Combined pre+post contract for equation `render`.
5487macro_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
5496// Auto-generated from contracts/distributed-training-v1.yaml — DO NOT EDIT
5497// Contract: distributed-training-v1
5498
5499/// Preconditions for equation `gradient_allreduce`.
5500/// Domain-specific. Call: `contract_pre_gradient_allreduce!(slice_expr)`
5501macro_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
5512/// Preconditions for equation `lora_gradient_size`.
5513/// Domain-specific. Call: `contract_pre_lora_gradient_size!(slice_expr)`
5514macro_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
5525/// Preconditions for equation `sharding`.
5526/// Domain-specific. Call: `contract_pre_sharding!(slice_expr)`
5527macro_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
5542/// Preconditions for equation `swiglu_ffn`.
5543/// Domain-specific. Call: `contract_pre_swiglu_ffn!(slice_expr)`
5544macro_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
5559/// Preconditions for equation `weighted_loss`.
5560/// Domain-specific. Call: `contract_pre_weighted_loss!(slice_expr)`
5561macro_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
5572// Auto-generated from contracts/distribution-v1.yaml — DO NOT EDIT
5573// Contract: distribution-v1
5574
5575/// Preconditions for equation `build_integrity`.
5576/// Call at function entry: `contract_pre_build_integrity!(input_expr)`
5577macro_rules! contract_pre_build_integrity {
5578    () => {{}};
5579    ($input:expr) => {{
5580        let _contract_input = &$input;
5581    }};
5582}
5583
5584/// Preconditions for equation `distribution_delivery`.
5585/// Call at function entry: `contract_pre_distribution_delivery!(input_expr)`
5586macro_rules! contract_pre_distribution_delivery {
5587    () => {{}};
5588    ($input:expr) => {{
5589        let _contract_input = &$input;
5590    }};
5591}
5592
5593// Auto-generated from contracts/dpo-loss-v1.yaml — DO NOT EDIT
5594// Contract: dpo-loss-v1
5595
5596/// Preconditions for equation `dpo_loss`.
5597/// Domain-specific. Call: `contract_pre_dpo_loss!(slice_expr)`
5598macro_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
5609/// Preconditions for equation `implicit_reward`.
5610/// Domain-specific. Call: `contract_pre_implicit_reward!(slice_expr)`
5611macro_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
5622/// Preconditions for equation `log_ratio`.
5623/// Domain-specific. Call: `contract_pre_log_ratio!(slice_expr)`
5624macro_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
5635// Auto-generated from contracts/drift-detection-v1.yaml — DO NOT EDIT
5636// Contract: drift-detection-v1
5637
5638/// Preconditions for equation `classify_drift`.
5639/// Domain-specific. Call: `contract_pre_classify_drift!(slice_expr)`
5640macro_rules! contract_pre_classify_drift {
5641    () => {{}};
5642    ($input:expr) => {{
5643        let _pv_x = &$input;
5644    }};
5645}
5646
5647/// Preconditions for equation `min_samples_guard`.
5648/// Domain-specific. Call: `contract_pre_min_samples_guard!(slice_expr)`
5649macro_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
5660/// Preconditions for equation `performance_drift`.
5661/// Domain-specific. Call: `contract_pre_performance_drift!(slice_expr)`
5662macro_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
5673/// Preconditions for equation `univariate_drift`.
5674/// Domain-specific. Call: `contract_pre_univariate_drift!(slice_expr)`
5675macro_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
5686// Auto-generated from contracts/dropout-v1.yaml — DO NOT EDIT
5687// Contract: dropout-v1
5688
5689/// Preconditions for equation `dropout_eval`.
5690/// Domain-specific. Call: `contract_pre_dropout_eval!(slice_expr)`
5691macro_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
5706/// Preconditions for equation `dropout_train`.
5707/// Domain-specific. Call: `contract_pre_dropout_train!(slice_expr)`
5708macro_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
5723// Auto-generated from contracts/embedding-algebra-v1.yaml — DO NOT EDIT
5724// Contract: embedding-algebra-v1
5725
5726/// Preconditions for equation `embedding_lookup`.
5727/// Domain-specific. Call: `contract_pre_embedding_lookup!(slice_expr)`
5728macro_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
5739/// Preconditions for equation `embedding_norm`.
5740/// Domain-specific. Call: `contract_pre_embedding_norm!(slice_expr)`
5741macro_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
5756/// Preconditions for equation `logit_temperature`.
5757/// Domain-specific. Call: `contract_pre_logit_temperature!(slice_expr)`
5758macro_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
5769/// Preconditions for equation `tied_weights`.
5770/// Domain-specific. Call: `contract_pre_tied_weights!(slice_expr)`
5771macro_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
5782/// Preconditions for equation `unembedding_projection`.
5783/// Domain-specific. Call: `contract_pre_unembedding_projection!(slice_expr)`
5784macro_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
5795/// Preconditions for equation `vocabulary_bounds`.
5796/// Domain-specific. Call: `contract_pre_vocabulary_bounds!(slice_expr)`
5797macro_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
5808// Auto-generated from contracts/embedding-lookup-v1.yaml — DO NOT EDIT
5809// Contract: embedding-lookup-v1
5810
5811/// Preconditions for equation `embedding_lookup`.
5812/// Domain-specific. Call: `contract_pre_embedding_lookup!(slice_expr)`
5813macro_rules! contract_pre_embedding_lookup {
5814    () => {{}};
5815    ($input:expr) => {{
5816        let _pv_token_ids = &$input;
5817    }};
5818}
5819
5820/// Postconditions for equation `embedding_lookup`.
5821/// Call before return: `contract_post_embedding_lookup!(result_expr)`
5822macro_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
5829/// Combined pre+post contract for equation `embedding_lookup`.
5830macro_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
5839// Auto-generated from contracts/encoder-forward-v1.yaml — DO NOT EDIT
5840// Contract: encoder-forward-v1
5841
5842/// Preconditions for equation `cls_pooling`.
5843/// Domain-specific. Call: `contract_pre_cls_pooling!(slice_expr)`
5844macro_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
5855/// Preconditions for equation `encoder_layer`.
5856/// Domain-specific. Call: `contract_pre_encoder_layer!(slice_expr)`
5857macro_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
5868// Auto-generated from contracts/encoder-roundtrip-v1.yaml — DO NOT EDIT
5869// Contract: encoder-roundtrip-v1
5870
5871/// Preconditions for equation `emit_posix`.
5872/// Call at function entry: `contract_pre_emit_posix!(input_expr)`
5873macro_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
5884/// Preconditions for equation `emit_purified`.
5885/// Call at function entry: `contract_pre_emit_purified!(input_expr)`
5886macro_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
5897/// Preconditions for equation `roundtrip`.
5898/// Call at function entry: `contract_pre_roundtrip!(input_expr)`
5899macro_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
5910// Auto-generated from contracts/encoder-roundtrip-v1.yaml — DO NOT EDIT
5911// Contract: encoder-roundtrip-v1
5912
5913/// Preconditions for equation `decode`.
5914/// Domain-specific. Call: `contract_pre_decode!(slice_expr)`
5915macro_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
5926/// Preconditions for equation `encode`.
5927/// Domain-specific. Call: `contract_pre_encode!(slice_expr)`
5928macro_rules! contract_pre_encode {
5929    () => {{}};
5930    ($input:expr) => {{
5931        let _pv_frame = &$input;
5932    }};
5933}
5934
5935/// Preconditions for equation `encoder_resolution`.
5936/// Call at function entry: `contract_pre_encoder_resolution!(input_expr)`
5937macro_rules! contract_pre_encoder_resolution {
5938    () => {{}};
5939    ($input:expr) => {{
5940        let _contract_input = &$input;
5941    }};
5942}
5943
5944// Auto-generated from contracts/error-handling-v1.yaml — DO NOT EDIT
5945// Contract: error-handling-v1
5946
5947/// Preconditions for equation `send`.
5948/// Domain-specific. Call: `contract_pre_send!(slice_expr)`
5949macro_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
5960/// Preconditions for equation `send_error_propagation`.
5961/// Domain-specific. Call: `contract_pre_send_error_propagation!(slice_expr)`
5962macro_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
5973// Auto-generated from contracts/error-handling-v1.yaml — DO NOT EDIT
5974// Contract: error-handling-v1
5975
5976/// Preconditions for equation `error_handling`.
5977/// Call at function entry: `contract_pre_error_handling!(input_expr)`
5978macro_rules! contract_pre_error_handling {
5979    () => {{}};
5980    ($input:expr) => {{
5981        let _contract_input = &$input;
5982    }};
5983}
5984
5985/// Postconditions for equation `error_handling`.
5986/// Call before return: `contract_post_error_handling!(result_expr)`
5987macro_rules! contract_post_error_handling {
5988    ($result:expr) => {{
5989        let _contract_result = &$result;
5990    }};
5991}
5992
5993/// Combined pre+post contract for equation `error_handling`.
5994macro_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
6003// Auto-generated from contracts/event-rulebook-v1.yaml — DO NOT EDIT
6004// Contract: event-rulebook-v1
6005
6006/// Preconditions for equation `action_ordering`.
6007/// Domain-specific. Call: `contract_pre_action_ordering!(slice_expr)`
6008macro_rules! contract_pre_action_ordering {
6009    () => {{}};
6010    ($input:expr) => {{
6011        let _pv_rule = &$input;
6012    }};
6013}
6014
6015/// Preconditions for equation `cooldown_deduplication`.
6016/// Domain-specific. Call: `contract_pre_cooldown_deduplication!(slice_expr)`
6017macro_rules! contract_pre_cooldown_deduplication {
6018    () => {{}};
6019    ($input:expr) => {{
6020        let _pv_rule = &$input;
6021    }};
6022}
6023
6024/// Preconditions for equation `trigger_dispatch_completeness`.
6025/// Call at function entry: `contract_pre_trigger_dispatch_completeness!(input_expr)`
6026macro_rules! contract_pre_trigger_dispatch_completeness {
6027    () => {{}};
6028    ($input:expr) => {{
6029        let _contract_input = &$input;
6030    }};
6031}
6032
6033// Auto-generated from contracts/execution-safety-v1.yaml — DO NOT EDIT
6034// Contract: execution-safety-v1
6035
6036/// Preconditions for equation `atomic_write`.
6037/// Call at function entry: `contract_pre_atomic_write!(input_expr)`
6038macro_rules! contract_pre_atomic_write {
6039    () => {{}};
6040    ($input:expr) => {{
6041        let _contract_input = &$input;
6042    }};
6043}
6044
6045/// Preconditions for equation `jidoka_stop`.
6046/// Call at function entry: `contract_pre_jidoka_stop!(input_expr)`
6047macro_rules! contract_pre_jidoka_stop {
6048    () => {{}};
6049    ($input:expr) => {{
6050        let _contract_input = &$input;
6051    }};
6052}
6053
6054// Auto-generated from contracts/f16-conversion-v1.yaml — DO NOT EDIT
6055// Contract: f16-conversion-v1
6056
6057/// Preconditions for equation `f16_to_f32_bias`.
6058/// Domain-specific. Call: `contract_pre_f16_to_f32_bias!(slice_expr)`
6059macro_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
6070/// Preconditions for equation `roundtrip`.
6071/// Domain-specific. Call: `contract_pre_roundtrip!(slice_expr)`
6072macro_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
6083// Auto-generated from contracts/flash-attention-v1.yaml — DO NOT EDIT
6084// Contract: flash-attention-v1
6085
6086/// Preconditions for equation `flash_attention`.
6087/// Domain-specific. Call: `contract_pre_flash_attention!(slice_expr)`
6088macro_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
6099// Auto-generated from contracts/format-parity-v1.yaml — DO NOT EDIT
6100// Contract: format-parity-v1
6101
6102/// Preconditions for equation `element_count`.
6103/// Domain-specific. Call: `contract_pre_element_count!(slice_expr)`
6104macro_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
6115/// Preconditions for equation `identity_1d`.
6116/// Domain-specific. Call: `contract_pre_identity_1d!(slice_expr)`
6117macro_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
6132/// Preconditions for equation `name_bijection`.
6133/// Domain-specific. Call: `contract_pre_name_bijection!(slice_expr)`
6134macro_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
6145/// Preconditions for equation `transpose_involution`.
6146/// Domain-specific. Call: `contract_pre_transpose_involution!(slice_expr)`
6147macro_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
6158// Auto-generated from contracts/fp8-interchange-v1.yaml — DO NOT EDIT
6159// Contract: fp8-interchange-v1
6160
6161/// Preconditions for equation `e4m3_encode`.
6162/// Domain-specific. Call: `contract_pre_e4m3_encode!(slice_expr)`
6163macro_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
6174/// Preconditions for equation `e5m2_encode`.
6175/// Domain-specific. Call: `contract_pre_e5m2_encode!(slice_expr)`
6176macro_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
6187/// Preconditions for equation `roundtrip`.
6188/// Domain-specific. Call: `contract_pre_roundtrip!(slice_expr)`
6189macro_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
6200// Auto-generated from contracts/fused-qkv-projection-v1.yaml — DO NOT EDIT
6201// Contract: fused-qkv-projection-v1
6202
6203/// Preconditions for equation `fused_qkv`.
6204/// Domain-specific. Call: `contract_pre_fused_qkv!(slice_expr)`
6205macro_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
6213/// Preconditions for equation `separate_qkv`.
6214/// Domain-specific. Call: `contract_pre_separate_qkv!(slice_expr)`
6215macro_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
6226/// Preconditions for equation `shared_q8_qkv`.
6227/// Domain-specific. Call: `contract_pre_shared_q8_qkv!(slice_expr)`
6228macro_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
6239// Auto-generated from contracts/gated-delta-net-v1.yaml — DO NOT EDIT
6240// Contract: gated-delta-net-v1
6241
6242/// Preconditions for equation `decay`.
6243/// Domain-specific. Call: `contract_pre_decay!(slice_expr)`
6244macro_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
6256/// Preconditions for equation `delta`.
6257/// Domain-specific. Call: `contract_pre_delta!(slice_expr)`
6258macro_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
6273/// Preconditions for equation `output`.
6274/// Domain-specific. Call: `contract_pre_output!(slice_expr)`
6275macro_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
6290/// Preconditions for equation `read`.
6291/// Domain-specific. Call: `contract_pre_read!(slice_expr)`
6292macro_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
6307/// Preconditions for equation `write`.
6308/// Domain-specific. Call: `contract_pre_write!(slice_expr)`
6309macro_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
6324// Auto-generated from contracts/gbm-v1.yaml — DO NOT EDIT
6325// Contract: gbm-v1
6326
6327/// Preconditions for equation `gradient_boost`.
6328/// Domain-specific. Call: `contract_pre_gradient_boost!(slice_expr)`
6329macro_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
6340/// Preconditions for equation `negative_gradient`.
6341/// Domain-specific. Call: `contract_pre_negative_gradient!(slice_expr)`
6342macro_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
6353/// Preconditions for equation `predict`.
6354/// Domain-specific. Call: `contract_pre_predict!(slice_expr)`
6355macro_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
6370/// Preconditions for equation `training_loss`.
6371/// Domain-specific. Call: `contract_pre_training_loss!(slice_expr)`
6372macro_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
6383// Auto-generated from contracts/gelu-kernel-v1.yaml — DO NOT EDIT
6384// Contract: gelu-kernel-v1
6385
6386/// Preconditions for equation `gelu`.
6387/// Domain-specific. Call: `contract_pre_gelu!(slice_expr)`
6388macro_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
6400/// Preconditions for equation `gelu_tanh_approx`.
6401/// Domain-specific. Call: `contract_pre_gelu_tanh_approx!(slice_expr)`
6402macro_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
6417// Auto-generated from contracts/gemm-backward-tiled-v1.yaml — DO NOT EDIT
6418// Contract: gemm-backward-tiled-v1
6419
6420/// Preconditions for equation `backward_a_gemm`.
6421/// Domain-specific. Call: `contract_pre_backward_a_gemm!(slice_expr)`
6422macro_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
6433/// Preconditions for equation `backward_b_gemm`.
6434/// Domain-specific. Call: `contract_pre_backward_b_gemm!(slice_expr)`
6435macro_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
6446/// Preconditions for equation `shared_memory_per_tile`.
6447/// Domain-specific. Call: `contract_pre_shared_memory_per_tile!(slice_expr)`
6448macro_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
6459/// Preconditions for equation `tiled_gemm_arithmetic_intensity`.
6460/// Domain-specific. Call: `contract_pre_tiled_gemm_arithmetic_intensity!(slice_expr)`
6461macro_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
6472/// Preconditions for equation `unrolled_instruction_ratio`.
6473/// Domain-specific. Call: `contract_pre_unrolled_instruction_ratio!(slice_expr)`
6474macro_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
6485// Auto-generated from contracts/gguf-cpu-cache-v1.yaml — DO NOT EDIT
6486// Contract: gguf-cpu-cache-v1
6487
6488/// Preconditions for equation `autoregressive_generation`.
6489/// Call at function entry: `contract_pre_autoregressive_generation!(input_expr)`
6490macro_rules! contract_pre_autoregressive_generation {
6491    () => {{}};
6492    ($input:expr) => {{
6493        let _contract_input = &$input;
6494    }};
6495}
6496
6497// Auto-generated from contracts/gguf-format-safety-v1.yaml — DO NOT EDIT
6498// Contract: gguf-format-safety-v1
6499
6500/// Preconditions for equation `alignment_enforcement`.
6501/// Call at function entry: `contract_pre_alignment_enforcement!(input_expr)`
6502macro_rules! contract_pre_alignment_enforcement {
6503    () => {{}};
6504    ($input:expr) => {{
6505        let _contract_input = &$input;
6506    }};
6507}
6508
6509/// Postconditions for equation `alignment_enforcement`.
6510/// Call before return: `contract_post_alignment_enforcement!(result_expr)`
6511macro_rules! contract_post_alignment_enforcement {
6512    ($result:expr) => {{
6513        let _contract_result = &$result;
6514    }};
6515}
6516
6517/// Combined pre+post contract for equation `alignment_enforcement`.
6518macro_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
6527/// Preconditions for equation `magic_validation`.
6528/// Call at function entry: `contract_pre_magic_validation!(input_expr)`
6529macro_rules! contract_pre_magic_validation {
6530    () => {{}};
6531    ($input:expr) => {{
6532        let _contract_input = &$input;
6533    }};
6534}
6535
6536/// Postconditions for equation `magic_validation`.
6537/// Call before return: `contract_post_magic_validation!(result_expr)`
6538macro_rules! contract_post_magic_validation {
6539    ($result:expr) => {{
6540        let _contract_result = &$result;
6541    }};
6542}
6543
6544/// Combined pre+post contract for equation `magic_validation`.
6545macro_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
6554/// Preconditions for equation `metadata_kv_safety`.
6555/// Call at function entry: `contract_pre_metadata_kv_safety!(input_expr)`
6556macro_rules! contract_pre_metadata_kv_safety {
6557    () => {{}};
6558    ($input:expr) => {{
6559        let _contract_input = &$input;
6560    }};
6561}
6562
6563/// Postconditions for equation `metadata_kv_safety`.
6564/// Call before return: `contract_post_metadata_kv_safety!(result_expr)`
6565macro_rules! contract_post_metadata_kv_safety {
6566    ($result:expr) => {{
6567        let _contract_result = &$result;
6568    }};
6569}
6570
6571/// Combined pre+post contract for equation `metadata_kv_safety`.
6572macro_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
6581/// Preconditions for equation `tensor_metadata_integrity`.
6582/// Domain-specific. Call: `contract_pre_tensor_metadata_integrity!(slice_expr)`
6583macro_rules! contract_pre_tensor_metadata_integrity {
6584    () => {{}};
6585    ($input:expr) => {{
6586        let _pv_header = &$input;
6587    }};
6588}
6589
6590/// Postconditions for equation `tensor_metadata_integrity`.
6591/// Call before return: `contract_post_tensor_metadata_integrity!(result_expr)`
6592macro_rules! contract_post_tensor_metadata_integrity {
6593    ($result:expr) => {{
6594        let _contract_result = &$result;
6595    }};
6596}
6597
6598/// Combined pre+post contract for equation `tensor_metadata_integrity`.
6599macro_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
6608/// Preconditions for equation `version_compatibility`.
6609/// Call at function entry: `contract_pre_version_compatibility!(input_expr)`
6610macro_rules! contract_pre_version_compatibility {
6611    () => {{}};
6612    ($input:expr) => {{
6613        let _contract_input = &$input;
6614    }};
6615}
6616
6617/// Postconditions for equation `version_compatibility`.
6618/// Call before return: `contract_post_version_compatibility!(result_expr)`
6619macro_rules! contract_post_version_compatibility {
6620    ($result:expr) => {{
6621        let _contract_result = &$result;
6622    }};
6623}
6624
6625/// Combined pre+post contract for equation `version_compatibility`.
6626macro_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
6635// Auto-generated from contracts/glm-v1.yaml — DO NOT EDIT
6636// Contract: glm-v1
6637
6638/// Preconditions for equation `binomial_link`.
6639/// Domain-specific. Call: `contract_pre_binomial_link!(slice_expr)`
6640macro_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
6655/// Preconditions for equation `gamma_link`.
6656/// Domain-specific. Call: `contract_pre_gamma_link!(slice_expr)`
6657macro_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
6672/// Preconditions for equation `irls_fit`.
6673/// Domain-specific. Call: `contract_pre_irls_fit!(slice_expr)`
6674macro_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
6689/// Preconditions for equation `poisson_link`.
6690/// Domain-specific. Call: `contract_pre_poisson_link!(slice_expr)`
6691macro_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
6706// Auto-generated from contracts/gnn-v1.yaml — DO NOT EDIT
6707// Contract: gnn-v1
6708
6709/// Preconditions for equation `gcn_aggregate`.
6710/// Call at function entry: `contract_pre_gcn_aggregate!(input_expr)`
6711macro_rules! contract_pre_gcn_aggregate {
6712    () => {{}};
6713    ($input:expr) => {{
6714        let _contract_input = &$input;
6715    }};
6716}
6717
6718/// Preconditions for equation `global_max_pool`.
6719/// Call at function entry: `contract_pre_global_max_pool!(input_expr)`
6720macro_rules! contract_pre_global_max_pool {
6721    () => {{}};
6722    ($input:expr) => {{
6723        let _contract_input = &$input;
6724    }};
6725}
6726
6727/// Preconditions for equation `global_mean_pool`.
6728/// Call at function entry: `contract_pre_global_mean_pool!(input_expr)`
6729macro_rules! contract_pre_global_mean_pool {
6730    () => {{}};
6731    ($input:expr) => {{
6732        let _contract_input = &$input;
6733    }};
6734}
6735
6736/// Preconditions for equation `message_passing`.
6737/// Call at function entry: `contract_pre_message_passing!(input_expr)`
6738macro_rules! contract_pre_message_passing {
6739    () => {{}};
6740    ($input:expr) => {{
6741        let _contract_input = &$input;
6742    }};
6743}
6744
6745// Auto-generated from contracts/golden-trace-v1.yaml — DO NOT EDIT
6746// Contract: golden-trace-v1
6747
6748/// Preconditions for equation `adaptive_sampling`.
6749/// Domain-specific. Call: `contract_pre_adaptive_sampling!(slice_expr)`
6750macro_rules! contract_pre_adaptive_sampling {
6751    () => {{}};
6752    ($input:expr) => {{
6753        let _pv_x = &$input;
6754    }};
6755}
6756
6757/// Preconditions for equation `trace_capture`.
6758/// Call at function entry: `contract_pre_trace_capture!(input_expr)`
6759macro_rules! contract_pre_trace_capture {
6760    () => {{}};
6761    ($input:expr) => {{
6762        let _contract_input = &$input;
6763    }};
6764}
6765
6766/// Preconditions for equation `trace_validate`.
6767/// Call at function entry: `contract_pre_trace_validate!(input_expr)`
6768macro_rules! contract_pre_trace_validate {
6769    () => {{}};
6770    ($input:expr) => {{
6771        let _contract_input = &$input;
6772    }};
6773}
6774
6775// Auto-generated from contracts/gpu-context-health-v1.yaml — DO NOT EDIT
6776// Contract: gpu-context-health-v1
6777
6778/// Preconditions for equation `context_health`.
6779/// Domain-specific. Call: `contract_pre_context_health!(slice_expr)`
6780macro_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
6791/// Preconditions for equation `cuda_graph_guard`.
6792/// Call at function entry: `contract_pre_cuda_graph_guard!(input_expr)`
6793macro_rules! contract_pre_cuda_graph_guard {
6794    () => {{}};
6795    ($input:expr) => {{
6796        let _contract_input = &$input;
6797    }};
6798}
6799
6800/// Preconditions for equation `culink_skip`.
6801/// Domain-specific. Call: `contract_pre_culink_skip!(slice_expr)`
6802macro_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
6813/// Preconditions for equation `fp8_architecture_guard`.
6814/// Domain-specific. Call: `contract_pre_fp8_architecture_guard!(slice_expr)`
6815macro_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
6826// Auto-generated from contracts/gpu-decode-profiling-v1.yaml — DO NOT EDIT
6827// Contract: gpu-decode-profiling-v1
6828
6829/// Preconditions for equation `decode_audio`.
6830/// Domain-specific. Call: `contract_pre_decode_audio!(slice_expr)`
6831macro_rules! contract_pre_decode_audio {
6832    () => {{}};
6833    ($input:expr) => {{
6834        let _pv_packet = &$input;
6835    }};
6836}
6837
6838/// Preconditions for equation `decode_video`.
6839/// Domain-specific. Call: `contract_pre_decode_video!(slice_expr)`
6840macro_rules! contract_pre_decode_video {
6841    () => {{}};
6842    ($input:expr) => {{
6843        let _pv_packet = &$input;
6844    }};
6845}
6846
6847// Auto-generated from contracts/gpu-decode-profiling-v1.yaml — DO NOT EDIT
6848// Contract: gpu-decode-profiling-v1
6849
6850/// Preconditions for equation `brick_ordering`.
6851/// Domain-specific. Call: `contract_pre_brick_ordering!(slice_expr)`
6852macro_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
6863/// Preconditions for equation `graph_disable`.
6864/// Domain-specific. Call: `contract_pre_graph_disable!(slice_expr)`
6865macro_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
6876/// Preconditions for equation `report_completeness`.
6877/// Domain-specific. Call: `contract_pre_report_completeness!(slice_expr)`
6878macro_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
6889/// Preconditions for equation `report_denominator`.
6890/// Domain-specific. Call: `contract_pre_report_denominator!(slice_expr)`
6891macro_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
6902/// Preconditions for equation `report_fidelity`.
6903/// Domain-specific. Call: `contract_pre_report_fidelity!(slice_expr)`
6904macro_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
6915/// Preconditions for equation `report_metadata`.
6916/// Domain-specific. Call: `contract_pre_report_metadata!(slice_expr)`
6917macro_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
6928/// Preconditions for equation `sync_verification`.
6929/// Domain-specific. Call: `contract_pre_sync_verification!(slice_expr)`
6930macro_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
6941/// Preconditions for equation `token_accounting`.
6942/// Domain-specific. Call: `contract_pre_token_accounting!(slice_expr)`
6943macro_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
6954/// Preconditions for equation `wall_coverage`.
6955/// Domain-specific. Call: `contract_pre_wall_coverage!(slice_expr)`
6956macro_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
6967// Auto-generated from contracts/gpu-multi-backend-parity-v1.yaml — DO NOT EDIT
6968// Contract: gpu-multi-backend-parity-v1
6969
6970/// Preconditions for equation `backend_priority`.
6971/// Domain-specific. Call: `contract_pre_backend_priority!(slice_expr)`
6972macro_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
6983/// Preconditions for equation `bandwidth_bound_theorem`.
6984/// Domain-specific. Call: `contract_pre_bandwidth_bound_theorem!(slice_expr)`
6985macro_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
6996/// Preconditions for equation `jit_compilation_correctness`.
6997/// Domain-specific. Call: `contract_pre_jit_compilation_correctness!(slice_expr)`
6998macro_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
7009/// Preconditions for equation `multi_backend_parity`.
7010/// Domain-specific. Call: `contract_pre_multi_backend_parity!(slice_expr)`
7011macro_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
7022// Auto-generated from contracts/gpu-weight-residency-v1.yaml — DO NOT EDIT
7023// Contract: gpu-weight-residency-v1
7024
7025/// Preconditions for equation `pcie_overhead`.
7026/// Domain-specific. Call: `contract_pre_pcie_overhead!(slice_expr)`
7027macro_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
7038/// Preconditions for equation `throughput_target`.
7039/// Domain-specific. Call: `contract_pre_throughput_target!(slice_expr)`
7040macro_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
7051// Auto-generated from contracts/gqa-kernel-v1.yaml — DO NOT EDIT
7052// Contract: gqa-kernel-v1
7053
7054/// Preconditions for equation `gqa`.
7055/// Domain-specific. Call: `contract_pre_gqa!(slice_expr)`
7056macro_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
7064// Auto-generated from contracts/graph-centrality-v1.yaml — DO NOT EDIT
7065// Contract: graph-centrality-v1
7066
7067/// Preconditions for equation `betweenness`.
7068/// Call at function entry: `contract_pre_betweenness!(input_expr)`
7069macro_rules! contract_pre_betweenness {
7070    () => {{}};
7071    ($input:expr) => {{
7072        let _contract_input = &$input;
7073    }};
7074}
7075
7076/// Preconditions for equation `closeness`.
7077/// Call at function entry: `contract_pre_closeness!(input_expr)`
7078macro_rules! contract_pre_closeness {
7079    () => {{}};
7080    ($input:expr) => {{
7081        let _contract_input = &$input;
7082    }};
7083}
7084
7085/// Preconditions for equation `degree`.
7086/// Call at function entry: `contract_pre_degree!(input_expr)`
7087macro_rules! contract_pre_degree {
7088    () => {{}};
7089    ($input:expr) => {{
7090        let _contract_input = &$input;
7091    }};
7092}
7093
7094/// Preconditions for equation `eigenvector`.
7095/// Call at function entry: `contract_pre_eigenvector!(input_expr)`
7096macro_rules! contract_pre_eigenvector {
7097    () => {{}};
7098    ($input:expr) => {{
7099        let _contract_input = &$input;
7100    }};
7101}
7102
7103/// Preconditions for equation `harmonic`.
7104/// Call at function entry: `contract_pre_harmonic!(input_expr)`
7105macro_rules! contract_pre_harmonic {
7106    () => {{}};
7107    ($input:expr) => {{
7108        let _contract_input = &$input;
7109    }};
7110}
7111
7112/// Preconditions for equation `katz`.
7113/// Call at function entry: `contract_pre_katz!(input_expr)`
7114macro_rules! contract_pre_katz {
7115    () => {{}};
7116    ($input:expr) => {{
7117        let _contract_input = &$input;
7118    }};
7119}
7120
7121// Auto-generated from contracts/graph-index-v1.yaml — DO NOT EDIT
7122// Contract: graph-index-v1
7123
7124/// Preconditions for equation `bm25_scoring`.
7125/// Call at function entry: `contract_pre_bm25_scoring!(input_expr)`
7126macro_rules! contract_pre_bm25_scoring {
7127    () => {{}};
7128    ($input:expr) => {{
7129        let _contract_input = &$input;
7130    }};
7131}
7132
7133/// Postconditions for equation `bm25_scoring`.
7134/// Call before return: `contract_post_bm25_scoring!(result_expr)`
7135macro_rules! contract_post_bm25_scoring {
7136    ($result:expr) => {{
7137        let _contract_result = &$result;
7138    }};
7139}
7140
7141/// Combined pre+post contract for equation `bm25_scoring`.
7142macro_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
7151/// Preconditions for equation `csr_construction`.
7152/// Call at function entry: `contract_pre_csr_construction!(input_expr)`
7153macro_rules! contract_pre_csr_construction {
7154    () => {{}};
7155    ($input:expr) => {{
7156        let _contract_input = &$input;
7157    }};
7158}
7159
7160/// Postconditions for equation `csr_construction`.
7161/// Call before return: `contract_post_csr_construction!(result_expr)`
7162macro_rules! contract_post_csr_construction {
7163    ($result:expr) => {{
7164        let _contract_result = &$result;
7165    }};
7166}
7167
7168/// Combined pre+post contract for equation `csr_construction`.
7169macro_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
7178/// Preconditions for equation `fts5_consistency`.
7179/// Domain-specific. Call: `contract_pre_fts5_consistency!(slice_expr)`
7180macro_rules! contract_pre_fts5_consistency {
7181    () => {{}};
7182    ($input:expr) => {{
7183        let _pv_doc = &$input;
7184    }};
7185}
7186
7187/// Postconditions for equation `fts5_consistency`.
7188/// Call before return: `contract_post_fts5_consistency!(result_expr)`
7189macro_rules! contract_post_fts5_consistency {
7190    ($result:expr) => {{
7191        let _contract_result = &$result;
7192    }};
7193}
7194
7195/// Combined pre+post contract for equation `fts5_consistency`.
7196macro_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
7205/// Preconditions for equation `pagerank_convergence`.
7206/// Domain-specific. Call: `contract_pre_pagerank_convergence!(slice_expr)`
7207macro_rules! contract_pre_pagerank_convergence {
7208    () => {{}};
7209    ($input:expr) => {{
7210        let _pv_x = &$input;
7211    }};
7212}
7213
7214/// Postconditions for equation `pagerank_convergence`.
7215/// Call before return: `contract_post_pagerank_convergence!(result_expr)`
7216macro_rules! contract_post_pagerank_convergence {
7217    ($result:expr) => {{
7218        let _contract_result = &$result;
7219    }};
7220}
7221
7222/// Combined pre+post contract for equation `pagerank_convergence`.
7223macro_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
7232/// Preconditions for equation `sqlite_roundtrip`.
7233/// Call at function entry: `contract_pre_sqlite_roundtrip!(input_expr)`
7234macro_rules! contract_pre_sqlite_roundtrip {
7235    () => {{}};
7236    ($input:expr) => {{
7237        let _contract_input = &$input;
7238    }};
7239}
7240
7241/// Postconditions for equation `sqlite_roundtrip`.
7242/// Call before return: `contract_post_sqlite_roundtrip!(result_expr)`
7243macro_rules! contract_post_sqlite_roundtrip {
7244    ($result:expr) => {{
7245        let _contract_result = &$result;
7246    }};
7247}
7248
7249/// Combined pre+post contract for equation `sqlite_roundtrip`.
7250macro_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
7259// Auto-generated from contracts/graph-query-v1.yaml — DO NOT EDIT
7260// Contract: graph-query-v1
7261
7262/// Preconditions for equation `bfs_correctness`.
7263/// Call at function entry: `contract_pre_bfs_correctness!(input_expr)`
7264macro_rules! contract_pre_bfs_correctness {
7265    () => {{}};
7266    ($input:expr) => {{
7267        let _contract_input = &$input;
7268    }};
7269}
7270
7271/// Preconditions for equation `pagerank_convergence`.
7272/// Domain-specific. Call: `contract_pre_pagerank_convergence!(slice_expr)`
7273macro_rules! contract_pre_pagerank_convergence {
7274    () => {{}};
7275    ($input:expr) => {{
7276        let _pv_x = &$input;
7277    }};
7278}
7279
7280// Auto-generated from contracts/http-api-v1.yaml — DO NOT EDIT
7281// Contract: http-api-v1
7282
7283/// Preconditions for equation `cors_negotiation`.
7284/// Call at function entry: `contract_pre_cors_negotiation!(input_expr)`
7285macro_rules! contract_pre_cors_negotiation {
7286    () => {{}};
7287    ($input:expr) => {{
7288        let _contract_input = &$input;
7289    }};
7290}
7291
7292/// Postconditions for equation `cors_negotiation`.
7293/// Call before return: `contract_post_cors_negotiation!(result_expr)`
7294macro_rules! contract_post_cors_negotiation {
7295    ($result:expr) => {{
7296        let _contract_result = &$result;
7297    }};
7298}
7299
7300/// Combined pre+post contract for equation `cors_negotiation`.
7301macro_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
7310/// Preconditions for equation `error_envelope_preservation`.
7311/// Call at function entry: `contract_pre_error_envelope_preservation!(input_expr)`
7312macro_rules! contract_pre_error_envelope_preservation {
7313    () => {{}};
7314    ($input:expr) => {{
7315        let _contract_input = &$input;
7316    }};
7317}
7318
7319/// Postconditions for equation `error_envelope_preservation`.
7320/// Call before return: `contract_post_error_envelope_preservation!(result_expr)`
7321macro_rules! contract_post_error_envelope_preservation {
7322    ($result:expr) => {{
7323        let _contract_result = &$result;
7324    }};
7325}
7326
7327/// Combined pre+post contract for equation `error_envelope_preservation`.
7328macro_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
7337/// Preconditions for equation `request_response_schema`.
7338/// Call at function entry: `contract_pre_request_response_schema!(input_expr)`
7339macro_rules! contract_pre_request_response_schema {
7340    () => {{}};
7341    ($input:expr) => {{
7342        let _contract_input = &$input;
7343    }};
7344}
7345
7346/// Postconditions for equation `request_response_schema`.
7347/// Call before return: `contract_post_request_response_schema!(result_expr)`
7348macro_rules! contract_post_request_response_schema {
7349    ($result:expr) => {{
7350        let _contract_result = &$result;
7351    }};
7352}
7353
7354/// Combined pre+post contract for equation `request_response_schema`.
7355macro_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
7364/// Preconditions for equation `timeout_honoring`.
7365/// Call at function entry: `contract_pre_timeout_honoring!(input_expr)`
7366macro_rules! contract_pre_timeout_honoring {
7367    () => {{}};
7368    ($input:expr) => {{
7369        let _contract_input = &$input;
7370    }};
7371}
7372
7373/// Postconditions for equation `timeout_honoring`.
7374/// Call before return: `contract_post_timeout_honoring!(result_expr)`
7375macro_rules! contract_post_timeout_honoring {
7376    ($result:expr) => {{
7377        let _contract_result = &$result;
7378    }};
7379}
7380
7381/// Combined pre+post contract for equation `timeout_honoring`.
7382macro_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
7391// Auto-generated from contracts/http-api-v1.yaml — DO NOT EDIT
7392// Contract: http-api-v1
7393
7394/// Preconditions for equation `body_schema_compliance`.
7395/// Call at function entry: `contract_pre_body_schema_compliance!(input_expr)`
7396macro_rules! contract_pre_body_schema_compliance {
7397    () => {{}};
7398    ($input:expr) => {{
7399        let _contract_input = &$input;
7400    }};
7401}
7402
7403/// Postconditions for equation `body_schema_compliance`.
7404/// Call before return: `contract_post_body_schema_compliance!(result_expr)`
7405macro_rules! contract_post_body_schema_compliance {
7406    ($result:expr) => {{
7407        let _contract_result = &$result;
7408    }};
7409}
7410
7411/// Combined pre+post contract for equation `body_schema_compliance`.
7412macro_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
7421/// Preconditions for equation `max_tokens_cap`.
7422/// Call at function entry: `contract_pre_max_tokens_cap!(input_expr)`
7423macro_rules! contract_pre_max_tokens_cap {
7424    () => {{}};
7425    ($input:expr) => {{
7426        let _contract_input = &$input;
7427    }};
7428}
7429
7430/// Postconditions for equation `max_tokens_cap`.
7431/// Call before return: `contract_post_max_tokens_cap!(result_expr)`
7432macro_rules! contract_post_max_tokens_cap {
7433    ($result:expr) => {{
7434        let _contract_result = &$result;
7435    }};
7436}
7437
7438/// Combined pre+post contract for equation `max_tokens_cap`.
7439macro_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
7448/// Preconditions for equation `response_schema`.
7449/// Call at function entry: `contract_pre_response_schema!(input_expr)`
7450macro_rules! contract_pre_response_schema {
7451    () => {{}};
7452    ($input:expr) => {{
7453        let _contract_input = &$input;
7454    }};
7455}
7456
7457/// Postconditions for equation `response_schema`.
7458/// Call before return: `contract_post_response_schema!(result_expr)`
7459macro_rules! contract_post_response_schema {
7460    ($result:expr) => {{
7461        let _contract_result = &$result;
7462    }};
7463}
7464
7465/// Combined pre+post contract for equation `response_schema`.
7466macro_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
7475/// Preconditions for equation `thinking_block_strip`.
7476/// Call at function entry: `contract_pre_thinking_block_strip!(input_expr)`
7477macro_rules! contract_pre_thinking_block_strip {
7478    () => {{}};
7479    ($input:expr) => {{
7480        let _contract_input = &$input;
7481    }};
7482}
7483
7484/// Postconditions for equation `thinking_block_strip`.
7485/// Call before return: `contract_post_thinking_block_strip!(result_expr)`
7486macro_rules! contract_post_thinking_block_strip {
7487    ($result:expr) => {{
7488        let _contract_result = &$result;
7489    }};
7490}
7491
7492/// Combined pre+post contract for equation `thinking_block_strip`.
7493macro_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
7502/// Preconditions for equation `tool_format_fidelity`.
7503/// Domain-specific. Call: `contract_pre_tool_format_fidelity!(slice_expr)`
7504macro_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
7515/// Postconditions for equation `tool_format_fidelity`.
7516/// Call before return: `contract_post_tool_format_fidelity!(result_expr)`
7517macro_rules! contract_post_tool_format_fidelity {
7518    ($result:expr) => {{
7519        let _contract_result = &$result;
7520    }};
7521}
7522
7523/// Combined pre+post contract for equation `tool_format_fidelity`.
7524macro_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
7533// Auto-generated from contracts/http-client-v1.yaml — DO NOT EDIT
7534// Contract: http-client-v1
7535
7536/// Preconditions for equation `error_propagation`.
7537/// Call at function entry: `contract_pre_error_propagation!(input_expr)`
7538macro_rules! contract_pre_error_propagation {
7539    () => {{}};
7540    ($input:expr) => {{
7541        let _contract_input = &$input;
7542    }};
7543}
7544
7545/// Postconditions for equation `error_propagation`.
7546/// Call before return: `contract_post_error_propagation!(result_expr)`
7547macro_rules! contract_post_error_propagation {
7548    ($result:expr) => {{
7549        let _contract_result = &$result;
7550    }};
7551}
7552
7553/// Combined pre+post contract for equation `error_propagation`.
7554macro_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
7563/// Preconditions for equation `lru_cache_eviction`.
7564/// Call at function entry: `contract_pre_lru_cache_eviction!(input_expr)`
7565macro_rules! contract_pre_lru_cache_eviction {
7566    () => {{}};
7567    ($input:expr) => {{
7568        let _contract_input = &$input;
7569    }};
7570}
7571
7572/// Postconditions for equation `lru_cache_eviction`.
7573/// Call before return: `contract_post_lru_cache_eviction!(result_expr)`
7574macro_rules! contract_post_lru_cache_eviction {
7575    ($result:expr) => {{
7576        let _contract_result = &$result;
7577    }};
7578}
7579
7580/// Combined pre+post contract for equation `lru_cache_eviction`.
7581macro_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
7590/// Preconditions for equation `multi_tier_routing`.
7591/// Call at function entry: `contract_pre_multi_tier_routing!(input_expr)`
7592macro_rules! contract_pre_multi_tier_routing {
7593    () => {{}};
7594    ($input:expr) => {{
7595        let _contract_input = &$input;
7596    }};
7597}
7598
7599/// Postconditions for equation `multi_tier_routing`.
7600/// Call before return: `contract_post_multi_tier_routing!(result_expr)`
7601macro_rules! contract_post_multi_tier_routing {
7602    ($result:expr) => {{
7603        let _contract_result = &$result;
7604    }};
7605}
7606
7607/// Combined pre+post contract for equation `multi_tier_routing`.
7608macro_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
7617/// Preconditions for equation `request_construction`.
7618/// Call at function entry: `contract_pre_request_construction!(input_expr)`
7619macro_rules! contract_pre_request_construction {
7620    () => {{}};
7621    ($input:expr) => {{
7622        let _contract_input = &$input;
7623    }};
7624}
7625
7626/// Postconditions for equation `request_construction`.
7627/// Call before return: `contract_post_request_construction!(result_expr)`
7628macro_rules! contract_post_request_construction {
7629    ($result:expr) => {{
7630        let _contract_result = &$result;
7631    }};
7632}
7633
7634/// Combined pre+post contract for equation `request_construction`.
7635macro_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
7644/// Preconditions for equation `response_parsing`.
7645/// Call at function entry: `contract_pre_response_parsing!(input_expr)`
7646macro_rules! contract_pre_response_parsing {
7647    () => {{}};
7648    ($input:expr) => {{
7649        let _contract_input = &$input;
7650    }};
7651}
7652
7653/// Postconditions for equation `response_parsing`.
7654/// Call before return: `contract_post_response_parsing!(result_expr)`
7655macro_rules! contract_post_response_parsing {
7656    ($result:expr) => {{
7657        let _contract_result = &$result;
7658    }};
7659}
7660
7661/// Combined pre+post contract for equation `response_parsing`.
7662macro_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
7671/// Preconditions for equation `ssrf_prevention`.
7672/// Call at function entry: `contract_pre_ssrf_prevention!(input_expr)`
7673macro_rules! contract_pre_ssrf_prevention {
7674    () => {{}};
7675    ($input:expr) => {{
7676        let _contract_input = &$input;
7677    }};
7678}
7679
7680/// Postconditions for equation `ssrf_prevention`.
7681/// Call before return: `contract_post_ssrf_prevention!(result_expr)`
7682macro_rules! contract_post_ssrf_prevention {
7683    ($result:expr) => {{
7684        let _contract_result = &$result;
7685    }};
7686}
7687
7688/// Combined pre+post contract for equation `ssrf_prevention`.
7689macro_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
7698/// Preconditions for equation `url_validation`.
7699/// Call at function entry: `contract_pre_url_validation!(input_expr)`
7700macro_rules! contract_pre_url_validation {
7701    () => {{}};
7702    ($input:expr) => {{
7703        let _contract_input = &$input;
7704    }};
7705}
7706
7707/// Postconditions for equation `url_validation`.
7708/// Call before return: `contract_post_url_validation!(result_expr)`
7709macro_rules! contract_post_url_validation {
7710    ($result:expr) => {{
7711        let _contract_result = &$result;
7712    }};
7713}
7714
7715/// Combined pre+post contract for equation `url_validation`.
7716macro_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
7725// Auto-generated from contracts/hybrid-layer-dispatch-v1.yaml — DO NOT EDIT
7726// Contract: hybrid-layer-dispatch-v1
7727
7728/// Preconditions for equation `conv1d_causal`.
7729/// Domain-specific. Call: `contract_pre_conv1d_causal!(slice_expr)`
7730macro_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
7741/// Preconditions for equation `head_grouping`.
7742/// Domain-specific. Call: `contract_pre_head_grouping!(slice_expr)`
7743macro_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
7758/// Preconditions for equation `hybrid_dispatch`.
7759/// Domain-specific. Call: `contract_pre_hybrid_dispatch!(slice_expr)`
7760macro_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
7771/// Preconditions for equation `linear_associativity`.
7772/// Domain-specific. Call: `contract_pre_linear_associativity!(slice_expr)`
7773macro_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
7784/// Preconditions for equation `linear_no_softmax`.
7785/// Domain-specific. Call: `contract_pre_linear_no_softmax!(slice_expr)`
7786macro_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
7801/// Preconditions for equation `linear_shapes`.
7802/// Domain-specific. Call: `contract_pre_linear_shapes!(slice_expr)`
7803macro_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
7818// Auto-generated from contracts/ica-v1.yaml — DO NOT EDIT
7819// Contract: ica-v1
7820
7821/// Preconditions for equation `fastica`.
7822/// Domain-specific. Call: `contract_pre_fastica!(slice_expr)`
7823macro_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
7831/// Preconditions for equation `mixing`.
7832/// Domain-specific. Call: `contract_pre_mixing!(slice_expr)`
7833macro_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
7841/// Preconditions for equation `unmixing`.
7842/// Domain-specific. Call: `contract_pre_unmixing!(slice_expr)`
7843macro_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
7851// Auto-generated from contracts/inference-pipeline-v1.yaml — DO NOT EDIT
7852// Contract: inference-pipeline-v1
7853
7854/// Preconditions for equation `decode_step`.
7855/// Domain-specific. Call: `contract_pre_decode_step!(slice_expr)`
7856macro_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
7867/// Preconditions for equation `hybrid_layer_schedule`.
7868/// Call at function entry: `contract_pre_hybrid_layer_schedule!(input_expr)`
7869macro_rules! contract_pre_hybrid_layer_schedule {
7870    () => {{}};
7871    ($input:expr) => {{
7872        let _contract_input = &$input;
7873    }};
7874}
7875
7876/// Preconditions for equation `kv_cache_growth`.
7877/// Domain-specific. Call: `contract_pre_kv_cache_growth!(slice_expr)`
7878macro_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
7889/// Preconditions for equation `layer_composition`.
7890/// Domain-specific. Call: `contract_pre_layer_composition!(slice_expr)`
7891macro_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
7902/// Preconditions for equation `prefill_phase`.
7903/// Call at function entry: `contract_pre_prefill_phase!(input_expr)`
7904macro_rules! contract_pre_prefill_phase {
7905    () => {{}};
7906    ($input:expr) => {{
7907        let _contract_input = &$input;
7908    }};
7909}
7910
7911/// Preconditions for equation `residual_stream`.
7912/// Call at function entry: `contract_pre_residual_stream!(input_expr)`
7913macro_rules! contract_pre_residual_stream {
7914    () => {{}};
7915    ($input:expr) => {{
7916        let _contract_input = &$input;
7917    }};
7918}
7919
7920// Auto-generated from contracts/inference-pipeline-v1.yaml — DO NOT EDIT
7921// Contract: inference-pipeline-v1
7922
7923/// Preconditions for equation `decode_step`.
7924/// Call at function entry: `contract_pre_decode_step!(input_expr)`
7925macro_rules! contract_pre_decode_step {
7926    () => {{}};
7927    ($input:expr) => {{
7928        let _contract_input = &$input;
7929    }};
7930}
7931
7932/// Preconditions for equation `prefill_phase`.
7933/// Domain-specific. Call: `contract_pre_prefill_phase!(slice_expr)`
7934macro_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
7945/// Preconditions for equation `sampling_temperature`.
7946/// Domain-specific. Call: `contract_pre_sampling_temperature!(slice_expr)`
7947macro_rules! contract_pre_sampling_temperature {
7948    () => {{}};
7949    ($input:expr) => {{
7950        let _pv_logits = &$input;
7951    }};
7952}
7953
7954// Auto-generated from contracts/int8-symmetric-quant-v1.yaml — DO NOT EDIT
7955// Contract: int8-symmetric-quant-v1
7956
7957/// Preconditions for equation `dequant_dot`.
7958/// Domain-specific. Call: `contract_pre_dequant_dot!(slice_expr)`
7959macro_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
7968/// Preconditions for equation `per_row_scale`.
7969/// Domain-specific. Call: `contract_pre_per_row_scale!(slice_expr)`
7970macro_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
7981/// Preconditions for equation `quantize`.
7982/// Domain-specific. Call: `contract_pre_quantize!(slice_expr)`
7983macro_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
7994// Auto-generated from contracts/iterator-v1.yaml — DO NOT EDIT
7995// Contract: iterator-v1
7996
7997/// Preconditions for equation `iterator`.
7998/// Domain-specific. Call: `contract_pre_iterator!(slice_expr)`
7999macro_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
8010// Auto-generated from contracts/kernel-fusion-v1.yaml — DO NOT EDIT
8011// Contract: kernel-fusion-v1
8012
8013/// Preconditions for equation `fusion_decision_registry`.
8014/// Call at function entry: `contract_pre_fusion_decision_registry!(input_expr)`
8015macro_rules! contract_pre_fusion_decision_registry {
8016    () => {{}};
8017    ($input:expr) => {{
8018        let _contract_input = &$input;
8019    }};
8020}
8021
8022/// Preconditions for equation `fusion_performance`.
8023/// Domain-specific. Call: `contract_pre_fusion_performance!(slice_expr)`
8024macro_rules! contract_pre_fusion_performance {
8025    () => {{}};
8026    ($input:expr) => {{
8027        let _pv_benchmark = &$input;
8028    }};
8029}
8030
8031/// Preconditions for equation `identity`.
8032/// Domain-specific. Call: `contract_pre_identity!(slice_expr)`
8033macro_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
8041// Auto-generated from contracts/kernel-launch-budget-v1.yaml — DO NOT EDIT
8042// Contract: kernel-launch-budget-v1
8043
8044/// Preconditions for equation `bsum_budget`.
8045/// Domain-specific. Call: `contract_pre_bsum_budget!(slice_expr)`
8046macro_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
8057/// Preconditions for equation `per_layer_decomposition`.
8058/// Domain-specific. Call: `contract_pre_per_layer_decomposition!(slice_expr)`
8059macro_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
8070/// Preconditions for equation `per_token_launches`.
8071/// Domain-specific. Call: `contract_pre_per_token_launches!(slice_expr)`
8072macro_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
8083// Auto-generated from contracts/kmeans-kernel-v1.yaml — DO NOT EDIT
8084// Contract: kmeans-kernel-v1
8085
8086/// Preconditions for equation `assignment`.
8087/// Domain-specific. Call: `contract_pre_assignment!(slice_expr)`
8088macro_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
8103/// Preconditions for equation `objective`.
8104/// Domain-specific. Call: `contract_pre_objective!(slice_expr)`
8105macro_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
8120/// Preconditions for equation `update`.
8121/// Domain-specific. Call: `contract_pre_update!(slice_expr)`
8122macro_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
8137// Auto-generated from contracts/kv-cache-equivalence-v1.yaml — DO NOT EDIT
8138// Contract: kv-cache-equivalence-v1
8139
8140/// Preconditions for equation `batched_serial_equivalence`.
8141/// Call at function entry: `contract_pre_batched_serial_equivalence!(input_expr)`
8142macro_rules! contract_pre_batched_serial_equivalence {
8143    () => {{}};
8144    ($input:expr) => {{
8145        let _contract_input = &$input;
8146    }};
8147}
8148
8149/// Preconditions for equation `fused_kernel`.
8150/// Call at function entry: `contract_pre_fused_kernel!(input_expr)`
8151macro_rules! contract_pre_fused_kernel {
8152    () => {{}};
8153    ($input:expr) => {{
8154        let _contract_input = &$input;
8155    }};
8156}
8157
8158/// Preconditions for equation `page_shape`.
8159/// Call at function entry: `contract_pre_page_shape!(input_expr)`
8160macro_rules! contract_pre_page_shape {
8161    () => {{}};
8162    ($input:expr) => {{
8163        let _contract_input = &$input;
8164    }};
8165}
8166
8167/// Preconditions for equation `prefill_incremental`.
8168/// Call at function entry: `contract_pre_prefill_incremental!(input_expr)`
8169macro_rules! contract_pre_prefill_incremental {
8170    () => {{}};
8171    ($input:expr) => {{
8172        let _contract_input = &$input;
8173    }};
8174}
8175
8176// Auto-generated from contracts/kv-cache-sizing-v1.yaml — DO NOT EDIT
8177// Contract: kv-cache-sizing-v1
8178
8179/// Preconditions for equation `bias_absence`.
8180/// Call at function entry: `contract_pre_bias_absence!(input_expr)`
8181macro_rules! contract_pre_bias_absence {
8182    () => {{}};
8183    ($input:expr) => {{
8184        let _contract_input = &$input;
8185    }};
8186}
8187
8188/// Preconditions for equation `hybrid_accounting`.
8189/// Call at function entry: `contract_pre_hybrid_accounting!(input_expr)`
8190macro_rules! contract_pre_hybrid_accounting {
8191    () => {{}};
8192    ($input:expr) => {{
8193        let _contract_input = &$input;
8194    }};
8195}
8196
8197/// Preconditions for equation `per_token_per_layer`.
8198/// Domain-specific. Call: `contract_pre_per_token_per_layer!(slice_expr)`
8199macro_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
8210/// Preconditions for equation `total_kv_memory`.
8211/// Call at function entry: `contract_pre_total_kv_memory!(input_expr)`
8212macro_rules! contract_pre_total_kv_memory {
8213    () => {{}};
8214    ($input:expr) => {{
8215        let _contract_input = &$input;
8216    }};
8217}
8218
8219/// Preconditions for equation `zero_input_identity`.
8220/// Call at function entry: `contract_pre_zero_input_identity!(input_expr)`
8221macro_rules! contract_pre_zero_input_identity {
8222    () => {{}};
8223    ($input:expr) => {{
8224        let _contract_input = &$input;
8225    }};
8226}
8227
8228// Auto-generated from contracts/layer-parity-v1.yaml — DO NOT EDIT
8229// Contract: layer-parity-v1
8230
8231/// Preconditions for equation `cosine_parity_gate`.
8232/// Domain-specific. Call: `contract_pre_cosine_parity_gate!(slice_expr)`
8233macro_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
8244/// Preconditions for equation `identity`.
8245/// Domain-specific. Call: `contract_pre_identity!(slice_expr)`
8246macro_rules! contract_pre_identity {
8247    () => {{}};
8248    ($input:expr) => {{
8249        let _pv_x = &$input;
8250    }};
8251}
8252
8253/// Preconditions for equation `layer_parity`.
8254/// Domain-specific. Call: `contract_pre_layer_parity!(slice_expr)`
8255macro_rules! contract_pre_layer_parity {
8256    () => {{}};
8257    ($input:expr) => {{
8258        let _pv_cpu_output = &$input;
8259    }};
8260}
8261
8262// Auto-generated from contracts/layernorm-kernel-v1.yaml — DO NOT EDIT
8263// Contract: layernorm-kernel-v1
8264
8265/// Preconditions for equation `layernorm`.
8266/// Domain-specific. Call: `contract_pre_layernorm!(slice_expr)`
8267macro_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
8279/// Postconditions for equation `layernorm`.
8280/// Call before return: `contract_post_layernorm!(result_expr)`
8281macro_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
8291/// Combined pre+post contract for equation `layernorm`.
8292macro_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
8301/// Preconditions for equation `statistics`.
8302/// Domain-specific. Call: `contract_pre_statistics!(slice_expr)`
8303macro_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
8318// Auto-generated from contracts/lbfgs-kernel-v1.yaml — DO NOT EDIT
8319// Contract: lbfgs-kernel-v1
8320
8321/// Preconditions for equation `line_search`.
8322/// Domain-specific. Call: `contract_pre_line_search!(slice_expr)`
8323macro_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
8334/// Preconditions for equation `secant_condition`.
8335/// Domain-specific. Call: `contract_pre_secant_condition!(slice_expr)`
8336macro_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
8347/// Preconditions for equation `two_loop_recursion`.
8348/// Domain-specific. Call: `contract_pre_two_loop_recursion!(slice_expr)`
8349macro_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
8360// Auto-generated from contracts/learned-position-embedding-v1.yaml — DO NOT EDIT
8361// Contract: learned-position-embedding-v1
8362
8363/// Preconditions for equation `position_embedding`.
8364/// Domain-specific. Call: `contract_pre_position_embedding!(slice_expr)`
8365macro_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
8376// Auto-generated from contracts/linear-models-v1.yaml — DO NOT EDIT
8377// Contract: linear-models-v1
8378
8379/// Preconditions for equation `logistic_predict_proba`.
8380/// Domain-specific. Call: `contract_pre_logistic_predict_proba!(slice_expr)`
8381macro_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
8392/// Preconditions for equation `ols_fit`.
8393/// Domain-specific. Call: `contract_pre_ols_fit!(slice_expr)`
8394macro_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
8409/// Preconditions for equation `ols_predict`.
8410/// Domain-specific. Call: `contract_pre_ols_predict!(slice_expr)`
8411macro_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
8426/// Preconditions for equation `r_squared_training`.
8427/// Domain-specific. Call: `contract_pre_r_squared_training!(slice_expr)`
8428macro_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
8439// Auto-generated from contracts/linear-probe-classifier-v1.yaml — DO NOT EDIT
8440// Contract: linear-probe-classifier-v1
8441
8442/// Preconditions for equation `linear_probe`.
8443/// Domain-specific. Call: `contract_pre_linear_probe!(slice_expr)`
8444macro_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
8455// Auto-generated from contracts/linear-projection-v1.yaml — DO NOT EDIT
8456// Contract: linear-projection-v1
8457
8458/// Preconditions for equation `linear_forward`.
8459/// Domain-specific. Call: `contract_pre_linear_forward!(slice_expr)`
8460macro_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
8471/// Preconditions for equation `linear_no_bias`.
8472/// Domain-specific. Call: `contract_pre_linear_no_bias!(slice_expr)`
8473macro_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
8484// Auto-generated from contracts/lora-algebra-v1.yaml — DO NOT EDIT
8485// Contract: lora-algebra-v1
8486
8487/// Preconditions for equation `dare_unbiased`.
8488/// Domain-specific. Call: `contract_pre_dare_unbiased!(slice_expr)`
8489macro_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
8504/// Preconditions for equation `eckart_young`.
8505/// Domain-specific. Call: `contract_pre_eckart_young!(slice_expr)`
8506macro_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
8521/// Preconditions for equation `lora_shape`.
8522/// Domain-specific. Call: `contract_pre_lora_shape!(slice_expr)`
8523macro_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
8538/// Preconditions for equation `shape_preservation`.
8539/// Domain-specific. Call: `contract_pre_shape_preservation!(slice_expr)`
8540macro_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
8551/// Preconditions for equation `task_vector`.
8552/// Domain-specific. Call: `contract_pre_task_vector!(slice_expr)`
8553macro_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
8568// Auto-generated from contracts/lora-gradient-flow-v1.yaml — DO NOT EDIT
8569// Contract: lora-gradient-flow-v1
8570
8571/// Preconditions for equation `lora_forward`.
8572/// Domain-specific. Call: `contract_pre_lora_forward!(slice_expr)`
8573macro_rules! contract_pre_lora_forward {
8574    () => {{}};
8575    ($input:expr) => {{
8576        let _pv_x = &$input;
8577    }};
8578}
8579
8580/// Postconditions for equation `lora_forward`.
8581/// Call before return: `contract_post_lora_forward!(result_expr)`
8582macro_rules! contract_post_lora_forward {
8583    ($result:expr) => {{
8584        let _contract_result = &$result;
8585    }};
8586}
8587
8588/// Combined pre+post contract for equation `lora_forward`.
8589macro_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
8598// Auto-generated from contracts/lora-target-selection-v1.yaml — DO NOT EDIT
8599// Contract: lora-target-selection-v1
8600
8601// Auto-generated from contracts/loss-functions-v1.yaml — DO NOT EDIT
8602// Contract: loss-functions-v1
8603
8604/// Preconditions for equation `bce`.
8605/// Domain-specific. Call: `contract_pre_bce!(slice_expr)`
8606macro_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
8617/// Preconditions for equation `huber`.
8618/// Domain-specific. Call: `contract_pre_huber!(slice_expr)`
8619macro_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
8630/// Preconditions for equation `l1_loss`.
8631/// Domain-specific. Call: `contract_pre_l1_loss!(slice_expr)`
8632macro_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
8643/// Preconditions for equation `mse_loss`.
8644/// Domain-specific. Call: `contract_pre_mse_loss!(slice_expr)`
8645macro_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
8656/// Preconditions for equation `nll`.
8657/// Domain-specific. Call: `contract_pre_nll!(slice_expr)`
8658macro_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
8669/// Preconditions for equation `smooth_l1`.
8670/// Domain-specific. Call: `contract_pre_smooth_l1!(slice_expr)`
8671macro_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
8682// Auto-generated from contracts/matmul-kernel-v1.yaml — DO NOT EDIT
8683// Contract: matmul-kernel-v1
8684
8685/// Preconditions for equation `matmul`.
8686/// Domain-specific. Call: `contract_pre_matmul!(slice_expr)`
8687macro_rules! contract_pre_matmul {
8688    () => {{}};
8689    ($input:expr) => {{
8690        let _pv_a = &$input;
8691    }};
8692}
8693
8694/// Postconditions for equation `matmul`.
8695/// Call before return: `contract_post_matmul!(result_expr)`
8696macro_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
8706/// Combined pre+post contract for equation `matmul`.
8707macro_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
8716/// Preconditions for equation `quantized_dot`.
8717/// Domain-specific. Call: `contract_pre_quantized_dot!(slice_expr)`
8718macro_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
8729// Auto-generated from contracts/mcp-protocol-sdk-v1.yaml — DO NOT EDIT
8730// Contract: mcp-protocol-sdk-v1
8731
8732/// Preconditions for equation `batch_request_ordering`.
8733/// Call at function entry: `contract_pre_batch_request_ordering!(input_expr)`
8734macro_rules! contract_pre_batch_request_ordering {
8735    () => {{}};
8736    ($input:expr) => {{
8737        let _contract_input = &$input;
8738    }};
8739}
8740
8741/// Postconditions for equation `batch_request_ordering`.
8742/// Call before return: `contract_post_batch_request_ordering!(result_expr)`
8743macro_rules! contract_post_batch_request_ordering {
8744    ($result:expr) => {{
8745        let _contract_result = &$result;
8746    }};
8747}
8748
8749/// Combined pre+post contract for equation `batch_request_ordering`.
8750macro_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
8759/// Preconditions for equation `cancellation_safety`.
8760/// Call at function entry: `contract_pre_cancellation_safety!(input_expr)`
8761macro_rules! contract_pre_cancellation_safety {
8762    () => {{}};
8763    ($input:expr) => {{
8764        let _contract_input = &$input;
8765    }};
8766}
8767
8768/// Postconditions for equation `cancellation_safety`.
8769/// Call before return: `contract_post_cancellation_safety!(result_expr)`
8770macro_rules! contract_post_cancellation_safety {
8771    ($result:expr) => {{
8772        let _contract_result = &$result;
8773    }};
8774}
8775
8776/// Combined pre+post contract for equation `cancellation_safety`.
8777macro_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
8786/// Preconditions for equation `error_code_mapping`.
8787/// Call at function entry: `contract_pre_error_code_mapping!(input_expr)`
8788macro_rules! contract_pre_error_code_mapping {
8789    () => {{}};
8790    ($input:expr) => {{
8791        let _contract_input = &$input;
8792    }};
8793}
8794
8795/// Postconditions for equation `error_code_mapping`.
8796/// Call before return: `contract_post_error_code_mapping!(result_expr)`
8797macro_rules! contract_post_error_code_mapping {
8798    ($result:expr) => {{
8799        let _contract_result = &$result;
8800    }};
8801}
8802
8803/// Combined pre+post contract for equation `error_code_mapping`.
8804macro_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
8813/// Preconditions for equation `jsonrpc_framing`.
8814/// Call at function entry: `contract_pre_jsonrpc_framing!(input_expr)`
8815macro_rules! contract_pre_jsonrpc_framing {
8816    () => {{}};
8817    ($input:expr) => {{
8818        let _contract_input = &$input;
8819    }};
8820}
8821
8822/// Postconditions for equation `jsonrpc_framing`.
8823/// Call before return: `contract_post_jsonrpc_framing!(result_expr)`
8824macro_rules! contract_post_jsonrpc_framing {
8825    ($result:expr) => {{
8826        let _contract_result = &$result;
8827    }};
8828}
8829
8830/// Combined pre+post contract for equation `jsonrpc_framing`.
8831macro_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
8840/// Preconditions for equation `payload_limits`.
8841/// Call at function entry: `contract_pre_payload_limits!(input_expr)`
8842macro_rules! contract_pre_payload_limits {
8843    () => {{}};
8844    ($input:expr) => {{
8845        let _contract_input = &$input;
8846    }};
8847}
8848
8849/// Postconditions for equation `payload_limits`.
8850/// Call before return: `contract_post_payload_limits!(result_expr)`
8851macro_rules! contract_post_payload_limits {
8852    ($result:expr) => {{
8853        let _contract_result = &$result;
8854    }};
8855}
8856
8857/// Combined pre+post contract for equation `payload_limits`.
8858macro_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
8867/// Preconditions for equation `protocol_version_negotiation`.
8868/// Call at function entry: `contract_pre_protocol_version_negotiation!(input_expr)`
8869macro_rules! contract_pre_protocol_version_negotiation {
8870    () => {{}};
8871    ($input:expr) => {{
8872        let _contract_input = &$input;
8873    }};
8874}
8875
8876/// Postconditions for equation `protocol_version_negotiation`.
8877/// Call before return: `contract_post_protocol_version_negotiation!(result_expr)`
8878macro_rules! contract_post_protocol_version_negotiation {
8879    ($result:expr) => {{
8880        let _contract_result = &$result;
8881    }};
8882}
8883
8884/// Combined pre+post contract for equation `protocol_version_negotiation`.
8885macro_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
8894/// Preconditions for equation `session_lifecycle`.
8895/// Call at function entry: `contract_pre_session_lifecycle!(input_expr)`
8896macro_rules! contract_pre_session_lifecycle {
8897    () => {{}};
8898    ($input:expr) => {{
8899        let _contract_input = &$input;
8900    }};
8901}
8902
8903/// Postconditions for equation `session_lifecycle`.
8904/// Call before return: `contract_post_session_lifecycle!(result_expr)`
8905macro_rules! contract_post_session_lifecycle {
8906    ($result:expr) => {{
8907        let _contract_result = &$result;
8908    }};
8909}
8910
8911/// Combined pre+post contract for equation `session_lifecycle`.
8912macro_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
8921/// Preconditions for equation `tool_dispatch_integrity`.
8922/// Call at function entry: `contract_pre_tool_dispatch_integrity!(input_expr)`
8923macro_rules! contract_pre_tool_dispatch_integrity {
8924    () => {{}};
8925    ($input:expr) => {{
8926        let _contract_input = &$input;
8927    }};
8928}
8929
8930/// Postconditions for equation `tool_dispatch_integrity`.
8931/// Call before return: `contract_post_tool_dispatch_integrity!(result_expr)`
8932macro_rules! contract_post_tool_dispatch_integrity {
8933    ($result:expr) => {{
8934        let _contract_result = &$result;
8935    }};
8936}
8937
8938/// Combined pre+post contract for equation `tool_dispatch_integrity`.
8939macro_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
8948/// Preconditions for equation `transport_abstraction`.
8949/// Call at function entry: `contract_pre_transport_abstraction!(input_expr)`
8950macro_rules! contract_pre_transport_abstraction {
8951    () => {{}};
8952    ($input:expr) => {{
8953        let _contract_input = &$input;
8954    }};
8955}
8956
8957/// Postconditions for equation `transport_abstraction`.
8958/// Call before return: `contract_post_transport_abstraction!(result_expr)`
8959macro_rules! contract_post_transport_abstraction {
8960    ($result:expr) => {{
8961        let _contract_result = &$result;
8962    }};
8963}
8964
8965/// Combined pre+post contract for equation `transport_abstraction`.
8966macro_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
8975// Auto-generated from contracts/mcp-protocol-v1.yaml — DO NOT EDIT
8976// Contract: mcp-protocol-v1
8977
8978/// Preconditions for equation `error_mapping_lossless`.
8979/// Call at function entry: `contract_pre_error_mapping_lossless!(input_expr)`
8980macro_rules! contract_pre_error_mapping_lossless {
8981    () => {{}};
8982    ($input:expr) => {{
8983        let _contract_input = &$input;
8984    }};
8985}
8986
8987/// Postconditions for equation `error_mapping_lossless`.
8988/// Call before return: `contract_post_error_mapping_lossless!(result_expr)`
8989macro_rules! contract_post_error_mapping_lossless {
8990    ($result:expr) => {{
8991        let _contract_result = &$result;
8992    }};
8993}
8994
8995/// Combined pre+post contract for equation `error_mapping_lossless`.
8996macro_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
9005/// Preconditions for equation `idempotency`.
9006/// Call at function entry: `contract_pre_idempotency!(input_expr)`
9007macro_rules! contract_pre_idempotency {
9008    () => {{}};
9009    ($input:expr) => {{
9010        let _contract_input = &$input;
9011    }};
9012}
9013
9014/// Postconditions for equation `idempotency`.
9015/// Call before return: `contract_post_idempotency!(result_expr)`
9016macro_rules! contract_post_idempotency {
9017    ($result:expr) => {{
9018        let _contract_result = &$result;
9019    }};
9020}
9021
9022/// Combined pre+post contract for equation `idempotency`.
9023macro_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
9032/// Preconditions for equation `session_lifecycle`.
9033/// Call at function entry: `contract_pre_session_lifecycle!(input_expr)`
9034macro_rules! contract_pre_session_lifecycle {
9035    () => {{}};
9036    ($input:expr) => {{
9037        let _contract_input = &$input;
9038    }};
9039}
9040
9041/// Postconditions for equation `session_lifecycle`.
9042/// Call before return: `contract_post_session_lifecycle!(result_expr)`
9043macro_rules! contract_post_session_lifecycle {
9044    ($result:expr) => {{
9045        let _contract_result = &$result;
9046    }};
9047}
9048
9049/// Combined pre+post contract for equation `session_lifecycle`.
9050macro_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
9059/// Preconditions for equation `tool_schema_fidelity`.
9060/// Call at function entry: `contract_pre_tool_schema_fidelity!(input_expr)`
9061macro_rules! contract_pre_tool_schema_fidelity {
9062    () => {{}};
9063    ($input:expr) => {{
9064        let _contract_input = &$input;
9065    }};
9066}
9067
9068/// Postconditions for equation `tool_schema_fidelity`.
9069/// Call before return: `contract_post_tool_schema_fidelity!(result_expr)`
9070macro_rules! contract_post_tool_schema_fidelity {
9071    ($result:expr) => {{
9072        let _contract_result = &$result;
9073    }};
9074}
9075
9076/// Combined pre+post contract for equation `tool_schema_fidelity`.
9077macro_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
9086// Auto-generated from contracts/mcp-tool-schema-v1.yaml — DO NOT EDIT
9087// Contract: mcp-tool-schema-v1
9088
9089/// Preconditions for equation `error_mapping`.
9090/// Call at function entry: `contract_pre_error_mapping!(input_expr)`
9091macro_rules! contract_pre_error_mapping {
9092    () => {{}};
9093    ($input:expr) => {{
9094        let _contract_input = &$input;
9095    }};
9096}
9097
9098/// Preconditions for equation `idempotency_classification`.
9099/// Call at function entry: `contract_pre_idempotency_classification!(input_expr)`
9100macro_rules! contract_pre_idempotency_classification {
9101    () => {{}};
9102    ($input:expr) => {{
9103        let _contract_input = &$input;
9104    }};
9105}
9106
9107/// Preconditions for equation `session_state_machine`.
9108/// Call at function entry: `contract_pre_session_state_machine!(input_expr)`
9109macro_rules! contract_pre_session_state_machine {
9110    () => {{}};
9111    ($input:expr) => {{
9112        let _contract_input = &$input;
9113    }};
9114}
9115
9116/// Preconditions for equation `tool_schema_fidelity`.
9117/// Domain-specific. Call: `contract_pre_tool_schema_fidelity!(slice_expr)`
9118macro_rules! contract_pre_tool_schema_fidelity {
9119    () => {{}};
9120    ($input:expr) => {{
9121        let _pv_tool = &$input;
9122    }};
9123}
9124
9125// Auto-generated from contracts/media-pipeline-v1.yaml — DO NOT EDIT
9126// Contract: media-pipeline-v1
9127
9128/// Preconditions for equation `codec_dispatch`.
9129/// Call at function entry: `contract_pre_codec_dispatch!(input_expr)`
9130macro_rules! contract_pre_codec_dispatch {
9131    () => {{}};
9132    ($input:expr) => {{
9133        let _contract_input = &$input;
9134    }};
9135}
9136
9137/// Preconditions for equation `encode_decode_roundtrip`.
9138/// Call at function entry: `contract_pre_encode_decode_roundtrip!(input_expr)`
9139macro_rules! contract_pre_encode_decode_roundtrip {
9140    () => {{}};
9141    ($input:expr) => {{
9142        let _contract_input = &$input;
9143    }};
9144}
9145
9146/// Preconditions for equation `frame_integrity`.
9147/// Call at function entry: `contract_pre_frame_integrity!(input_expr)`
9148macro_rules! contract_pre_frame_integrity {
9149    () => {{}};
9150    ($input:expr) => {{
9151        let _contract_input = &$input;
9152    }};
9153}
9154
9155// Auto-generated from contracts/memory-safety-v1.yaml — DO NOT EDIT
9156// Contract: memory-safety-v1
9157
9158/// Preconditions for equation `bounds_safety`.
9159/// Domain-specific. Call: `contract_pre_bounds_safety!(slice_expr)`
9160macro_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
9171/// Preconditions for equation `drop_safety`.
9172/// Domain-specific. Call: `contract_pre_drop_safety!(slice_expr)`
9173macro_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
9184/// Preconditions for equation `escape_analysis`.
9185/// Domain-specific. Call: `contract_pre_escape_analysis!(slice_expr)`
9186macro_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
9197/// Preconditions for equation `lifetime_safety`.
9198/// Domain-specific. Call: `contract_pre_lifetime_safety!(slice_expr)`
9199macro_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
9210/// Preconditions for equation `ownership_invariant`.
9211/// Domain-specific. Call: `contract_pre_ownership_invariant!(slice_expr)`
9212macro_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
9223/// Preconditions for equation `use_after_move`.
9224/// Domain-specific. Call: `contract_pre_use_after_move!(slice_expr)`
9225macro_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
9236// Auto-generated from contracts/memory-safety-v1.yaml — DO NOT EDIT
9237// Contract: memory-safety-v1
9238
9239/// Preconditions for equation `arena_lifecycle`.
9240/// Call at function entry: `contract_pre_arena_lifecycle!(input_expr)`
9241macro_rules! contract_pre_arena_lifecycle {
9242    () => {{}};
9243    ($input:expr) => {{
9244        let _contract_input = &$input;
9245    }};
9246}
9247
9248/// Postconditions for equation `arena_lifecycle`.
9249/// Call before return: `contract_post_arena_lifecycle!(result_expr)`
9250macro_rules! contract_post_arena_lifecycle {
9251    ($result:expr) => {{
9252        let _contract_result = &$result;
9253    }};
9254}
9255
9256/// Combined pre+post contract for equation `arena_lifecycle`.
9257macro_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
9266/// Preconditions for equation `index_memory_budget`.
9267/// Call at function entry: `contract_pre_index_memory_budget!(input_expr)`
9268macro_rules! contract_pre_index_memory_budget {
9269    () => {{}};
9270    ($input:expr) => {{
9271        let _contract_input = &$input;
9272    }};
9273}
9274
9275/// Postconditions for equation `index_memory_budget`.
9276/// Call before return: `contract_post_index_memory_budget!(result_expr)`
9277macro_rules! contract_post_index_memory_budget {
9278    ($result:expr) => {{
9279        let _contract_result = &$result;
9280    }};
9281}
9282
9283/// Combined pre+post contract for equation `index_memory_budget`.
9284macro_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
9293/// Preconditions for equation `lru_eviction_correctness`.
9294/// Call at function entry: `contract_pre_lru_eviction_correctness!(input_expr)`
9295macro_rules! contract_pre_lru_eviction_correctness {
9296    () => {{}};
9297    ($input:expr) => {{
9298        let _contract_input = &$input;
9299    }};
9300}
9301
9302/// Postconditions for equation `lru_eviction_correctness`.
9303/// Call before return: `contract_post_lru_eviction_correctness!(result_expr)`
9304macro_rules! contract_post_lru_eviction_correctness {
9305    ($result:expr) => {{
9306        let _contract_result = &$result;
9307    }};
9308}
9309
9310/// Combined pre+post contract for equation `lru_eviction_correctness`.
9311macro_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
9320// Auto-generated from contracts/metaheuristics-v1.yaml — DO NOT EDIT
9321// Contract: metaheuristics-v1
9322
9323/// Preconditions for equation `best_monotone`.
9324/// Domain-specific. Call: `contract_pre_best_monotone!(slice_expr)`
9325macro_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
9336/// Preconditions for equation `ga_crossover`.
9337/// Domain-specific. Call: `contract_pre_ga_crossover!(slice_expr)`
9338macro_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
9349/// Preconditions for equation `pso_velocity`.
9350/// Domain-specific. Call: `contract_pre_pso_velocity!(slice_expr)`
9351macro_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
9362/// Preconditions for equation `sa_acceptance`.
9363/// Domain-specific. Call: `contract_pre_sa_acceptance!(slice_expr)`
9364macro_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
9375// Auto-generated from contracts/metrics-classification-v1.yaml — DO NOT EDIT
9376// Contract: metrics-classification-v1
9377
9378/// Preconditions for equation `accuracy`.
9379/// Domain-specific. Call: `contract_pre_accuracy!(slice_expr)`
9380macro_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
9395/// Preconditions for equation `confusion_matrix`.
9396/// Domain-specific. Call: `contract_pre_confusion_matrix!(slice_expr)`
9397macro_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
9408/// Preconditions for equation `f1_score`.
9409/// Domain-specific. Call: `contract_pre_f1_score!(slice_expr)`
9410macro_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
9425/// Preconditions for equation `precision`.
9426/// Domain-specific. Call: `contract_pre_precision!(slice_expr)`
9427macro_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
9442/// Preconditions for equation `recall`.
9443/// Domain-specific. Call: `contract_pre_recall!(slice_expr)`
9444macro_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
9459// Auto-generated from contracts/metrics-clustering-v1.yaml — DO NOT EDIT
9460// Contract: metrics-clustering-v1
9461
9462/// Preconditions for equation `inertia`.
9463/// Call at function entry: `contract_pre_inertia!(input_expr)`
9464macro_rules! contract_pre_inertia {
9465    () => {{}};
9466    ($input:expr) => {{
9467        let _contract_input = &$input;
9468    }};
9469}
9470
9471/// Preconditions for equation `silhouette_coefficient`.
9472/// Call at function entry: `contract_pre_silhouette_coefficient!(input_expr)`
9473macro_rules! contract_pre_silhouette_coefficient {
9474    () => {{}};
9475    ($input:expr) => {{
9476        let _contract_input = &$input;
9477    }};
9478}
9479
9480/// Preconditions for equation `silhouette_score`.
9481/// Call at function entry: `contract_pre_silhouette_score!(input_expr)`
9482macro_rules! contract_pre_silhouette_score {
9483    () => {{}};
9484    ($input:expr) => {{
9485        let _contract_input = &$input;
9486    }};
9487}
9488
9489// Auto-generated from contracts/metrics-ranking-v1.yaml — DO NOT EDIT
9490// Contract: metrics-ranking-v1
9491
9492/// Preconditions for equation `hit_at_k`.
9493/// Domain-specific. Call: `contract_pre_hit_at_k!(slice_expr)`
9494macro_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
9505/// Preconditions for equation `mrr`.
9506/// Domain-specific. Call: `contract_pre_mrr!(slice_expr)`
9507macro_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
9516/// Preconditions for equation `ndcg_at_k`.
9517/// Domain-specific. Call: `contract_pre_ndcg_at_k!(slice_expr)`
9518macro_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
9529/// Preconditions for equation `reciprocal_rank`.
9530/// Domain-specific. Call: `contract_pre_reciprocal_rank!(slice_expr)`
9531macro_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
9542// Auto-generated from contracts/metrics-regression-v1.yaml — DO NOT EDIT
9543// Contract: metrics-regression-v1
9544
9545/// Preconditions for equation `mae`.
9546/// Domain-specific. Call: `contract_pre_mae!(slice_expr)`
9547macro_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
9558/// Preconditions for equation `mse`.
9559/// Domain-specific. Call: `contract_pre_mse!(slice_expr)`
9560macro_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
9571/// Preconditions for equation `r_squared`.
9572/// Domain-specific. Call: `contract_pre_r_squared!(slice_expr)`
9573macro_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
9588/// Preconditions for equation `rmse`.
9589/// Domain-specific. Call: `contract_pre_rmse!(slice_expr)`
9590macro_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
9605// Auto-generated from contracts/model-config-algebra-v1.yaml — DO NOT EDIT
9606// Contract: model-config-algebra-v1
9607
9608/// Preconditions for equation `bounds`.
9609/// Domain-specific. Call: `contract_pre_bounds!(slice_expr)`
9610macro_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
9621/// Preconditions for equation `cross_constraint`.
9622/// Domain-specific. Call: `contract_pre_cross_constraint!(slice_expr)`
9623macro_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
9634/// Preconditions for equation `divisibility`.
9635/// Domain-specific. Call: `contract_pre_divisibility!(slice_expr)`
9636macro_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
9647/// Preconditions for equation `non_degeneracy`.
9648/// Domain-specific. Call: `contract_pre_non_degeneracy!(slice_expr)`
9649macro_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
9660/// Preconditions for equation `ordering`.
9661/// Domain-specific. Call: `contract_pre_ordering!(slice_expr)`
9662macro_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
9673// Auto-generated from contracts/model-format-conversion-v1.yaml — DO NOT EDIT
9674// Contract: model-format-conversion-v1
9675
9676/// Preconditions for equation `apr_tokenizer_embedding`.
9677/// Domain-specific. Call: `contract_pre_apr_tokenizer_embedding!(slice_expr)`
9678macro_rules! contract_pre_apr_tokenizer_embedding {
9679    () => {{}};
9680    ($input:expr) => {{
9681        let _pv_x = &$input;
9682    }};
9683}
9684
9685/// Postconditions for equation `apr_tokenizer_embedding`.
9686/// Call before return: `contract_post_apr_tokenizer_embedding!(result_expr)`
9687macro_rules! contract_post_apr_tokenizer_embedding {
9688    ($result:expr) => {{
9689        let _contract_result = &$result;
9690    }};
9691}
9692
9693/// Combined pre+post contract for equation `apr_tokenizer_embedding`.
9694macro_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
9703/// Preconditions for equation `export_fidelity`.
9704/// Call at function entry: `contract_pre_export_fidelity!(input_expr)`
9705macro_rules! contract_pre_export_fidelity {
9706    () => {{}};
9707    ($input:expr) => {{
9708        let _contract_input = &$input;
9709    }};
9710}
9711
9712/// Postconditions for equation `export_fidelity`.
9713/// Call before return: `contract_post_export_fidelity!(result_expr)`
9714macro_rules! contract_post_export_fidelity {
9715    ($result:expr) => {{
9716        let _contract_result = &$result;
9717    }};
9718}
9719
9720/// Combined pre+post contract for equation `export_fidelity`.
9721macro_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
9730/// Preconditions for equation `format_conversion_roundtrip`.
9731/// Call at function entry: `contract_pre_format_conversion_roundtrip!(input_expr)`
9732macro_rules! contract_pre_format_conversion_roundtrip {
9733    () => {{}};
9734    ($input:expr) => {{
9735        let _contract_input = &$input;
9736    }};
9737}
9738
9739/// Postconditions for equation `format_conversion_roundtrip`.
9740/// Call before return: `contract_post_format_conversion_roundtrip!(result_expr)`
9741macro_rules! contract_post_format_conversion_roundtrip {
9742    ($result:expr) => {{
9743        let _contract_result = &$result;
9744    }};
9745}
9746
9747/// Combined pre+post contract for equation `format_conversion_roundtrip`.
9748macro_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
9757/// Preconditions for equation `import_integrity`.
9758/// Call at function entry: `contract_pre_import_integrity!(input_expr)`
9759macro_rules! contract_pre_import_integrity {
9760    () => {{}};
9761    ($input:expr) => {{
9762        let _contract_input = &$input;
9763    }};
9764}
9765
9766/// Postconditions for equation `import_integrity`.
9767/// Call before return: `contract_post_import_integrity!(result_expr)`
9768macro_rules! contract_post_import_integrity {
9769    ($result:expr) => {{
9770        let _contract_result = &$result;
9771    }};
9772}
9773
9774/// Combined pre+post contract for equation `import_integrity`.
9775macro_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
9784/// Preconditions for equation `merge_weight_algebra`.
9785/// Domain-specific. Call: `contract_pre_merge_weight_algebra!(slice_expr)`
9786macro_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
9797/// Postconditions for equation `merge_weight_algebra`.
9798/// Call before return: `contract_post_merge_weight_algebra!(result_expr)`
9799macro_rules! contract_post_merge_weight_algebra {
9800    ($result:expr) => {{
9801        let _contract_result = &$result;
9802    }};
9803}
9804
9805/// Combined pre+post contract for equation `merge_weight_algebra`.
9806macro_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
9815/// Preconditions for equation `quantization_bounds`.
9816/// Call at function entry: `contract_pre_quantization_bounds!(input_expr)`
9817macro_rules! contract_pre_quantization_bounds {
9818    () => {{}};
9819    ($input:expr) => {{
9820        let _contract_input = &$input;
9821    }};
9822}
9823
9824/// Postconditions for equation `quantization_bounds`.
9825/// Call before return: `contract_post_quantization_bounds!(result_expr)`
9826macro_rules! contract_post_quantization_bounds {
9827    ($result:expr) => {{
9828        let _contract_result = &$result;
9829    }};
9830}
9831
9832/// Combined pre+post contract for equation `quantization_bounds`.
9833macro_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
9842// Auto-generated from contracts/model-metadata-bounds-v1.yaml — DO NOT EDIT
9843// Contract: model-metadata-bounds-v1
9844
9845/// Preconditions for equation `config_bounds_check`.
9846/// Domain-specific. Call: `contract_pre_config_bounds_check!(slice_expr)`
9847macro_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
9858// Auto-generated from contracts/model-qa-v1.yaml — DO NOT EDIT
9859// Contract: model-qa-v1
9860
9861/// Preconditions for equation `grade_assignment`.
9862/// Domain-specific. Call: `contract_pre_grade_assignment!(slice_expr)`
9863macro_rules! contract_pre_grade_assignment {
9864    () => {{}};
9865    ($input:expr) => {{
9866        let _pv_x = &$input;
9867    }};
9868}
9869
9870/// Preconditions for equation `mqs_scoring`.
9871/// Call at function entry: `contract_pre_mqs_scoring!(input_expr)`
9872macro_rules! contract_pre_mqs_scoring {
9873    () => {{}};
9874    ($input:expr) => {{
9875        let _contract_input = &$input;
9876    }};
9877}
9878
9879/// Preconditions for equation `regression_detection`.
9880/// Call at function entry: `contract_pre_regression_detection!(input_expr)`
9881macro_rules! contract_pre_regression_detection {
9882    () => {{}};
9883    ($input:expr) => {{
9884        let _contract_input = &$input;
9885    }};
9886}
9887
9888// Auto-generated from contracts/monitor-metrics-v1.yaml — DO NOT EDIT
9889// Contract: monitor-metrics-v1
9890
9891/// Preconditions for equation `cpu_utilization`.
9892/// Call at function entry: `contract_pre_cpu_utilization!(input_expr)`
9893macro_rules! contract_pre_cpu_utilization {
9894    () => {{}};
9895    ($input:expr) => {{
9896        let _contract_input = &$input;
9897    }};
9898}
9899
9900/// Preconditions for equation `history_persistence`.
9901/// Call at function entry: `contract_pre_history_persistence!(input_expr)`
9902macro_rules! contract_pre_history_persistence {
9903    () => {{}};
9904    ($input:expr) => {{
9905        let _contract_input = &$input;
9906    }};
9907}
9908
9909/// Preconditions for equation `memory_usage`.
9910/// Call at function entry: `contract_pre_memory_usage!(input_expr)`
9911macro_rules! contract_pre_memory_usage {
9912    () => {{}};
9913    ($input:expr) => {{
9914        let _contract_input = &$input;
9915    }};
9916}
9917
9918// Auto-generated from contracts/mqs-scoring-v1.yaml — DO NOT EDIT
9919// Contract: mqs-scoring-v1
9920
9921/// Preconditions for equation `mqs_composite`.
9922/// Domain-specific. Call: `contract_pre_mqs_composite!(slice_expr)`
9923macro_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
9938/// Preconditions for equation `mqs_deterministic`.
9939/// Domain-specific. Call: `contract_pre_mqs_deterministic!(slice_expr)`
9940macro_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
9951/// Preconditions for equation `mqs_grade`.
9952/// Domain-specific. Call: `contract_pre_mqs_grade!(slice_expr)`
9953macro_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
9964/// Preconditions for equation `mqs_pass_rate`.
9965/// Domain-specific. Call: `contract_pre_mqs_pass_rate!(slice_expr)`
9966macro_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
9981// Auto-generated from contracts/mqs-scoring-v1.yaml — DO NOT EDIT
9982// Contract: mqs-scoring-v1
9983
9984/// Preconditions for equation `mqs_composite`.
9985/// Domain-specific. Call: `contract_pre_mqs_composite!(slice_expr)`
9986macro_rules! contract_pre_mqs_composite {
9987    () => {{}};
9988    ($input:expr) => {{
9989        let _pv_x = &$input;
9990    }};
9991}
9992
9993/// Postconditions for equation `mqs_composite`.
9994/// Call before return: `contract_post_mqs_composite!(result_expr)`
9995macro_rules! contract_post_mqs_composite {
9996    ($result:expr) => {{
9997        let _contract_result = &$result;
9998    }};
9999}
10000
10001/// Combined pre+post contract for equation `mqs_composite`.
10002macro_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
10011/// Preconditions for equation `mqs_deterministic`.
10012/// Call at function entry: `contract_pre_mqs_deterministic!(input_expr)`
10013macro_rules! contract_pre_mqs_deterministic {
10014    () => {{}};
10015    ($input:expr) => {{
10016        let _contract_input = &$input;
10017    }};
10018}
10019
10020/// Postconditions for equation `mqs_deterministic`.
10021/// Call before return: `contract_post_mqs_deterministic!(result_expr)`
10022macro_rules! contract_post_mqs_deterministic {
10023    ($result:expr) => {{
10024        let _contract_result = &$result;
10025    }};
10026}
10027
10028/// Combined pre+post contract for equation `mqs_deterministic`.
10029macro_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
10038/// Preconditions for equation `mqs_grade`.
10039/// Domain-specific. Call: `contract_pre_mqs_grade!(slice_expr)`
10040macro_rules! contract_pre_mqs_grade {
10041    () => {{}};
10042    ($input:expr) => {{
10043        let _pv_x = &$input;
10044    }};
10045}
10046
10047/// Postconditions for equation `mqs_grade`.
10048/// Call before return: `contract_post_mqs_grade!(result_expr)`
10049macro_rules! contract_post_mqs_grade {
10050    ($result:expr) => {{
10051        let _contract_result = &$result;
10052    }};
10053}
10054
10055/// Combined pre+post contract for equation `mqs_grade`.
10056macro_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
10065// Auto-generated from contracts/naive-bayes-v1.yaml — DO NOT EDIT
10066// Contract: naive-bayes-v1
10067
10068/// Preconditions for equation `class_prior`.
10069/// Domain-specific. Call: `contract_pre_class_prior!(slice_expr)`
10070macro_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
10085/// Preconditions for equation `gaussian_likelihood`.
10086/// Domain-specific. Call: `contract_pre_gaussian_likelihood!(slice_expr)`
10087macro_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
10098/// Preconditions for equation `log_posterior`.
10099/// Domain-specific. Call: `contract_pre_log_posterior!(slice_expr)`
10100macro_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
10115// Auto-generated from contracts/namespace-isolation-v1.yaml — DO NOT EDIT
10116// Contract: namespace-isolation-v1
10117
10118/// Preconditions for equation `connect_lifecycle`.
10119/// Call at function entry: `contract_pre_connect_lifecycle!(input_expr)`
10120macro_rules! contract_pre_connect_lifecycle {
10121    () => {{}};
10122    ($input:expr) => {{
10123        let _contract_input = &$input;
10124    }};
10125}
10126
10127/// Preconditions for equation `send_isolation`.
10128/// Domain-specific. Call: `contract_pre_send_isolation!(slice_expr)`
10129macro_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
10140// Auto-generated from contracts/oci-manifest-v1.yaml — DO NOT EDIT
10141// Contract: oci-manifest-v1
10142
10143/// Preconditions for equation `layer_cache_hit`.
10144/// Call at function entry: `contract_pre_layer_cache_hit!(input_expr)`
10145macro_rules! contract_pre_layer_cache_hit {
10146    () => {{}};
10147    ($input:expr) => {{
10148        let _contract_input = &$input;
10149    }};
10150}
10151
10152/// Preconditions for equation `layer_ordering`.
10153/// Domain-specific. Call: `contract_pre_layer_ordering!(slice_expr)`
10154macro_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
10165/// Preconditions for equation `manifest_digest_consistency`.
10166/// Domain-specific. Call: `contract_pre_manifest_digest_consistency!(slice_expr)`
10167macro_rules! contract_pre_manifest_digest_consistency {
10168    () => {{}};
10169    ($input:expr) => {{
10170        let _pv_manifest = &$input;
10171    }};
10172}
10173
10174/// Preconditions for equation `reproducible_build`.
10175/// Call at function entry: `contract_pre_reproducible_build!(input_expr)`
10176macro_rules! contract_pre_reproducible_build {
10177    () => {{}};
10178    ($input:expr) => {{
10179        let _contract_input = &$input;
10180    }};
10181}
10182
10183// Auto-generated from contracts/online-softmax-v1.yaml — DO NOT EDIT
10184// Contract: online-softmax-v1
10185
10186/// Preconditions for equation `online_normalizer`.
10187/// Domain-specific. Call: `contract_pre_online_normalizer!(slice_expr)`
10188macro_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
10203/// Preconditions for equation `standard_softmax`.
10204/// Domain-specific. Call: `contract_pre_standard_softmax!(slice_expr)`
10205macro_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
10220// Auto-generated from contracts/optimization-v1.yaml — DO NOT EDIT
10221// Contract: optimization-v1
10222
10223/// Preconditions for equation `cg_minimize`.
10224/// Domain-specific. Call: `contract_pre_cg_minimize!(slice_expr)`
10225macro_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
10236/// Preconditions for equation `convergence`.
10237/// Domain-specific. Call: `contract_pre_convergence!(slice_expr)`
10238macro_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
10249/// Preconditions for equation `line_search`.
10250/// Domain-specific. Call: `contract_pre_line_search!(slice_expr)`
10251macro_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
10262// Auto-generated from contracts/package-resolve-v1.yaml — DO NOT EDIT
10263// Contract: package-resolve-v1
10264
10265/// Preconditions for equation `pull_resolve`.
10266/// Call at function entry: `contract_pre_pull_resolve!(input_expr)`
10267macro_rules! contract_pre_pull_resolve {
10268    () => {{}};
10269    ($input:expr) => {{
10270        let _contract_input = &$input;
10271    }};
10272}
10273
10274/// Preconditions for equation `registry_list`.
10275/// Call at function entry: `contract_pre_registry_list!(input_expr)`
10276macro_rules! contract_pre_registry_list {
10277    () => {{}};
10278    ($input:expr) => {{
10279        let _contract_input = &$input;
10280    }};
10281}
10282
10283/// Preconditions for equation `run_tracking`.
10284/// Call at function entry: `contract_pre_run_tracking!(input_expr)`
10285macro_rules! contract_pre_run_tracking {
10286    () => {{}};
10287    ($input:expr) => {{
10288        let _contract_input = &$input;
10289    }};
10290}
10291
10292// Auto-generated from contracts/paged-attention-v1.yaml — DO NOT EDIT
10293// Contract: paged-attention-v1
10294
10295/// Preconditions for equation `block_allocation`.
10296/// Domain-specific. Call: `contract_pre_block_allocation!(slice_expr)`
10297macro_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
10308/// Preconditions for equation `block_table_lookup`.
10309/// Domain-specific. Call: `contract_pre_block_table_lookup!(slice_expr)`
10310macro_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
10321/// Preconditions for equation `copy_on_write`.
10322/// Domain-specific. Call: `contract_pre_copy_on_write!(slice_expr)`
10323macro_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
10334// Auto-generated from contracts/paged-kv-cache-v1.yaml — DO NOT EDIT
10335// Contract: paged-kv-cache-v1
10336
10337/// Preconditions for equation `block_allocation`.
10338/// Domain-specific. Call: `contract_pre_block_allocation!(slice_expr)`
10339macro_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
10350/// Preconditions for equation `block_table_invariant`.
10351/// Domain-specific. Call: `contract_pre_block_table_invariant!(slice_expr)`
10352macro_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
10363/// Preconditions for equation `fragmentation_free`.
10364/// Domain-specific. Call: `contract_pre_fragmentation_free!(slice_expr)`
10365macro_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
10376/// Preconditions for equation `graph_compatibility`.
10377/// Call at function entry: `contract_pre_graph_compatibility!(input_expr)`
10378macro_rules! contract_pre_graph_compatibility {
10379    () => {{}};
10380    ($input:expr) => {{
10381        let _contract_input = &$input;
10382    }};
10383}
10384
10385/// Preconditions for equation `paged_contiguous_equivalence`.
10386/// Call at function entry: `contract_pre_paged_contiguous_equivalence!(input_expr)`
10387macro_rules! contract_pre_paged_contiguous_equivalence {
10388    () => {{}};
10389    ($input:expr) => {{
10390        let _contract_input = &$input;
10391    }};
10392}
10393
10394/// Preconditions for equation `slot_mapping`.
10395/// Domain-specific. Call: `contract_pre_slot_mapping!(slice_expr)`
10396macro_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
10407// Auto-generated from contracts/pagerank-kernel-v1.yaml — DO NOT EDIT
10408// Contract: pagerank-kernel-v1
10409
10410/// Preconditions for equation `bfs`.
10411/// Call at function entry: `contract_pre_bfs!(input_expr)`
10412macro_rules! contract_pre_bfs {
10413    () => {{}};
10414    ($input:expr) => {{
10415        let _contract_input = &$input;
10416    }};
10417}
10418
10419/// Preconditions for equation `pagerank`.
10420/// Domain-specific. Call: `contract_pre_pagerank!(slice_expr)`
10421macro_rules! contract_pre_pagerank {
10422    () => {{}};
10423    ($input:expr) => {{
10424        let _pv_x = &$input;
10425    }};
10426}
10427
10428// Auto-generated from contracts/pagerank-kernel-v1.yaml — DO NOT EDIT
10429// Contract: pagerank-kernel-v1
10430
10431/// Preconditions for equation `pagerank`.
10432/// Call at function entry: `contract_pre_pagerank!(input_expr)`
10433macro_rules! contract_pre_pagerank {
10434    () => {{}};
10435    ($input:expr) => {{
10436        let _contract_input = &$input;
10437    }};
10438}
10439
10440/// Preconditions for equation `power_iteration`.
10441/// Call at function entry: `contract_pre_power_iteration!(input_expr)`
10442macro_rules! contract_pre_power_iteration {
10443    () => {{}};
10444    ($input:expr) => {{
10445        let _contract_input = &$input;
10446    }};
10447}
10448
10449// Auto-generated from contracts/parser-soundness-v1.yaml — DO NOT EDIT
10450// Contract: parser-soundness-v1
10451
10452/// Preconditions for equation `lex`.
10453/// Domain-specific. Call: `contract_pre_lex!(slice_expr)`
10454macro_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
10463/// Preconditions for equation `parse`.
10464/// Domain-specific. Call: `contract_pre_parse!(slice_expr)`
10465macro_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
10476/// Preconditions for equation `semantic_analyze`.
10477/// Domain-specific. Call: `contract_pre_semantic_analyze!(slice_expr)`
10478macro_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
10489// Auto-generated from contracts/parser-soundness-v1.yaml — DO NOT EDIT
10490// Contract: parser-soundness-v1
10491
10492/// Preconditions for equation `block_scoping`.
10493/// Call at function entry: `contract_pre_block_scoping!(input_expr)`
10494macro_rules! contract_pre_block_scoping {
10495    () => {{}};
10496    ($input:expr) => {{
10497        let _contract_input = &$input;
10498    }};
10499}
10500
10501/// Preconditions for equation `parse_correctness`.
10502/// Call at function entry: `contract_pre_parse_correctness!(input_expr)`
10503macro_rules! contract_pre_parse_correctness {
10504    () => {{}};
10505    ($input:expr) => {{
10506        let _contract_input = &$input;
10507    }};
10508}
10509
10510/// Preconditions for equation `transpile_roundtrip`.
10511/// Call at function entry: `contract_pre_transpile_roundtrip!(input_expr)`
10512macro_rules! contract_pre_transpile_roundtrip {
10513    () => {{}};
10514    ($input:expr) => {{
10515        let _contract_input = &$input;
10516    }};
10517}
10518
10519// Auto-generated from contracts/pca-v1.yaml — DO NOT EDIT
10520// Contract: pca-v1
10521
10522/// Preconditions for equation `explained_variance`.
10523/// Domain-specific. Call: `contract_pre_explained_variance!(slice_expr)`
10524macro_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
10535/// Preconditions for equation `pca_transform`.
10536/// Domain-specific. Call: `contract_pre_pca_transform!(slice_expr)`
10537macro_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
10548/// Preconditions for equation `reconstruction`.
10549/// Domain-specific. Call: `contract_pre_reconstruction!(slice_expr)`
10550macro_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
10561// Auto-generated from contracts/performance-grading-v1.yaml — DO NOT EDIT
10562// Contract: performance-grading-v1
10563
10564/// Preconditions for equation `concrete_instance`.
10565/// Domain-specific. Call: `contract_pre_concrete_instance!(slice_expr)`
10566macro_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
10577/// Preconditions for equation `efficiency_grade`.
10578/// Domain-specific. Call: `contract_pre_efficiency_grade!(slice_expr)`
10579macro_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
10590/// Preconditions for equation `llamacpp_parity`.
10591/// Domain-specific. Call: `contract_pre_llamacpp_parity!(slice_expr)`
10592macro_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
10603/// Preconditions for equation `ollama_parity`.
10604/// Domain-specific. Call: `contract_pre_ollama_parity!(slice_expr)`
10605macro_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
10616/// Preconditions for equation `vllm_parity`.
10617/// Domain-specific. Call: `contract_pre_vllm_parity!(slice_expr)`
10618macro_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
10629// Auto-generated from contracts/pipeline-cache-v1.yaml — DO NOT EDIT
10630// Contract: pipeline-cache-v1
10631
10632/// Preconditions for equation `identity`.
10633/// Call at function entry: `contract_pre_identity!(input_expr)`
10634macro_rules! contract_pre_identity {
10635    () => {{}};
10636    ($input:expr) => {{
10637        let _contract_input = &$input;
10638    }};
10639}
10640
10641// Auto-generated from contracts/plugin-lifecycle-v1.yaml — DO NOT EDIT
10642// Contract: plugin-lifecycle-v1
10643
10644/// Preconditions for equation `lifecycle_state_machine`.
10645/// Call at function entry: `contract_pre_lifecycle_state_machine!(input_expr)`
10646macro_rules! contract_pre_lifecycle_state_machine {
10647    () => {{}};
10648    ($input:expr) => {{
10649        let _contract_input = &$input;
10650    }};
10651}
10652
10653/// Preconditions for equation `permission_scoping`.
10654/// Domain-specific. Call: `contract_pre_permission_scoping!(slice_expr)`
10655macro_rules! contract_pre_permission_scoping {
10656    () => {{}};
10657    ($input:expr) => {{
10658        let _pv_plugin = &$input;
10659    }};
10660}
10661
10662/// Preconditions for equation `schema_validation`.
10663/// Domain-specific. Call: `contract_pre_schema_validation!(slice_expr)`
10664macro_rules! contract_pre_schema_validation {
10665    () => {{}};
10666    ($input:expr) => {{
10667        let _pv_schema = &$input;
10668    }};
10669}
10670
10671// Auto-generated from contracts/pmat-work-lifecycle-v1.yaml — DO NOT EDIT
10672// Contract: pmat-work-lifecycle-v1
10673
10674/// Preconditions for equation `baseline_integrity`.
10675/// Call at function entry: `contract_pre_baseline_integrity!(input_expr)`
10676macro_rules! contract_pre_baseline_integrity {
10677    () => {{}};
10678    ($input:expr) => {{
10679        let _contract_input = &$input;
10680    }};
10681}
10682
10683/// Postconditions for equation `baseline_integrity`.
10684/// Call before return: `contract_post_baseline_integrity!(result_expr)`
10685macro_rules! contract_post_baseline_integrity {
10686    ($result:expr) => {{
10687        let _contract_result = &$result;
10688    }};
10689}
10690
10691/// Combined pre+post contract for equation `baseline_integrity`.
10692macro_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
10701/// Preconditions for equation `contract_immutability`.
10702/// Domain-specific. Call: `contract_pre_contract_immutability!(slice_expr)`
10703macro_rules! contract_pre_contract_immutability {
10704    () => {{}};
10705    ($input:expr) => {{
10706        let _pv_x = &$input;
10707    }};
10708}
10709
10710/// Postconditions for equation `contract_immutability`.
10711/// Call before return: `contract_post_contract_immutability!(result_expr)`
10712macro_rules! contract_post_contract_immutability {
10713    ($result:expr) => {{
10714        let _contract_result = &$result;
10715    }};
10716}
10717
10718/// Combined pre+post contract for equation `contract_immutability`.
10719macro_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
10728/// Preconditions for equation `falsification_completeness`.
10729/// Call at function entry: `contract_pre_falsification_completeness!(input_expr)`
10730macro_rules! contract_pre_falsification_completeness {
10731    () => {{}};
10732    ($input:expr) => {{
10733        let _contract_input = &$input;
10734    }};
10735}
10736
10737/// Postconditions for equation `falsification_completeness`.
10738/// Call before return: `contract_post_falsification_completeness!(result_expr)`
10739macro_rules! contract_post_falsification_completeness {
10740    ($result:expr) => {{
10741        let _contract_result = &$result;
10742    }};
10743}
10744
10745/// Combined pre+post contract for equation `falsification_completeness`.
10746macro_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
10755/// Preconditions for equation `monotonic_ledger`.
10756/// Call at function entry: `contract_pre_monotonic_ledger!(input_expr)`
10757macro_rules! contract_pre_monotonic_ledger {
10758    () => {{}};
10759    ($input:expr) => {{
10760        let _contract_input = &$input;
10761    }};
10762}
10763
10764/// Postconditions for equation `monotonic_ledger`.
10765/// Call before return: `contract_post_monotonic_ledger!(result_expr)`
10766macro_rules! contract_post_monotonic_ledger {
10767    ($result:expr) => {{
10768        let _contract_result = &$result;
10769    }};
10770}
10771
10772/// Combined pre+post contract for equation `monotonic_ledger`.
10773macro_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
10782/// Preconditions for equation `profile_determinism`.
10783/// Call at function entry: `contract_pre_profile_determinism!(input_expr)`
10784macro_rules! contract_pre_profile_determinism {
10785    () => {{}};
10786    ($input:expr) => {{
10787        let _contract_input = &$input;
10788    }};
10789}
10790
10791/// Postconditions for equation `profile_determinism`.
10792/// Call before return: `contract_post_profile_determinism!(result_expr)`
10793macro_rules! contract_post_profile_determinism {
10794    ($result:expr) => {{
10795        let _contract_result = &$result;
10796    }};
10797}
10798
10799/// Combined pre+post contract for equation `profile_determinism`.
10800macro_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
10809/// Preconditions for equation `rescue_bound`.
10810/// Call at function entry: `contract_pre_rescue_bound!(input_expr)`
10811macro_rules! contract_pre_rescue_bound {
10812    () => {{}};
10813    ($input:expr) => {{
10814        let _contract_input = &$input;
10815    }};
10816}
10817
10818/// Postconditions for equation `rescue_bound`.
10819/// Call before return: `contract_post_rescue_bound!(result_expr)`
10820macro_rules! contract_post_rescue_bound {
10821    ($result:expr) => {{
10822        let _contract_result = &$result;
10823    }};
10824}
10825
10826/// Combined pre+post contract for equation `rescue_bound`.
10827macro_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
10836/// Preconditions for equation `subcontracting_soundness`.
10837/// Call at function entry: `contract_pre_subcontracting_soundness!(input_expr)`
10838macro_rules! contract_pre_subcontracting_soundness {
10839    () => {{}};
10840    ($input:expr) => {{
10841        let _contract_input = &$input;
10842    }};
10843}
10844
10845/// Postconditions for equation `subcontracting_soundness`.
10846/// Call before return: `contract_post_subcontracting_soundness!(result_expr)`
10847macro_rules! contract_post_subcontracting_soundness {
10848    ($result:expr) => {{
10849        let _contract_result = &$result;
10850    }};
10851}
10852
10853/// Combined pre+post contract for equation `subcontracting_soundness`.
10854macro_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
10863// Auto-generated from contracts/preprocessing-normalization-v1.yaml — DO NOT EDIT
10864// Contract: preprocessing-normalization-v1
10865
10866/// Preconditions for equation `minmax_scaler`.
10867/// Domain-specific. Call: `contract_pre_minmax_scaler!(slice_expr)`
10868macro_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
10883/// Preconditions for equation `robust_scaler`.
10884/// Domain-specific. Call: `contract_pre_robust_scaler!(slice_expr)`
10885macro_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
10900/// Preconditions for equation `standard_scaler`.
10901/// Domain-specific. Call: `contract_pre_standard_scaler!(slice_expr)`
10902macro_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
10913// Auto-generated from contracts/property-testing-v1.yaml — DO NOT EDIT
10914// Contract: property-testing-v1
10915
10916/// Preconditions for equation `assertion_evaluation`.
10917/// Domain-specific. Call: `contract_pre_assertion_evaluation!(slice_expr)`
10918macro_rules! contract_pre_assertion_evaluation {
10919    () => {{}};
10920    ($input:expr) => {{
10921        let _pv_x = &$input;
10922    }};
10923}
10924
10925/// Preconditions for equation `coverage_collection`.
10926/// Call at function entry: `contract_pre_coverage_collection!(input_expr)`
10927macro_rules! contract_pre_coverage_collection {
10928    () => {{}};
10929    ($input:expr) => {{
10930        let _contract_input = &$input;
10931    }};
10932}
10933
10934/// Preconditions for equation `playbook_state_machine`.
10935/// Call at function entry: `contract_pre_playbook_state_machine!(input_expr)`
10936macro_rules! contract_pre_playbook_state_machine {
10937    () => {{}};
10938    ($input:expr) => {{
10939        let _contract_input = &$input;
10940    }};
10941}
10942
10943/// Preconditions for equation `retry_assertion`.
10944/// Call at function entry: `contract_pre_retry_assertion!(input_expr)`
10945macro_rules! contract_pre_retry_assertion {
10946    () => {{}};
10947    ($input:expr) => {{
10948        let _contract_input = &$input;
10949    }};
10950}
10951
10952/// Preconditions for equation `soft_assertion_collection`.
10953/// Call at function entry: `contract_pre_soft_assertion_collection!(input_expr)`
10954macro_rules! contract_pre_soft_assertion_collection {
10955    () => {{}};
10956    ($input:expr) => {{
10957        let _contract_input = &$input;
10958    }};
10959}
10960
10961/// Preconditions for equation `test_result_reporting`.
10962/// Call at function entry: `contract_pre_test_result_reporting!(input_expr)`
10963macro_rules! contract_pre_test_result_reporting {
10964    () => {{}};
10965    ($input:expr) => {{
10966        let _contract_input = &$input;
10967    }};
10968}
10969
10970// Auto-generated from contracts/provider-routing-v1.yaml — DO NOT EDIT
10971// Contract: provider-routing-v1
10972
10973/// Preconditions for equation `backoff_jitter`.
10974/// Call at function entry: `contract_pre_backoff_jitter!(input_expr)`
10975macro_rules! contract_pre_backoff_jitter {
10976    () => {{}};
10977    ($input:expr) => {{
10978        let _contract_input = &$input;
10979    }};
10980}
10981
10982/// Postconditions for equation `cost_budget`.
10983/// Call before return: `contract_post_cost_budget!(result_expr)`
10984macro_rules! contract_post_cost_budget {
10985    ($result:expr) => {{
10986        let _contract_result = &$result;
10987    }};
10988}
10989
10990/// Preconditions for equation `failover_cascade`.
10991/// Domain-specific. Call: `contract_pre_failover_cascade!(slice_expr)`
10992macro_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
11003/// Preconditions for equation `privacy_enforcement`.
11004/// Domain-specific. Call: `contract_pre_privacy_enforcement!(slice_expr)`
11005macro_rules! contract_pre_privacy_enforcement {
11006    () => {{}};
11007    ($input:expr) => {{
11008        let _pv_request = &$input;
11009    }};
11010}
11011
11012/// Postconditions for equation `privacy_enforcement`.
11013/// Call before return: `contract_post_privacy_enforcement!(result_expr)`
11014macro_rules! contract_post_privacy_enforcement {
11015    ($result:expr) => {{
11016        let _contract_result = &$result;
11017    }};
11018}
11019
11020/// Combined pre+post contract for equation `privacy_enforcement`.
11021macro_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
11030// Auto-generated from contracts/ptx-target-parity-v1.yaml — DO NOT EDIT
11031// Contract: ptx-target-parity-v1
11032
11033/// Preconditions for equation `jit_compilation_success`.
11034/// Domain-specific. Call: `contract_pre_jit_compilation_success!(slice_expr)`
11035macro_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
11046/// Preconditions for equation `no_hardcoded_targets`.
11047/// Domain-specific. Call: `contract_pre_no_hardcoded_targets!(slice_expr)`
11048macro_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
11059/// Preconditions for equation `target_parity`.
11060/// Domain-specific. Call: `contract_pre_target_parity!(slice_expr)`
11061macro_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
11076// Auto-generated from contracts/q4k-q6k-superblock-v1.yaml — DO NOT EDIT
11077// Contract: q4k-q6k-superblock-v1
11078
11079/// Preconditions for equation `bsum`.
11080/// Domain-specific. Call: `contract_pre_bsum!(slice_expr)`
11081macro_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
11092/// Preconditions for equation `dequantization`.
11093/// Domain-specific. Call: `contract_pre_dequantization!(slice_expr)`
11094macro_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
11105/// Preconditions for equation `q4k_superblock`.
11106/// Domain-specific. Call: `contract_pre_q4k_superblock!(slice_expr)`
11107macro_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
11118/// Preconditions for equation `q6k_superblock`.
11119/// Domain-specific. Call: `contract_pre_q6k_superblock!(slice_expr)`
11120macro_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
11131/// Preconditions for equation `total_bytes`.
11132/// Domain-specific. Call: `contract_pre_total_bytes!(slice_expr)`
11133macro_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
11144// Auto-generated from contracts/qk-norm-apr-loader-v1.yaml — DO NOT EDIT
11145// Contract: qk-norm-apr-loader-v1
11146
11147/// Preconditions for equation `qk_norm_load`.
11148/// Domain-specific. Call: `contract_pre_qk_norm_load!(slice_expr)`
11149macro_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
11164// Auto-generated from contracts/qk-norm-v1.yaml — DO NOT EDIT
11165// Contract: qk-norm-v1
11166
11167/// Preconditions for equation `qk_rmsnorm`.
11168/// Domain-specific. Call: `contract_pre_qk_rmsnorm!(slice_expr)`
11169macro_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
11184// Auto-generated from contracts/qlora-hyperparameters-v1.yaml — DO NOT EDIT
11185// Contract: qlora-hyperparameters-v1
11186
11187/// Preconditions for equation `effective_batch_size`.
11188/// Domain-specific. Call: `contract_pre_effective_batch_size!(slice_expr)`
11189macro_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
11200/// Preconditions for equation `epoch_count_imbalanced`.
11201/// Domain-specific. Call: `contract_pre_epoch_count_imbalanced!(slice_expr)`
11202macro_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
11213/// Preconditions for equation `gradient_clip_bound`.
11214/// Domain-specific. Call: `contract_pre_gradient_clip_bound!(slice_expr)`
11215macro_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
11226/// Preconditions for equation `learning_rate_scaling`.
11227/// Domain-specific. Call: `contract_pre_learning_rate_scaling!(slice_expr)`
11228macro_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
11239/// Preconditions for equation `lora_alpha_ratio`.
11240/// Domain-specific. Call: `contract_pre_lora_alpha_ratio!(slice_expr)`
11241macro_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
11252/// Preconditions for equation `seq_len_from_data`.
11253/// Domain-specific. Call: `contract_pre_seq_len_from_data!(slice_expr)`
11254macro_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
11265/// Preconditions for equation `warmup_fraction`.
11266/// Domain-specific. Call: `contract_pre_warmup_fraction!(slice_expr)`
11267macro_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
11278// Auto-generated from contracts/quality-validation-v1.yaml — DO NOT EDIT
11279// Contract: quality-validation-v1
11280
11281/// Preconditions for equation `gate_composition`.
11282/// Call at function entry: `contract_pre_gate_composition!(input_expr)`
11283macro_rules! contract_pre_gate_composition {
11284    () => {{}};
11285    ($input:expr) => {{
11286        let _contract_input = &$input;
11287    }};
11288}
11289
11290/// Preconditions for equation `validate_index`.
11291/// Call at function entry: `contract_pre_validate_index!(input_expr)`
11292macro_rules! contract_pre_validate_index {
11293    () => {{}};
11294    ($input:expr) => {{
11295        let _contract_input = &$input;
11296    }};
11297}
11298
11299/// Preconditions for equation `validate_size`.
11300/// Call at function entry: `contract_pre_validate_size!(input_expr)`
11301macro_rules! contract_pre_validate_size {
11302    () => {{}};
11303    ($input:expr) => {{
11304        let _contract_input = &$input;
11305    }};
11306}
11307
11308// Auto-generated from contracts/quantization-ordering-v1.yaml — DO NOT EDIT
11309// Contract: quantization-ordering-v1
11310
11311/// Preconditions for equation `alpha_scaling`.
11312/// Domain-specific. Call: `contract_pre_alpha_scaling!(slice_expr)`
11313macro_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
11324/// Preconditions for equation `bytes_per_param`.
11325/// Domain-specific. Call: `contract_pre_bytes_per_param!(slice_expr)`
11326macro_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
11337/// Preconditions for equation `dropout_expectation`.
11338/// Domain-specific. Call: `contract_pre_dropout_expectation!(slice_expr)`
11339macro_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
11350/// Preconditions for equation `size_ordering`.
11351/// Domain-specific. Call: `contract_pre_size_ordering!(slice_expr)`
11352macro_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
11363// Auto-generated from contracts/quantized-dot-product-v1.yaml — DO NOT EDIT
11364// Contract: quantized-dot-product-v1
11365
11366/// Preconditions for equation `bsum_decomposition`.
11367/// Domain-specific. Call: `contract_pre_bsum_decomposition!(slice_expr)`
11368macro_rules! contract_pre_bsum_decomposition {
11369    () => {{}};
11370    ($input:expr) => {{
11371        let _pv_activations = &$input;
11372    }};
11373}
11374
11375/// Preconditions for equation `format_isolation`.
11376/// Call at function entry: `contract_pre_format_isolation!(input_expr)`
11377macro_rules! contract_pre_format_isolation {
11378    () => {{}};
11379    ($input:expr) => {{
11380        let _contract_input = &$input;
11381    }};
11382}
11383
11384/// Preconditions for equation `identity`.
11385/// Domain-specific. Call: `contract_pre_identity!(slice_expr)`
11386macro_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
11397/// Preconditions for equation `simd_scalar_equivalence`.
11398/// Domain-specific. Call: `contract_pre_simd_scalar_equivalence!(slice_expr)`
11399macro_rules! contract_pre_simd_scalar_equivalence {
11400    () => {{}};
11401    ($input:expr) => {{
11402        let _pv_data = &$input;
11403    }};
11404}
11405
11406// Auto-generated from contracts/qwen2-e2e-verification-v1.yaml — DO NOT EDIT
11407// Contract: qwen2-e2e-verification-v1
11408
11409/// Preconditions for equation `contract_composition`.
11410/// Domain-specific. Call: `contract_pre_contract_composition!(slice_expr)`
11411macro_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
11422/// Preconditions for equation `flops_per_token`.
11423/// Domain-specific. Call: `contract_pre_flops_per_token!(slice_expr)`
11424macro_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
11435/// Preconditions for equation `memory_breakdown`.
11436/// Domain-specific. Call: `contract_pre_memory_breakdown!(slice_expr)`
11437macro_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
11448/// Preconditions for equation `model_parameter_count`.
11449/// Domain-specific. Call: `contract_pre_model_parameter_count!(slice_expr)`
11450macro_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
11461/// Preconditions for equation `throughput_model`.
11462/// Domain-specific. Call: `contract_pre_throughput_model!(slice_expr)`
11463macro_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
11474/// Preconditions for equation `verification_ladder`.
11475/// Domain-specific. Call: `contract_pre_verification_ladder!(slice_expr)`
11476macro_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
11487// Auto-generated from contracts/qwen2-shapes-v1.yaml — DO NOT EDIT
11488// Contract: qwen2-shapes-v1
11489
11490/// Preconditions for equation `head_dim_consistency`.
11491/// Domain-specific. Call: `contract_pre_head_dim_consistency!(slice_expr)`
11492macro_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
11503/// Preconditions for equation `kv_projection_shape`.
11504/// Domain-specific. Call: `contract_pre_kv_projection_shape!(slice_expr)`
11505macro_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
11516/// Preconditions for equation `o_projection_transpose`.
11517/// Domain-specific. Call: `contract_pre_o_projection_transpose!(slice_expr)`
11518macro_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
11529/// Preconditions for equation `q_projection_shape`.
11530/// Domain-specific. Call: `contract_pre_q_projection_shape!(slice_expr)`
11531macro_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
11542/// Preconditions for equation `rope_frequency`.
11543/// Domain-specific. Call: `contract_pre_rope_frequency!(slice_expr)`
11544macro_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
11555/// Preconditions for equation `swiglu_ratio`.
11556/// Domain-specific. Call: `contract_pre_swiglu_ratio!(slice_expr)`
11557macro_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
11568// Auto-generated from contracts/qwen2-weight-loading-v1.yaml — DO NOT EDIT
11569// Contract: qwen2-weight-loading-v1
11570
11571/// Preconditions for equation `kv_projection`.
11572/// Call at function entry: `contract_pre_kv_projection!(input_expr)`
11573macro_rules! contract_pre_kv_projection {
11574    () => {{}};
11575    ($input:expr) => {{
11576        let _contract_input = &$input;
11577    }};
11578}
11579
11580/// Preconditions for equation `q_projection`.
11581/// Call at function entry: `contract_pre_q_projection!(input_expr)`
11582macro_rules! contract_pre_q_projection {
11583    () => {{}};
11584    ($input:expr) => {{
11585        let _contract_input = &$input;
11586    }};
11587}
11588
11589/// Preconditions for equation `swiglu_expansion`.
11590/// Call at function entry: `contract_pre_swiglu_expansion!(input_expr)`
11591macro_rules! contract_pre_swiglu_expansion {
11592    () => {{}};
11593    ($input:expr) => {{
11594        let _contract_input = &$input;
11595    }};
11596}
11597
11598/// Preconditions for equation `total_parameters`.
11599/// Call at function entry: `contract_pre_total_parameters!(input_expr)`
11600macro_rules! contract_pre_total_parameters {
11601    () => {{}};
11602    ($input:expr) => {{
11603        let _contract_input = &$input;
11604    }};
11605}
11606
11607// Auto-generated from contracts/qwen3-e2e-verification-v1.yaml — DO NOT EDIT
11608// Contract: qwen3-e2e-verification-v1
11609
11610/// Preconditions for equation `contract_composition`.
11611/// Domain-specific. Call: `contract_pre_contract_composition!(slice_expr)`
11612macro_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
11623/// Preconditions for equation `flops_per_token`.
11624/// Domain-specific. Call: `contract_pre_flops_per_token!(slice_expr)`
11625macro_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
11636/// Preconditions for equation `memory_breakdown`.
11637/// Domain-specific. Call: `contract_pre_memory_breakdown!(slice_expr)`
11638macro_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
11649/// Preconditions for equation `model_parameter_count`.
11650/// Domain-specific. Call: `contract_pre_model_parameter_count!(slice_expr)`
11651macro_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
11662/// Preconditions for equation `throughput_model`.
11663/// Domain-specific. Call: `contract_pre_throughput_model!(slice_expr)`
11664macro_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
11675/// Preconditions for equation `verification_ladder`.
11676/// Domain-specific. Call: `contract_pre_verification_ladder!(slice_expr)`
11677macro_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
11688// Auto-generated from contracts/qwen3-shapes-v1.yaml — DO NOT EDIT
11689// Contract: qwen3-shapes-v1
11690
11691/// Preconditions for equation `head_dim_consistency`.
11692/// Domain-specific. Call: `contract_pre_head_dim_consistency!(slice_expr)`
11693macro_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
11704/// Preconditions for equation `kv_projection_shape`.
11705/// Domain-specific. Call: `contract_pre_kv_projection_shape!(slice_expr)`
11706macro_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
11717/// Preconditions for equation `o_projection_transpose`.
11718/// Domain-specific. Call: `contract_pre_o_projection_transpose!(slice_expr)`
11719macro_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
11730/// Preconditions for equation `q_projection_shape`.
11731/// Domain-specific. Call: `contract_pre_q_projection_shape!(slice_expr)`
11732macro_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
11743/// Preconditions for equation `rope_frequency`.
11744/// Domain-specific. Call: `contract_pre_rope_frequency!(slice_expr)`
11745macro_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
11756/// Preconditions for equation `swiglu_ratio`.
11757/// Domain-specific. Call: `contract_pre_swiglu_ratio!(slice_expr)`
11758macro_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
11769// Auto-generated from contracts/qwen35-e2e-verification-v1.yaml — DO NOT EDIT
11770// Contract: qwen35-e2e-verification-v1
11771
11772/// Preconditions for equation `contract_composition`.
11773/// Domain-specific. Call: `contract_pre_contract_composition!(slice_expr)`
11774macro_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
11785/// Preconditions for equation `flops_per_token`.
11786/// Domain-specific. Call: `contract_pre_flops_per_token!(slice_expr)`
11787macro_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
11798/// Preconditions for equation `memory_breakdown`.
11799/// Domain-specific. Call: `contract_pre_memory_breakdown!(slice_expr)`
11800macro_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
11811/// Preconditions for equation `model_parameter_count`.
11812/// Domain-specific. Call: `contract_pre_model_parameter_count!(slice_expr)`
11813macro_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
11824/// Preconditions for equation `throughput_model`.
11825/// Domain-specific. Call: `contract_pre_throughput_model!(slice_expr)`
11826macro_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
11837/// Preconditions for equation `verification_ladder`.
11838/// Domain-specific. Call: `contract_pre_verification_ladder!(slice_expr)`
11839macro_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
11850// Auto-generated from contracts/qwen35-hybrid-forward-v1.yaml — DO NOT EDIT
11851// Contract: qwen35-hybrid-forward-v1
11852
11853/// Preconditions for equation `activation_magnitude`.
11854/// Domain-specific. Call: `contract_pre_activation_magnitude!(slice_expr)`
11855macro_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
11866/// Preconditions for equation `attention_sublayer`.
11867/// Domain-specific. Call: `contract_pre_attention_sublayer!(slice_expr)`
11868macro_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
11879/// Preconditions for equation `ffn_sublayer`.
11880/// Domain-specific. Call: `contract_pre_ffn_sublayer!(slice_expr)`
11881macro_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
11892/// Preconditions for equation `gdn_sublayer`.
11893/// Domain-specific. Call: `contract_pre_gdn_sublayer!(slice_expr)`
11894macro_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
11905/// Preconditions for equation `gradient_flow`.
11906/// Domain-specific. Call: `contract_pre_gradient_flow!(slice_expr)`
11907macro_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
11918/// Preconditions for equation `hybrid_block`.
11919/// Domain-specific. Call: `contract_pre_hybrid_block!(slice_expr)`
11920macro_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
11931// Auto-generated from contracts/qwen35-shapes-v1.yaml — DO NOT EDIT
11932// Contract: qwen35-shapes-v1
11933
11934/// Preconditions for equation `kv_projection_shape`.
11935/// Domain-specific. Call: `contract_pre_kv_projection_shape!(slice_expr)`
11936macro_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
11947/// Preconditions for equation `o_projection_transpose`.
11948/// Domain-specific. Call: `contract_pre_o_projection_transpose!(slice_expr)`
11949macro_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
11960/// Preconditions for equation `q_projection_shape`.
11961/// Domain-specific. Call: `contract_pre_q_projection_shape!(slice_expr)`
11962macro_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
11973/// Preconditions for equation `rope_frequency`.
11974/// Domain-specific. Call: `contract_pre_rope_frequency!(slice_expr)`
11975macro_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
11986/// Preconditions for equation `swiglu_ratio`.
11987/// Domain-specific. Call: `contract_pre_swiglu_ratio!(slice_expr)`
11988macro_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
11999// Auto-generated from contracts/qwen3moe-e2e-verification-v1.yaml — DO NOT EDIT
12000// Contract: qwen3moe-e2e-verification-v1
12001
12002/// Preconditions for equation `active_parameter_count`.
12003/// Domain-specific. Call: `contract_pre_active_parameter_count!(slice_expr)`
12004macro_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
12015/// Preconditions for equation `contract_composition`.
12016/// Domain-specific. Call: `contract_pre_contract_composition!(slice_expr)`
12017macro_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
12028/// Preconditions for equation `flops_per_token`.
12029/// Domain-specific. Call: `contract_pre_flops_per_token!(slice_expr)`
12030macro_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
12041/// Preconditions for equation `memory_breakdown`.
12042/// Domain-specific. Call: `contract_pre_memory_breakdown!(slice_expr)`
12043macro_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
12054/// Preconditions for equation `model_parameter_count`.
12055/// Domain-specific. Call: `contract_pre_model_parameter_count!(slice_expr)`
12056macro_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
12067/// Preconditions for equation `throughput_model`.
12068/// Domain-specific. Call: `contract_pre_throughput_model!(slice_expr)`
12069macro_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
12080/// Preconditions for equation `verification_ladder`.
12081/// Domain-specific. Call: `contract_pre_verification_ladder!(slice_expr)`
12082macro_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
12093// Auto-generated from contracts/qwen3moe-shapes-v1.yaml — DO NOT EDIT
12094// Contract: qwen3moe-shapes-v1
12095
12096/// Preconditions for equation `kv_projection_shape`.
12097/// Domain-specific. Call: `contract_pre_kv_projection_shape!(slice_expr)`
12098macro_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
12109/// Preconditions for equation `moe_expert_shape`.
12110/// Domain-specific. Call: `contract_pre_moe_expert_shape!(slice_expr)`
12111macro_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
12122/// Preconditions for equation `moe_router_shape`.
12123/// Domain-specific. Call: `contract_pre_moe_router_shape!(slice_expr)`
12124macro_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
12135/// Preconditions for equation `o_projection_transpose`.
12136/// Domain-specific. Call: `contract_pre_o_projection_transpose!(slice_expr)`
12137macro_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
12148/// Preconditions for equation `q_projection_shape`.
12149/// Domain-specific. Call: `contract_pre_q_projection_shape!(slice_expr)`
12150macro_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
12161/// Preconditions for equation `rope_frequency`.
12162/// Domain-specific. Call: `contract_pre_rope_frequency!(slice_expr)`
12163macro_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
12174/// Preconditions for equation `swiglu_ratio`.
12175/// Domain-specific. Call: `contract_pre_swiglu_ratio!(slice_expr)`
12176macro_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
12187// Auto-generated from contracts/rag-pipeline-v1.yaml — DO NOT EDIT
12188// Contract: rag-pipeline-v1
12189
12190/// Preconditions for equation `embed_insert`.
12191/// Call at function entry: `contract_pre_embed_insert!(input_expr)`
12192macro_rules! contract_pre_embed_insert {
12193    () => {{}};
12194    ($input:expr) => {{
12195        let _contract_input = &$input;
12196    }};
12197}
12198
12199/// Preconditions for equation `metric_correctness`.
12200/// Call at function entry: `contract_pre_metric_correctness!(input_expr)`
12201macro_rules! contract_pre_metric_correctness {
12202    () => {{}};
12203    ($input:expr) => {{
12204        let _contract_input = &$input;
12205    }};
12206}
12207
12208/// Preconditions for equation `retrieve_rank`.
12209/// Call at function entry: `contract_pre_retrieve_rank!(input_expr)`
12210macro_rules! contract_pre_retrieve_rank {
12211    () => {{}};
12212    ($input:expr) => {{
12213        let _contract_input = &$input;
12214    }};
12215}
12216
12217// Auto-generated from contracts/random-forest-v1.yaml — DO NOT EDIT
12218// Contract: random-forest-v1
12219
12220/// Preconditions for equation `bootstrap_sample`.
12221/// Domain-specific. Call: `contract_pre_bootstrap_sample!(slice_expr)`
12222macro_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
12233/// Preconditions for equation `ensemble_size`.
12234/// Domain-specific. Call: `contract_pre_ensemble_size!(slice_expr)`
12235macro_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
12250/// Preconditions for equation `majority_vote`.
12251/// Domain-specific. Call: `contract_pre_majority_vote!(slice_expr)`
12252macro_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
12267/// Preconditions for equation `predict`.
12268/// Domain-specific. Call: `contract_pre_predict!(slice_expr)`
12269macro_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
12284// Auto-generated from contracts/recipe-determinism-v1.yaml — DO NOT EDIT
12285// Contract: recipe-determinism-v1
12286
12287/// Preconditions for equation `expand_recipe`.
12288/// Call at function entry: `contract_pre_expand_recipe!(input_expr)`
12289macro_rules! contract_pre_expand_recipe {
12290    () => {{}};
12291    ($input:expr) => {{
12292        let _contract_input = &$input;
12293    }};
12294}
12295
12296/// Preconditions for equation `validate_input_type`.
12297/// Call at function entry: `contract_pre_validate_input_type!(input_expr)`
12298macro_rules! contract_pre_validate_input_type {
12299    () => {{}};
12300    ($input:expr) => {{
12301        let _contract_input = &$input;
12302    }};
12303}
12304
12305/// Preconditions for equation `validate_inputs`.
12306/// Domain-specific. Call: `contract_pre_validate_inputs!(slice_expr)`
12307macro_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
12318// Auto-generated from contracts/regex-contract-example-v1.yaml — DO NOT EDIT
12319// Contract: regex-contract-example-v1
12320
12321/// Preconditions for equation `format_iso_timestamp`.
12322/// Call at function entry: `contract_pre_format_iso_timestamp!(input_expr)`
12323macro_rules! contract_pre_format_iso_timestamp {
12324    () => {{}};
12325    ($input:expr) => {{
12326        let _contract_input = &$input;
12327    }};
12328}
12329
12330/// Postconditions for equation `format_iso_timestamp`.
12331/// Call before return: `contract_post_format_iso_timestamp!(result_expr)`
12332macro_rules! contract_post_format_iso_timestamp {
12333    ($result:expr) => {{
12334        let _contract_result = &$result;
12335    }};
12336}
12337
12338/// Combined pre+post contract for equation `format_iso_timestamp`.
12339macro_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
12348/// Preconditions for equation `format_semver`.
12349/// Call at function entry: `contract_pre_format_semver!(input_expr)`
12350macro_rules! contract_pre_format_semver {
12351    () => {{}};
12352    ($input:expr) => {{
12353        let _contract_input = &$input;
12354    }};
12355}
12356
12357/// Postconditions for equation `format_semver`.
12358/// Call before return: `contract_post_format_semver!(result_expr)`
12359macro_rules! contract_post_format_semver {
12360    ($result:expr) => {{
12361        let _contract_result = &$result;
12362    }};
12363}
12364
12365/// Combined pre+post contract for equation `format_semver`.
12366macro_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
12375/// Preconditions for equation `format_ticket_id`.
12376/// Call at function entry: `contract_pre_format_ticket_id!(input_expr)`
12377macro_rules! contract_pre_format_ticket_id {
12378    () => {{}};
12379    ($input:expr) => {{
12380        let _contract_input = &$input;
12381    }};
12382}
12383
12384/// Postconditions for equation `format_ticket_id`.
12385/// Call before return: `contract_post_format_ticket_id!(result_expr)`
12386macro_rules! contract_post_format_ticket_id {
12387    ($result:expr) => {{
12388        let _contract_result = &$result;
12389    }};
12390}
12391
12392/// Combined pre+post contract for equation `format_ticket_id`.
12393macro_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
12402// Auto-generated from contracts/registry-integrity-v1.yaml — DO NOT EDIT
12403// Contract: registry-integrity-v1
12404
12405/// Preconditions for equation `pull_idempotency`.
12406/// Call at function entry: `contract_pre_pull_idempotency!(input_expr)`
12407macro_rules! contract_pre_pull_idempotency {
12408    () => {{}};
12409    ($input:expr) => {{
12410        let _contract_input = &$input;
12411    }};
12412}
12413
12414/// Preconditions for equation `run_lifecycle`.
12415/// Call at function entry: `contract_pre_run_lifecycle!(input_expr)`
12416macro_rules! contract_pre_run_lifecycle {
12417    () => {{}};
12418    ($input:expr) => {{
12419        let _contract_input = &$input;
12420    }};
12421}
12422
12423// Auto-generated from contracts/render-primitives-v1.yaml — DO NOT EDIT
12424// Contract: render-primitives-v1
12425
12426/// Preconditions for equation `draw_bounds`.
12427/// Call at function entry: `contract_pre_draw_bounds!(input_expr)`
12428macro_rules! contract_pre_draw_bounds {
12429    () => {{}};
12430    ($input:expr) => {{
12431        let _contract_input = &$input;
12432    }};
12433}
12434
12435/// Preconditions for equation `layout_area_conservation`.
12436/// Domain-specific. Call: `contract_pre_layout_area_conservation!(slice_expr)`
12437macro_rules! contract_pre_layout_area_conservation {
12438    () => {{}};
12439    ($input:expr) => {{
12440        let _pv_x = &$input;
12441    }};
12442}
12443
12444/// Preconditions for equation `line_connectivity`.
12445/// Call at function entry: `contract_pre_line_connectivity!(input_expr)`
12446macro_rules! contract_pre_line_connectivity {
12447    () => {{}};
12448    ($input:expr) => {{
12449        let _contract_input = &$input;
12450    }};
12451}
12452
12453// Auto-generated from contracts/retrieval-quality-v1.yaml — DO NOT EDIT
12454// Contract: retrieval-quality-v1
12455
12456/// Preconditions for equation `embedding_insert`.
12457/// Domain-specific. Call: `contract_pre_embedding_insert!(slice_expr)`
12458macro_rules! contract_pre_embedding_insert {
12459    () => {{}};
12460    ($input:expr) => {{
12461        let _pv_embedding = &$input;
12462    }};
12463}
12464
12465/// Preconditions for equation `metric_bounds`.
12466/// Domain-specific. Call: `contract_pre_metric_bounds!(slice_expr)`
12467macro_rules! contract_pre_metric_bounds {
12468    () => {{}};
12469    ($input:expr) => {{
12470        let _pv_relevant = &$input;
12471    }};
12472}
12473
12474/// Preconditions for equation `retrieval_ranking`.
12475/// Call at function entry: `contract_pre_retrieval_ranking!(input_expr)`
12476macro_rules! contract_pre_retrieval_ranking {
12477    () => {{}};
12478    ($input:expr) => {{
12479        let _contract_input = &$input;
12480    }};
12481}
12482
12483// Auto-generated from contracts/rmsnorm-kernel-v1.yaml — DO NOT EDIT
12484// Contract: rmsnorm-kernel-v1
12485
12486/// Preconditions for equation `rmsnorm`.
12487/// Domain-specific. Call: `contract_pre_rmsnorm!(slice_expr)`
12488macro_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
12500/// Postconditions for equation `rmsnorm`.
12501/// Call before return: `contract_post_rmsnorm!(result_expr)`
12502macro_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
12512/// Combined pre+post contract for equation `rmsnorm`.
12513macro_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
12522// Auto-generated from contracts/roofline-model-v1.yaml — DO NOT EDIT
12523// Contract: roofline-model-v1
12524
12525/// Preconditions for equation `bandwidth_ceiling`.
12526/// Domain-specific. Call: `contract_pre_bandwidth_ceiling!(slice_expr)`
12527macro_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
12538/// Preconditions for equation `compute_ceiling`.
12539/// Domain-specific. Call: `contract_pre_compute_ceiling!(slice_expr)`
12540macro_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
12551/// Preconditions for equation `model_bytes`.
12552/// Domain-specific. Call: `contract_pre_model_bytes!(slice_expr)`
12553macro_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
12564/// Preconditions for equation `throughput_bound`.
12565/// Domain-specific. Call: `contract_pre_throughput_bound!(slice_expr)`
12566macro_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
12577// Auto-generated from contracts/rope-extrapolation-v1.yaml — DO NOT EDIT
12578// Contract: rope-extrapolation-v1
12579
12580/// Preconditions for equation `base_frequency`.
12581/// Domain-specific. Call: `contract_pre_base_frequency!(slice_expr)`
12582macro_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
12593/// Preconditions for equation `linear_interpolation`.
12594/// Domain-specific. Call: `contract_pre_linear_interpolation!(slice_expr)`
12595macro_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
12606/// Preconditions for equation `ntk_scaled_base`.
12607/// Domain-specific. Call: `contract_pre_ntk_scaled_base!(slice_expr)`
12608macro_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
12619/// Preconditions for equation `rotation_matrix`.
12620/// Domain-specific. Call: `contract_pre_rotation_matrix!(slice_expr)`
12621macro_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
12632/// Preconditions for equation `yarn_mixed_frequency`.
12633/// Domain-specific. Call: `contract_pre_yarn_mixed_frequency!(slice_expr)`
12634macro_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
12645/// Preconditions for equation `yarn_ramp`.
12646/// Domain-specific. Call: `contract_pre_yarn_ramp!(slice_expr)`
12647macro_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
12658// Auto-generated from contracts/rope-kernel-v1.yaml — DO NOT EDIT
12659// Contract: rope-kernel-v1
12660
12661/// Preconditions for equation `rope`.
12662/// Domain-specific. Call: `contract_pre_rope!(slice_expr)`
12663macro_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
12675/// Postconditions for equation `rope`.
12676/// Call before return: `contract_post_rope!(result_expr)`
12677macro_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
12687/// Combined pre+post contract for equation `rope`.
12688macro_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
12697// Auto-generated from contracts/safetensors-cpu-dispatch-v1.yaml — DO NOT EDIT
12698// Contract: safetensors-cpu-dispatch-v1
12699
12700/// Preconditions for equation `format_parity`.
12701/// Domain-specific. Call: `contract_pre_format_parity!(slice_expr)`
12702macro_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
12713// Auto-generated from contracts/safetensors-format-safety-v1.yaml — DO NOT EDIT
12714// Contract: safetensors-format-safety-v1
12715
12716/// Preconditions for equation `dtype_consistency`.
12717/// Call at function entry: `contract_pre_dtype_consistency!(input_expr)`
12718macro_rules! contract_pre_dtype_consistency {
12719    () => {{}};
12720    ($input:expr) => {{
12721        let _contract_input = &$input;
12722    }};
12723}
12724
12725/// Postconditions for equation `dtype_consistency`.
12726/// Call before return: `contract_post_dtype_consistency!(result_expr)`
12727macro_rules! contract_post_dtype_consistency {
12728    ($result:expr) => {{
12729        let _contract_result = &$result;
12730    }};
12731}
12732
12733/// Combined pre+post contract for equation `dtype_consistency`.
12734macro_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
12743/// Preconditions for equation `header_size_validation`.
12744/// Call at function entry: `contract_pre_header_size_validation!(input_expr)`
12745macro_rules! contract_pre_header_size_validation {
12746    () => {{}};
12747    ($input:expr) => {{
12748        let _contract_input = &$input;
12749    }};
12750}
12751
12752/// Postconditions for equation `header_size_validation`.
12753/// Call before return: `contract_post_header_size_validation!(result_expr)`
12754macro_rules! contract_post_header_size_validation {
12755    ($result:expr) => {{
12756        let _contract_result = &$result;
12757    }};
12758}
12759
12760/// Combined pre+post contract for equation `header_size_validation`.
12761macro_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
12770/// Preconditions for equation `mmap_zero_copy`.
12771/// Call at function entry: `contract_pre_mmap_zero_copy!(input_expr)`
12772macro_rules! contract_pre_mmap_zero_copy {
12773    () => {{}};
12774    ($input:expr) => {{
12775        let _contract_input = &$input;
12776    }};
12777}
12778
12779/// Postconditions for equation `mmap_zero_copy`.
12780/// Call before return: `contract_post_mmap_zero_copy!(result_expr)`
12781macro_rules! contract_post_mmap_zero_copy {
12782    ($result:expr) => {{
12783        let _contract_result = &$result;
12784    }};
12785}
12786
12787/// Combined pre+post contract for equation `mmap_zero_copy`.
12788macro_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
12797/// Preconditions for equation `no_overlap_invariant`.
12798/// Call at function entry: `contract_pre_no_overlap_invariant!(input_expr)`
12799macro_rules! contract_pre_no_overlap_invariant {
12800    () => {{}};
12801    ($input:expr) => {{
12802        let _contract_input = &$input;
12803    }};
12804}
12805
12806/// Postconditions for equation `no_overlap_invariant`.
12807/// Call before return: `contract_post_no_overlap_invariant!(result_expr)`
12808macro_rules! contract_post_no_overlap_invariant {
12809    ($result:expr) => {{
12810        let _contract_result = &$result;
12811    }};
12812}
12813
12814/// Combined pre+post contract for equation `no_overlap_invariant`.
12815macro_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
12824/// Preconditions for equation `tensor_offset_bounds`.
12825/// Call at function entry: `contract_pre_tensor_offset_bounds!(input_expr)`
12826macro_rules! contract_pre_tensor_offset_bounds {
12827    () => {{}};
12828    ($input:expr) => {{
12829        let _contract_input = &$input;
12830    }};
12831}
12832
12833/// Postconditions for equation `tensor_offset_bounds`.
12834/// Call before return: `contract_post_tensor_offset_bounds!(result_expr)`
12835macro_rules! contract_post_tensor_offset_bounds {
12836    ($result:expr) => {{
12837        let _contract_result = &$result;
12838    }};
12839}
12840
12841/// Combined pre+post contract for equation `tensor_offset_bounds`.
12842macro_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
12851// Auto-generated from contracts/safety-classifier-v1.yaml — DO NOT EDIT
12852// Contract: safety-classifier-v1
12853
12854/// Preconditions for equation `classify_filesystem`.
12855/// Domain-specific. Call: `contract_pre_classify_filesystem!(slice_expr)`
12856macro_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
12871/// Preconditions for equation `classify_injection`.
12872/// Domain-specific. Call: `contract_pre_classify_injection!(slice_expr)`
12873macro_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
12888/// Preconditions for equation `classify_secrets`.
12889/// Domain-specific. Call: `contract_pre_classify_secrets!(slice_expr)`
12890macro_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
12905/// Preconditions for equation `lint_shell`.
12906/// Call at function entry: `contract_pre_lint_shell!(input_expr)`
12907macro_rules! contract_pre_lint_shell {
12908    () => {{}};
12909    ($input:expr) => {{
12910        let _contract_input = &$input;
12911    }};
12912}
12913
12914// Auto-generated from contracts/sampling-algorithms-v1.yaml — DO NOT EDIT
12915// Contract: sampling-algorithms-v1
12916
12917/// Preconditions for equation `greedy`.
12918/// Domain-specific. Call: `contract_pre_greedy!(slice_expr)`
12919macro_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
12930/// Preconditions for equation `temperature`.
12931/// Domain-specific. Call: `contract_pre_temperature!(slice_expr)`
12932macro_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
12943/// Preconditions for equation `top_k`.
12944/// Domain-specific. Call: `contract_pre_top_k!(slice_expr)`
12945macro_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
12956/// Preconditions for equation `top_p`.
12957/// Domain-specific. Call: `contract_pre_top_p!(slice_expr)`
12958macro_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
12969// Auto-generated from contracts/sandbox-isolation-v1.yaml — DO NOT EDIT
12970// Contract: sandbox-isolation-v1
12971
12972/// Preconditions for equation `filesystem_isolation`.
12973/// Domain-specific. Call: `contract_pre_filesystem_isolation!(slice_expr)`
12974macro_rules! contract_pre_filesystem_isolation {
12975    () => {{}};
12976    ($input:expr) => {{
12977        let _pv_config = &$input;
12978    }};
12979}
12980
12981/// Preconditions for equation `network_isolation`.
12982/// Domain-specific. Call: `contract_pre_network_isolation!(slice_expr)`
12983macro_rules! contract_pre_network_isolation {
12984    () => {{}};
12985    ($input:expr) => {{
12986        let _pv_config = &$input;
12987    }};
12988}
12989
12990/// Preconditions for equation `overlay_capture`.
12991/// Domain-specific. Call: `contract_pre_overlay_capture!(slice_expr)`
12992macro_rules! contract_pre_overlay_capture {
12993    () => {{}};
12994    ($input:expr) => {{
12995        let _pv_overlay = &$input;
12996    }};
12997}
12998
12999// Auto-generated from contracts/score-composite-v1.yaml — DO NOT EDIT
13000// Contract: score-composite-v1
13001
13002/// Preconditions for equation `geometric_mean`.
13003/// Domain-specific. Call: `contract_pre_geometric_mean!(slice_expr)`
13004macro_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
13019/// Postconditions for equation `geometric_mean`.
13020/// Call before return: `contract_post_geometric_mean!(result_expr)`
13021macro_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
13031/// Combined pre+post contract for equation `geometric_mean`.
13032macro_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
13041/// Preconditions for equation `grade_from_score`.
13042/// Domain-specific. Call: `contract_pre_grade_from_score!(slice_expr)`
13043macro_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
13054/// Postconditions for equation `grade_from_score`.
13055/// Call before return: `contract_post_grade_from_score!(result_expr)`
13056macro_rules! contract_post_grade_from_score {
13057    ($result:expr) => {{
13058        let _contract_result = &$result;
13059    }};
13060}
13061
13062/// Combined pre+post contract for equation `grade_from_score`.
13063macro_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
13072// Auto-generated from contracts/secret-provider-v1.yaml — DO NOT EDIT
13073// Contract: secret-provider-v1
13074
13075/// Preconditions for equation `drift_detection`.
13076/// Call at function entry: `contract_pre_drift_detection!(input_expr)`
13077macro_rules! contract_pre_drift_detection {
13078    () => {{}};
13079    ($input:expr) => {{
13080        let _contract_input = &$input;
13081    }};
13082}
13083
13084/// Preconditions for equation `ephemeral_cleanup`.
13085/// Domain-specific. Call: `contract_pre_ephemeral_cleanup!(slice_expr)`
13086macro_rules! contract_pre_ephemeral_cleanup {
13087    () => {{}};
13088    ($input:expr) => {{
13089        let _pv_secret = &$input;
13090    }};
13091}
13092
13093/// Preconditions for equation `provider_dispatch`.
13094/// Domain-specific. Call: `contract_pre_provider_dispatch!(slice_expr)`
13095macro_rules! contract_pre_provider_dispatch {
13096    () => {{}};
13097    ($input:expr) => {{
13098        let _pv_ref = &$input;
13099    }};
13100}
13101
13102// Auto-generated from contracts/semantic-equivalence-v1.yaml — DO NOT EDIT
13103// Contract: semantic-equivalence-v1
13104
13105/// Preconditions for equation `comprehension_equivalence`.
13106/// Domain-specific. Call: `contract_pre_comprehension_equivalence!(slice_expr)`
13107macro_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
13118/// Preconditions for equation `control_flow_equivalence`.
13119/// Domain-specific. Call: `contract_pre_control_flow_equivalence!(slice_expr)`
13120macro_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
13131/// Preconditions for equation `expression_equivalence`.
13132/// Domain-specific. Call: `contract_pre_expression_equivalence!(slice_expr)`
13133macro_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
13144/// Preconditions for equation `observational_equivalence`.
13145/// Domain-specific. Call: `contract_pre_observational_equivalence!(slice_expr)`
13146macro_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
13157/// Preconditions for equation `statement_equivalence`.
13158/// Domain-specific. Call: `contract_pre_statement_equivalence!(slice_expr)`
13159macro_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
13170// Auto-generated from contracts/serialization-v1.yaml — DO NOT EDIT
13171// Contract: serialization-v1
13172
13173/// Preconditions for equation `deserialize`.
13174/// Domain-specific. Call: `contract_pre_deserialize!(slice_expr)`
13175macro_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
13186/// Preconditions for equation `serialize`.
13187/// Call at function entry: `contract_pre_serialize!(input_expr)`
13188macro_rules! contract_pre_serialize {
13189    () => {{}};
13190    ($input:expr) => {{
13191        let _contract_input = &$input;
13192    }};
13193}
13194
13195// Auto-generated from contracts/serialization-v1.yaml — DO NOT EDIT
13196// Contract: serialization-v1
13197
13198/// Preconditions for equation `serialization`.
13199/// Domain-specific. Call: `contract_pre_serialization!(slice_expr)`
13200macro_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
13215// Auto-generated from contracts/session-v1.yaml — DO NOT EDIT
13216// Contract: session-v1
13217
13218/// Preconditions for equation `age_filter`.
13219/// Call at function entry: `contract_pre_age_filter!(input_expr)`
13220macro_rules! contract_pre_age_filter {
13221    () => {{}};
13222    ($input:expr) => {{
13223        let _contract_input = &$input;
13224    }};
13225}
13226
13227/// Postconditions for equation `age_filter`.
13228/// Call before return: `contract_post_age_filter!(result_expr)`
13229macro_rules! contract_post_age_filter {
13230    ($result:expr) => {{
13231        let _contract_result = &$result;
13232    }};
13233}
13234
13235/// Combined pre+post contract for equation `age_filter`.
13236macro_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
13245/// Preconditions for equation `append_only`.
13246/// Call at function entry: `contract_pre_append_only!(input_expr)`
13247macro_rules! contract_pre_append_only {
13248    () => {{}};
13249    ($input:expr) => {{
13250        let _contract_input = &$input;
13251    }};
13252}
13253
13254/// Postconditions for equation `append_only`.
13255/// Call before return: `contract_post_append_only!(result_expr)`
13256macro_rules! contract_post_append_only {
13257    ($result:expr) => {{
13258        let _contract_result = &$result;
13259    }};
13260}
13261
13262/// Combined pre+post contract for equation `append_only`.
13263macro_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
13272/// Preconditions for equation `jsonl_roundtrip`.
13273/// Domain-specific. Call: `contract_pre_jsonl_roundtrip!(slice_expr)`
13274macro_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
13285/// Postconditions for equation `jsonl_roundtrip`.
13286/// Call before return: `contract_post_jsonl_roundtrip!(result_expr)`
13287macro_rules! contract_post_jsonl_roundtrip {
13288    ($result:expr) => {{
13289        let _contract_result = &$result;
13290    }};
13291}
13292
13293/// Combined pre+post contract for equation `jsonl_roundtrip`.
13294macro_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
13303/// Preconditions for equation `manifest_serde`.
13304/// Domain-specific. Call: `contract_pre_manifest_serde!(slice_expr)`
13305macro_rules! contract_pre_manifest_serde {
13306    () => {{}};
13307    ($input:expr) => {{
13308        let _pv_manifest = &$input;
13309    }};
13310}
13311
13312/// Postconditions for equation `manifest_serde`.
13313/// Call before return: `contract_post_manifest_serde!(result_expr)`
13314macro_rules! contract_post_manifest_serde {
13315    ($result:expr) => {{
13316        let _contract_result = &$result;
13317    }};
13318}
13319
13320/// Combined pre+post contract for equation `manifest_serde`.
13321macro_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
13330// Auto-generated from contracts/shannon-entropy-v1.yaml — DO NOT EDIT
13331// Contract: shannon-entropy-v1
13332
13333/// Preconditions for equation `entropy`.
13334/// Domain-specific. Call: `contract_pre_entropy!(slice_expr)`
13335macro_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
13350/// Preconditions for equation `uniform_entropy`.
13351/// Domain-specific. Call: `contract_pre_uniform_entropy!(slice_expr)`
13352macro_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
13363// Auto-generated from contracts/shell-execution-v1.yaml — DO NOT EDIT
13364// Contract: shell-execution-v1
13365
13366/// Preconditions for equation `config_validation`.
13367/// Call at function entry: `contract_pre_config_validation!(input_expr)`
13368macro_rules! contract_pre_config_validation {
13369    () => {{}};
13370    ($input:expr) => {{
13371        let _contract_input = &$input;
13372    }};
13373}
13374
13375/// Preconditions for equation `parser_correctness`.
13376/// Domain-specific. Call: `contract_pre_parser_correctness!(slice_expr)`
13377macro_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
13388/// Preconditions for equation `startup_budget`.
13389/// Call at function entry: `contract_pre_startup_budget!(input_expr)`
13390macro_rules! contract_pre_startup_budget {
13391    () => {{}};
13392    ($input:expr) => {{
13393        let _contract_input = &$input;
13394    }};
13395}
13396
13397// Auto-generated from contracts/silu-kernel-v1.yaml — DO NOT EDIT
13398// Contract: silu-kernel-v1
13399
13400/// Preconditions for equation `sigmoid`.
13401/// Domain-specific. Call: `contract_pre_sigmoid!(slice_expr)`
13402macro_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
13414/// Preconditions for equation `silu`.
13415/// Domain-specific. Call: `contract_pre_silu!(slice_expr)`
13416macro_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
13428// Auto-generated from contracts/simulation-determinism-v1.yaml — DO NOT EDIT
13429// Contract: simulation-determinism-v1
13430
13431/// Preconditions for equation `audit_trail`.
13432/// Call at function entry: `contract_pre_audit_trail!(input_expr)`
13433macro_rules! contract_pre_audit_trail {
13434    () => {{}};
13435    ($input:expr) => {{
13436        let _contract_input = &$input;
13437    }};
13438}
13439
13440/// Preconditions for equation `step_determinism`.
13441/// Domain-specific. Call: `contract_pre_step_determinism!(slice_expr)`
13442macro_rules! contract_pre_step_determinism {
13443    () => {{}};
13444    ($input:expr) => {{
13445        let _pv_x = &$input;
13446    }};
13447}
13448
13449/// Preconditions for equation `time_advancement`.
13450/// Domain-specific. Call: `contract_pre_time_advancement!(slice_expr)`
13451macro_rules! contract_pre_time_advancement {
13452    () => {{}};
13453    ($input:expr) => {{
13454        let _pv_x = &$input;
13455    }};
13456}
13457
13458// Auto-generated from contracts/simulation-step-v1.yaml — DO NOT EDIT
13459// Contract: simulation-step-v1
13460
13461/// Preconditions for equation `audit_completeness`.
13462/// Call at function entry: `contract_pre_audit_completeness!(input_expr)`
13463macro_rules! contract_pre_audit_completeness {
13464    () => {{}};
13465    ($input:expr) => {{
13466        let _contract_input = &$input;
13467    }};
13468}
13469
13470/// Preconditions for equation `simulate_convergence`.
13471/// Domain-specific. Call: `contract_pre_simulate_convergence!(slice_expr)`
13472macro_rules! contract_pre_simulate_convergence {
13473    () => {{}};
13474    ($input:expr) => {{
13475        let _pv_params = &$input;
13476    }};
13477}
13478
13479/// Preconditions for equation `step_monotonicity`.
13480/// Domain-specific. Call: `contract_pre_step_monotonicity!(slice_expr)`
13481macro_rules! contract_pre_step_monotonicity {
13482    () => {{}};
13483    ($input:expr) => {{
13484        let _pv_x = &$input;
13485    }};
13486}
13487
13488// Auto-generated from contracts/sliding-window-attention-v1.yaml — DO NOT EDIT
13489// Contract: sliding-window-attention-v1
13490
13491/// Preconditions for equation `attention_sparsity`.
13492/// Domain-specific. Call: `contract_pre_attention_sparsity!(slice_expr)`
13493macro_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
13504/// Preconditions for equation `causal_window_mask`.
13505/// Domain-specific. Call: `contract_pre_causal_window_mask!(slice_expr)`
13506macro_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
13517/// Preconditions for equation `effective_context`.
13518/// Domain-specific. Call: `contract_pre_effective_context!(slice_expr)`
13519macro_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
13530/// Preconditions for equation `multi_layer_receptive_field`.
13531/// Domain-specific. Call: `contract_pre_multi_layer_receptive_field!(slice_expr)`
13532macro_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
13543/// Preconditions for equation `window_mask`.
13544/// Domain-specific. Call: `contract_pre_window_mask!(slice_expr)`
13545macro_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
13554// Auto-generated from contracts/softmax-kernel-v1.yaml — DO NOT EDIT
13555// Contract: softmax-kernel-v1
13556
13557/// Preconditions for equation `softmax`.
13558/// Domain-specific. Call: `contract_pre_softmax!(slice_expr)`
13559macro_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
13571/// Postconditions for equation `softmax`.
13572/// Call before return: `contract_post_softmax!(result_expr)`
13573macro_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
13581/// Combined pre+post contract for equation `softmax`.
13582macro_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
13591// Auto-generated from contracts/sovereign-tensor-v1.yaml — DO NOT EDIT
13592// Contract: sovereign-tensor-v1
13593
13594// Auto-generated from contracts/special-tokens-registry-v1.yaml — DO NOT EDIT
13595// Contract: special-tokens-registry-v1
13596
13597/// Preconditions for equation `token_bounds`.
13598/// Domain-specific. Call: `contract_pre_token_bounds!(slice_expr)`
13599macro_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
13610// Auto-generated from contracts/speculative-decoding-v1.yaml — DO NOT EDIT
13611// Contract: speculative-decoding-v1
13612
13613/// Preconditions for equation `acceptance_probability`.
13614/// Domain-specific. Call: `contract_pre_acceptance_probability!(slice_expr)`
13615macro_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
13626/// Preconditions for equation `output_equivalence`.
13627/// Domain-specific. Call: `contract_pre_output_equivalence!(slice_expr)`
13628macro_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
13639/// Preconditions for equation `token_acceptance`.
13640/// Domain-specific. Call: `contract_pre_token_acceptance!(slice_expr)`
13641macro_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
13652// Auto-generated from contracts/ssm-kernel-v1.yaml — DO NOT EDIT
13653// Contract: ssm-kernel-v1
13654
13655/// Preconditions for equation `selective_gate`.
13656/// Domain-specific. Call: `contract_pre_selective_gate!(slice_expr)`
13657macro_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
13672/// Preconditions for equation `ssm_discretize`.
13673/// Domain-specific. Call: `contract_pre_ssm_discretize!(slice_expr)`
13674macro_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
13689/// Preconditions for equation `ssm_scan`.
13690/// Domain-specific. Call: `contract_pre_ssm_scan!(slice_expr)`
13691macro_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
13706// Auto-generated from contracts/state-machine-v1.yaml — DO NOT EDIT
13707// Contract: state-machine-v1
13708
13709/// Preconditions for equation `event_store_append_only`.
13710/// Call at function entry: `contract_pre_event_store_append_only!(input_expr)`
13711macro_rules! contract_pre_event_store_append_only {
13712    () => {{}};
13713    ($input:expr) => {{
13714        let _contract_input = &$input;
13715    }};
13716}
13717
13718/// Postconditions for equation `event_store_append_only`.
13719/// Call before return: `contract_post_event_store_append_only!(result_expr)`
13720macro_rules! contract_post_event_store_append_only {
13721    ($result:expr) => {{
13722        let _contract_result = &$result;
13723    }};
13724}
13725
13726/// Combined pre+post contract for equation `event_store_append_only`.
13727macro_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
13736/// Preconditions for equation `refactor_transitions`.
13737/// Call at function entry: `contract_pre_refactor_transitions!(input_expr)`
13738macro_rules! contract_pre_refactor_transitions {
13739    () => {{}};
13740    ($input:expr) => {{
13741        let _contract_input = &$input;
13742    }};
13743}
13744
13745/// Postconditions for equation `refactor_transitions`.
13746/// Call before return: `contract_post_refactor_transitions!(result_expr)`
13747macro_rules! contract_post_refactor_transitions {
13748    ($result:expr) => {{
13749        let _contract_result = &$result;
13750    }};
13751}
13752
13753/// Combined pre+post contract for equation `refactor_transitions`.
13754macro_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
13763/// Preconditions for equation `snapshot_recovery`.
13764/// Call at function entry: `contract_pre_snapshot_recovery!(input_expr)`
13765macro_rules! contract_pre_snapshot_recovery {
13766    () => {{}};
13767    ($input:expr) => {{
13768        let _contract_input = &$input;
13769    }};
13770}
13771
13772/// Postconditions for equation `snapshot_recovery`.
13773/// Call before return: `contract_post_snapshot_recovery!(result_expr)`
13774macro_rules! contract_post_snapshot_recovery {
13775    ($result:expr) => {{
13776        let _contract_result = &$result;
13777    }};
13778}
13779
13780/// Combined pre+post contract for equation `snapshot_recovery`.
13781macro_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
13790// Auto-generated from contracts/store-cas-v1.yaml — DO NOT EDIT
13791// Contract: store-cas-v1
13792
13793/// Preconditions for equation `closure_completeness`.
13794/// Domain-specific. Call: `contract_pre_closure_completeness!(slice_expr)`
13795macro_rules! contract_pre_closure_completeness {
13796    () => {{}};
13797    ($input:expr) => {{
13798        let _pv_entry = &$input;
13799    }};
13800}
13801
13802/// Preconditions for equation `derivation_determinism`.
13803/// Domain-specific. Call: `contract_pre_derivation_determinism!(slice_expr)`
13804macro_rules! contract_pre_derivation_determinism {
13805    () => {{}};
13806    ($input:expr) => {{
13807        let _pv_d = &$input;
13808    }};
13809}
13810
13811/// Preconditions for equation `far_archive_roundtrip`.
13812/// Domain-specific. Call: `contract_pre_far_archive_roundtrip!(slice_expr)`
13813macro_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
13824/// Preconditions for equation `gc_safety`.
13825/// Domain-specific. Call: `contract_pre_gc_safety!(slice_expr)`
13826macro_rules! contract_pre_gc_safety {
13827    () => {{}};
13828    ($input:expr) => {{
13829        let _pv_x = &$input;
13830    }};
13831}
13832
13833/// Preconditions for equation `purity_monotonicity`.
13834/// Domain-specific. Call: `contract_pre_purity_monotonicity!(slice_expr)`
13835macro_rules! contract_pre_purity_monotonicity {
13836    () => {{}};
13837    ($input:expr) => {{
13838        let _pv_d = &$input;
13839    }};
13840}
13841
13842// Auto-generated from contracts/streaming-tpot-v1.yaml — DO NOT EDIT
13843// Contract: streaming-tpot-v1
13844
13845/// Preconditions for equation `tpot_definition`.
13846/// Domain-specific. Call: `contract_pre_tpot_definition!(slice_expr)`
13847macro_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
13858// Auto-generated from contracts/svm-v1.yaml — DO NOT EDIT
13859// Contract: svm-v1
13860
13861/// Preconditions for equation `decision_function`.
13862/// Domain-specific. Call: `contract_pre_decision_function!(slice_expr)`
13863macro_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
13874/// Preconditions for equation `hinge_loss`.
13875/// Domain-specific. Call: `contract_pre_hinge_loss!(slice_expr)`
13876macro_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
13887/// Preconditions for equation `margin`.
13888/// Domain-specific. Call: `contract_pre_margin!(slice_expr)`
13889macro_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
13904/// Preconditions for equation `svm_predict`.
13905/// Domain-specific. Call: `contract_pre_svm_predict!(slice_expr)`
13906macro_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
13921// Auto-generated from contracts/swiglu-kernel-v1.yaml — DO NOT EDIT
13922// Contract: swiglu-kernel-v1
13923
13924/// Preconditions for equation `silu`.
13925/// Domain-specific. Call: `contract_pre_silu!(slice_expr)`
13926macro_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
13938/// Preconditions for equation `swiglu`.
13939/// Domain-specific. Call: `contract_pre_swiglu!(slice_expr)`
13940macro_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
13952/// Postconditions for equation `swiglu`.
13953/// Call before return: `contract_post_swiglu!(result_expr)`
13954macro_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
13964/// Combined pre+post contract for equation `swiglu`.
13965macro_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
13974// Auto-generated from contracts/task-pipeline-v1.yaml — DO NOT EDIT
13975// Contract: task-pipeline-v1
13976
13977/// Preconditions for equation `health_check_retry`.
13978/// Domain-specific. Call: `contract_pre_health_check_retry!(slice_expr)`
13979macro_rules! contract_pre_health_check_retry {
13980    () => {{}};
13981    ($input:expr) => {{
13982        let _pv_hc = &$input;
13983    }};
13984}
13985
13986/// Preconditions for equation `pipeline_dag_execution`.
13987/// Domain-specific. Call: `contract_pre_pipeline_dag_execution!(slice_expr)`
13988macro_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
13999/// Preconditions for equation `quality_gate_enforcement`.
14000/// Domain-specific. Call: `contract_pre_quality_gate_enforcement!(slice_expr)`
14001macro_rules! contract_pre_quality_gate_enforcement {
14002    () => {{}};
14003    ($input:expr) => {{
14004        let _pv_gate = &$input;
14005    }};
14006}
14007
14008/// Preconditions for equation `task_status_terminal`.
14009/// Call at function entry: `contract_pre_task_status_terminal!(input_expr)`
14010macro_rules! contract_pre_task_status_terminal {
14011    () => {{}};
14012    ($input:expr) => {{
14013        let _contract_input = &$input;
14014    }};
14015}
14016
14017// Auto-generated from contracts/tdg-scoring-v1.yaml — DO NOT EDIT
14018// Contract: tdg-scoring-v1
14019
14020/// Preconditions for equation `calculate_tdg`.
14021/// Call at function entry: `contract_pre_calculate_tdg!(input_expr)`
14022macro_rules! contract_pre_calculate_tdg {
14023    () => {{}};
14024    ($input:expr) => {{
14025        let _contract_input = &$input;
14026    }};
14027}
14028
14029/// Postconditions for equation `calculate_tdg`.
14030/// Call before return: `contract_post_calculate_tdg!(result_expr)`
14031macro_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
14041/// Combined pre+post contract for equation `calculate_tdg`.
14042macro_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
14051/// Preconditions for equation `letter_grade`.
14052/// Domain-specific. Call: `contract_pre_letter_grade!(slice_expr)`
14053macro_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
14064/// Postconditions for equation `letter_grade`.
14065/// Call before return: `contract_post_letter_grade!(result_expr)`
14066macro_rules! contract_post_letter_grade {
14067    ($result:expr) => {{
14068        let _contract_result = &$result;
14069    }};
14070}
14071
14072/// Combined pre+post contract for equation `letter_grade`.
14073macro_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
14082// Auto-generated from contracts/tensor-inventory-v1.yaml — DO NOT EDIT
14083// Contract: tensor-inventory-v1
14084
14085/// Preconditions for equation `architecture_delta`.
14086/// Domain-specific. Call: `contract_pre_architecture_delta!(slice_expr)`
14087macro_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
14098/// Preconditions for equation `parameter_decomposition`.
14099/// Domain-specific. Call: `contract_pre_parameter_decomposition!(slice_expr)`
14100macro_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
14111/// Preconditions for equation `quantization_bytes`.
14112/// Domain-specific. Call: `contract_pre_quantization_bytes!(slice_expr)`
14113macro_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
14124/// Preconditions for equation `tensor_count`.
14125/// Domain-specific. Call: `contract_pre_tensor_count!(slice_expr)`
14126macro_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
14141/// Preconditions for equation `tied_embeddings`.
14142/// Domain-specific. Call: `contract_pre_tied_embeddings!(slice_expr)`
14143macro_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
14154// Auto-generated from contracts/tensor-layout-v1.yaml — DO NOT EDIT
14155// Contract: tensor-layout-v1
14156
14157/// Preconditions for equation `identity`.
14158/// Domain-specific. Call: `contract_pre_identity!(slice_expr)`
14159macro_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
14167/// Preconditions for equation `quant_dispatch_exhaustiveness`.
14168/// Call at function entry: `contract_pre_quant_dispatch_exhaustiveness!(input_expr)`
14169macro_rules! contract_pre_quant_dispatch_exhaustiveness {
14170    () => {{}};
14171    ($input:expr) => {{
14172        let _contract_input = &$input;
14173    }};
14174}
14175
14176/// Preconditions for equation `transpose_invariant`.
14177/// Call at function entry: `contract_pre_transpose_invariant!(input_expr)`
14178macro_rules! contract_pre_transpose_invariant {
14179    () => {{}};
14180    ($input:expr) => {{
14181        let _contract_input = &$input;
14182    }};
14183}
14184
14185/// Preconditions for equation `validated_tensor_construction`.
14186/// Domain-specific. Call: `contract_pre_validated_tensor_construction!(slice_expr)`
14187macro_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
14198// Auto-generated from contracts/tensor-names-v1.yaml — DO NOT EDIT
14199// Contract: tensor-names-v1
14200
14201/// Preconditions for equation `architecture_normalization`.
14202/// Domain-specific. Call: `contract_pre_architecture_normalization!(slice_expr)`
14203macro_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
14214/// Preconditions for equation `name_resolution`.
14215/// Domain-specific. Call: `contract_pre_name_resolution!(slice_expr)`
14216macro_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
14227// Auto-generated from contracts/tensor-rc-data-v1.yaml — DO NOT EDIT
14228// Contract: tensor-rc-data-v1
14229
14230/// Preconditions for equation `identity`.
14231/// Domain-specific. Call: `contract_pre_identity!(slice_expr)`
14232macro_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
14240// Auto-generated from contracts/tensor-shape-flow-v1.yaml — DO NOT EDIT
14241// Contract: tensor-shape-flow-v1
14242
14243/// Preconditions for equation `gqa_grouping`.
14244/// Domain-specific. Call: `contract_pre_gqa_grouping!(slice_expr)`
14245macro_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
14256/// Preconditions for equation `lm_head`.
14257/// Domain-specific. Call: `contract_pre_lm_head!(slice_expr)`
14258macro_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
14273/// Preconditions for equation `qkv_projection`.
14274/// Domain-specific. Call: `contract_pre_qkv_projection!(slice_expr)`
14275macro_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
14290/// Preconditions for equation `residual`.
14291/// Domain-specific. Call: `contract_pre_residual!(slice_expr)`
14292macro_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
14307/// Preconditions for equation `swiglu_shape`.
14308/// Domain-specific. Call: `contract_pre_swiglu_shape!(slice_expr)`
14309macro_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
14324// Auto-generated from contracts/threading-safety-v1.yaml — DO NOT EDIT
14325// Contract: threading-safety-v1
14326
14327/// Preconditions for equation `lock_order_invariant`.
14328/// Call at function entry: `contract_pre_lock_order_invariant!(input_expr)`
14329macro_rules! contract_pre_lock_order_invariant {
14330    () => {{}};
14331    ($input:expr) => {{
14332        let _contract_input = &$input;
14333    }};
14334}
14335
14336/// Postconditions for equation `lock_order_invariant`.
14337/// Call before return: `contract_post_lock_order_invariant!(result_expr)`
14338macro_rules! contract_post_lock_order_invariant {
14339    ($result:expr) => {{
14340        let _contract_result = &$result;
14341    }};
14342}
14343
14344/// Combined pre+post contract for equation `lock_order_invariant`.
14345macro_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
14354/// Preconditions for equation `race_freedom`.
14355/// Call at function entry: `contract_pre_race_freedom!(input_expr)`
14356macro_rules! contract_pre_race_freedom {
14357    () => {{}};
14358    ($input:expr) => {{
14359        let _contract_input = &$input;
14360    }};
14361}
14362
14363/// Postconditions for equation `race_freedom`.
14364/// Call before return: `contract_post_race_freedom!(result_expr)`
14365macro_rules! contract_post_race_freedom {
14366    ($result:expr) => {{
14367        let _contract_result = &$result;
14368    }};
14369}
14370
14371/// Combined pre+post contract for equation `race_freedom`.
14372macro_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
14381// Auto-generated from contracts/tied-embeddings-v1.yaml — DO NOT EDIT
14382// Contract: tied-embeddings-v1
14383
14384/// Preconditions for equation `tied_lm_head`.
14385/// Domain-specific. Call: `contract_pre_tied_lm_head!(slice_expr)`
14386macro_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
14397// Auto-generated from contracts/tiled-matmul-shader-v1.yaml — DO NOT EDIT
14398// Contract: tiled-matmul-shader-v1
14399
14400/// Preconditions for equation `identity`.
14401/// Domain-specific. Call: `contract_pre_identity!(slice_expr)`
14402macro_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
14410// Auto-generated from contracts/tokenizer-loading-v1.yaml — DO NOT EDIT
14411// Contract: tokenizer-loading-v1
14412
14413/// Preconditions for equation `byte_encoder_coverage`.
14414/// Call at function entry: `contract_pre_byte_encoder_coverage!(input_expr)`
14415macro_rules! contract_pre_byte_encoder_coverage {
14416    () => {{}};
14417    ($input:expr) => {{
14418        let _contract_input = &$input;
14419    }};
14420}
14421
14422/// Preconditions for equation `identity`.
14423/// Call at function entry: `contract_pre_identity!(input_expr)`
14424macro_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
14435/// Preconditions for equation `roundtrip_encoding`.
14436/// Call at function entry: `contract_pre_roundtrip_encoding!(input_expr)`
14437macro_rules! contract_pre_roundtrip_encoding {
14438    () => {{}};
14439    ($input:expr) => {{
14440        let _contract_input = &$input;
14441    }};
14442}
14443
14444// Auto-generated from contracts/tokenizer-v1.yaml — DO NOT EDIT
14445// Contract: tokenizer-v1
14446
14447/// Preconditions for equation `deterministic_encode`.
14448/// Call at function entry: `contract_pre_deterministic_encode!(input_expr)`
14449macro_rules! contract_pre_deterministic_encode {
14450    () => {{}};
14451    ($input:expr) => {{
14452        let _contract_input = &$input;
14453    }};
14454}
14455
14456/// Postconditions for equation `deterministic_encode`.
14457/// Call before return: `contract_post_deterministic_encode!(result_expr)`
14458macro_rules! contract_post_deterministic_encode {
14459    ($result:expr) => {{
14460        let _contract_result = &$result;
14461    }};
14462}
14463
14464/// Combined pre+post contract for equation `deterministic_encode`.
14465macro_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
14474/// Preconditions for equation `empty_input`.
14475/// Call at function entry: `contract_pre_empty_input!(input_expr)`
14476macro_rules! contract_pre_empty_input {
14477    () => {{}};
14478    ($input:expr) => {{
14479        let _contract_input = &$input;
14480    }};
14481}
14482
14483/// Postconditions for equation `empty_input`.
14484/// Call before return: `contract_post_empty_input!(result_expr)`
14485macro_rules! contract_post_empty_input {
14486    ($result:expr) => {{
14487        let _contract_result = &$result;
14488    }};
14489}
14490
14491/// Combined pre+post contract for equation `empty_input`.
14492macro_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
14501/// Preconditions for equation `roundtrip`.
14502/// Call at function entry: `contract_pre_roundtrip!(input_expr)`
14503macro_rules! contract_pre_roundtrip {
14504    () => {{}};
14505    ($input:expr) => {{
14506        let _contract_input = &$input;
14507    }};
14508}
14509
14510/// Postconditions for equation `roundtrip`.
14511/// Call before return: `contract_post_roundtrip!(result_expr)`
14512macro_rules! contract_post_roundtrip {
14513    ($result:expr) => {{
14514        let _contract_result = &$result;
14515    }};
14516}
14517
14518/// Combined pre+post contract for equation `roundtrip`.
14519macro_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
14528/// Preconditions for equation `thread_safety`.
14529/// Call at function entry: `contract_pre_thread_safety!(input_expr)`
14530macro_rules! contract_pre_thread_safety {
14531    () => {{}};
14532    ($input:expr) => {{
14533        let _contract_input = &$input;
14534    }};
14535}
14536
14537/// Postconditions for equation `thread_safety`.
14538/// Call before return: `contract_post_thread_safety!(result_expr)`
14539macro_rules! contract_post_thread_safety {
14540    ($result:expr) => {{
14541        let _contract_result = &$result;
14542    }};
14543}
14544
14545/// Combined pre+post contract for equation `thread_safety`.
14546macro_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
14555/// Preconditions for equation `vocab_size_bound`.
14556/// Call at function entry: `contract_pre_vocab_size_bound!(input_expr)`
14557macro_rules! contract_pre_vocab_size_bound {
14558    () => {{}};
14559    ($input:expr) => {{
14560        let _contract_input = &$input;
14561    }};
14562}
14563
14564/// Postconditions for equation `vocab_size_bound`.
14565/// Call before return: `contract_post_vocab_size_bound!(result_expr)`
14566macro_rules! contract_post_vocab_size_bound {
14567    ($result:expr) => {{
14568        let _contract_result = &$result;
14569    }};
14570}
14571
14572/// Combined pre+post contract for equation `vocab_size_bound`.
14573macro_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
14582// Auto-generated from contracts/trace-integrity-v1.yaml — DO NOT EDIT
14583// Contract: trace-integrity-v1
14584
14585/// Preconditions for equation `otel_format`.
14586/// Call at function entry: `contract_pre_otel_format!(input_expr)`
14587macro_rules! contract_pre_otel_format {
14588    () => {{}};
14589    ($input:expr) => {{
14590        let _contract_input = &$input;
14591    }};
14592}
14593
14594/// Preconditions for equation `trace_capture`.
14595/// Call at function entry: `contract_pre_trace_capture!(input_expr)`
14596macro_rules! contract_pre_trace_capture {
14597    () => {{}};
14598    ($input:expr) => {{
14599        let _contract_input = &$input;
14600    }};
14601}
14602
14603/// Preconditions for equation `trace_comparison`.
14604/// Domain-specific. Call: `contract_pre_trace_comparison!(slice_expr)`
14605macro_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
14616// Auto-generated from contracts/tracing-observability-v1.yaml — DO NOT EDIT
14617// Contract: tracing-observability-v1
14618
14619/// Preconditions for equation `metric_monotonicity`.
14620/// Call at function entry: `contract_pre_metric_monotonicity!(input_expr)`
14621macro_rules! contract_pre_metric_monotonicity {
14622    () => {{}};
14623    ($input:expr) => {{
14624        let _contract_input = &$input;
14625    }};
14626}
14627
14628/// Postconditions for equation `metric_monotonicity`.
14629/// Call before return: `contract_post_metric_monotonicity!(result_expr)`
14630macro_rules! contract_post_metric_monotonicity {
14631    ($result:expr) => {{
14632        let _contract_result = &$result;
14633    }};
14634}
14635
14636/// Combined pre+post contract for equation `metric_monotonicity`.
14637macro_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
14646/// Preconditions for equation `renacer_backward_compat`.
14647/// Call at function entry: `contract_pre_renacer_backward_compat!(input_expr)`
14648macro_rules! contract_pre_renacer_backward_compat {
14649    () => {{}};
14650    ($input:expr) => {{
14651        let _contract_input = &$input;
14652    }};
14653}
14654
14655/// Postconditions for equation `renacer_backward_compat`.
14656/// Call before return: `contract_post_renacer_backward_compat!(result_expr)`
14657macro_rules! contract_post_renacer_backward_compat {
14658    ($result:expr) => {{
14659        let _contract_result = &$result;
14660    }};
14661}
14662
14663/// Combined pre+post contract for equation `renacer_backward_compat`.
14664macro_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
14673/// Preconditions for equation `span_parentage`.
14674/// Call at function entry: `contract_pre_span_parentage!(input_expr)`
14675macro_rules! contract_pre_span_parentage {
14676    () => {{}};
14677    ($input:expr) => {{
14678        let _contract_input = &$input;
14679    }};
14680}
14681
14682/// Postconditions for equation `span_parentage`.
14683/// Call before return: `contract_post_span_parentage!(result_expr)`
14684macro_rules! contract_post_span_parentage {
14685    ($result:expr) => {{
14686        let _contract_result = &$result;
14687    }};
14688}
14689
14690/// Combined pre+post contract for equation `span_parentage`.
14691macro_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
14700// Auto-generated from contracts/training-loop-v1.yaml — DO NOT EDIT
14701// Contract: training-loop-v1
14702
14703/// Preconditions for equation `ema_loss`.
14704/// Domain-specific. Call: `contract_pre_ema_loss!(slice_expr)`
14705macro_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
14716/// Preconditions for equation `val_split`.
14717/// Domain-specific. Call: `contract_pre_val_split!(slice_expr)`
14718macro_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
14733/// Preconditions for equation `warmup_lr`.
14734/// Domain-specific. Call: `contract_pre_warmup_lr!(slice_expr)`
14735macro_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
14746// Auto-generated from contracts/transpile-pipeline-v1.yaml — DO NOT EDIT
14747// Contract: transpile-pipeline-v1
14748
14749/// Preconditions for equation `parse_soundness`.
14750/// Call at function entry: `contract_pre_parse_soundness!(input_expr)`
14751macro_rules! contract_pre_parse_soundness {
14752    () => {{}};
14753    ($input:expr) => {{
14754        let _contract_input = &$input;
14755    }};
14756}
14757
14758/// Preconditions for equation `transpile_determinism`.
14759/// Call at function entry: `contract_pre_transpile_determinism!(input_expr)`
14760macro_rules! contract_pre_transpile_determinism {
14761    () => {{}};
14762    ($input:expr) => {{
14763        let _contract_input = &$input;
14764    }};
14765}
14766
14767/// Preconditions for equation `type_preservation`.
14768/// Call at function entry: `contract_pre_type_preservation!(input_expr)`
14769macro_rules! contract_pre_type_preservation {
14770    () => {{}};
14771    ($input:expr) => {{
14772        let _contract_input = &$input;
14773    }};
14774}
14775
14776// Auto-generated from contracts/transpile-soundness-v1.yaml — DO NOT EDIT
14777// Contract: transpile-soundness-v1
14778
14779/// Preconditions for equation `ast_to_program`.
14780/// Call at function entry: `contract_pre_ast_to_program!(input_expr)`
14781macro_rules! contract_pre_ast_to_program {
14782    () => {{}};
14783    ($input:expr) => {{
14784        let _contract_input = &$input;
14785    }};
14786}
14787
14788/// Preconditions for equation `pipeline_composition`.
14789/// Domain-specific. Call: `contract_pre_pipeline_composition!(slice_expr)`
14790macro_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
14801/// Preconditions for equation `transpile_determinism`.
14802/// Call at function entry: `contract_pre_transpile_determinism!(input_expr)`
14803macro_rules! contract_pre_transpile_determinism {
14804    () => {{}};
14805    ($input:expr) => {{
14806        let _contract_input = &$input;
14807    }};
14808}
14809
14810// Auto-generated from contracts/transpiler-correctness-v1.yaml — DO NOT EDIT
14811// Contract: transpiler-correctness-v1
14812
14813/// Preconditions for equation `semantic_equivalence`.
14814/// Call at function entry: `contract_pre_semantic_equivalence!(input_expr)`
14815macro_rules! contract_pre_semantic_equivalence {
14816    () => {{}};
14817    ($input:expr) => {{
14818        let _contract_input = &$input;
14819    }};
14820}
14821
14822/// Postconditions for equation `semantic_equivalence`.
14823/// Call before return: `contract_post_semantic_equivalence!(result_expr)`
14824macro_rules! contract_post_semantic_equivalence {
14825    ($result:expr) => {{
14826        let _contract_result = &$result;
14827    }};
14828}
14829
14830/// Combined pre+post contract for equation `semantic_equivalence`.
14831macro_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
14840/// Preconditions for equation `transpile_determinism`.
14841/// Call at function entry: `contract_pre_transpile_determinism!(input_expr)`
14842macro_rules! contract_pre_transpile_determinism {
14843    () => {{}};
14844    ($input:expr) => {{
14845        let _contract_input = &$input;
14846    }};
14847}
14848
14849/// Postconditions for equation `transpile_determinism`.
14850/// Call before return: `contract_post_transpile_determinism!(result_expr)`
14851macro_rules! contract_post_transpile_determinism {
14852    ($result:expr) => {{
14853        let _contract_result = &$result;
14854    }};
14855}
14856
14857/// Combined pre+post contract for equation `transpile_determinism`.
14858macro_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
14867/// Preconditions for equation `type_preservation`.
14868/// Call at function entry: `contract_pre_type_preservation!(input_expr)`
14869macro_rules! contract_pre_type_preservation {
14870    () => {{}};
14871    ($input:expr) => {{
14872        let _contract_input = &$input;
14873    }};
14874}
14875
14876/// Postconditions for equation `type_preservation`.
14877/// Call before return: `contract_post_type_preservation!(result_expr)`
14878macro_rules! contract_post_type_preservation {
14879    ($result:expr) => {{
14880        let _contract_result = &$result;
14881    }};
14882}
14883
14884/// Combined pre+post contract for equation `type_preservation`.
14885macro_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
14894// Auto-generated from contracts/transpose-kernel-v1.yaml — DO NOT EDIT
14895// Contract: transpose-kernel-v1
14896
14897/// Preconditions for equation `transpose`.
14898/// Domain-specific. Call: `contract_pre_transpose!(slice_expr)`
14899macro_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
14907// Auto-generated from contracts/tui-lifecycle-v1.yaml — DO NOT EDIT
14908// Contract: tui-lifecycle-v1
14909
14910/// Preconditions for equation `event_dispatch`.
14911/// Call at function entry: `contract_pre_event_dispatch!(input_expr)`
14912macro_rules! contract_pre_event_dispatch {
14913    () => {{}};
14914    ($input:expr) => {{
14915        let _contract_input = &$input;
14916    }};
14917}
14918
14919/// Preconditions for equation `render_cycle_correctness`.
14920/// Domain-specific. Call: `contract_pre_render_cycle_correctness!(slice_expr)`
14921macro_rules! contract_pre_render_cycle_correctness {
14922    () => {{}};
14923    ($input:expr) => {{
14924        let _pv_buffer = &$input;
14925    }};
14926}
14927
14928/// Preconditions for equation `terminal_restore`.
14929/// Call at function entry: `contract_pre_terminal_restore!(input_expr)`
14930macro_rules! contract_pre_terminal_restore {
14931    () => {{}};
14932    ($input:expr) => {{
14933        let _contract_input = &$input;
14934    }};
14935}
14936
14937/// Preconditions for equation `widget_lifecycle`.
14938/// Call at function entry: `contract_pre_widget_lifecycle!(input_expr)`
14939macro_rules! contract_pre_widget_lifecycle {
14940    () => {{}};
14941    ($input:expr) => {{
14942        let _contract_input = &$input;
14943    }};
14944}
14945
14946// Auto-generated from contracts/tui-panels-v1.yaml — DO NOT EDIT
14947// Contract: tui-panels-v1
14948
14949/// Preconditions for equation `adaptive_degradation`.
14950/// Call at function entry: `contract_pre_adaptive_degradation!(input_expr)`
14951macro_rules! contract_pre_adaptive_degradation {
14952    () => {{}};
14953    ($input:expr) => {{
14954        let _contract_input = &$input;
14955    }};
14956}
14957
14958/// Postconditions for equation `adaptive_degradation`.
14959/// Call before return: `contract_post_adaptive_degradation!(result_expr)`
14960macro_rules! contract_post_adaptive_degradation {
14961    ($result:expr) => {{
14962        let _contract_result = &$result;
14963    }};
14964}
14965
14966/// Combined pre+post contract for equation `adaptive_degradation`.
14967macro_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
14976/// Preconditions for equation `brick_budget_enforcement`.
14977/// Domain-specific. Call: `contract_pre_brick_budget_enforcement!(slice_expr)`
14978macro_rules! contract_pre_brick_budget_enforcement {
14979    () => {{}};
14980    ($input:expr) => {{
14981        let _pv_house = &$input;
14982    }};
14983}
14984
14985/// Postconditions for equation `brick_budget_enforcement`.
14986/// Call before return: `contract_post_brick_budget_enforcement!(result_expr)`
14987macro_rules! contract_post_brick_budget_enforcement {
14988    ($result:expr) => {{
14989        let _contract_result = &$result;
14990    }};
14991}
14992
14993/// Combined pre+post contract for equation `brick_budget_enforcement`.
14994macro_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
15003/// Postconditions for equation `cost_display_invariants`.
15004/// Call before return: `contract_post_cost_display_invariants!(result_expr)`
15005macro_rules! contract_post_cost_display_invariants {
15006    ($result:expr) => {{
15007        let _contract_result = &$result;
15008    }};
15009}
15010
15011/// Preconditions for equation `panel_layout_nonoverlap`.
15012/// Domain-specific. Call: `contract_pre_panel_layout_nonoverlap!(slice_expr)`
15013macro_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
15024/// Postconditions for equation `panel_layout_nonoverlap`.
15025/// Call before return: `contract_post_panel_layout_nonoverlap!(result_expr)`
15026macro_rules! contract_post_panel_layout_nonoverlap {
15027    ($result:expr) => {{
15028        let _contract_result = &$result;
15029    }};
15030}
15031
15032/// Combined pre+post contract for equation `panel_layout_nonoverlap`.
15033macro_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
15042/// Postconditions for equation `sandbox_violation_visibility`.
15043/// Call before return: `contract_post_sandbox_violation_visibility!(result_expr)`
15044macro_rules! contract_post_sandbox_violation_visibility {
15045    ($result:expr) => {{
15046        let _contract_result = &$result;
15047    }};
15048}
15049
15050/// Postconditions for equation `statusbar_state_display`.
15051/// Call before return: `contract_post_statusbar_state_display!(result_expr)`
15052macro_rules! contract_post_statusbar_state_display {
15053    ($result:expr) => {{
15054        let _contract_result = &$result;
15055    }};
15056}
15057
15058/// Preconditions for equation `streaming_token_ordering`.
15059/// Domain-specific. Call: `contract_pre_streaming_token_ordering!(slice_expr)`
15060macro_rules! contract_pre_streaming_token_ordering {
15061    () => {{}};
15062    ($input:expr) => {{
15063        let _pv_x = &$input;
15064    }};
15065}
15066
15067/// Postconditions for equation `streaming_token_ordering`.
15068/// Call before return: `contract_post_streaming_token_ordering!(result_expr)`
15069macro_rules! contract_post_streaming_token_ordering {
15070    ($result:expr) => {{
15071        let _contract_result = &$result;
15072    }};
15073}
15074
15075/// Combined pre+post contract for equation `streaming_token_ordering`.
15076macro_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
15085/// Preconditions for equation `tool_progress_monotonic`.
15086/// Domain-specific. Call: `contract_pre_tool_progress_monotonic!(slice_expr)`
15087macro_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
15098/// Postconditions for equation `tool_progress_monotonic`.
15099/// Call before return: `contract_post_tool_progress_monotonic!(result_expr)`
15100macro_rules! contract_post_tool_progress_monotonic {
15101    ($result:expr) => {{
15102        let _contract_result = &$result;
15103    }};
15104}
15105
15106/// Combined pre+post contract for equation `tool_progress_monotonic`.
15107macro_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
15116// Auto-generated from contracts/tui-rendering-v1.yaml — DO NOT EDIT
15117// Contract: tui-rendering-v1
15118
15119/// Preconditions for equation `cellbuffer_bounds`.
15120/// Call at function entry: `contract_pre_cellbuffer_bounds!(input_expr)`
15121macro_rules! contract_pre_cellbuffer_bounds {
15122    () => {{}};
15123    ($input:expr) => {{
15124        let _contract_input = &$input;
15125    }};
15126}
15127
15128/// Postconditions for equation `cellbuffer_bounds`.
15129/// Call before return: `contract_post_cellbuffer_bounds!(result_expr)`
15130macro_rules! contract_post_cellbuffer_bounds {
15131    ($result:expr) => {{
15132        let _contract_result = &$result;
15133    }};
15134}
15135
15136/// Combined pre+post contract for equation `cellbuffer_bounds`.
15137macro_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
15146/// Preconditions for equation `color_mode_fallback`.
15147/// Call at function entry: `contract_pre_color_mode_fallback!(input_expr)`
15148macro_rules! contract_pre_color_mode_fallback {
15149    () => {{}};
15150    ($input:expr) => {{
15151        let _contract_input = &$input;
15152    }};
15153}
15154
15155/// Postconditions for equation `color_mode_fallback`.
15156/// Call before return: `contract_post_color_mode_fallback!(result_expr)`
15157macro_rules! contract_post_color_mode_fallback {
15158    ($result:expr) => {{
15159        let _contract_result = &$result;
15160    }};
15161}
15162
15163/// Combined pre+post contract for equation `color_mode_fallback`.
15164macro_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
15173/// Preconditions for equation `diff_renderer_correctness`.
15174/// Domain-specific. Call: `contract_pre_diff_renderer_correctness!(slice_expr)`
15175macro_rules! contract_pre_diff_renderer_correctness {
15176    () => {{}};
15177    ($input:expr) => {{
15178        let _pv_prev = &$input;
15179    }};
15180}
15181
15182/// Postconditions for equation `diff_renderer_correctness`.
15183/// Call before return: `contract_post_diff_renderer_correctness!(result_expr)`
15184macro_rules! contract_post_diff_renderer_correctness {
15185    ($result:expr) => {{
15186        let _contract_result = &$result;
15187    }};
15188}
15189
15190/// Combined pre+post contract for equation `diff_renderer_correctness`.
15191macro_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
15200/// Preconditions for equation `dirty_tracking`.
15201/// Domain-specific. Call: `contract_pre_dirty_tracking!(slice_expr)`
15202macro_rules! contract_pre_dirty_tracking {
15203    () => {{}};
15204    ($input:expr) => {{
15205        let _pv_dirty_mask = &$input;
15206    }};
15207}
15208
15209/// Postconditions for equation `dirty_tracking`.
15210/// Call before return: `contract_post_dirty_tracking!(result_expr)`
15211macro_rules! contract_post_dirty_tracking {
15212    ($result:expr) => {{
15213        let _contract_result = &$result;
15214    }};
15215}
15216
15217/// Combined pre+post contract for equation `dirty_tracking`.
15218macro_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
15227/// Preconditions for equation `resize_safety`.
15228/// Call at function entry: `contract_pre_resize_safety!(input_expr)`
15229macro_rules! contract_pre_resize_safety {
15230    () => {{}};
15231    ($input:expr) => {{
15232        let _contract_input = &$input;
15233    }};
15234}
15235
15236/// Postconditions for equation `resize_safety`.
15237/// Call before return: `contract_post_resize_safety!(result_expr)`
15238macro_rules! contract_post_resize_safety {
15239    ($result:expr) => {{
15240        let _contract_result = &$result;
15241    }};
15242}
15243
15244/// Combined pre+post contract for equation `resize_safety`.
15245macro_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
15254/// Preconditions for equation `unicode_width`.
15255/// Call at function entry: `contract_pre_unicode_width!(input_expr)`
15256macro_rules! contract_pre_unicode_width {
15257    () => {{}};
15258    ($input:expr) => {{
15259        let _contract_input = &$input;
15260    }};
15261}
15262
15263/// Postconditions for equation `unicode_width`.
15264/// Call before return: `contract_post_unicode_width!(result_expr)`
15265macro_rules! contract_post_unicode_width {
15266    ($result:expr) => {{
15267        let _contract_result = &$result;
15268    }};
15269}
15270
15271/// Combined pre+post contract for equation `unicode_width`.
15272macro_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
15281/// Preconditions for equation `zero_alloc_render`.
15282/// Domain-specific. Call: `contract_pre_zero_alloc_render!(slice_expr)`
15283macro_rules! contract_pre_zero_alloc_render {
15284    () => {{}};
15285    ($input:expr) => {{
15286        let _pv_buffer = &$input;
15287    }};
15288}
15289
15290/// Postconditions for equation `zero_alloc_render`.
15291/// Call before return: `contract_post_zero_alloc_render!(result_expr)`
15292macro_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
15299/// Combined pre+post contract for equation `zero_alloc_render`.
15300macro_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
15309// Auto-generated from contracts/type-preservation-v1.yaml — DO NOT EDIT
15310// Contract: type-preservation-v1
15311
15312/// Preconditions for equation `container_preservation`.
15313/// Domain-specific. Call: `contract_pre_container_preservation!(slice_expr)`
15314macro_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
15325/// Preconditions for equation `copy_semantics`.
15326/// Domain-specific. Call: `contract_pre_copy_semantics!(slice_expr)`
15327macro_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
15338/// Preconditions for equation `numeric_semantics`.
15339/// Domain-specific. Call: `contract_pre_numeric_semantics!(slice_expr)`
15340macro_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
15351/// Preconditions for equation `type_inference`.
15352/// Domain-specific. Call: `contract_pre_type_inference!(slice_expr)`
15353macro_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
15364/// Preconditions for equation `type_map`.
15365/// Domain-specific. Call: `contract_pre_type_map!(slice_expr)`
15366macro_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
15377// Auto-generated from contracts/validated-tensor-v1.yaml — DO NOT EDIT
15378// Contract: validated-tensor-v1
15379
15380/// Preconditions for equation `density_gate`.
15381/// Domain-specific. Call: `contract_pre_density_gate!(slice_expr)`
15382macro_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
15397/// Preconditions for equation `l2_norm_nondegeneracy`.
15398/// Domain-specific. Call: `contract_pre_l2_norm_nondegeneracy!(slice_expr)`
15399macro_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
15410/// Preconditions for equation `nan_inf_rejection`.
15411/// Domain-specific. Call: `contract_pre_nan_inf_rejection!(slice_expr)`
15412macro_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
15423// Auto-generated from contracts/verification-engine-v1.yaml — DO NOT EDIT
15424// Contract: verification-engine-v1
15425
15426/// Preconditions for equation `generator_coverage`.
15427/// Domain-specific. Call: `contract_pre_generator_coverage!(slice_expr)`
15428macro_rules! contract_pre_generator_coverage {
15429    () => {{}};
15430    ($input:expr) => {{
15431        let _pv_strategy = &$input;
15432    }};
15433}
15434
15435/// Preconditions for equation `mutation_soundness`.
15436/// Call at function entry: `contract_pre_mutation_soundness!(input_expr)`
15437macro_rules! contract_pre_mutation_soundness {
15438    () => {{}};
15439    ($input:expr) => {{
15440        let _contract_input = &$input;
15441    }};
15442}
15443
15444/// Preconditions for equation `oracle_verdict`.
15445/// Call at function entry: `contract_pre_oracle_verdict!(input_expr)`
15446macro_rules! contract_pre_oracle_verdict {
15447    () => {{}};
15448    ($input:expr) => {{
15449        let _contract_input = &$input;
15450    }};
15451}
15452
15453// Auto-generated from contracts/visualization-render-v1.yaml — DO NOT EDIT
15454// Contract: visualization-render-v1
15455
15456/// Preconditions for equation `layout_treemap`.
15457/// Domain-specific. Call: `contract_pre_layout_treemap!(slice_expr)`
15458macro_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
15469/// Preconditions for equation `primitive_bounds`.
15470/// Call at function entry: `contract_pre_primitive_bounds!(input_expr)`
15471macro_rules! contract_pre_primitive_bounds {
15472    () => {{}};
15473    ($input:expr) => {{
15474        let _contract_input = &$input;
15475    }};
15476}
15477
15478/// Preconditions for equation `render_output`.
15479/// Call at function entry: `contract_pre_render_output!(input_expr)`
15480macro_rules! contract_pre_render_output {
15481    () => {{}};
15482    ($input:expr) => {{
15483        let _contract_input = &$input;
15484    }};
15485}
15486
15487// Auto-generated from contracts/wgpu-production-training-v1.yaml — DO NOT EDIT
15488// Contract: wgpu-production-training-v1
15489
15490// Auto-generated from contracts/wgpu-resident-weights-v1.yaml — DO NOT EDIT
15491// Contract: wgpu-resident-weights-v1
15492
15493/// Preconditions for equation `identity`.
15494/// Domain-specific. Call: `contract_pre_identity!(slice_expr)`
15495macro_rules! contract_pre_identity {
15496    () => {{}};
15497    ($input:expr) => {{
15498        let _pv_x = &$input;
15499    }};
15500}
15501
15502// Auto-generated from contracts/work-dbc-v1.yaml — DO NOT EDIT
15503// Contract: work-dbc-v1
15504
15505/// Preconditions for equation `checkpoint_verification`.
15506/// Domain-specific. Call: `contract_pre_checkpoint_verification!(slice_expr)`
15507macro_rules! contract_pre_checkpoint_verification {
15508    () => {{}};
15509    ($input:expr) => {{
15510        let _pv_contract = &$input;
15511    }};
15512}
15513
15514/// Postconditions for equation `checkpoint_verification`.
15515/// Call before return: `contract_post_checkpoint_verification!(result_expr)`
15516macro_rules! contract_post_checkpoint_verification {
15517    ($result:expr) => {{
15518        let _contract_result = &$result;
15519    }};
15520}
15521
15522/// Combined pre+post contract for equation `checkpoint_verification`.
15523macro_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
15532/// Preconditions for equation `contract_profile`.
15533/// Domain-specific. Call: `contract_pre_contract_profile!(slice_expr)`
15534macro_rules! contract_pre_contract_profile {
15535    () => {{}};
15536    ($input:expr) => {{
15537        let _pv_x = &$input;
15538    }};
15539}
15540
15541/// Postconditions for equation `contract_profile`.
15542/// Call before return: `contract_post_contract_profile!(result_expr)`
15543macro_rules! contract_post_contract_profile {
15544    ($result:expr) => {{
15545        let _contract_result = &$result;
15546    }};
15547}
15548
15549/// Combined pre+post contract for equation `contract_profile`.
15550macro_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
15559/// Preconditions for equation `falsifiable_claim`.
15560/// Domain-specific. Call: `contract_pre_falsifiable_claim!(slice_expr)`
15561macro_rules! contract_pre_falsifiable_claim {
15562    () => {{}};
15563    ($input:expr) => {{
15564        let _pv_claim = &$input;
15565    }};
15566}
15567
15568/// Postconditions for equation `falsifiable_claim`.
15569/// Call before return: `contract_post_falsifiable_claim!(result_expr)`
15570macro_rules! contract_post_falsifiable_claim {
15571    ($result:expr) => {{
15572        let _contract_result = &$result;
15573    }};
15574}
15575
15576/// Combined pre+post contract for equation `falsifiable_claim`.
15577macro_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
15586/// Preconditions for equation `meyer_triad`.
15587/// Domain-specific. Call: `contract_pre_meyer_triad!(slice_expr)`
15588macro_rules! contract_pre_meyer_triad {
15589    () => {{}};
15590    ($input:expr) => {{
15591        let _pv_x = &$input;
15592    }};
15593}
15594
15595/// Postconditions for equation `meyer_triad`.
15596/// Call before return: `contract_post_meyer_triad!(result_expr)`
15597macro_rules! contract_post_meyer_triad {
15598    ($result:expr) => {{
15599        let _contract_result = &$result;
15600    }};
15601}
15602
15603/// Combined pre+post contract for equation `meyer_triad`.
15604macro_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
15613/// Preconditions for equation `override_accountability`.
15614/// Call at function entry: `contract_pre_override_accountability!(input_expr)`
15615macro_rules! contract_pre_override_accountability {
15616    () => {{}};
15617    ($input:expr) => {{
15618        let _contract_input = &$input;
15619    }};
15620}
15621
15622/// Postconditions for equation `override_accountability`.
15623/// Call before return: `contract_post_override_accountability!(result_expr)`
15624macro_rules! contract_post_override_accountability {
15625    ($result:expr) => {{
15626        let _contract_result = &$result;
15627    }};
15628}
15629
15630/// Combined pre+post contract for equation `override_accountability`.
15631macro_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
15640/// Preconditions for equation `rescue_protocol`.
15641/// Call at function entry: `contract_pre_rescue_protocol!(input_expr)`
15642macro_rules! contract_pre_rescue_protocol {
15643    () => {{}};
15644    ($input:expr) => {{
15645        let _contract_input = &$input;
15646    }};
15647}
15648
15649/// Postconditions for equation `rescue_protocol`.
15650/// Call before return: `contract_post_rescue_protocol!(result_expr)`
15651macro_rules! contract_post_rescue_protocol {
15652    ($result:expr) => {{
15653        let _contract_result = &$result;
15654    }};
15655}
15656
15657/// Combined pre+post contract for equation `rescue_protocol`.
15658macro_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
15667/// Preconditions for equation `work_lifecycle`.
15668/// Domain-specific. Call: `contract_pre_work_lifecycle!(slice_expr)`
15669macro_rules! contract_pre_work_lifecycle {
15670    () => {{}};
15671    ($input:expr) => {{
15672        let _pv_x = &$input;
15673    }};
15674}
15675
15676/// Postconditions for equation `work_lifecycle`.
15677/// Call before return: `contract_post_work_lifecycle!(result_expr)`
15678macro_rules! contract_post_work_lifecycle {
15679    ($result:expr) => {{
15680        let _contract_result = &$result;
15681    }};
15682}
15683
15684/// Combined pre+post contract for equation `work_lifecycle`.
15685macro_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// Total: 646 preconditions, 15 postconditions from 277 contracts