caixa-core 0.1.607

Manifest types, layout invariants, and version contract for the caixa tatara-lisp package system.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
use serde::{Deserialize, Serialize};

/// What a caixa produces.
///
/// In `caixa.lisp`:
///
/// ```lisp
/// :kind Biblioteca   ; library (lib/<nome>.lisp entry)
/// :kind Binario      ; executable(s) under exe/
/// :kind Servico      ; long-running service under servicos/
/// :kind Supervisor   ; OTP-style typed supervisor tree (see supervisor.rs)
/// ```
///
/// Authored as bare symbols (`Biblioteca` not `:biblioteca`) to match the
/// tatara-lisp enum convention where symbols become enum discriminants via
/// the serde `Deserialize` fallthrough.
#[derive(
    Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, Hash, gen_platform::IsVariant,
)]
pub enum CaixaKind {
    /// Library — exports Lisp forms for other caixas to `(importar …)`.
    Biblioteca,
    /// Binary — one or more executables under `exe/`.
    Binario,
    /// Service — long-running daemon under `servicos/`.
    Servico,
    /// OTP-shaped supervisor — does not run any code itself; its
    /// children are other caixas, restarted under a typed strategy.
    /// See `supervisor.rs` for the full shape (`SupervisorSpec`).
    Supervisor,
    /// Typed application — composes multiple Servicos into a single
    /// declarative mesh with WIT-typed `:contratos`, mesh-level
    /// `:politicas`, and explicit `:placement`. See `aplicacao.rs`
    /// (`AplicacaoSpec`) and `theory/MESH-COMPOSITION.md` for the
    /// design frame.
    Aplicacao,
    /// Typed CI run — carries a `:ci` slot of
    /// `canteiro_types::CiRun` (a repo's CI run as a set of typed
    /// nodes + their dependency edges). Runs no code of its own and
    /// owns no `lib`/`exe`/`servicos`/`children`/`membros` code
    /// surface — its sole payload is the `ci` field on [`crate::Caixa`].
    /// See CANTEIRO §7.1-C (`pleme-io/sui`'s `canteiro-types` crate)
    /// for the DAG algebra (`decompose`/`affected_set`/`affected_waves`)
    /// this slot feeds, and the `caixa-actions` renderer (currently
    /// validate-only — see its crate docs) for the M0 consumer.
    Acao,
}

impl CaixaKind {
    /// Exhaustive iteration surface for every consumer that walks the
    /// closed six-arm [`CaixaKind`] discriminator set (the future M4
    /// `mesh.pleme.io/v1alpha1/Caixa` CR materializer's admission-webhook
    /// rejection body naming the accepted-`:kind` list, a future
    /// `feira --kind …` CLI arg-parse's "did you mean" hint via a
    /// [`Self::from_wire`]-scan over the slice, the future
    /// `feira app graph` per-Aplicacao `:kind`-histogram column, any
    /// future round-trip fuzz harness that sweeps every arm). A future
    /// variant addition (an `Actor` virtual-actor arm the
    /// [`ABSORPTION-ROADMAP`](https://github.com/pleme-io/theory/blob/main/ABSORPTION-ROADMAP.md)
    /// M5 Orleans-inspired kind reaches through — a candidate future
    /// arm named in the sibling [`Self::from_wire`] doc block —
    /// extends this slice as a single edit and every consumer picks up
    /// the new entry by construction; the compiler-checked
    /// exhaustiveness on the sibling method `match` arms
    /// ([`Self::as_str`] / [`Self::wire_name`] / [`Self::from_wire`] /
    /// the `requires_*` predicates) is the build-time guarantee that
    /// no arm forgets to grow.
    ///
    /// Peer of the sibling closed-set typed enums'
    /// [`crate::aplicacao::PlacementStrategy::ALL`] (18c7342) /
    /// [`crate::aplicacao::RateLimitUnit::ALL`] (6bce03d) /
    /// [`crate::dep::DepList::ALL`] (45ee563) exhaustive-iteration
    /// surfaces — the fourth (and structurally most fundamental —
    /// every caixa carries a `:kind`) closed-set typed enum on the
    /// caixa surface to converge onto the same
    /// one-canonical-arm-list-per-enum discipline.
    pub const ALL: &'static [Self] = &[
        Self::Biblioteca,
        Self::Binario,
        Self::Servico,
        Self::Supervisor,
        Self::Aplicacao,
        Self::Acao,
    ];

    /// A `Biblioteca` is expected to have at least one `lib/` entry.
    #[must_use]
    pub const fn requires_lib(self) -> bool {
        matches!(self, Self::Biblioteca)
    }

    /// A `Binario` is expected to have at least one `exe/` entry.
    #[must_use]
    pub const fn requires_exe(self) -> bool {
        matches!(self, Self::Binario)
    }

    /// A `Servico` is expected to have at least one `servicos/` entry.
    #[must_use]
    pub const fn requires_servicos(self) -> bool {
        matches!(self, Self::Servico)
    }

    /// A `Supervisor` is expected to have at least one `:children` entry
    /// (or a `SimpleOneForOne` strategy that spawns children dynamically).
    #[must_use]
    pub const fn requires_children(self) -> bool {
        matches!(self, Self::Supervisor)
    }

    /// An `Aplicacao` is expected to have at least one `:membros` entry.
    #[must_use]
    pub const fn requires_membros(self) -> bool {
        matches!(self, Self::Aplicacao)
    }

    /// An `Acao` is expected to carry a `:ci` slot (a typed
    /// `canteiro_types::CiRun`). Mirror of the sibling
    /// [`Self::requires_lib`]/[`Self::requires_exe`]/
    /// [`Self::requires_servicos`]/[`Self::requires_membros`] required-
    /// slot predicates on the fifth [`CaixaKind`] arm.
    #[must_use]
    pub const fn requires_ci(self) -> bool {
        matches!(self, Self::Acao)
    }

    /// Substrate-canonical exhaustive accept-set on the [`CaixaKind`]
    /// `PascalCase` wire byte-string axis — the closed six-arm roster of
    /// every un-`rename`d byte-string [`Self::wire_name`] emits, routed
    /// byte-for-byte through the paired
    /// [`crate::render::CAIXA_KIND_WIRE_BIBLIOTECA`] /
    /// [`crate::render::CAIXA_KIND_WIRE_BINARIO`] /
    /// [`crate::render::CAIXA_KIND_WIRE_SERVICO`] /
    /// [`crate::render::CAIXA_KIND_WIRE_SUPERVISOR`] /
    /// [`crate::render::CAIXA_KIND_WIRE_APLICACAO`] /
    /// [`crate::render::CAIXA_KIND_WIRE_ACAO`] lifted `pub const` roster
    /// the [`Self::wire_name`] emitter walks — and byte-for-byte the
    /// same six strings the un-`rename`d `Serialize` derive carries on
    /// every K8s-CR JSON / YAML round-trip and the paired
    /// [`Self::from_wire`] parser accepts.
    ///
    /// Peer of the sibling
    /// [`crate::upgrade::UpgradeInstruction::WIRE_FORMS`] (cc42c0e) roster
    /// on the OTP-appup wire-form axis and its paired
    /// [`crate::upgrade::UpgradeInstruction::LISP_FORMS`] (1898d77) roster
    /// on the tatara-lisp author-surface form axis — the same
    /// exhaustive-accept-set roster discipline `UpgradeInstruction`
    /// closed on its five-arm OTP-appup discriminator is now extended
    /// onto the structurally most fundamental caixa-core enum (every
    /// caixa carries a `:kind`). Companion to the sibling [`Self::ALL`]
    /// exhaustive-iteration surface on the variant axis: where `ALL`
    /// enumerates the six typed variants, this const enumerates the
    /// six wire byte-strings the paired [`Self::wire_name`] emitter
    /// projects each variant onto — the two rosters carry the same
    /// closed set of arms through different axes, and the paired
    /// [`tests::caixa_kind_wire_names_covers_every_arm`] pin gates the
    /// two rosters against each other so a silent skew between the
    /// variant set and the wire-string set trips at caixa-core test
    /// time rather than at a downstream K8s-CR admission-webhook
    /// rejection body's accepted-set enumeration miss.
    ///
    /// Consumers today (and future): the future M4
    /// `mesh.pleme.io/v1alpha1/Caixa` CR admission-webhook rejection
    /// body enumerating the accepted `:kind` `PascalCase` byte-string set
    /// verbatim on an unknown-tag miss (the six wire tags the JSON /
    /// YAML payload carries, not the lowercase Portuguese diagnostic
    /// form the sibling [`Self::as_str`] emits), a future `feira --kind
    /// …` CLI arg-parse's "did you mean" hint that scans this slice
    /// rather than open-coding the six literal `PascalCase` strings, a
    /// future `feira app graph` per-Aplicacao `:kind`-histogram column
    /// that walks the roster to render every arm's tally (including
    /// zero-count arms — a hand-rolled projection off `ALL` alone would
    /// need a companion per-variant-to-wire map at every consumer;
    /// this roster closes the two-axis walk in one lifted const), any
    /// future K8s CRD generation tool that emits the accepted-set enum
    /// on the Caixa CR schema — every consumer that wants to enumerate
    /// the closed `PascalCase` wire kind-tag set outside caixa-core now
    /// reaches for one lifted substrate-primitive roster rather than
    /// open-coding a `["Biblioteca", "Binario", "Servico",
    /// "Supervisor", "Aplicacao", "Acao"]` array-literal whose arm-set
    /// has no compile-time link back to the typed [`CaixaKind`] enum.
    /// A future variant addition (an `Actor` virtual-actor arm the
    /// [`ABSORPTION-ROADMAP`](https://github.com/pleme-io/theory/blob/main/ABSORPTION-ROADMAP.md)
    /// M5 Orleans-inspired kind reaches through) extends this roster as
    /// a single edit — paired with the [`Self::wire_name`] match's
    /// compiler-checked exhaustiveness on the new arm — and every
    /// consumer picks up the new tag by construction rather than a
    /// coordinated array-literal rewrite across every downstream site.
    ///
    /// Length is pinned load-bearing at `CaixaKind::ALL.len()` (six) by
    /// [`tests::caixa_kind_wire_names_covers_every_arm`], and every
    /// entry is pinned to a member of the roster on every arm so a
    /// silent skew between the [`Self::wire_name`] match's arm-set and
    /// this const's arm-set trips at caixa-core test time rather than
    /// at a downstream admission-webhook rejection body's accepted-set
    /// enumeration miss. Every entry is further pinned to open with an
    /// ASCII uppercase byte so a silent collapse of the two axes (an
    /// entry byte-identical to a sibling [`Self::as_str`] lowercase-
    /// Portuguese label that would let a wire-axis consumer accept the
    /// human-readable diagnostic byte-string) trips here rather than at
    /// a downstream K8s-CR round-trip miss.
    pub const WIRE_NAMES: &'static [&'static str] = &[
        crate::render::CAIXA_KIND_WIRE_BIBLIOTECA,
        crate::render::CAIXA_KIND_WIRE_BINARIO,
        crate::render::CAIXA_KIND_WIRE_SERVICO,
        crate::render::CAIXA_KIND_WIRE_SUPERVISOR,
        crate::render::CAIXA_KIND_WIRE_APLICACAO,
        crate::render::CAIXA_KIND_WIRE_ACAO,
    ];

    /// Substrate-canonical exhaustive accept-set on the [`CaixaKind`]
    /// lowercase-Portuguese human-readable label axis — the closed
    /// six-arm roster of every byte-string [`Self::as_str`] returns,
    /// routed byte-for-byte through the paired
    /// [`crate::render::CAIXA_KIND_LABEL_BIBLIOTECA`] /
    /// [`crate::render::CAIXA_KIND_LABEL_BINARIO`] /
    /// [`crate::render::CAIXA_KIND_LABEL_SERVICO`] /
    /// [`crate::render::CAIXA_KIND_LABEL_SUPERVISOR`] /
    /// [`crate::render::CAIXA_KIND_LABEL_APLICACAO`] /
    /// [`crate::render::CAIXA_KIND_LABEL_ACAO`] lifted `pub const` roster
    /// the [`Self::as_str`] emitter (and the [`std::fmt::Display`] /
    /// [`AsRef<str>`] / `From<Self|&Self> for {&'static str, String,
    /// Cow<'static, str>, Box<str>, Arc<str>}` trait triple + quintuple
    /// routed through it) walks — and byte-for-byte the same six strings
    /// the sibling [`std::fmt::Display`] impl emits.
    ///
    /// Second corner on the two-axis roster split for the structurally
    /// most fundamental caixa-core enum: where the sibling
    /// [`Self::WIRE_NAMES`] (bd708bd) enumerates the six `PascalCase` wire
    /// byte-strings [`Self::wire_name`] emits, this const enumerates the
    /// six lowercase-Portuguese human-readable label byte-strings
    /// [`Self::as_str`] emits — the two rosters carry the same closed set
    /// of arms through the two-axis split the sibling
    /// [`tests::caixa_kind_display_matches_as_str_and_not_serialize_wire`]
    /// pin already makes load-bearing (wire byte-string ≠ human-readable
    /// label; the split is by design, not drift). Peer of the sibling
    /// [`crate::upgrade::UpgradeInstruction::LISP_FORMS`] (1898d77) roster
    /// on the OTP-appup author-surface form axis and
    /// [`crate::upgrade::UpgradeInstruction::WIRE_FORMS`] (cc42c0e) roster
    /// on the wire-form axis — the same paired two-axis exhaustive-
    /// accept-set roster discipline extended onto the top-level
    /// [`CaixaKind`] discriminator.
    ///
    /// Consumers today (and future): a future `feira app graph`
    /// per-Aplicacao `:kind`-histogram column that wants to walk every
    /// arm's human-readable label to render zero-count arms as well as
    /// present arms (a hand-rolled projection off `ALL` alone would need
    /// a companion per-variant-to-label map at every consumer site; this
    /// roster closes the two-axis walk in one lifted const), a future
    /// wasm-operator per-reconcile-step diagnostic log line that
    /// enumerates the six accepted human-readable labels on an
    /// unknown-kind rejection (rejection body reaches for one lifted
    /// substrate-primitive roster rather than open-coding a
    /// `["biblioteca", "binario", "servico", "supervisor", "aplicacao",
    /// "acao"]` array-literal whose arm-set has no compile-time link
    /// back to the typed [`CaixaKind`] enum), a future
    /// `tracing::field::valuable::Value::List` structured-log accepted-
    /// label emit that materializes the roster verbatim, a future
    /// M4 admission-webhook rejection body's *user-facing* diagnostic
    /// (as distinct from the wire-form enumeration the sibling
    /// [`Self::WIRE_NAMES`] roster carries — the two rosters serve two
    /// audiences by design). A future variant addition (an `Actor`
    /// virtual-actor arm the
    /// [`ABSORPTION-ROADMAP`](https://github.com/pleme-io/theory/blob/main/ABSORPTION-ROADMAP.md)
    /// M5 Orleans-inspired kind reaches through) extends this roster as
    /// a single edit — paired with the [`Self::as_str`] match's
    /// compiler-checked exhaustiveness on the new arm — and every
    /// consumer picks up the new label by construction rather than a
    /// coordinated array-literal rewrite across every downstream site.
    ///
    /// Length is pinned load-bearing at `CaixaKind::ALL.len()` (six) by
    /// [`tests::caixa_kind_labels_covers_every_arm`], and every entry is
    /// pinned to a member of the roster on every arm so a silent skew
    /// between the [`Self::as_str`] match's arm-set and this const's
    /// arm-set trips at caixa-core test time rather than at a downstream
    /// consumer's accepted-set enumeration miss. Every entry is further
    /// pinned to open with an ASCII lowercase byte so a silent collapse
    /// of the two axes (an entry byte-identical to a sibling
    /// [`Self::wire_name`] `PascalCase` byte-string that would let a
    /// label-axis consumer accept the wire byte-string) trips here
    /// rather than at a downstream consumer's collision on the wrong
    /// vocabulary.
    pub const LABELS: &'static [&'static str] = &[
        crate::render::CAIXA_KIND_LABEL_BIBLIOTECA,
        crate::render::CAIXA_KIND_LABEL_BINARIO,
        crate::render::CAIXA_KIND_LABEL_SERVICO,
        crate::render::CAIXA_KIND_LABEL_SUPERVISOR,
        crate::render::CAIXA_KIND_LABEL_APLICACAO,
        crate::render::CAIXA_KIND_LABEL_ACAO,
    ];

    /// Substrate-canonical per-[`CaixaKind`] PascalCase wire byte-string
    /// every consumer that emits the Caixa's `:kind` axis onto a wire
    /// surface outside the caixa-core boundary keys off — returns the
    /// per-arm byte-string the paired
    /// [`crate::render::CAIXA_KIND_WIRE_BIBLIOTECA`] /
    /// [`crate::render::CAIXA_KIND_WIRE_BINARIO`] /
    /// [`crate::render::CAIXA_KIND_WIRE_SERVICO`] /
    /// [`crate::render::CAIXA_KIND_WIRE_SUPERVISOR`] /
    /// [`crate::render::CAIXA_KIND_WIRE_APLICACAO`] /
    /// [`crate::render::CAIXA_KIND_WIRE_ACAO`] lifted consts pin, and
    /// [`Self::from_wire`] parses back into the typed [`CaixaKind`]
    /// discriminator.
    ///
    /// Byte-identical to the un-`rename`d `Serialize` derive's per-arm
    /// wire scalar (`serde_json::to_string(&kind).unwrap()` unquoted),
    /// with the pin test
    /// [`tests::caixa_kind_wire_name_matches_serialize_wire_byte_string`]
    /// making the two paths' byte-agreement load-bearing so a future
    /// `#[serde(rename_all = "…")]` attribute drift at the derive
    /// surface trips at caixa-core build time rather than silently
    /// splitting the wire byte-shape from every consumer that reaches
    /// for this typed dispatch. The paired [`Self::from_wire`] returns
    /// `Some` on every string [`Self::wire_name`] emits and `None` on
    /// every other input — the round-trip pin
    /// [`tests::caixa_kind_wire_round_trips_through_from_wire`] locks
    /// the two paths' accept-sets together by construction.
    ///
    /// Distinct axis from the sibling [`Self::as_str`] — which returns
    /// the lowercase Portuguese diagnostic byte-string (`"biblioteca"`
    /// / `"binario"` / …) every consumer that formats the caixa's
    /// typed shape as user-facing text lands on — by design, not by
    /// drift: the two-axis split the load-bearing pin
    /// [`tests::caixa_kind_display_matches_as_str_and_not_serialize_wire`]
    /// already encodes. This wire accessor closes the third axis on
    /// the [`CaixaKind`] closed-set discriminator (wire byte-string),
    /// peer of [`Self::as_str`] (human-readable byte-string) and the
    /// [`std::fmt::Display`] impl (routed through [`Self::as_str`]).
    ///
    /// Prior to this lift, the six [`caixa-crd::conversion`] +
    /// [`caixa-feira`] + future-M4-CR-materializer consumers that
    /// needed the PascalCase wire byte-shape reached for one of two
    /// fragile paths: `format!("{:?}", kind)` (couples the wire format
    /// to `Debug`'s stability guarantee, which Rust's own conventions
    /// give as *no guarantee at all* — a `#[derive(Debug)]` swap for
    /// a hand-rolled `impl Debug` that pretty-prints the variant with
    /// extra context is a permitted mechanical edit whose apply-time
    /// symptom would be every downstream K8s CR carrying a stale wire
    /// byte-string), or `serde_json::to_string(&kind)` + string-trim of
    /// the outer quotes (introduces an allocation + error-handling
    /// path for a byte-shape the compiler knows verbatim at build
    /// time). Lifting the resolver to a typed method on the substrate
    /// primitive means every downstream consumer of the Caixa's
    /// `:kind` wire surface reaches for exactly one typed dispatch —
    /// the resolver's accept-set migrates as a unit on any future arm
    /// addition (a future virtual-actor `Actor` arm the
    /// `theory/ABSORPTION-ROADMAP.md` M5 Orleans-inspired kind reaches
    /// through, a per-cluster kind-alias table the M4 CR materializer
    /// resolves per-CR).
    #[must_use]
    pub const fn wire_name(self) -> &'static str {
        match self {
            Self::Biblioteca => crate::render::CAIXA_KIND_WIRE_BIBLIOTECA,
            Self::Binario => crate::render::CAIXA_KIND_WIRE_BINARIO,
            Self::Servico => crate::render::CAIXA_KIND_WIRE_SERVICO,
            Self::Supervisor => crate::render::CAIXA_KIND_WIRE_SUPERVISOR,
            Self::Aplicacao => crate::render::CAIXA_KIND_WIRE_APLICACAO,
            Self::Acao => crate::render::CAIXA_KIND_WIRE_ACAO,
        }
    }

    /// Substrate-canonical inverse of [`Self::wire_name`] — parses a
    /// PascalCase wire byte-string into the typed [`CaixaKind`]
    /// discriminator, returning `None` on any string not in the six-arm
    /// accept-set the sibling [`Self::wire_name`] emits.
    ///
    /// The pair `(wire_name, from_wire)` forms a total round-trip
    /// discipline on the six [`CaixaKind`] arms — every
    /// [`Self::wire_name`] output parses back through this accessor
    /// (pinned load-bearing by the sibling
    /// [`tests::caixa_kind_wire_round_trips_through_from_wire`] test),
    /// so consumers that emit a wire byte-string through
    /// [`Self::wire_name`] and later re-parse it here (the K8s
    /// [`caixa_crd`] `CaixaSpec.kind` `String`-carry round-trip through
    /// `caixa_into_cr` + `caixa_from_cr`, the future M4
    /// `mesh.pleme.io/v1alpha1/Caixa` CR materializer's admission-time
    /// wire re-parse, the future `feira` CLI verb that accepts a
    /// `--kind <Biblioteca|Servico|…>` arg and binds it into the typed
    /// enum) reach for one typed dispatch on the substrate primitive
    /// instead of the hand-rolled per-arm `match` cascade every
    /// pre-lift consumer previously carried verbatim. A future arm
    /// addition (a virtual-actor `Actor` arm the M5 Orleans-inspired
    /// kind reaches through) lands one caixa-core edit — the parser's
    /// arm-set migrates as a unit — rather than a coordinated rewrite
    /// across every hand-rolled `match cr.spec.kind.as_str()` at every
    /// downstream consumer site.
    ///
    /// Prior to this lift, the sole in-tree consumer of the reverse
    /// parse — [`caixa_crd::conversion::caixa_from_cr`] — carried a
    /// six-arm `match cr.spec.kind.as_str() { "Biblioteca" => …,
    /// "Binario" => …, "Servico" => …, "Supervisor" => …, "Aplicacao"
    /// => …, "Acao" => …, _ => CaixaKind::Biblioteca }` cascade that
    /// hard-coded every wire byte-string as a per-arm string literal
    /// with no compile-time link back to the typed
    /// [`crate::CaixaKind`] enum. A future variant rename or a serde
    /// attribute drift on the derive would silently split the wire
    /// format the forward `caixa_into_cr` emits from the reverse
    /// parser's arm-set — the CR would round-trip through JSON cleanly
    /// but land on the `_ => CaixaKind::Biblioteca` silent fallback
    /// on every non-Biblioteca variant, far from the derive-attribute
    /// commit that caused the drift. Lifting the resolver to a typed
    /// method on the substrate primitive closes the drift footgun by
    /// construction: the parser's accept-set is the same set the
    /// [`Self::wire_name`] emitter walks, so both halves of the
    /// round-trip migrate through one caixa-core edit on any future
    /// arm addition.
    ///
    /// Returns `Option<CaixaKind>` rather than `Result<CaixaKind, _>`
    /// because the existing in-tree consumer [`caixa_from_cr`] carries
    /// a hard-coded silent fallback (`_ => CaixaKind::Biblioteca`) —
    /// the fallback's shape is preserved verbatim by the caller's
    /// `.unwrap_or(CaixaKind::Biblioteca)` on the return value, so
    /// this lift is a byte-equal behavioral swap on today's call site
    /// (the CR round-trip is invariant), and future callers that want
    /// a typed error (a future `feira --kind …` arg-parse that
    /// surfaces `unknown kind: <arg>` at the CLI) can build one on top
    /// without disturbing the existing consumer's contract.
    #[must_use]
    pub fn from_wire(s: &str) -> Option<Self> {
        match s {
            crate::render::CAIXA_KIND_WIRE_BIBLIOTECA => Some(Self::Biblioteca),
            crate::render::CAIXA_KIND_WIRE_BINARIO => Some(Self::Binario),
            crate::render::CAIXA_KIND_WIRE_SERVICO => Some(Self::Servico),
            crate::render::CAIXA_KIND_WIRE_SUPERVISOR => Some(Self::Supervisor),
            crate::render::CAIXA_KIND_WIRE_APLICACAO => Some(Self::Aplicacao),
            crate::render::CAIXA_KIND_WIRE_ACAO => Some(Self::Acao),
            _ => None,
        }
    }

    /// The canonical human-readable name.
    ///
    /// The five arms route through the paired
    /// [`crate::render::CAIXA_KIND_LABEL_BIBLIOTECA`] /
    /// [`crate::render::CAIXA_KIND_LABEL_BINARIO`] /
    /// [`crate::render::CAIXA_KIND_LABEL_SERVICO`] /
    /// [`crate::render::CAIXA_KIND_LABEL_SUPERVISOR`] /
    /// [`crate::render::CAIXA_KIND_LABEL_APLICACAO`] lifted constants so
    /// every substrate consumer that formats a caixa's typed shape as
    /// user-facing text (the future wasm-operator's per-caixa startup
    /// log line, the future `feira app graph` per-member kind column,
    /// the future M4 CR materializer's admission-webhook rejection
    /// body) reads the same byte-string the [`std::fmt::Display`] impl
    /// (routed through this helper) emits — the pin test
    /// [`tests::caixa_kind_as_str_returns_lifted_peer_const`] asserts
    /// the five paths agree. Peer of the sibling
    /// [`crate::supervisor::RestartStrategy::as_str`] (09ffb2d),
    /// [`crate::supervisor::RestartPolicy::as_str`] (ccdf955), and M3
    /// [`crate::aplicacao::PlacementStrategy::as_str`] (cc8f749) on the
    /// sibling closed-set typed-enum discriminator axes — the fourth
    /// closed-set typed enum on the caixa surface to converge onto the
    /// same drift-detection posture.
    ///
    /// The two axes ([`Self::as_str`] returning lowercase Portuguese
    /// vs. the un-`rename`d `Serialize` derive emitting PascalCase
    /// `"Biblioteca"` / `"Binario"` / `"Servico"` / `"Supervisor"` /
    /// `"Aplicacao"`) are intentionally distinct: the wire format is
    /// the tatara-lisp author surface (`:kind Biblioteca`), while
    /// [`Self::as_str`] / [`std::fmt::Display`] emit the substrate's
    /// canonical human-readable form for diagnostics + graph output +
    /// audit views. Two paths on this enum surface (rather than three
    /// as on the sibling OTP-shape and M3 enums where wire ==
    /// human-readable), but the same "one canonical byte-string per
    /// axis, routed through a lifted const" discipline.
    #[must_use]
    pub const fn as_str(self) -> &'static str {
        match self {
            Self::Biblioteca => crate::render::CAIXA_KIND_LABEL_BIBLIOTECA,
            Self::Binario => crate::render::CAIXA_KIND_LABEL_BINARIO,
            Self::Servico => crate::render::CAIXA_KIND_LABEL_SERVICO,
            Self::Supervisor => crate::render::CAIXA_KIND_LABEL_SUPERVISOR,
            Self::Aplicacao => crate::render::CAIXA_KIND_LABEL_APLICACAO,
            Self::Acao => crate::render::CAIXA_KIND_LABEL_ACAO,
        }
    }
}

/// [`std::fmt::Display`] routed through [`CaixaKind::as_str`], so the
/// pretty-printed byte-string every consumer that formats the caixa's
/// typed shape as user-facing text lands on (the future wasm-operator's
/// per-caixa startup log line, the future `feira app graph` per-member
/// kind column, the future M4 `wasm.pleme.io/v1alpha1/ComputeUnit` /
/// `mesh.pleme.io/v1alpha1/*` CR materializer's admission-webhook
/// rejection body) reaches for the same lifted
/// [`crate::render::CAIXA_KIND_LABEL_BIBLIOTECA`] /
/// [`crate::render::CAIXA_KIND_LABEL_BINARIO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SERVICO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SUPERVISOR`] /
/// [`crate::render::CAIXA_KIND_LABEL_APLICACAO`] const the
/// [`CaixaKind::as_str`] helper already returns.
///
/// Pre-convergence [`CaixaKind`] carried no [`std::fmt::Display`]
/// surface at all — every consumer past the wire format
/// (`Serialize` → PascalCase) had to pick between two paths
/// ([`CaixaKind::as_str`] returning the lowercase Portuguese label, or
/// `format!("{v:?}")` on the `Debug` derive returning the PascalCase
/// variant name), each with different bytes on every arm and no
/// compile-time link between the two — with the failure surfacing as a
/// downstream consumer's log / graph / diagnostic reading one spelling
/// while a peer consumer emitted another, far from any single-site
/// commit. Wiring [`std::fmt::Display`] through [`CaixaKind::as_str`]
/// closes the drift footgun structurally: every `format!("{v}")` call
/// reaches the same lifted [`crate::render::CAIXA_KIND_LABEL_*`] const
/// [`CaixaKind::as_str`] returns, and a future rebrand (a per-consumer
/// disambiguation of the `:kind` vocabulary, an English-canonical
/// rebrand of `"biblioteca"` → `"library"` under an M4 substrate-wide-
/// vocabulary shift) reaches every consumer through exactly one
/// const-edit.
///
/// The wire format axis (`Serialize` derive, PascalCase, tatara-lisp
/// author surface `:kind Biblioteca`) stays deliberately distinct from
/// the human-readable axis (`Display` / `as_str`, lowercase Portuguese
/// diagnostic form): the two-path split is by design, not drift. The
/// pin test
/// [`tests::caixa_kind_display_matches_as_str_and_not_serialize_wire`]
/// makes the split load-bearing so a future accidental collapse of
/// either axis onto the other (routing `Display` through the wire
/// format via `serde_json::to_string`, or routing `Serialize` through
/// [`CaixaKind::as_str`] via `#[serde(rename_all = "…")]`) trips at
/// build time rather than silently merging the two axes into one at
/// some future consumer.
///
/// Pin tests
/// [`tests::caixa_kind_display_routes_through_as_str_helper`] and
/// [`tests::caixa_kind_as_str_returns_lifted_peer_const`] assert the
/// two paths agree byte-for-byte on every variant, so a future variant
/// rename or per-arm serde attribute drift is a build error visible at
/// caixa-core test time.
///
/// Mirrors the M3 [`crate::aplicacao::PlacementStrategy`] `Display`
/// impl (aplicacao.rs:2306), the M2
/// [`crate::supervisor::RestartStrategy`] `Display` impl
/// (supervisor.rs:164), and the M2 [`crate::supervisor::RestartPolicy`]
/// `Display` impl (supervisor.rs:306) on the sibling closed-set typed-
/// enum discriminator axes — same as_str-through-Display convergence
/// discipline, extended to close the fourth (and structurally most
/// fundamental — every caixa carries a `:kind`) closed-set typed-enum
/// discriminator axis on the caixa typed surface.
impl std::fmt::Display for CaixaKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}

/// Substrate-canonical [`AsRef<str>`] projection on the structurally
/// most fundamental closed-set typed enum on the caixa surface — every
/// [`crate::Caixa`] carries a `:kind` — routing through the same
/// [`CaixaKind::as_str`] `pub const fn` accessor the paired
/// [`std::fmt::Display`] impl already delegates through, so any future
/// consumer that binds a [`CaixaKind`] through the standard-library
/// `impl AsRef<str>` bound (a [`std::process::Command::arg`] shell-out
/// composing the diagnostic byte-string into the future `feira` verb
/// dispatch, a `tracing::field::Value::Str`-arm structured-log recorder
/// on the future `caixa-operator`'s per-caixa reconcile step, a
/// [`std::collections::HashMap`] lookup keyed on the human-readable
/// label through `map.get::<str>(kind.as_ref())` on a future per-kind
/// diagnostic-dispatch table the M4 admission-webhook rejection body
/// composes) reaches the paired
/// [`crate::render::CAIXA_KIND_LABEL_BIBLIOTECA`] /
/// [`crate::render::CAIXA_KIND_LABEL_BINARIO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SERVICO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SUPERVISOR`] /
/// [`crate::render::CAIXA_KIND_LABEL_APLICACAO`] /
/// [`crate::render::CAIXA_KIND_LABEL_ACAO`] lifted-const through one
/// substrate-primitive dispatch rather than an open-coded `.as_str()`
/// projection at every wire-up.
///
/// Deliberately routes through the human-readable
/// [`CaixaKind::as_str`] axis, not the `PascalCase`
/// [`CaixaKind::wire_name`] axis — the two-axis split the sibling
/// [`tests::caixa_kind_display_matches_as_str_and_not_serialize_wire`]
/// pin makes load-bearing is preserved here by construction: `AsRef`
/// and `Display` land on the diagnostic byte-string, while the wire
/// axis (tatara-lisp author surface `:kind Biblioteca`) stays reachable
/// only through the explicit [`CaixaKind::wire_name`] +
/// [`serde::Serialize`] paths. Rust-side newtype/typed-enum convention
/// pairs [`AsRef<str>`] with [`fmt::Display`] on the same primitive so
/// a caller who has one has both; before this lift, [`CaixaKind`]
/// carried [`fmt::Display`] but not the paired [`AsRef<str>`] impl the
/// convention names.
///
/// Same "route the trait impl through the substrate-primitive
/// accessor" discipline the sibling [`crate::CaixaVersion`]
/// [`AsRef<str>`] impl (16d5c7e), the paired M2
/// [`crate::supervisor::RestartStrategy`] [`AsRef<str>`] impl
/// (63eb1a4), the paired M2 [`crate::supervisor::RestartPolicy`]
/// [`AsRef<str>`] impl (419ea81), and the M3
/// [`crate::aplicacao::PlacementStrategy`] [`AsRef<str>`] impl
/// (d86edd2) carry — closes the substrate primitive's
/// [`AsRef<str>`] projection axis onto the top-level [`CaixaKind`]
/// discriminator, so every closed-set typed enum on the caixa surface
/// (top-level `:kind`, M2 `:supervisor` per-child + sibling restart,
/// M3 `:placement :estrategia`, `:versao` newtype) now carries the
/// paired [`AsRef<str>`] + [`fmt::Display`] + `as_str` triple through
/// one lifted `CAIXA_KIND_LABEL_*` / `SUPERVISOR_*` /
/// `M3_PLACEMENT_ESTRATEGIA_*` const family.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_as_ref_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`CaixaKind::as_str`] across the six-arm
/// closed set) and
/// [`tests::caixa_kind_as_ref_str_routes_through_display_via_shared_accessor`]
/// (three-path convergence: `AsRef<str>` + `Display` + `as_str` all
/// resolve to the same lifted `CAIXA_KIND_LABEL_*` const per arm) —
/// any future silent detour that routes the impl through a divergent
/// projection (a per-arm inline `match self { … }` re-inlining that
/// opens a compile-time link to the un-lifted arm-literal, a swap onto
/// the `PascalCase` [`CaixaKind::wire_name`] axis that would collide
/// the human-readable / wire two-axis split) trips at caixa-core test
/// time under `assert_eq!` rather than at a downstream
/// `impl AsRef<str>`-bound consumer's silent split.
impl AsRef<str> for CaixaKind {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// Trait-idiomatic reverse projection on the top-level [`CaixaKind`]
/// closed-set typed enum — routes byte-for-byte through the paired
/// substrate-primitive [`CaixaKind::from_wire`] `Option<Self>` accessor
/// so every future consumer that binds a `PascalCase` wire byte-string
/// through the standard-library `.try_into()` / [`TryFrom`] axis (a
/// future `feira --kind <Biblioteca|Servico|…>` CLI arg-parse that
/// composes into `let kind: CaixaKind = s.try_into()?`, a future
/// `mesh.pleme.io/v1alpha1/Caixa` CR admission-webhook that folds a
/// `spec.kind: String` field through `CaixaKind::try_from(&s)?`, a
/// generic `<T: TryFrom<&str>>`-bound loader over any of the
/// substrate's closed-set typed enums) reaches the same six-arm
/// accept-set the sibling [`CaixaKind::from_wire`] parses through and
/// the sibling [`CaixaKind::wire_name`] emits, rather than an open-
/// coded per-arm `match s { "Biblioteca" => …, … }` cascade whose
/// arm-set has no compile-time link back to the substrate primitive.
///
/// Complements the pre-existing forward-projection triple
/// ([`std::fmt::Display`], [`AsRef<str>`], [`CaixaKind::as_str`]) with
/// the paired trait-idiomatic reverse-projection axis: Rust-side
/// newtype/typed-enum convention pairs [`AsRef<str>`] with either
/// [`std::str::FromStr`] or [`TryFrom<&str>`] on the same primitive so
/// a caller who can project *out to* a `&str` can also project *in
/// from* one. The [`TryFrom<&str>`] axis is deliberately chosen over
/// [`std::str::FromStr`] to sidestep the `clippy::should_implement_trait`
/// lint that the sibling method-named `from_wire` would trigger under
/// a `FromStr` impl (the same design tradeoff the peer
/// [`crate::provedor::ferrite::FerriteRuntime::from_wire`] block
/// notes) — this impl closes the trait-idiomatic reverse axis without
/// disturbing the method-named `from_wire` shape every sibling
/// closed-set typed enum on the substrate already carries.
///
/// `type Error = ()` matches the sibling [`CaixaKind::from_wire`]'s
/// `Option<Self>` return-shape's deliberate deferral of error typing:
/// the caller picks the diagnostic form appropriate for its use site
/// (a future `feira --kind` arg-parse composes its own per-verb
/// "unknown kind: <arg> — accepted: {…}" message enumerating
/// [`CaixaKind::ALL`], a future admission-webhook rejection body
/// wraps the `Err(())` outcome with the accepted-set enumeration for
/// operator diagnostics, a `Result::map_err` at the call site lifts
/// the unit-error to a per-verb error type). Same shape the peer
/// [`FerriteRuntime::from_wire`] doc block motivates on the
/// `caixa-provedor` closed-set typed enum's reverse projection.
///
/// The paired [`TryFrom<&str>`] impl reaches the same six-arm accept-
/// set the [`CaixaKind::from_wire`] resolver dispatches through, so
/// any future arm addition (a virtual-actor `Actor` arm the
/// [`ABSORPTION-ROADMAP`](https://github.com/pleme-io/theory/blob/main/ABSORPTION-ROADMAP.md)
/// M5 Orleans-inspired kind reaches through) grows the trait-
/// idiomatic axis by construction — one caixa-core edit on
/// [`CaixaKind::from_wire`] extends both the method-named reverse
/// projection every existing consumer keys off and the trait-
/// idiomatic reverse projection this impl exposes, without a
/// coordinated rewrite across every future `TryFrom<&str>`-bound
/// consumer's arm-set.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_try_from_str_routes_through_from_wire_accessor`]
/// (byte-parity pin against [`CaixaKind::from_wire`] across the
/// six-arm accept-set) and
/// [`tests::caixa_kind_try_from_str_rejects_unknown_byte_strings`]
/// (rejection witness against silent accept-set widening).
impl TryFrom<&str> for CaixaKind {
    type Error = ();

    fn try_from(s: &str) -> Result<Self, Self::Error> {
        Self::from_wire(s).ok_or(())
    }
}

/// Trait-idiomatic *forward* projection on the structurally most
/// fundamental closed-set typed enum on the caixa surface — every
/// [`crate::Caixa`] carries a `:kind` — routing through the paired
/// substrate-primitive [`CaixaKind::as_str`] `pub const fn` accessor so
/// every future consumer that binds a [`CaixaKind`] through the
/// standard-library `.into()` / [`From<Self> for &'static str`]
/// (equivalently [`Into<&'static str>`]) axis (a future
/// `tracing::field::valuable::Value::Str(kind.into())` structured-log
/// recorder where the `Str` arm typing demands `&'static str` and the
/// sibling [`AsRef<str>`] impl's borrowed `&str` return-type does not
/// satisfy the bound, a future
/// `Cow::Borrowed::<'static, str>(kind.into())` composer on the future
/// M4 admission-webhook rejection body where the `Cow<'static, str>`
/// typing rules out the sibling [`AsRef<str>`] borrowed return, a
/// generic `<T: Into<&'static str>>`-bound serializer on a per-kind
/// diagnostic column, a per-kind [`std::collections::HashMap`] whose
/// key type is `&'static str` requiring the `'static` bound through
/// [`Into::into`]) reaches the same lifted
/// [`crate::render::CAIXA_KIND_LABEL_BIBLIOTECA`] /
/// [`crate::render::CAIXA_KIND_LABEL_BINARIO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SERVICO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SUPERVISOR`] /
/// [`crate::render::CAIXA_KIND_LABEL_APLICACAO`] /
/// [`crate::render::CAIXA_KIND_LABEL_ACAO`] const the paired
/// [`std::fmt::Display`], [`AsRef<str>`], and [`CaixaKind::as_str`]
/// surfaces already return, rather than an open-coded per-arm
/// `match kind { Biblioteca => "biblioteca", … }` cascade whose
/// arm-set has no compile-time link back to the substrate primitive.
///
/// Complements the pre-existing quadruple ([`std::fmt::Display`],
/// [`AsRef<str>`], [`CaixaKind::as_str`], [`TryFrom<&str>`] via
/// 3c83606) with the paired trait-idiomatic forward-projection axis:
/// Rust-side newtype/typed-enum convention pairs [`TryFrom<&str>`]
/// (trait-idiomatic reverse) with [`From<Self> for &'static str`]
/// (trait-idiomatic forward) on the same primitive so a caller who
/// can project *in from* a `&str` via the trait axis can also project
/// *out to* one — mirroring the `strum::IntoStaticStr` /
/// `serde::Serialize`-shape idiom where both projection halves share
/// one trait-driven vocabulary. Before this lift the substrate
/// carried a `&str`-returning [`AsRef<str>`] but not the paired
/// `&'static str`-returning [`From<Self> for &'static str`] axis
/// every downstream generic that specifically needs `'static`
/// byte-string bytes reaches for.
///
/// Deliberately routes through the human-readable
/// [`CaixaKind::as_str`] axis, not the `PascalCase`
/// [`CaixaKind::wire_name`] axis — the two-axis split the sibling
/// [`tests::caixa_kind_display_matches_as_str_and_not_serialize_wire`]
/// pin makes load-bearing is preserved here by construction: the
/// paired [`AsRef<str>`], [`std::fmt::Display`], and this
/// [`From<Self> for &'static str`] trait triple all land on the
/// diagnostic byte-string, while the wire axis (tatara-lisp author
/// surface `:kind Biblioteca`) stays reachable only through the
/// explicit [`CaixaKind::wire_name`] + [`serde::Serialize`] paths.
///
/// The paired [`CaixaKind::as_str`] returns `&'static str` by
/// construction (each `match` arm resolves to a
/// [`crate::render::CAIXA_KIND_LABEL_*`] `pub const &str` with static
/// lifetime), so the trait's return-type promise is upheld
/// structurally. Any future silent detour that routes the impl
/// through a non-static projection (a per-arm inline
/// `String::from("biblioteca")`-shaped re-inlining that would
/// `.leak()`-cast for the `'static` bound, a hypothetical rebrand of
/// one arm's [`crate::render::CAIXA_KIND_LABEL_*`] const to a
/// non-`const &str`) is a caixa-core-build-time failure through the
/// `pub const fn as_str` signature the trait routes through.
///
/// The paired impl reaches the same six-arm emit-set the
/// [`CaixaKind::as_str`] accessor dispatches through, so any future
/// arm addition (a virtual-actor `Actor` arm the
/// [`ABSORPTION-ROADMAP`](https://github.com/pleme-io/theory/blob/main/ABSORPTION-ROADMAP.md)
/// M5 Orleans-inspired kind reaches through — a candidate future arm
/// named in the sibling [`CaixaKind::from_wire`] doc block) grows
/// the trait-idiomatic forward axis by construction — one caixa-core
/// edit on [`CaixaKind::as_str`] extends every one of the four
/// sibling forward-projection paths ([`std::fmt::Display`],
/// [`AsRef<str>`], [`CaixaKind::as_str`] itself, and this
/// [`From<Self> for &'static str`]) without a coordinated rewrite
/// across every future `Into<&'static str>`-bound consumer's arm-set.
///
/// Extends the substrate-wide trait-idiomatic *forward*-projection
/// family opened on [`crate::supervisor::RestartStrategy`] (523157d)
/// and [`crate::supervisor::RestartPolicy`] (9fb37d0) — the two M2
/// OTP-shape closed-set typed enum peers whose paired
/// `From<Self> for &'static str` axis established the "route through
/// `as_str`" precedent — onto the structurally most fundamental
/// closed-set typed enum on the caixa surface. Third peer on the
/// forward-projection family, and the first outside the M2 OTP-shape
/// sibling axis pair; the remaining eleven closed-set typed enums on
/// the caixa substrate surface (`CaixaDialeto`, `PlacementStrategy`,
/// `WitShape`, `RateLimitUnit`, `PathShapeViolation`, `InvariantKind`,
/// `ArchVerdict`, `Severity`, `FixSafety`, `Semantic`, `FerriteRuntime`)
/// are the future targets of this campaign.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_from_into_static_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`CaixaKind::as_str`] across the six-arm
/// emit-set, plus a `const`-context materialization witness for the
/// `&'static str` lifetime promise) and
/// [`tests::caixa_kind_from_into_static_str_and_as_str_partition_the_emit_set`]
/// (partition pin asserting `<&'static str as From<CaixaKind>>::from`
/// and [`CaixaKind::as_str`] agree on every arm, plus a two-way
/// round-trip witness through the paired trait-idiomatic
/// [`TryFrom<&str>`] axis on the `PascalCase` wire vocabulary that
/// closes the two-way `Self ↔ &'static str` round-trip on the
/// trait-idiomatic axis pair via the intermediate
/// [`CaixaKind::wire_name`] axis — the two projection endpoints
/// resolve to different vocabularies by design, so the round-trip
/// crosses through the wire axis rather than composing the two trait
/// impls directly).
impl From<CaixaKind> for &'static str {
    fn from(kind: CaixaKind) -> &'static str {
        kind.as_str()
    }
}

/// Trait-idiomatic *forward* projection on [`CaixaKind`] from a
/// *borrowed* input onto the `&'static str` axis — the borrowed-input
/// companion to the paired owned-input [`From<CaixaKind> for &'static
/// str`] impl immediately above. Routes byte-for-byte through the same
/// substrate-primitive [`CaixaKind::as_str`] `pub const fn` accessor so
/// every consumer that binds a `&CaixaKind` through the standard-
/// library `.into()` / [`From<&Self> for &'static str`] axis (a
/// `CaixaKind::ALL.iter().map(<&'static str>::from).collect::<Vec<_>>()`
/// per-arm accept-set materializer — whose iterator over
/// `&'static [CaixaKind]` yields `&CaixaKind`, not `CaixaKind`, so the
/// owned-input [`From<CaixaKind>`] axis alone forces every call site
/// through an explicit `.copied()` / dereference / [`Copy`]-bound
/// restatement rather than the direct trait-idiomatic projection; a
/// future generic `<T: Copy + for<'a> Into<&'static str>>`-bound
/// diagnostic column that walks the `iter().map(Into::into)` shape
/// verbatim; the future M4 admission-webhook rejection body that
/// composes the accepted-set enumeration from an iterated
/// `CaixaKind::ALL.iter().map(|k| k.into())` pipe rather than a
/// per-arm `match k { … }` cascade) reaches the same six-arm lifted
/// [`crate::render::CAIXA_KIND_LABEL_*`] const the paired owned-input
/// [`From<CaixaKind> for &'static str`], the sibling
/// [`std::fmt::Display`], [`AsRef<str>`], and [`CaixaKind::as_str`]
/// surfaces already return.
///
/// Second peer on the substrate-wide trait-idiomatic *borrowed-input*
/// forward-projection family opened on
/// [`crate::dep::DepList`] (64aa742). Rust's `From` trait does not
/// auto-derive the `From<&Self>` sibling from a `From<Self>` impl (the
/// blanket `impl<T, U> From<&T> for U where T: Copy, U: From<T>` does
/// not exist in `core`), so every closed-set typed enum that carries
/// the owned-input axis but not the borrowed-input axis forces every
/// borrowed-input call site through a `.copied()` /
/// `<&'static str>::from(*kind)` / `kind.as_str()` detour whose type
/// bounds have no compile-time link to the substrate primitive.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_from_borrowed_into_static_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`CaixaKind::as_str`] across the six-arm
/// emit-set via a borrowed input, plus a `const`-context materialization
/// witness) and
/// [`tests::caixa_kind_from_owned_and_borrowed_into_static_str_agree_on_every_arm`]
/// (cross-axis partition pin against the paired owned-input
/// [`From<CaixaKind> for &'static str`] impl, plus a
/// `.iter().map(Into::into)` pipe witness over [`CaixaKind::ALL`]).
impl From<&CaixaKind> for &'static str {
    fn from(kind: &CaixaKind) -> &'static str {
        kind.as_str()
    }
}

/// Trait-idiomatic *owned-`String`* forward projection on the
/// structurally most fundamental closed-set typed enum on the caixa
/// surface ([`CaixaKind`]) — the owned-heap-string companion to the
/// paired `&'static str`-returning [`From<CaixaKind> for &'static str`]
/// / [`From<&CaixaKind> for &'static str`] impls immediately above.
/// Routes byte-for-byte through the substrate-primitive
/// [`CaixaKind::as_str`] `pub const fn` accessor (via [`str::to_owned`])
/// so every consumer that binds a [`CaixaKind`] through the standard-
/// library `.into()` / [`From<Self> for String`] (equivalently
/// [`Into<String>`]) axis — a future `serde_json::Value::String(kind.into())`
/// structured-payload composer where the `Value::String` arm typing
/// demands an owned [`String`] and the sibling
/// [`&'static str`]-returning axis forces an explicit `.to_owned()` /
/// [`String::from`] restatement at every call site, a future
/// `HashMap::<String, CaixaKind>::from_iter(CaixaKind::ALL.iter().copied()
/// .map(|k| (k.into(), k)))` per-kind lookup where the map's key type
/// is owned [`String`] rather than [`&'static str`], a future
/// `Cow::<'static, str>::Owned(kind.into())` composer on the future M4
/// admission-webhook rejection body's owned-arm, the future wasm-
/// operator's per-Caixa post-decompose `serde_json::json!({ "kind":
/// kind })` diagnostic emit where the JSON serializer's [`serde::Serialize`]
/// impl on [`String`] owns the emit-path — reaches the same six-arm
/// lifted [`crate::render::CAIXA_KIND_LABEL_BIBLIOTECA`] /
/// [`crate::render::CAIXA_KIND_LABEL_BINARIO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SERVICO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SUPERVISOR`] /
/// [`crate::render::CAIXA_KIND_LABEL_APLICACAO`] /
/// [`crate::render::CAIXA_KIND_LABEL_ACAO`] const the paired
/// [`std::fmt::Display`], [`AsRef<str>`], [`CaixaKind::as_str`], and
/// the two `&'static str`-returning forward-projection impls already
/// return.
///
/// Extends the trait-idiomatic *owned-`String`* forward-projection
/// axis onto the structurally most fundamental closed-set typed enum
/// on the caixa substrate surface — third peer on the family opened
/// on [`crate::supervisor::RestartStrategy`] (7baa18a, first-mover)
/// and [`crate::supervisor::RestartPolicy`] (7851725, second peer on
/// the M2 OTP-shape sibling axis). Rust's standard library does not
/// carry a blanket `impl<T: AsRef<str>> From<T> for String` (nor an
/// `impl<T: fmt::Display> From<T> for String`), so every closed-set
/// typed enum that carries the paired [`AsRef<str>`] /
/// [`std::fmt::Display`] / [`From<Self> for &'static str`] triple
/// but not the owned-[`String`] axis forces every owned-string call
/// site through a `.to_string()` / `.as_str().to_owned()` /
/// `String::from(kind.as_str())` detour whose type bounds have no
/// compile-time link to the substrate primitive.
///
/// Deliberately routes through the human-readable
/// [`CaixaKind::as_str`] axis, not the `PascalCase`
/// [`CaixaKind::wire_name`] axis — the two-axis split the sibling
/// [`tests::caixa_kind_display_matches_as_str_and_not_serialize_wire`]
/// pin makes load-bearing is preserved here by construction: the
/// paired [`AsRef<str>`], [`std::fmt::Display`], the two
/// `&'static str`-returning forward-projection impls, and this
/// owned-[`String`] impl all land on the diagnostic byte-string,
/// while the wire axis (tatara-lisp author surface `:kind Biblioteca`)
/// stays reachable only through the explicit
/// [`CaixaKind::wire_name`] + [`serde::Serialize`] paths.
///
/// Unlike the peer M2 OTP-shape axis pair
/// ([`crate::supervisor::RestartPolicy`] whose forward `From` axis and
/// reverse [`TryFrom<&str>`] axis share one `PascalCase` vocabulary
/// by construction, so the owned-[`String`] forward + reverse
/// round-trip composes directly), the [`CaixaKind`] forward
/// owned-[`String`] axis emits lowercase Portuguese diagnostic bytes
/// (`"biblioteca"`) while the paired trait-idiomatic reverse
/// [`TryFrom<&str>`] axis (via [`CaixaKind::from_wire`]) parses
/// `PascalCase` wire bytes (`"Biblioteca"`) — the round-trip witness
/// crosses through [`CaixaKind::wire_name`] as the reverse-axis
/// vocabulary rather than composing the owned-[`String`] emit
/// directly.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_from_into_owned_string_routes_through_as_str_accessor`]
/// (byte-parity pin against [`CaixaKind::as_str`] across the six-arm
/// emit-set, plus a blanket `.into::<String>()` shape witness) and
/// [`tests::caixa_kind_from_into_owned_string_and_static_str_agree_on_every_arm`]
/// (cross-axis partition pin against the paired owned-input
/// [`From<CaixaKind> for &'static str`] impl and the sibling
/// [`ToString::to_string`] surface routed through
/// [`std::fmt::Display`], plus a `.iter().copied().map(String::from)`
/// pipe witness over [`CaixaKind::ALL`], plus a wire-vocab round-trip
/// witness through [`CaixaKind::wire_name`] + [`TryFrom<&str>`] that
/// closes the two-way `Self → String → Self` round-trip on the
/// trait-idiomatic owned-[`String`] forward axis + reverse axis pair
/// via the wire vocabulary rather than the emit vocabulary — the
/// two-axis split by design).
impl From<CaixaKind> for String {
    fn from(kind: CaixaKind) -> String {
        kind.as_str().to_owned()
    }
}

/// Trait-idiomatic *borrowed-input, owned-`String` output* forward
/// projection on the structurally most fundamental closed-set typed
/// enum on the caixa surface ([`CaixaKind`]) — the fourth (and
/// closing) corner of the `{Self, &Self} × {&'static str, String}`
/// 2×2 trait-idiomatic projection family on this enum, mirror of the
/// peer M2 OTP-shape [`From<&crate::supervisor::RestartStrategy> for
/// String`] (579385f) / [`From<&crate::supervisor::RestartPolicy> for
/// String`] (8465740) and the sibling two-list dep-graph
/// [`From<&crate::dep::DepList> for String`] (e0cb617) that opened
/// the corner off the M2 OTP-shape sibling axis pair onto the first
/// non-M2 closed-set fieldless typed enum peer. Routes byte-for-byte
/// through the substrate-primitive [`CaixaKind::as_str`] `pub const fn`
/// accessor (via [`str::to_owned`]) so every consumer that holds a
/// borrowed [`&CaixaKind`] and needs an owned [`String`] — a future
/// `serde_json::Value::String(String::from(&kind))` structured-payload
/// composer over a borrowed field, a future `Iterator::map` over
/// `&[CaixaKind]` that projects to owned keys through
/// `.iter().map(String::from)` (whose iterator yields `&CaixaKind`,
/// not `CaixaKind`, so the owned-input [`From<CaixaKind> for String`]
/// axis alone forces every call site through an explicit `.copied()` /
/// spurious [`Copy`] deref restatement rather than the direct trait-
/// idiomatic projection), a future
/// `HashMap::<String, CaixaKind>::from_iter` that keys off a borrowed-
/// iteration axis where dereferencing the kind would force an
/// unnecessary [`Copy`] at every step, the future wasm-operator's
/// per-manifest `kind_axes.iter().map(String::from).collect()`
/// per-kind author-surface-tag diagnostic emit whose iteration axis
/// is borrowed by construction — reaches the same six-arm lifted
/// [`crate::render::CAIXA_KIND_LABEL_BIBLIOTECA`] /
/// [`crate::render::CAIXA_KIND_LABEL_BINARIO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SERVICO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SUPERVISOR`] /
/// [`crate::render::CAIXA_KIND_LABEL_APLICACAO`] /
/// [`crate::render::CAIXA_KIND_LABEL_ACAO`] const the paired
/// [`std::fmt::Display`], [`AsRef<str>`], [`CaixaKind::as_str`], and
/// the three other trait-idiomatic forward-projection impls
/// ([`From<CaixaKind> for &'static str`],
/// [`From<&CaixaKind> for &'static str`],
/// [`From<CaixaKind> for String`]) already return.
///
/// Fourth peer on the substrate-wide trait-idiomatic *borrowed-input,
/// owned-`String` output* forward-projection family opened on
/// [`crate::supervisor::RestartStrategy`] (579385f), closed on the M2
/// OTP-shape sibling axis pair by [`crate::supervisor::RestartPolicy`]
/// (8465740), and extended onto the first non-M2 peer by
/// [`crate::dep::DepList`] (e0cb617) — extends the
/// `{Self, &Self} × {&'static str, String}` 2×2 projection corner off
/// the two-list dep-graph axis onto the structurally most fundamental
/// closed-set fieldless typed enum peer on the caixa surface (every
/// caixa carries a `:kind`). Rust's standard library does not carry a
/// blanket `impl<T: AsRef<str>> From<&T> for String` (nor an
/// `impl<T: fmt::Display> From<&T> for String`), so every closed-set
/// typed enum that carries the paired `AsRef<str>` / `Display` /
/// `From<Self> for &'static str` / `From<&Self> for &'static str` /
/// `From<Self> for String` quintuple but not the borrowed-input
/// owned-[`String`] axis forces every borrowed-input owned-string call
/// site through a `kind.as_str().to_owned()` / `String::from(*kind)`
/// (with a spurious [`Copy`]) / `kind.to_string()` (through
/// [`std::fmt::Display`]) detour whose type bounds have no compile-
/// time link to the substrate primitive.
///
/// Unlike the peer M2 OTP-shape axis pair
/// ([`crate::supervisor::RestartStrategy`] /
/// [`crate::supervisor::RestartPolicy`] whose forward `From` emit and
/// reverse [`TryFrom<&str>`] parse share one `PascalCase` vocabulary
/// by construction, so the borrowed-input owned-[`String`] forward +
/// reverse round-trip composes directly through the owned-[`String`]'s
/// [`String::as_str`] borrow) and unlike the two-list dep-graph peer
/// ([`crate::dep::DepList`] whose [`crate::dep::DepList::as_str`] emit
/// and [`crate::dep::DepList::from_wire`] parse resolve through the
/// same lifted [`crate::render::DEP_AUTHOR_KEY_DEPS`] /
/// [`crate::render::DEP_AUTHOR_KEY_DEPS_DEV`] consts by construction),
/// the [`CaixaKind`] forward borrowed-input owned-[`String`] axis
/// emits lowercase Portuguese diagnostic bytes (`"biblioteca"`) while
/// the paired trait-idiomatic reverse [`TryFrom<&str>`] axis (via
/// [`CaixaKind::from_wire`]) parses `PascalCase` wire bytes
/// (`"Biblioteca"`) — the two-axis split the sibling
/// [`tests::caixa_kind_display_matches_as_str_and_not_serialize_wire`]
/// pin makes load-bearing is preserved here by construction, so the
/// round-trip witness crosses through [`CaixaKind::wire_name`] as the
/// reverse-axis vocabulary rather than composing the borrowed-input
/// owned-[`String`] emit directly.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_from_into_borrowed_owned_string_routes_through_as_str_accessor`]
/// (byte-parity pin against [`CaixaKind::as_str`] across the six-arm
/// emit-set through the borrowed-input surface) and
/// [`tests::caixa_kind_from_into_borrowed_owned_string_agrees_with_paired_axes_on_every_arm`]
/// (cross-axis partition pin against the paired owned-input owned-
/// [`String`] [`From<CaixaKind> for String`] impl, the paired
/// borrowed-input owned-[`&'static str`]
/// [`From<&CaixaKind> for &'static str`] impl, the paired owned-input
/// owned-[`&'static str`] [`From<CaixaKind> for &'static str`] impl,
/// and the sibling [`ToString::to_string`] surface routed through
/// [`std::fmt::Display`], plus a `.iter().map(String::from)` pipe
/// witness over [`CaixaKind::ALL`] (whose iterator yields
/// `&CaixaKind` by construction, so the borrowed-input owned-
/// [`String`] axis is what routes the pipe through the substrate-
/// primitive [`CaixaKind::as_str`] accessor without a spurious
/// [`Copy`] deref), plus a round-trip witness through
/// [`CaixaKind::wire_name`] + [`TryFrom<&str>`] that closes the
/// two-way `&Self → String → wire → Self` round-trip via the wire
/// vocabulary rather than the emit vocabulary — the two-axis split
/// by design).
impl From<&CaixaKind> for String {
    fn from(kind: &CaixaKind) -> String {
        kind.as_str().to_owned()
    }
}

/// Trait-idiomatic *owned-input, [`std::borrow::Cow<'static, str>`]
/// output* forward projection on the structurally most fundamental
/// closed-set typed enum on the caixa surface ([`CaixaKind`]) — routes
/// byte-for-byte through the substrate-primitive [`CaixaKind::as_str`]
/// `pub const fn` accessor (via [`std::borrow::Cow::Borrowed`]) so every
/// consumer that binds a [`CaixaKind`] through the standard-library
/// `.into()` / [`From<Self> for std::borrow::Cow<'static, str>`]
/// (equivalently [`Into<Cow<'static, str>>`]) axis — a future
/// `axum::response::IntoResponse` body composer whose typing folds a
/// per-arm rejection line into a [`std::borrow::Cow<'static, str>`]
/// boundary, a future M4 admission-webhook rejection body composer
/// whose typing rules out the sibling [`AsRef<str>`] borrowed return
/// and the sibling [`From<Self> for &'static str`] axis's non-
/// [`Cow`]-parameterized shape, a future substrate-wide per-arm
/// diagnostic surface that folds either the zero-alloc
/// [`Cow::Borrowed`] arm (for the closed-set arms whose byte-string is
/// build-time-lifted) or the [`Cow::Owned`] arm (for a caller that
/// mutates the projection) through one uniform trait dispatch, a
/// future generic `<T: Into<Cow<'static, str>>>`-bound emitter on a
/// per-kind structured-log or admission-webhook rejection body — reaches
/// the same six-arm lifted
/// [`crate::render::CAIXA_KIND_LABEL_BIBLIOTECA`] /
/// [`crate::render::CAIXA_KIND_LABEL_BINARIO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SERVICO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SUPERVISOR`] /
/// [`crate::render::CAIXA_KIND_LABEL_APLICACAO`] /
/// [`crate::render::CAIXA_KIND_LABEL_ACAO`] const the paired
/// [`std::fmt::Display`], [`AsRef<str>`], [`CaixaKind::as_str`], and
/// the four
/// `{Self, &Self} × {&'static str, String}` 2×2 trait-idiomatic
/// forward-projection corners
/// ([`From<CaixaKind> for &'static str`],
/// [`From<&CaixaKind> for &'static str`],
/// [`From<CaixaKind> for String`],
/// [`From<&CaixaKind> for String`]) already return, rather than an
/// open-coded per-call-site `std::borrow::Cow::Borrowed(kind.as_str())`
/// / `std::borrow::Cow::Owned(kind.to_string())` composition whose type
/// bounds have no compile-time link back to the substrate primitive.
///
/// Deliberately returns [`std::borrow::Cow::Borrowed`] rather than
/// [`std::borrow::Cow::Owned`] — the substrate-primitive
/// [`CaixaKind::as_str`] accessor's return carries the `&'static str`
/// lifetime by construction (each `match` arm resolves to a
/// [`crate::render::CAIXA_KIND_LABEL_*`] `pub const &str` with static
/// lifetime), so the zero-alloc borrowed arm is the type-correct
/// projection with no runtime allocation. The paired
/// [`std::borrow::Cow::Owned`] arm stays reachable at the call site
/// through the existing [`From<CaixaKind> for String`] axis composed
/// with [`std::borrow::Cow::from`] on the resulting owned [`String`] —
/// a caller who chose to mutate the projection lands on the owned arm
/// by their own composition, not by the substrate-primitive projection
/// silently allocating on their behalf.
///
/// Deliberately routes through the human-readable
/// [`CaixaKind::as_str`] axis, not the `PascalCase`
/// [`CaixaKind::wire_name`] axis — the two-axis split the sibling
/// [`tests::caixa_kind_display_matches_as_str_and_not_serialize_wire`]
/// pin makes load-bearing is preserved here by construction: the
/// paired [`AsRef<str>`], [`std::fmt::Display`], the four
/// `{Self, &Self} × {&'static str, String}` 2×2 forward-projection
/// corners, and this [`std::borrow::Cow<'static, str>`] axis all land
/// on the diagnostic byte-string, while the wire axis (tatara-lisp
/// author surface `:kind Biblioteca`) stays reachable only through
/// the explicit [`CaixaKind::wire_name`] + [`serde::Serialize`] paths.
///
/// First-mover on the substrate-wide trait-idiomatic
/// [`std::borrow::Cow<'static, str>`] forward-projection family —
/// Rust's standard library does not carry a blanket
/// `impl<T: AsRef<str>> From<T> for Cow<'static, str>` (nor an
/// `impl<T: fmt::Display> From<T> for Cow<'static, str>`), so every
/// closed-set fieldless typed enum on the substrate that carries the
/// paired [`AsRef<str>`] / [`std::fmt::Display`] /
/// [`From<Self> for &'static str`] / [`From<&Self> for &'static str`] /
/// [`From<Self> for String`] / [`From<&Self> for String`] sextet but
/// not the [`std::borrow::Cow<'static, str>`] axis forces every
/// [`Cow<'static, str>`]-parameterized call site through a
/// `std::borrow::Cow::Borrowed(kind.as_str())` /
/// `std::borrow::Cow::Owned(kind.to_string())` / `String::from(kind)
/// .into()` detour whose type bounds have no compile-time link to the
/// substrate primitive. Opening the axis on the structurally most
/// fundamental closed-set fieldless typed enum peer on the caixa
/// surface (every caixa carries a `:kind`) establishes the "route
/// through `as_str` via [`Cow::Borrowed`]" discipline; every future
/// closed-set fieldless typed enum peer on the substrate
/// ([`crate::supervisor::RestartStrategy`],
/// [`crate::supervisor::RestartPolicy`],
/// [`crate::aplicacao::PlacementStrategy`],
/// [`crate::aplicacao::RateLimitUnit`], [`crate::dep::DepList`],
/// [`crate::dialeto::CaixaDialeto`], and the outside-`caixa-core`
/// peers `WitShape`, `PathShapeViolation`, `InvariantKind`,
/// `ArchVerdict`, `Severity`, `FixSafety`, `Semantic`,
/// `FerriteRuntime`) is a future target of the campaign, tracking the
/// same discipline the closed 2×2 corner already established.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_from_into_static_cow_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`CaixaKind::as_str`] across the six-arm
/// emit-set, plus a [`std::borrow::Cow::Borrowed`] discriminator
/// witness that the projection lands on the zero-alloc arm rather
/// than silently allocating through [`std::borrow::Cow::Owned`]) and
/// [`tests::caixa_kind_from_into_static_cow_str_agrees_with_paired_axes_on_every_arm`]
/// (cross-axis partition pin against the paired
/// [`From<CaixaKind> for &'static str`],
/// [`From<CaixaKind> for String`], and [`ToString::to_string`]
/// surfaces, plus a `.iter().copied().map(std::borrow::Cow::from)`
/// pipe witness over [`CaixaKind::ALL`]).
impl From<CaixaKind> for std::borrow::Cow<'static, str> {
    fn from(kind: CaixaKind) -> std::borrow::Cow<'static, str> {
        std::borrow::Cow::Borrowed(kind.as_str())
    }
}

/// Trait-idiomatic *borrowed-input, [`std::borrow::Cow<'static, str>`]
/// output* forward projection on the structurally most fundamental
/// closed-set typed enum on the caixa surface ([`CaixaKind`]) — the
/// borrowed-input companion to the paired owned-input
/// [`From<CaixaKind> for std::borrow::Cow<'static, str>`] impl
/// immediately above. Routes byte-for-byte through the same
/// substrate-primitive [`CaixaKind::as_str`] `pub const fn` accessor
/// (via [`std::borrow::Cow::Borrowed`]) so every consumer that holds a
/// borrowed [`&CaixaKind`] and needs a [`std::borrow::Cow<'static, str>`]
/// — a `CaixaKind::ALL.iter().map(std::borrow::Cow::from).collect::<Vec<_>>()`
/// per-arm accept-set materializer (whose iterator over
/// `&'static [CaixaKind]` yields `&CaixaKind`, not `CaixaKind`, so the
/// owned-input [`From<CaixaKind> for std::borrow::Cow<'static, str>`]
/// axis alone forces every call site through an explicit `.copied()` /
/// dereference / [`Copy`]-bound restatement rather than the direct
/// trait-idiomatic projection), a future generic
/// `<T: for<'a> Into<std::borrow::Cow<'static, str>>>`-bound emitter on
/// a per-kind diagnostic column that walks the `iter().map(Into::into)`
/// shape verbatim, the future M4 admission-webhook rejection body that
/// composes the accepted-set enumeration from an iterated
/// `CaixaKind::ALL.iter().map(|k| k.into())` pipe rather than a per-arm
/// `match k { … }` cascade — reaches the same six-arm lifted
/// [`crate::render::CAIXA_KIND_LABEL_BIBLIOTECA`] /
/// [`crate::render::CAIXA_KIND_LABEL_BINARIO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SERVICO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SUPERVISOR`] /
/// [`crate::render::CAIXA_KIND_LABEL_APLICACAO`] /
/// [`crate::render::CAIXA_KIND_LABEL_ACAO`] const the paired
/// [`std::fmt::Display`], [`AsRef<str>`], [`CaixaKind::as_str`], the
/// four `{Self, &Self} × {&'static str, String}` 2×2 trait-idiomatic
/// forward-projection corners, and the paired owned-input
/// [`From<CaixaKind> for std::borrow::Cow<'static, str>`] impl already
/// return.
///
/// Deliberately returns [`std::borrow::Cow::Borrowed`] rather than
/// [`std::borrow::Cow::Owned`] — the substrate-primitive
/// [`CaixaKind::as_str`] accessor's return carries the `&'static str`
/// lifetime by construction (each `match` arm resolves to a
/// [`crate::render::CAIXA_KIND_LABEL_*`] `pub const &str` with static
/// lifetime), so the zero-alloc borrowed arm is the type-correct
/// projection with no runtime allocation.
///
/// Second peer on the substrate-wide trait-idiomatic
/// [`std::borrow::Cow<'static, str>`] forward-projection family opened
/// on the paired owned-input [`From<CaixaKind> for std::borrow::Cow<'static, str>`]
/// impl one commit prior (99c1735) — closes the `{Self, &Self}` input-
/// shape corner of the [`Cow<'static, str>`] axis on the structurally
/// most fundamental closed-set fieldless typed enum peer on the caixa
/// surface. Rust's standard library does not carry a blanket
/// `impl<T: AsRef<str>> From<&T> for Cow<'static, str>` (nor an
/// `impl<T: fmt::Display> From<&T> for Cow<'static, str>`), so every
/// closed-set fieldless typed enum peer on the substrate that carries
/// the paired owned-input [`Cow<'static, str>`] axis but not the
/// borrowed-input axis forces every borrowed-input
/// [`Cow<'static, str>`]-parameterized call site through a spurious
/// [`Copy`] deref (`std::borrow::Cow::from(*kind)`) or a
/// `std::borrow::Cow::Borrowed(kind.as_str())` open-code whose type
/// bounds have no compile-time link to the substrate primitive.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_from_borrowed_into_static_cow_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`CaixaKind::as_str`] across the six-arm
/// emit-set through the borrowed-input surface, plus a
/// [`std::borrow::Cow::Borrowed`] discriminator witness that the
/// projection lands on the zero-alloc arm) and
/// [`tests::caixa_kind_from_borrowed_into_static_cow_str_agrees_with_paired_axes_on_every_arm`]
/// (cross-axis partition pin against the paired owned-input
/// [`From<CaixaKind> for std::borrow::Cow<'static, str>`], the paired
/// borrowed-input owned-`&'static str`
/// [`From<&CaixaKind> for &'static str`], and the paired borrowed-
/// input owned-`String` [`From<&CaixaKind> for String`] impls, plus a
/// `.iter().map(std::borrow::Cow::from)` pipe witness over
/// [`CaixaKind::ALL`] — whose iterator yields `&CaixaKind` by
/// construction, so the borrowed-input [`Cow<'static, str>`] axis is
/// what routes the pipe through the substrate-primitive
/// [`CaixaKind::as_str`] accessor with the zero-alloc
/// [`Cow::Borrowed`] arm by construction and without a spurious
/// [`Copy`] deref).
impl From<&CaixaKind> for std::borrow::Cow<'static, str> {
    fn from(kind: &CaixaKind) -> std::borrow::Cow<'static, str> {
        std::borrow::Cow::Borrowed(kind.as_str())
    }
}

/// Trait-idiomatic *owned-input, [`Box<str>`] output* forward projection on
/// the structurally most fundamental closed-set fieldless typed enum on the
/// caixa surface ([`CaixaKind`]) — every [`crate::Caixa`] carries a `:kind`.
/// Routes byte-for-byte through the substrate-primitive
/// [`CaixaKind::as_str`] `pub const fn` accessor via [`Box::<str>::from`] on
/// the returned `&'static str`, so every consumer that binds a
/// `let key: Box<str> = kind.into();`-shaped call site reaches the same
/// six-arm lowercase-Portuguese diagnostic emit-set the sibling
/// `{Self, &Self} × {&'static str, String, Cow<'static, str>}` forward-
/// projection corner already returns.
///
/// Rust's standard library carries `impl From<&str> for Box<str>` and
/// `impl From<String> for Box<str>` but no blanket
/// `impl<T: AsRef<str>> From<T> for Box<str>`, so this axis is a distinct
/// trait-idiomatic surface that a downstream `CaixaKind → Box<str>`
/// `.into()` reaches through this impl and no other — without a
/// `Box::from(kind.as_str())` open-code whose type bounds have no compile-
/// time link back to the substrate primitive.
///
/// Deliberately routes through the human-readable [`CaixaKind::as_str`]
/// axis, not the `PascalCase` [`CaixaKind::wire_name`] axis — the two-axis
/// split the sibling
/// [`tests::caixa_kind_display_matches_as_str_and_not_serialize_wire`] pin
/// makes load-bearing is preserved here by construction.
///
/// Extends the substrate-wide trait-idiomatic [`Box<str>`] forward-
/// projection campaign onto its structurally most fundamental peer, after
/// the caixa-core-internal tier closed on
/// [`crate::render::PathShapeViolation`] / [`crate::dep::DepList`] /
/// [`crate::dialeto::CaixaDialeto`] and the outside-caixa-core tier closed
/// on `InvariantKind` / `ArchVerdict` / `Severity` / `FixSafety` /
/// `Semantic` / `FerriteRuntime`. A future variant addition (a virtual-
/// actor `Actor` arm the
/// [`ABSORPTION-ROADMAP`](https://github.com/pleme-io/theory/blob/main/ABSORPTION-ROADMAP.md)
/// M5 Orleans-inspired kind reaches through) grows the [`Box<str>`]
/// forward-projection axis by construction — one caixa-core edit on
/// [`CaixaKind::as_str`] extends every one of the sibling forward-
/// projection paths.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_from_into_box_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`CaixaKind::as_str`] across the six-arm
/// [`CaixaKind::ALL`] emit-set on the owned-input surface, plus a blanket-
/// derived [`Into`] shape witness).
impl From<CaixaKind> for Box<str> {
    fn from(kind: CaixaKind) -> Box<str> {
        Box::<str>::from(kind.as_str())
    }
}

/// Trait-idiomatic *borrowed-input, [`Box<str>`] output* forward projection
/// on the structurally most fundamental closed-set fieldless typed enum on
/// the caixa surface ([`CaixaKind`]). Routes byte-for-byte through the
/// substrate-primitive [`CaixaKind::as_str`] `pub const fn` accessor via
/// [`Box::<str>::from`] on the returned `&'static str`, so every consumer
/// that binds a `let key: Box<str> = (&kind).into();`-shaped call site or a
/// `CaixaKind::ALL.iter().map(Box::<str>::from)`-shaped pipe (whose
/// iterator over `&'static [CaixaKind]` yields `&CaixaKind` by
/// construction) reaches the same six-arm lowercase-Portuguese diagnostic
/// emit-set the paired owned-input [`From<CaixaKind> for Box<str>`] and the
/// sibling `{Self, &Self} × {&'static str, String, Cow<'static, str>}`
/// forward-projection corner already return.
///
/// Rust's standard library carries `impl From<&str> for Box<str>` and
/// `impl From<String> for Box<str>` but no blanket
/// `impl<T: AsRef<str>> From<&T> for Box<str>` (nor a `Copy`-based
/// `impl<T: Copy, U: From<T>> From<&T> for U`), so this borrowed-input axis
/// is a distinct trait-idiomatic surface that the pipe shape
/// [`CaixaKind::ALL`]`.iter().map(Box::<str>::from)` reaches through this
/// impl and no other — without it, the same pipe would force an explicit
/// `.copied()` restatement whose type bounds have no compile-time link back
/// to the substrate primitive.
///
/// Closes the `{Self, &Self}` input-shape corner on the [`Box<str>`]
/// forward-projection axis for the structurally most fundamental closed-
/// set fieldless typed enum on the caixa substrate, matching the
/// `{Self, &Self} × {&'static str, String, Cow<'static, str>}` 2×3
/// forward-projection matrix the peer projection surfaces already close.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_from_borrowed_into_box_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`CaixaKind::as_str`] across the six-arm
/// [`CaixaKind::ALL`] emit-set on the borrowed-input surface, plus a
/// blanket-derived [`Into`] shape witness, plus a
/// `.iter().map(Box::<str>::from)` pipe witness over [`CaixaKind::ALL`]
/// that resolves through the borrowed-input axis without a spurious
/// [`Copy`] deref).
impl From<&CaixaKind> for Box<str> {
    fn from(kind: &CaixaKind) -> Box<str> {
        Box::<str>::from(kind.as_str())
    }
}

/// Trait-idiomatic *owned-input, [`std::sync::Arc<str>`] output* forward
/// projection on the structurally most fundamental closed-set fieldless
/// typed enum on the caixa surface ([`CaixaKind`]) — every [`crate::Caixa`]
/// carries a `:kind`. Routes byte-for-byte through the substrate-primitive
/// [`CaixaKind::as_str`] `pub const fn` accessor via
/// [`std::sync::Arc::<str>::from`] on the returned `&'static str`, so every
/// consumer that binds a `let key: std::sync::Arc<str> = kind.into();`-shaped
/// call site reaches the same six-arm lowercase-Portuguese diagnostic
/// emit-set the sibling
/// `{Self, &Self} × {&'static str, String, Cow<'static, str>, Box<str>}`
/// forward-projection corner already returns.
///
/// Rust's standard library carries `impl From<&str> for std::sync::Arc<str>`
/// and `impl From<String> for std::sync::Arc<str>` but no blanket
/// `impl<T: AsRef<str>> From<T> for std::sync::Arc<str>` (nor an
/// `impl<T: fmt::Display> From<T> for std::sync::Arc<str>`), so this axis is
/// a distinct trait-idiomatic surface that a
/// `let key: std::sync::Arc<str> = kind.into();`-shaped call site reaches
/// through this impl and no other — a paired
/// `std::sync::Arc::<str>::from(kind.as_str())` open-code has no compile-
/// time link back to the substrate primitive, and a two-step
/// `std::sync::Arc::<str>::from(String::from(kind))` composition through the
/// owned-`String` axis allocates twice (once into the intermediate `String`,
/// once into the [`std::sync::Arc<str>`] on the `From<String>` conversion)
/// where the single-step trait impl allocates once. The shared-ownership +
/// [`Sync`] + [`Send`] contract [`std::sync::Arc<str>`] provides is the
/// distinct value the sibling [`Box<str>`] axis's owned-move return-shape
/// cannot provide — a per-cluster reconcile `:kind`-label reachable from
/// multiple concurrent per-Aplicacao / per-Servico tasks through the same
/// six lowercase-Portuguese byte-strings, without a `.clone()`-per-task
/// materialization the owned-move [`Box<str>`] axis would force.
///
/// Opens the caixa-core-internal tier of the substrate-wide trait-idiomatic
/// [`std::sync::Arc<str>`] forward-projection campaign on the structurally
/// most fundamental caixa-core enum peer — after the M2 OTP-shape tier
/// closed on [`crate::supervisor::RestartStrategy`] (bca2ec8 owned + b3e72d7
/// borrowed) and [`crate::supervisor::RestartPolicy`] (b05724e / ea91551),
/// the M3 mesh-shape tier closed on
/// [`crate::aplicacao::PlacementStrategy`] (977d577 / cc87908),
/// [`crate::aplicacao::WitShape`] (9a59b77 / 941748c), and
/// [`crate::aplicacao::RateLimitUnit`] (c481bfe / dae722f), and the outside-
/// `caixa-core` tier completed on `InvariantKind` / `ArchVerdict` /
/// `Severity` / `FixSafety` / `Semantic` / `FerriteRuntime`. Leaves the
/// remaining caixa-core-internal closed-set fieldless typed enum peers
/// ([`crate::dep::DepList`], [`crate::dialeto::CaixaDialeto`],
/// [`crate::render::PathShapeViolation`]) as the campaign's next multi-peer
/// targets on the caixa-core-internal tier of the Arc<str> axis.
///
/// Deliberately routes through the human-readable [`CaixaKind::as_str`]
/// axis, not the `PascalCase` [`CaixaKind::wire_name`] axis — the two-axis
/// split the sibling
/// [`tests::caixa_kind_display_matches_as_str_and_not_serialize_wire`] pin
/// makes load-bearing is preserved here by construction. A future variant
/// addition (a virtual-actor `Actor` arm the
/// [`ABSORPTION-ROADMAP`](https://github.com/pleme-io/theory/blob/main/ABSORPTION-ROADMAP.md)
/// M5 Orleans-inspired kind reaches through) grows the
/// [`std::sync::Arc<str>`] forward-projection axis by construction — one
/// caixa-core edit on [`CaixaKind::as_str`] extends every one of the sibling
/// forward-projection paths.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_from_into_arc_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`CaixaKind::as_str`] across the six-arm
/// [`CaixaKind::ALL`] emit-set on the owned-input surface, plus a blanket-
/// derived [`Into`] shape witness and cross-axis byte-parity pins against
/// the sibling owned-input
/// `{&'static str, String, Cow<'static, str>, Box<str>}` return-shape axes).
impl From<CaixaKind> for std::sync::Arc<str> {
    fn from(kind: CaixaKind) -> std::sync::Arc<str> {
        std::sync::Arc::<str>::from(kind.as_str())
    }
}

/// Trait-idiomatic *borrowed-input, [`std::sync::Arc<str>`] output* forward
/// projection on the structurally most fundamental closed-set fieldless
/// typed enum on the caixa surface ([`CaixaKind`]) — the borrowed-input
/// companion to the paired owned-input
/// [`From<CaixaKind> for std::sync::Arc<str>`] impl one commit above that
/// opens the caixa-core-internal tier of the substrate-wide trait-idiomatic
/// [`std::sync::Arc<str>`] forward-projection campaign. Routes byte-for-byte
/// through the substrate-primitive [`CaixaKind::as_str`] `pub const fn`
/// accessor via [`std::sync::Arc::<str>::from`] on the returned
/// `&'static str`, so every consumer that binds a
/// `let key: std::sync::Arc<str> = (&kind).into();`-shaped call site or a
/// `CaixaKind::ALL.iter().map(std::sync::Arc::<str>::from)`-shaped pipe
/// (whose iterator over `&'static [CaixaKind]` yields `&CaixaKind` by
/// construction) reaches the same six-arm lowercase-Portuguese diagnostic
/// emit-set the paired owned-input
/// [`From<CaixaKind> for std::sync::Arc<str>`] and the sibling
/// `{Self, &Self} × {&'static str, String, Cow<'static, str>, Box<str>}`
/// forward-projection corner already return.
///
/// Rust's standard library carries `impl From<&str> for std::sync::Arc<str>`
/// and `impl From<String> for std::sync::Arc<str>` but no blanket
/// `impl<T: AsRef<str>> From<&T> for std::sync::Arc<str>` (nor a `Copy`-
/// based `impl<T: Copy, U: From<T>> From<&T> for U`), so this borrowed-input
/// axis is a distinct trait-idiomatic surface that the pipe shape
/// [`CaixaKind::ALL`]`.iter().map(std::sync::Arc::<str>::from)` reaches
/// through this impl and no other — without it, the same pipe would force
/// a spurious [`Copy`] deref
/// (`std::sync::Arc::<str>::from((*kind).as_str())`) or a
/// `.copied()` restatement whose type bounds have no compile-time link back
/// to the substrate primitive.
///
/// Closes the `{Self, &Self}` input-shape corner on the
/// [`std::sync::Arc<str>`] forward-projection axis for the structurally most
/// fundamental closed-set fieldless typed enum on the caixa substrate,
/// matching the `{Self, &Self} × {&'static str, String, Cow<'static, str>,
/// Box<str>}` 2×4 forward-projection matrix the peer projection surfaces
/// already close.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_from_borrowed_into_arc_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`CaixaKind::as_str`] across the six-arm
/// [`CaixaKind::ALL`] emit-set on the borrowed-input surface, plus a
/// blanket-derived [`Into`] shape witness, a cross-axis partition pin
/// against the paired owned-input
/// [`From<CaixaKind> for std::sync::Arc<str>`] and the sibling borrowed-
/// input `{&'static str, String, Cow<'static, str>, Box<str>}` return-shape
/// axes, and a `.iter().map(std::sync::Arc::<str>::from)` pipe witness over
/// [`CaixaKind::ALL`] that resolves through the borrowed-input axis without
/// a spurious [`Copy`] deref).
impl From<&CaixaKind> for std::sync::Arc<str> {
    fn from(kind: &CaixaKind) -> std::sync::Arc<str> {
        std::sync::Arc::<str>::from(kind.as_str())
    }
}

/// Trait-idiomatic [`std::str::FromStr`] parse axis on the
/// structurally most fundamental closed-set typed enum on the caixa
/// surface — every [`crate::Caixa`] carries a `:kind` — routes
/// byte-for-byte through the paired [`TryFrom<&str> for CaixaKind`]
/// impl (which in turn routes through the substrate-primitive
/// [`CaixaKind::from_wire`] `Option<Self>` accessor), so
/// `"...".parse::<CaixaKind>()` /
/// `<CaixaKind as FromStr>::from_str(…)` reaches the same six-arm
/// `PascalCase` wire accept-set the sibling method-named
/// [`CaixaKind::from_wire`] resolver and the paired
/// [`TryFrom<&str>`] impl already resolve against.
///
/// Extends the substrate-wide trait-idiomatic `str::parse`-axis
/// campaign — opened on [`crate::dep::DepList`] via 6167092 as
/// first-mover on the two-list dep-graph closed-set typed enum —
/// onto the structurally most fundamental closed-set typed enum on
/// the caixa surface. [`FromStr`] is the canonical Rust-idiomatic
/// parse-set entry point every stdlib-shaped consumer reaches for —
/// [`str::parse::<T>()`] is a `T: FromStr`-bounded generic, not a
/// `T: for<'a> TryFrom<&'a str>`-bounded one — so lifting
/// [`FromStr`] onto the closed-set enum unlocks the
/// `.parse::<CaixaKind>()` short-form on every consumer (a future
/// `feira kind <Biblioteca|…>` clap-style arg-parse composes
/// `arg.parse::<CaixaKind>()`; a `serde` string-tagged deserializer
/// routes through the same `FromStr` bound; the future M4 admission
/// webhook's `Deserialize` derive reaches the enum through its
/// `FromStr` impl via `serde_with::DisplayFromStr` when the field
/// carries a plain `PascalCase` string rather than the current
/// serde-derived tagged form).
///
/// The impl trivially delegates to the paired [`TryFrom<&str>`] —
/// same `type Err = ()` deliberate-deferral shape the sibling
/// reverse-projection trait carries — so both trait-idiomatic
/// parse-axis paths (`TryFrom<&str>` and `FromStr::from_str`)
/// resolve to the same six-arm accept-set by construction. A future
/// accept-set widening (a case-fold path, a Portuguese-rebrand
/// alias) reaches every parse path through one edit on the
/// substrate-primitive [`CaixaKind::from_wire`] accessor, not a
/// coordinated rewrite across the two reverse-projection trait
/// impls.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_from_str_routes_through_try_from_str_impl`]
/// (byte-parity pin across the six-arm accept-set + delegated-
/// `.parse()`-projection witness) and
/// [`tests::caixa_kind_from_str_rejects_unknown_byte_strings`]
/// (rejection witness against silent accept-set widening).
impl std::str::FromStr for CaixaKind {
    type Err = ();

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        <Self as TryFrom<&str>>::try_from(s)
    }
}

/// Trait-idiomatic *owned-input, [`std::rc::Rc<str>`] output* forward
/// projection on the structurally most fundamental closed-set fieldless
/// typed enum on the caixa surface ([`CaixaKind`]). Routes byte-for-byte
/// through the substrate-primitive [`CaixaKind::as_str`] `pub const fn`
/// accessor via [`std::rc::Rc::<str>::from`] on the returned
/// `&'static str`, so every consumer that binds a
/// `let key: std::rc::Rc<str> = kind.into();`-shaped call site reaches
/// the same six-arm lowercase-Portuguese diagnostic emit-set the sibling
/// `{Self, &Self} × {&'static str, String, Cow<'static, str>, Box<str>,
/// std::sync::Arc<str>}` forward-projection corner already returns.
///
/// Rust's standard library carries `impl From<&str> for std::rc::Rc<str>`
/// and `impl From<String> for std::rc::Rc<str>` but no blanket
/// `impl<T: AsRef<str>> From<T> for std::rc::Rc<str>` (nor an
/// `impl<T: fmt::Display> From<T> for std::rc::Rc<str>`), and — critically
/// — the [`std::sync::Arc<str>`] and [`std::rc::Rc<str>`] layouts share
/// the same on-disk shape but the trait tables are disjoint (no blanket
/// `impl<T> From<T> for std::rc::Rc<str> where std::sync::Arc<str>: From<T>`
/// exists in `core`), so a closed-set enum that carries the paired
/// [`std::sync::Arc<str>`] axis but not the paired [`std::rc::Rc<str>`]
/// axis forces every single-threaded [`std::rc::Rc<str>`]-typed call site
/// through an [`std::rc::Rc::<str>::from`]`(kind.as_str())` open-code (no
/// compile-time link back to the substrate primitive) or a
/// [`std::rc::Rc::<str>::from`]`(String::from(kind))` two-step
/// composition through the owned-`String` axis that allocates twice
/// (once into the intermediate [`String`], once into the
/// [`std::rc::Rc<str>`] on the `From<String>` conversion) where the
/// single-step trait impl allocates once. The single-threaded shared-
/// ownership contract [`std::rc::Rc<str>`] provides — the non-atomic
/// strong-and-weak refcount header, cheaper `Clone` than the paired
/// atomically-refcounted [`std::sync::Arc<str>`] axis by a measurable
/// margin on hot single-threaded call sites — is the distinct value the
/// sibling [`std::sync::Arc<str>`] axis's [`Send`] and [`Sync`] return-
/// shape cannot provide without paying the atomic-increment cost on
/// every clone: a
/// single-threaded `feira lint` per-caixa diagnostic table whose per-
/// column `Cell<std::rc::Rc<str>>` payload carries the `:kind` label
/// across the row-composer + column-composer + wrapper phases reaches
/// through this axis and not the atomic sibling; a single-threaded
/// `HashMap::<std::rc::Rc<str>, _>::from_iter` per-`:kind` lookup where
/// the map's key type is [`std::rc::Rc<str>`] so the same kind-label
/// pointer can key both the map and the payload without a second heap
/// allocation reaches through this axis. Same
/// `From<Self> for std::rc::Rc<str>` reverse-projection axis the sibling
/// substrate-primitive newtype [`crate::CaixaVersion`] (01f0e0c —
/// closed the reverse-projection matrix on the substrate's core String-
/// wrapper newtype primitive) already carries — extended here onto the
/// caixa-core-internal tier of the closed-set fieldless typed-enum
/// surface via the structurally most fundamental peer, opening the
/// substrate-wide `From<Self> for std::rc::Rc<str>` campaign on the
/// closed-set fieldless typed-enum family.
///
/// Deliberately routes through the human-readable [`CaixaKind::as_str`]
/// axis, not the `PascalCase` [`CaixaKind::wire_name`] axis — the two-
/// axis split the sibling
/// [`tests::caixa_kind_display_matches_as_str_and_not_serialize_wire`]
/// pin makes load-bearing is preserved here by construction.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_from_into_rc_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`CaixaKind::as_str`] across the six-arm
/// [`CaixaKind::ALL`] emit-set on the owned-input surface, plus a
/// blanket-derived [`Into`] shape witness and cross-axis byte-parity
/// pins against the sibling owned-input `{&'static str, String,
/// Cow<'static, str>, Box<str>, std::sync::Arc<str>}` return-shape
/// axes).
impl From<CaixaKind> for std::rc::Rc<str> {
    fn from(kind: CaixaKind) -> std::rc::Rc<str> {
        std::rc::Rc::<str>::from(kind.as_str())
    }
}

/// Trait-idiomatic *borrowed-input, [`std::rc::Rc<str>`] output* forward
/// projection on the structurally most fundamental closed-set fieldless
/// typed enum on the caixa surface ([`CaixaKind`]) — the borrowed-input
/// companion to the paired owned-input
/// [`From<CaixaKind> for std::rc::Rc<str>`] impl one commit above. Routes
/// byte-for-byte through the substrate-primitive [`CaixaKind::as_str`]
/// `pub const fn` accessor via [`std::rc::Rc::<str>::from`] on the
/// returned `&'static str`, so a
/// `CaixaKind::ALL.iter().map(std::rc::Rc::<str>::from)`-shaped pipe
/// (whose iterator over `&'static [CaixaKind]` yields `&CaixaKind` by
/// construction) reaches the same six-arm lowercase-Portuguese
/// diagnostic emit-set the paired owned-input axis and the sibling
/// `{Self, &Self} × {&'static str, String, Cow<'static, str>, Box<str>,
/// std::sync::Arc<str>}` forward-projection corner already return.
///
/// Rust's standard library carries no blanket
/// `impl<T: AsRef<str>> From<&T> for std::rc::Rc<str>` (nor a `Copy`-
/// based `impl<T: Copy, U: From<T>> From<&T> for U`), so this borrowed-
/// input axis is a distinct trait-idiomatic surface that the pipe shape
/// [`CaixaKind::ALL`]`.iter().map(std::rc::Rc::<str>::from)` reaches
/// through this impl and no other — without it, the same pipe would
/// force a spurious [`Copy`] deref
/// (`std::rc::Rc::<str>::from((*kind).as_str())`) or a `.copied()`
/// restatement whose type bounds have no compile-time link back to the
/// substrate primitive.
///
/// Closes the `{Self, &Self}` input-shape corner on the
/// [`std::rc::Rc<str>`] forward-projection axis for the structurally
/// most fundamental closed-set fieldless typed enum on the caixa
/// substrate, matching the `{Self, &Self} × {&'static str, String,
/// Cow<'static, str>, Box<str>, std::sync::Arc<str>}` 2×5 forward-
/// projection matrix the peer projection surfaces already close.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_from_borrowed_into_rc_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`CaixaKind::as_str`] across the six-arm
/// [`CaixaKind::ALL`] emit-set on the borrowed-input surface, plus a
/// blanket-derived [`Into`] shape witness, a cross-axis partition pin
/// against the paired owned-input
/// [`From<CaixaKind> for std::rc::Rc<str>`] and the sibling borrowed-
/// input `{&'static str, String, Cow<'static, str>, Box<str>,
/// std::sync::Arc<str>}` return-shape axes, and a
/// `.iter().map(std::rc::Rc::<str>::from)` pipe witness over
/// [`CaixaKind::ALL`] that resolves through the borrowed-input axis
/// without a spurious [`Copy`] deref).
impl From<&CaixaKind> for std::rc::Rc<str> {
    fn from(kind: &CaixaKind) -> std::rc::Rc<str> {
        std::rc::Rc::<str>::from(kind.as_str())
    }
}

/// Substrate-canonical [`AsRef<[u8]>`] byte-view projection on the
/// structurally most fundamental closed-set fieldless typed enum on the
/// caixa surface — every [`crate::Caixa`] carries a `:kind` — routing
/// byte-for-byte through the paired substrate-primitive
/// [`CaixaKind::as_str`] `pub const fn` accessor via [`str::as_bytes`]
/// on the returned `&'static str`, so any future consumer that binds a
/// [`CaixaKind`] through a standard-library `<T: AsRef<[u8]>>` trait
/// bound reaches the same lifted
/// [`crate::render::CAIXA_KIND_LABEL_BIBLIOTECA`] /
/// [`crate::render::CAIXA_KIND_LABEL_BINARIO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SERVICO`] /
/// [`crate::render::CAIXA_KIND_LABEL_SUPERVISOR`] /
/// [`crate::render::CAIXA_KIND_LABEL_APLICACAO`] /
/// [`crate::render::CAIXA_KIND_LABEL_ACAO`] `pub const &str` roster the
/// paired sibling [`AsRef<str>`] / [`std::fmt::Display`] /
/// [`CaixaKind::as_str`] / `{Self, &Self} × {&'static str, String,
/// Cow<'static, str>, Box<str>, std::sync::Arc<str>, std::rc::Rc<str>}`
/// str-view + reverse-projection surfaces already return — through the
/// byte-view axis, which the str-view axes cannot express.
///
/// The primary compounding target is the [`crate`]-adjacent
/// [`caixa-lacre`](../../caixa-lacre/) BLAKE3 content-address closure:
/// [`blake3::hash`] and [`blake3::Hasher::update`] both bind their
/// input through `impl AsRef<[u8]>`, so any future
/// per-caixa content-address tag that folds a `:kind` discriminator
/// byte into the [`crate::Lacre`] closure (a hypothetical
/// `hasher.update(kind);`-shape composition on the per-caixa BLAKE3
/// closure builder) reaches the substrate-primitive
/// [`CaixaKind::as_str`] accessor through this impl and no other —
/// without it, every such call site opens the two-hop composition
/// `kind.as_str().as_bytes()` (or the equally two-hop
/// `AsRef::<str>::as_ref(&kind).as_bytes()`) whose byte-tail has no
/// compile-time link back to the byte-projection axis, so any future
/// silent detour off the substrate-primitive `as_str` accessor
/// (a per-arm inline `match kind { … }` re-inlining, a rebrand of one
/// `CAIXA_KIND_LABEL_*` const that touches the str-view axis but not
/// the byte-view axis, an English-canonical vocabulary shift the M4
/// admission-webhook rejection body composes) trips at diagnostic /
/// hashing / logging time rather than at caixa-core test time. Peer
/// consumer paths on the byte-view axis: any future
/// [`std::io::Write::write_all`]-bound diagnostic sink (whose input
/// binds through `impl AsRef<[u8]>`), any future byte-keyed
/// [`std::collections::HashMap`] `<K: AsRef<[u8]>, V>` lookup whose
/// entry-key trait bound rules out the sibling [`AsRef<str>`]
/// str-view projection, and any future
/// `ring::digest::Context::update` / `sha2::Sha256::update` /
/// `blake3::Hasher::update` byte-input surface on any future per-kind
/// content-address digest.
///
/// Rust's standard library carries `impl AsRef<[u8]> for str` and
/// `impl AsRef<[u8]> for String`, so the two-hop composition
/// `kind.as_str().as_bytes()` (or, equivalently,
/// `AsRef::<str>::as_ref(&kind).as_bytes()`) is reachable through the
/// pre-existing str-view axis alone. But that two-hop shape has no
/// compile-time link back to the byte-projection axis, forces every
/// downstream `<T: AsRef<[u8]>>`-bound consumer to open-code the
/// two-hop composition at every call site rather than pass a
/// [`CaixaKind`] through the trait bound directly, and admits a
/// silent split whenever a future call site takes the sibling
/// [`std::fmt::Display`] or [`From<Self> for String`] axis (whose
/// `.as_bytes()` byte-tails byte-equal `as_str`'s by construction but
/// carry no compile-time byte-view surface, since `Display` returns
/// a formatter and `String` allocates). The lifted single-hop impl
/// closes the byte-view axis so every future
/// `<T: AsRef<[u8]>>`-bound consumer reaches the substrate primitive
/// through one trait dispatch, and every future arm addition (a
/// virtual-actor `Actor` arm the
/// [`ABSORPTION-ROADMAP`](https://github.com/pleme-io/theory/blob/main/ABSORPTION-ROADMAP.md)
/// M5 Orleans-inspired kind reaches through) grows the byte-view axis
/// through one edit on the substrate-primitive `as_str` accessor, not
/// a coordinated rewrite across every future
/// `<T: AsRef<[u8]>>`-bound consumer's arm-set.
///
/// Deliberately routes through the human-readable
/// [`CaixaKind::as_str`] axis, not the `PascalCase`
/// [`CaixaKind::wire_name`] axis — same two-axis split the sibling
/// [`AsRef<str>`] str-view projection preserves, extended onto the
/// byte-view surface: the paired [`AsRef<str>`], [`AsRef<[u8]>`],
/// [`std::fmt::Display`], and [`CaixaKind::as_str`] view surfaces all
/// land on the diagnostic byte-string, while the wire axis (tatara-
/// lisp author surface `:kind Biblioteca`) stays reachable only
/// through the explicit [`CaixaKind::wire_name`] +
/// [`serde::Serialize`] paths. Any future silent collapse of either
/// axis onto the other (routing the byte-view through the wire
/// axis's `PascalCase` bytes, routing the str-view through
/// [`serde_json::to_string`]) trips through
/// [`tests::caixa_kind_display_matches_as_str_and_not_serialize_wire`]
/// at caixa-core test time rather than at a downstream byte-consumer's
/// silent split.
///
/// Opens the trait-idiomatic *byte-view* axis on the substrate-wide
/// closed-set fieldless typed-enum family through the structurally
/// most fundamental caixa-core enum peer — the first-mover on the
/// byte-projection axis in the same manner
/// [`std::str::FromStr`] (c452cae, the trait-idiomatic parse-axis
/// first-mover on this same enum) and
/// [`From<Self> for std::rc::Rc<str>`] (e04aff0, the trait-idiomatic
/// single-threaded-refcounted reverse-projection axis first-mover on
/// this same enum) opened their respective axes on the same peer. The
/// sibling closed-set fieldless typed enums
/// ([`crate::dialeto::CaixaDialeto`], [`crate::dep::DepList`],
/// [`crate::aplicacao::PlacementStrategy`],
/// [`crate::aplicacao::WitShape`], [`crate::aplicacao::RateLimitUnit`],
/// [`crate::supervisor::RestartStrategy`],
/// [`crate::supervisor::RestartPolicy`],
/// [`crate::upgrade::UpgradeInstruction`], and the outside-caixa-core
/// peers) each carry the same [`AsRef<str>`] +
/// `pub const fn as_str`/`as_suffix`/`as_lisp_form` substrate-primitive
/// accessor discipline, so a future extension of the trait-idiomatic
/// byte-view axis onto each peer reaches through one impl per enum
/// keyed to that peer's substrate-primitive accessor.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_as_ref_bytes_routes_through_as_str_accessor`]
/// (fail-before-pass-after byte-parity pin against
/// [`CaixaKind::as_str`] `.as_bytes()` across the six-arm
/// [`CaixaKind::ALL`] emit-set, cross-axis witness against the paired
/// str-view [`AsRef<str>`] / [`std::fmt::Display`] /
/// [`CaixaKind::as_str`] axes' `.as_bytes()` byte-tails, cross-axis
/// witness against the paired reverse-projection
/// `{&'static str, String, Cow<'static, str>, Box<str>,
/// std::sync::Arc<str>, std::rc::Rc<str>}` return-shape axes'
/// `.as_bytes()` byte-tails, a `<T: AsRef<[u8]>>`-bound-consumer
/// witness that a generic byte-input function accepts a [`CaixaKind`]
/// directly through the trait bound, and a
/// `blake3::Hasher::update`-shape byte-input surface witness routed
/// through the `<T: AsRef<[u8]>>`-bound consumer axis to reach the
/// caixa-lacre compounding target). Any future silent detour that
/// routes the byte-view impl off the substrate-primitive
/// [`CaixaKind::as_str`] accessor (a per-arm inline
/// `b"biblioteca".as_slice()`-shaped re-inlining that opens a
/// compile-time link to the un-lifted arm-literal, a swap onto the
/// `PascalCase` [`CaixaKind::wire_name`] axis that would collide the
/// human-readable / wire two-axis split on the byte-view surface,
/// a swap onto the sibling `serialize_wire`-shape
/// [`serde_json::to_string`] axis that would carry the surrounding
/// JSON-encoded double-quote byte pair through the byte-view surface
/// where the caller expected the bare byte-string) trips at caixa-
/// core test time rather than at a downstream byte-consumer's silent
/// split.
impl AsRef<[u8]> for CaixaKind {
    fn as_ref(&self) -> &[u8] {
        self.as_str().as_bytes()
    }
}

/// Trait-idiomatic *owned-input, owned-`Vec<u8>` output* byte-owned
/// reverse projection on the structurally most fundamental closed-set
/// fieldless typed enum on the caixa surface ([`CaixaKind`]) — the
/// byte-mirror of the [`From<CaixaKind> for String`] str-owned reverse-
/// projection axis and the owned-`Vec<u8>` reverse-projection sibling
/// of the [`AsRef<[u8]>`] borrowed byte-view axis (69d8d86) lifted on
/// this same enum. Routes byte-for-byte through the substrate-primitive
/// [`CaixaKind::as_str`] `pub const fn` accessor via
/// [`str::as_bytes`] + [`slice::to_vec`] so every consumer that binds
/// a [`CaixaKind`] through the standard-library
/// `impl From<CaixaKind> for Vec<u8>` axis (equivalently
/// `<T: Into<Vec<u8>>>`) — a future
/// [`std::io::Write::write_all`]-shape per-arm audit-log byte-sink
/// whose input parameter is an owned [`Vec<u8>`] payload, a future
/// `bytes::Bytes::from(Vec::<u8>::from(kind))` composer folding the
/// per-arm byte-tag into the [`bytes::Bytes`] framing surface, a
/// future `hasher.update(&Vec::<u8>::from(kind))`-shape BLAKE3
/// content-address closure that needs the owned byte-tail buffered
/// before folding into the [`crate::Lacre`] closure body, a future
/// per-kind protobuf/CBOR/msgpack payload composer whose framer takes
/// an owned [`Vec<u8>`] rather than a borrowed byte-slice — reaches
/// the same six-arm lifted [`crate::render::CAIXA_KIND_LABEL_*`] const
/// roster the paired [`AsRef<[u8]>`] borrowed byte-view axis, the four
/// `{Self, &Self} × {&'static str, String}` 2×2 str-view forward-
/// projection corners, the [`std::borrow::Cow<'static, str>`] /
/// [`Box<str>`] / [`std::sync::Arc<str>`] / [`std::rc::Rc<str>`] str-
/// owned reverse-projection quartet, and the substrate-primitive
/// [`CaixaKind::as_str`] accessor already return, rather than an open-
/// coded per-call-site `kind.as_str().as_bytes().to_vec()` /
/// `<CaixaKind as AsRef<[u8]>>::as_ref(&kind).to_vec()` /
/// `String::from(kind).into_bytes()` composition whose type bounds
/// have no compile-time link back to the substrate primitive.
///
/// First-mover on the substrate-wide trait-idiomatic *byte-owned
/// reverse-projection* family — Rust's standard library carries
/// `impl From<&[u8]> for Vec<u8>` and `impl From<String> for Vec<u8>`,
/// so a two-hop composition `kind.as_str().as_bytes().to_vec()` (or
/// `String::from(kind).into_bytes()`, or
/// `<CaixaKind as AsRef<[u8]>>::as_ref(&kind).to_vec()`) is reachable
/// through the pre-existing str-view axes and the paired
/// [`AsRef<[u8]>`] borrowed byte-view axis alone. But that two-hop
/// shape has no compile-time link back to the byte-owned reverse-
/// projection axis, forces every downstream
/// `<T: Into<Vec<u8>>>`-bound consumer to open-code the composition at
/// every call site, and admits a silent split whenever a future call
/// site takes a sibling projection axis whose `into_bytes()` /
/// `to_vec()` byte-tail carries no compile-time byte-owned surface.
/// The lifted single-hop impl closes the byte-owned reverse-projection
/// axis so every future `Vec<u8>`-parameterized consumer reaches the
/// substrate primitive through one trait dispatch, and every future
/// arm addition (a new `:kind` variant landing on
/// [`crate::render::CAIXA_KIND_LABEL_*`]) grows the byte-owned axis
/// through one edit on the substrate-primitive
/// [`CaixaKind::as_str`] accessor.
///
/// Opens the byte-owned reverse-projection axis on the structurally
/// most fundamental closed-set fieldless typed enum peer on the caixa
/// surface (every caixa carries a `:kind`), establishing the "route
/// through `as_str` via `.as_bytes().to_vec()`" discipline; every
/// future closed-set fieldless typed enum peer on the substrate
/// ([`crate::supervisor::RestartStrategy`],
/// [`crate::supervisor::RestartPolicy`],
/// [`crate::aplicacao::PlacementStrategy`],
/// [`crate::aplicacao::RateLimitUnit`], [`crate::dep::DepList`],
/// [`crate::dialeto::CaixaDialeto`], and the outside-`caixa-core`
/// peers `WitShape`, `PathShapeViolation`, `InvariantKind`,
/// `ArchVerdict`, `Severity`, `FixSafety`, `Semantic`,
/// `FerriteRuntime`) is a future target of the campaign, mirroring the
/// discipline the paired [`AsRef<[u8]>`] borrowed byte-view axis
/// campaign already tracked.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_from_into_owned_vec_bytes_routes_through_as_str_accessor`]
/// (byte-parity pin against [`CaixaKind::as_str`] across the six-arm
/// emit-set binding the byte-owned reverse-projection axis against the
/// paired [`AsRef<[u8]>`] borrowed byte-view axis and the str-view
/// family's `.as_bytes().to_vec()` byte-tails, plus a
/// `<T: Into<Vec<u8>>>`-bound generic-consumer witness and a
/// `std::io::Write::write_all`-shape owned-byte-sink surface witness
/// on both owned and borrowed input shapes).
impl From<CaixaKind> for Vec<u8> {
    fn from(kind: CaixaKind) -> Vec<u8> {
        kind.as_str().as_bytes().to_vec()
    }
}

/// Trait-idiomatic *borrowed-input, owned-`Vec<u8>` output* byte-owned
/// reverse projection on the structurally most fundamental closed-set
/// fieldless typed enum on the caixa surface ([`CaixaKind`]) — the
/// borrowed-input peer of [`From<CaixaKind> for Vec<u8>`], closing the
/// `{Self, &Self} → Vec<u8>` pair on the byte-owned reverse-projection
/// axis in one lift. Routes byte-for-byte through the substrate-
/// primitive [`CaixaKind::as_str`] `pub const fn` accessor so every
/// consumer that holds a borrowed [`&CaixaKind`] and needs an owned
/// [`Vec<u8>`] — a future `.iter().map(Vec::<u8>::from).collect()`
/// pipe over `&[CaixaKind]` (whose iterator yields `&CaixaKind`, not
/// `CaixaKind`, so the owned-input axis alone forces every call site
/// through an explicit `.copied()` / spurious [`Copy`] deref
/// restatement rather than the direct trait-idiomatic projection), a
/// future admission-webhook rejection body composer that walks
/// [`CaixaKind::ALL`] through an `Into<Vec<u8>>`-bound per-arm byte-
/// writer to surface the accepted `:kind` set — reaches the same six-
/// arm lifted [`crate::render::CAIXA_KIND_LABEL_*`] const roster the
/// paired owned-input peer already returns.
impl From<&CaixaKind> for Vec<u8> {
    fn from(kind: &CaixaKind) -> Vec<u8> {
        kind.as_str().as_bytes().to_vec()
    }
}

/// Trait-idiomatic *borrowed byte-slice input* reverse projection on the
/// structurally most fundamental closed-set fieldless typed enum on the caixa
/// surface ([`CaixaKind`]) — the byte-view mirror of the str-view reverse-
/// projection axis carried by the paired [`TryFrom<&str> for CaixaKind`] impl
/// (which routes through the substrate-primitive [`CaixaKind::from_wire`]
/// `Option<Self>` accessor on the `PascalCase` wire vocabulary). Routes
/// byte-for-byte through the standard-library [`std::str::from_utf8`] UTF-8
/// validator and then through [`CaixaKind::from_wire`] so every consumer that
/// holds a borrowed [`&[u8]`] and needs to project it back into a typed
/// [`CaixaKind`] — a future admission-webhook rejection body that reads a
/// `spec.kind` field off a raw HTTP body byte-slice before UTF-8 validation
/// commits allocation, a future `bytes::Bytes::as_ref()`-fed CR-decoder that
/// parses a per-caixa `:kind` tag from an already-borrowed framing byte-tail,
/// a future BLAKE3-content-addressed manifest reader that walks a fixed
/// byte-slice payload back into typed enum values through the sibling
/// [`crate::Lacre`] closure body, a future generic
/// `<T: for<'a> TryFrom<&'a [u8]>>`-bound loader over any of the substrate's
/// closed-set typed enums — reaches the same six-arm `PascalCase` wire accept-
/// set the sibling method-named [`CaixaKind::from_wire`] resolver and the
/// paired trait-idiomatic [`TryFrom<&str>`] axis already resolve against,
/// rather than an open-coded per-call-site
/// `std::str::from_utf8(bytes).ok().and_then(CaixaKind::from_wire)` composition
/// or a `<CaixaKind as TryFrom<&str>>::try_from(std::str::from_utf8(bytes)?)`
/// two-hop shape whose type bounds have no compile-time link to the
/// substrate primitive.
///
/// First-mover on the substrate-wide trait-idiomatic *byte-view reverse-
/// projection* family — Rust's standard library carries no blanket
/// `impl<T: for<'a> TryFrom<&'a str>> TryFrom<&[u8]> for T`, so a two-hop
/// composition through [`std::str::from_utf8`] + the paired [`TryFrom<&str>`]
/// axis is reachable at every call site but has no compile-time link back to
/// the byte-view reverse-projection axis. Opening the axis on the
/// structurally most fundamental closed-set fieldless typed enum peer on the
/// caixa surface (every caixa carries a `:kind`) establishes the "route
/// through `from_wire` via `std::str::from_utf8`" discipline; every future
/// closed-set fieldless typed enum peer on the substrate
/// ([`crate::supervisor::RestartStrategy`],
/// [`crate::supervisor::RestartPolicy`],
/// [`crate::aplicacao::PlacementStrategy`],
/// [`crate::aplicacao::RateLimitUnit`], [`crate::dep::DepList`],
/// [`crate::dialeto::CaixaDialeto`], and the outside-`caixa-core` peers
/// `WitShape`, `PathShapeViolation`, `InvariantKind`, `ArchVerdict`,
/// `Severity`, `FixSafety`, `Semantic`, `FerriteRuntime`) is a future target
/// of the campaign, mirroring the discipline the closed byte-owned forward-
/// projection family established.
///
/// `type Error = ()` matches the sibling [`CaixaKind::from_wire`]'s
/// `Option<Self>` return-shape's deliberate deferral of error typing and the
/// paired trait-idiomatic [`TryFrom<&str>`] axis's unit-error shape — the
/// caller picks the diagnostic form appropriate for its use site (a future
/// admission-webhook rejection body wraps the `Err(())` with the accepted-set
/// enumeration for operator diagnostics; a `Result::map_err` at the call
/// site lifts the unit-error to a per-verb error type). Two rejection paths
/// route through the single unit-error: an invalid UTF-8 byte-sequence
/// (`std::str::from_utf8` returns `Err`) and a valid UTF-8 byte-string that
/// falls outside the six-arm `PascalCase` wire accept-set
/// ([`CaixaKind::from_wire`] returns `None`) — both collapse onto `Err(())`
/// so the trait signature stays consistent with the sibling str-view reverse
/// axis, and a caller that needs to distinguish the two failure modes
/// composes [`std::str::from_utf8`] + [`CaixaKind::from_wire`] explicitly.
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_try_from_bytes_routes_through_from_wire_accessor`]
/// (byte-parity pin against [`CaixaKind::from_wire`] across the six-arm
/// [`CaixaKind::ALL`] accept-set on the borrowed byte-slice surface, plus a
/// cross-axis witness that the byte-view reverse projection agrees with the
/// paired [`TryFrom<&str>`] str-view reverse axis on every accepted arm) and
/// [`tests::caixa_kind_try_from_bytes_rejects_unknown_and_non_utf8_bytes`]
/// (rejection witness against silent accept-set widening on both the
/// non-UTF-8 byte-sequence rejection path and the unknown-wire-vocabulary
/// rejection path).
impl TryFrom<&[u8]> for CaixaKind {
    type Error = ();

    fn try_from(bytes: &[u8]) -> Result<Self, Self::Error> {
        std::str::from_utf8(bytes)
            .ok()
            .and_then(Self::from_wire)
            .ok_or(())
    }
}

/// Trait-idiomatic *owned byte-vec input* reverse projection on the
/// structurally most fundamental closed-set fieldless typed enum on the
/// caixa surface ([`CaixaKind`]) — the owned-input peer of
/// [`TryFrom<&[u8]> for CaixaKind`], mirroring the closed
/// [`From<CaixaKind> for Vec<u8>`] + [`From<&CaixaKind> for Vec<u8>`]
/// byte-owned *forward*-projection pair on this same enum onto the
/// byte-owned *reverse*-projection axis. Routes byte-for-byte through
/// [`<Self as TryFrom<&[u8]>>::try_from`] on the [`Vec<u8>::as_slice`]
/// borrow, so the owned-input surface reaches the same
/// [`std::str::from_utf8`] + [`CaixaKind::from_wire`] resolution chain
/// the borrowed-input peer already carries — one substrate-primitive
/// accessor, one trait dispatch, no per-consumer detour.
///
/// Rust's standard library carries no blanket
/// `impl<T: for<'a> TryFrom<&'a [u8]>> TryFrom<Vec<u8>> for T`, so a
/// consumer that holds an owned [`Vec<u8>`] and needs a typed
/// [`CaixaKind`] otherwise picks between (a) an open-coded
/// `<CaixaKind as TryFrom<&[u8]>>::try_from(bytes.as_slice())` at every
/// call site (whose type bounds have no compile-time link to the byte-
/// owned reverse-projection axis), (b) a two-hop
/// `String::from_utf8(bytes)` + [`CaixaKind::from_wire`] composition
/// whose error surface leaks the standard-library [`std::string::FromUtf8Error`]
/// (widening the sibling [`TryFrom<&[u8]>`] axis's unit-error) and
/// silently allocates a [`String`] on inputs that will never make it
/// past the wire vocabulary, or (c) an intermediate
/// `<CaixaKind as TryFrom<&str>>::try_from(std::str::from_utf8(&bytes)?)`
/// three-hop shape. This impl closes the owned-byte-vec reverse-
/// projection axis at the substrate-primitive
/// [`CaixaKind::from_wire`] accessor so every future
/// `<T: TryFrom<Vec<u8>>>`-bound owned-byte-vec consumer — a future
/// admission-webhook body reader that hands raw request bytes off as
/// a [`Vec<u8>`] before UTF-8 validation commits, a future
/// `std::io::Read::read_to_end`-shape audit-log source whose framing
/// yields an owned byte-vec per frame, a future protobuf/CBOR/msgpack
/// per-field decoder whose bytes arm surfaces an owned [`Vec<u8>`]
/// before dispatch, a `bytes::Bytes::to_vec()`-shape wire-body
/// composer walking a prior audit's payload back to the typed enum,
/// an `<T: TryFrom<Vec<u8>>>`-bound generic loader over any of the
/// substrate's closed-set typed enums — reaches the same six-arm
/// `PascalCase` wire accept-set through one trait dispatch.
///
/// First-mover on the substrate-wide trait-idiomatic *byte-owned
/// reverse-projection* family, opening on the structurally most
/// fundamental caixa-core enum peer (every caixa carries a `:kind`).
/// Every future closed-set fieldless typed enum peer on the substrate
/// ([`crate::supervisor::RestartStrategy`],
/// [`crate::supervisor::RestartPolicy`],
/// [`crate::aplicacao::PlacementStrategy`],
/// [`crate::aplicacao::RateLimitUnit`], [`crate::dep::DepList`],
/// [`crate::dialeto::CaixaDialeto`], [`crate::render::PathShapeViolation`],
/// and the outside-`caixa-core` peers `WitShape`, `InvariantKind`,
/// `ArchVerdict`, `Severity`, `FixSafety`, `Semantic`, `FerriteRuntime`)
/// is a future target of the campaign, mirroring the trajectory the
/// closed byte-view reverse-projection family (`TryFrom<&[u8]>`) and
/// the closed byte-owned forward-projection family
/// (`From<{Self, &Self}> for Vec<u8>`) already walked.
///
/// `type Error = ()` matches the sibling [`TryFrom<&[u8]> for CaixaKind`]
/// unit-error shape, preserving the trait-family consistency across the
/// borrowed-and-owned byte-view reverse-projection pair. The owned
/// [`Vec<u8>`] input is dropped on the error path (the standard-library
/// `String::from_utf8` convention of returning the input in the error
/// deliberately declined — a caller that needs the bytes back holds a
/// clone before the call, and the closed-set-enum use site rarely
/// wants the raw bytes back past a "did you mean" diagnostic that
/// operates on the wire vocabulary rather than the input).
///
/// Pinned load-bearing by
/// [`tests::caixa_kind_try_from_vec_bytes_routes_through_borrowed_byte_view_axis`]
/// (byte-parity pin against the paired borrowed [`TryFrom<&[u8]>`] axis
/// across the six-arm [`CaixaKind::ALL`] accept-set on the owned byte-
/// vec surface, plus a cross-axis witness that the byte-owned reverse
/// projection agrees with the paired str-view reverse-projection axis
/// ([`TryFrom<&str>`]) on every accepted arm through the shared
/// substrate-primitive [`CaixaKind::from_wire`] accessor, plus a four-
/// corner {owned-input, borrowed-input} × {owned-output byte-vec,
/// borrowed-output byte-slice} round-trip witness against the paired
/// [`From<{Self, &Self}> for Vec<u8>`] byte-owned forward-projection
/// pair) and
/// [`tests::caixa_kind_try_from_vec_bytes_rejects_unknown_and_non_utf8_bytes`]
/// (rejection witness against silent accept-set widening on both the
/// non-UTF-8 byte-sequence rejection path and the unknown-wire-
/// vocabulary rejection path, plus a cross-axis witness that the
/// owned byte-vec reverse-projection axis agrees with the borrowed
/// byte-slice reverse-projection axis on every rejected input).
impl TryFrom<Vec<u8>> for CaixaKind {
    type Error = ();

    fn try_from(bytes: Vec<u8>) -> Result<Self, Self::Error> {
        <Self as TryFrom<&[u8]>>::try_from(bytes.as_slice())
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn kind_requirements() {
        assert!(CaixaKind::Biblioteca.requires_lib());
        assert!(!CaixaKind::Biblioteca.requires_exe());
        assert!(CaixaKind::Binario.requires_exe());
        assert!(CaixaKind::Servico.requires_servicos());
        assert!(CaixaKind::Supervisor.requires_children());
        assert!(!CaixaKind::Servico.requires_children());
        assert!(CaixaKind::Acao.requires_ci());
        assert!(!CaixaKind::Servico.requires_ci());
    }

    #[test]
    fn kind_deserializes_from_pascal_symbol() {
        let v: CaixaKind = serde_json::from_str("\"Biblioteca\"").unwrap();
        assert_eq!(v, CaixaKind::Biblioteca);
        let v: CaixaKind = serde_json::from_str("\"Supervisor\"").unwrap();
        assert_eq!(v, CaixaKind::Supervisor);
    }

    #[test]
    fn supervisor_kind_has_canonical_name() {
        assert_eq!(CaixaKind::Supervisor.as_str(), "supervisor");
    }

    #[test]
    fn caixa_kind_as_str_returns_lifted_peer_const() {
        // The fail-before-pass-after pin: pre-lift the five
        // [`CaixaKind::as_str`] match arms each returned a hand-authored
        // byte-string literal (`"biblioteca"` / `"binario"` /
        // `"servico"` / `"supervisor"` / `"aplicacao"`) with no
        // compile-time link to any lifted peer const on the sibling
        // layout-diagnostic axis (whose bytes coincide on `Biblioteca` /
        // `Servico` by design — see the existing alignment pin in
        // `crate::layout::tests`). A future rebrand touching either
        // endpoint (a per-consumer disambiguation of the `:kind`
        // vocabulary, an English-canonical rename lands on one arm's
        // byte-string without touching the peer axis) would silently
        // desynchronize until a downstream consumer surfaced the drift
        // at diagnostic / graph time. Pinning the five arms to the five
        // lifted [`crate::render::CAIXA_KIND_LABEL_*`] consts makes any
        // future drift a caixa-core-build-time failure. Peer of the
        // sibling
        // [`crate::supervisor::tests::restart_strategy_variants_serialize_to_lifted_scalar_values`]
        // (09ffb2d) /
        // [`crate::supervisor::tests::restart_policy_variants_serialize_to_lifted_scalar_values`]
        // (ccdf955) /
        // `placement_strategy_variants_serialize_to_lifted_scalar_values`
        // (3f0e21c) pins on the sibling closed-set typed-enum
        // discriminator axes.
        for (variant, expected) in [
            (
                CaixaKind::Biblioteca,
                crate::render::CAIXA_KIND_LABEL_BIBLIOTECA,
            ),
            (CaixaKind::Binario, crate::render::CAIXA_KIND_LABEL_BINARIO),
            (CaixaKind::Servico, crate::render::CAIXA_KIND_LABEL_SERVICO),
            (
                CaixaKind::Supervisor,
                crate::render::CAIXA_KIND_LABEL_SUPERVISOR,
            ),
            (
                CaixaKind::Aplicacao,
                crate::render::CAIXA_KIND_LABEL_APLICACAO,
            ),
            (CaixaKind::Acao, crate::render::CAIXA_KIND_LABEL_ACAO),
        ] {
            assert_eq!(
                variant.as_str(),
                expected,
                "CaixaKind::{variant:?}.as_str() must return the lifted \
                 CAIXA_KIND_LABEL_* const"
            );
        }
    }

    #[test]
    fn caixa_kind_display_routes_through_as_str_helper() {
        // The fail-before-pass-after pin on the two-path convergence:
        // pre-lift [`CaixaKind`] carried no [`std::fmt::Display`]
        // surface at all — every consumer past the wire format had to
        // pick between [`CaixaKind::as_str`] returning the lowercase
        // Portuguese label or `format!("{v:?}")` on the `Debug` derive
        // returning the PascalCase variant name. Wiring
        // [`std::fmt::Display`] through [`CaixaKind::as_str`] closes
        // the drift footgun: every `format!("{v}")` call reaches the
        // same lifted [`crate::render::CAIXA_KIND_LABEL_*`] const the
        // [`CaixaKind::as_str`] helper already returns, so a future
        // variant rename lands at exactly one place. Pin the routing
        // here so a future `impl std::fmt::Display for CaixaKind`
        // reimplementation that hand-rolls the arms instead of
        // delegating to [`CaixaKind::as_str`] fails at caixa-core
        // build time. Peer of the sibling
        // [`crate::supervisor::tests::restart_strategy_display_routes_through_as_str_helper`]
        // /
        // [`crate::supervisor::tests::restart_policy_display_routes_through_as_str_helper`]
        // (15a1305) on the sibling M2 closed-set typed-enum
        // discriminator axes.
        for &variant in CaixaKind::ALL {
            assert_eq!(
                variant.to_string(),
                variant.as_str(),
                "CaixaKind::{variant:?} Display must route through \
                 CaixaKind::as_str (single source of truth: the lifted \
                 CAIXA_KIND_LABEL_* const)"
            );
        }
    }

    #[test]
    fn caixa_kind_display_matches_as_str_and_not_serialize_wire() {
        // The fail-before-pass-after pin on the two-axis split
        // discipline: unlike the sibling OTP-shape / M3 typed enums
        // ([`crate::supervisor::RestartStrategy`],
        // [`crate::supervisor::RestartPolicy`],
        // [`crate::aplicacao::PlacementStrategy`]) where the wire
        // format and the human-readable format share bytes (both
        // PascalCase / camelCase), [`CaixaKind`] carries two axes with
        // *distinct* byte-shapes by design: the wire format is
        // PascalCase (`"Biblioteca"` / `"Binario"` / `"Servico"` /
        // `"Supervisor"` / `"Aplicacao"` — the tatara-lisp author
        // surface `:kind Biblioteca`), while [`CaixaKind::as_str`] /
        // [`std::fmt::Display`] emit the lowercase Portuguese
        // diagnostic form (`"biblioteca"` etc.). The pin here makes
        // the split load-bearing: a future accidental collapse of
        // either axis onto the other (routing `Serialize` through
        // [`CaixaKind::as_str`] via `#[serde(rename_all = "lowercase")]`,
        // routing [`std::fmt::Display`] through the wire format
        // directly) would trip here at caixa-core build time rather
        // than silently merging the two axes at some future consumer's
        // dispatch step.
        for &variant in CaixaKind::ALL {
            let wire = serde_json::to_string(&variant).unwrap();
            let unquoted = wire
                .strip_prefix('"')
                .and_then(|s| s.strip_suffix('"'))
                .expect("serialized CaixaKind is a JSON string");
            let display = variant.to_string();
            assert_eq!(
                display,
                variant.as_str(),
                "CaixaKind::{variant:?} Display must byte-equal as_str"
            );
            assert_ne!(
                display, unquoted,
                "CaixaKind::{variant:?} Display / as_str (lowercase Portuguese \
                 diagnostic form) must stay structurally distinct from the \
                 Serialize wire format (PascalCase tatara-lisp author surface)"
            );
            assert!(
                unquoted.chars().next().is_some_and(char::is_uppercase),
                "CaixaKind::{variant:?} wire format must open with an \
                 uppercase byte (PascalCase tatara-lisp author surface)"
            );
            assert!(
                display.chars().next().is_some_and(char::is_lowercase),
                "CaixaKind::{variant:?} Display / as_str must open with a \
                 lowercase byte (Portuguese diagnostic form)"
            );
        }
    }

    #[test]
    fn caixa_kind_label_consts_pin_canonical_bytes() {
        // Drift-detection pin: the five
        // [`crate::render::CAIXA_KIND_LABEL_*`] lifted consts must
        // continue to carry their canonical byte-shapes. A rebrand
        // touching one const's declaration would silently desynchronize
        // every consumer this const routes through (the
        // [`CaixaKind::as_str`] arm, the [`std::fmt::Display`] route,
        // the byte-shape coincidence pins against
        // [`crate::render::LAYOUT_MISSING_ENTRY_KIND_BIBLIOTECA`] /
        // [`crate::render::LAYOUT_MISSING_ENTRY_KIND_SERVICO`] /
        // [`crate::render::FLEET_PROGRAMS_KEY_APLICACAO`]) — pinning
        // the five byte-shapes here makes any rebrand attempt a build
        // error at this call, forcing the author to reason about every
        // downstream consumer explicitly. Mirror of the peer
        // drift-detection pins the sibling OTP-shape / M3 closed-set
        // const families carry (`SUPERVISOR_ESTRATEGIA_*`,
        // `SUPERVISOR_CHILD_RESTART_*`, `M3_PLACEMENT_ESTRATEGIA_*`).
        assert_eq!(crate::render::CAIXA_KIND_LABEL_BIBLIOTECA, "biblioteca");
        assert_eq!(crate::render::CAIXA_KIND_LABEL_BINARIO, "binario");
        assert_eq!(crate::render::CAIXA_KIND_LABEL_SERVICO, "servico");
        assert_eq!(crate::render::CAIXA_KIND_LABEL_SUPERVISOR, "supervisor");
        assert_eq!(crate::render::CAIXA_KIND_LABEL_APLICACAO, "aplicacao");
        assert_eq!(crate::render::CAIXA_KIND_LABEL_ACAO, "acao");
    }

    #[test]
    fn caixa_kind_is_variant_predicates_partition_the_arm_set() {
        // Fail-before-pass-after pin on the [`gen_platform::IsVariant`]
        // derive: for each of the five variants, exactly one of the
        // generated `is_biblioteca` / `is_binario` / `is_servico` /
        // `is_supervisor` / `is_aplicacao` predicates returns `true` and
        // the other four return `false`. Prior to this derive the ten
        // production `caixa.kind() == CaixaKind::X` / `!=` sites in
        // `layout.rs` (`SupervisorOwnsCode` / `AplicacaoOwnsCode` /
        // `MeshSlotsOnNonAplicacao` / `SupervisorSlotsOnNonSupervisor` /
        // `ServicoSlotsOnNonServico` / `MissingLib` biblioteca-fallback
        // / Supervisor invariants / Aplicacao invariants) plus
        // `manifest.rs` (`aplicacao_view` / `supervisor_view` kind
        // gates) each open-coded a per-arm PartialEq compare against
        // the enum variant — ten sites that expressed no compile-time
        // link back to the closed-set typed dispatch a future sixth
        // `:kind` (e.g. an `Actor` virtual-actor arm for the
        // absorption-roadmap M5 Orleans-inspired kind) would have to
        // thread through in lockstep or one gate would silently
        // disagree with the others on which arms it treats as "runs
        // no code" / "declares mesh slots" / etc. Peer of the sibling
        // [`crate::supervisor::RestartStrategy`] / [`crate::supervisor::RestartPolicy`] /
        // [`crate::upgrade::UpgradeInstruction`] `IsVariant` derives on
        // the sibling closed-set typed-enum discriminator axes — extends
        // the same one-typed-dispatch-per-variant discipline onto the
        // fourth (and structurally most fundamental — every caixa
        // carries a `:kind`) closed-set typed-enum discriminator axis.
        let rows: [(CaixaKind, [bool; 6]); 6] = [
            (
                CaixaKind::Biblioteca,
                [true, false, false, false, false, false],
            ),
            (
                CaixaKind::Binario,
                [false, true, false, false, false, false],
            ),
            (
                CaixaKind::Servico,
                [false, false, true, false, false, false],
            ),
            (
                CaixaKind::Supervisor,
                [false, false, false, true, false, false],
            ),
            (
                CaixaKind::Aplicacao,
                [false, false, false, false, true, false],
            ),
            (CaixaKind::Acao, [false, false, false, false, false, true]),
        ];
        for (variant, expected) in rows {
            let observed = [
                variant.is_biblioteca(),
                variant.is_binario(),
                variant.is_servico(),
                variant.is_supervisor(),
                variant.is_aplicacao(),
                variant.is_acao(),
            ];
            assert_eq!(
                observed, expected,
                "CaixaKind::{variant:?} is_* predicates must partition \
                 the arm set (biblioteca, binario, servico, supervisor, \
                 aplicacao, acao); got {observed:?}"
            );
        }
    }

    #[test]
    fn caixa_kind_is_variant_predicates_are_const_fn() {
        // The [`gen_platform::IsVariant`] derive emits `const fn`
        // predicates on the peer [`crate::upgrade::UpgradeInstruction`] +
        // [`crate::supervisor::RestartStrategy`] +
        // [`crate::supervisor::RestartPolicy`] closed-set typed enums —
        // pin the same posture on [`CaixaKind`] so a future accidental
        // downgrade to non-`const` (an added runtime helper reachable
        // only from a non-`const` context, a manual hand-rolled `impl`
        // that shadows the derive-generated method) trips at
        // caixa-core build time rather than surfacing as a
        // downstream `const`-context regression far from the derive
        // declaration.
        //
        // The pin lives inside a `const { assert!(..) }` block so the
        // compiler enforces both halves (arm predicate is `const`-
        // callable AND returns `true` for the matching arm) at
        // caixa-core compile time — a `#[test]` body without the
        // `const { .. }` wrapper would enforce const-callability at
        // compile time (through the named `const` binding) but the
        // arm-value pin only at test-run time, splitting the
        // enforcement axis into two windows.
        const {
            assert!(CaixaKind::Aplicacao.is_aplicacao());
            assert!(CaixaKind::Biblioteca.is_biblioteca());
            assert!(CaixaKind::Servico.is_servico());
            assert!(CaixaKind::Supervisor.is_supervisor());
            assert!(CaixaKind::Binario.is_binario());
            assert!(CaixaKind::Acao.is_acao());
        }
    }

    #[test]
    fn caixa_kind_wire_name_returns_lifted_peer_const() {
        // Fail-before-pass-after pin: the six [`CaixaKind::wire_name`]
        // match arms each return one of the paired
        // [`crate::render::CAIXA_KIND_WIRE_*`] lifted consts, and a
        // future rebrand touching either endpoint (a per-consumer
        // disambiguation of the `:kind` vocabulary, a rename lands on
        // one arm's byte-string without touching the peer axis) would
        // silently desynchronize the emitter from the paired
        // [`CaixaKind::from_wire`] parser's accept-set. Pinning the six
        // arms to the six lifted consts makes any future drift a
        // caixa-core-build-time failure — peer of the sibling
        // [`caixa_kind_as_str_returns_lifted_peer_const`] pin on the
        // human-readable-label axis.
        for (variant, expected) in [
            (
                CaixaKind::Biblioteca,
                crate::render::CAIXA_KIND_WIRE_BIBLIOTECA,
            ),
            (CaixaKind::Binario, crate::render::CAIXA_KIND_WIRE_BINARIO),
            (CaixaKind::Servico, crate::render::CAIXA_KIND_WIRE_SERVICO),
            (
                CaixaKind::Supervisor,
                crate::render::CAIXA_KIND_WIRE_SUPERVISOR,
            ),
            (
                CaixaKind::Aplicacao,
                crate::render::CAIXA_KIND_WIRE_APLICACAO,
            ),
            (CaixaKind::Acao, crate::render::CAIXA_KIND_WIRE_ACAO),
        ] {
            assert_eq!(
                variant.wire_name(),
                expected,
                "CaixaKind::{variant:?}.wire_name() must return the \
                 lifted CAIXA_KIND_WIRE_* const"
            );
        }
    }

    #[test]
    fn caixa_kind_wire_name_matches_serialize_wire_byte_string() {
        // Load-bearing pin on the derive-to-const identity: the six
        // [`CaixaKind::wire_name`] outputs must byte-equal the
        // un-`rename`d `Serialize` derive's per-arm wire scalar (the
        // JSON quoted-string with its outer quotes stripped). A future
        // accidental `#[serde(rename_all = "…")]` attribute drift at
        // the derive surface would silently split the wire byte-shape
        // every K8s-CR / tatara-lisp author-surface / future-M4-CR
        // materializer consumer emits through this typed dispatch from
        // the shape the un-`rename`d derive projects — the drift's
        // apply-time symptom (a K8s Caixa CR whose `spec.kind` no
        // longer round-trips through `caixa_from_cr` because the
        // reverse [`CaixaKind::from_wire`] parser rejects the new
        // rename-transformed byte-string) would surface far from the
        // derive attribute's commit. Pinning the identity here makes
        // any such drift a caixa-core-build-time failure. Peer of the
        // sibling
        // [`caixa_kind_display_matches_as_str_and_not_serialize_wire`]
        // pin — that one keeps `Display` structurally *distinct* from
        // the wire byte-shape (by design); this one keeps
        // [`CaixaKind::wire_name`] structurally *aligned* with the
        // wire byte-shape (by design).
        for &variant in CaixaKind::ALL {
            let json = serde_json::to_string(&variant).unwrap();
            let unquoted = json
                .strip_prefix('"')
                .and_then(|s| s.strip_suffix('"'))
                .expect("serialized CaixaKind is a JSON string");
            assert_eq!(
                variant.wire_name(),
                unquoted,
                "CaixaKind::{variant:?}.wire_name() must byte-equal the \
                 un-renamed Serialize derive's wire scalar — a mismatch \
                 means either the derive attributes drifted or the \
                 CAIXA_KIND_WIRE_* const family drifted; either way \
                 downstream K8s-CR round-trip through caixa_from_cr \
                 silently splits from the accessor-routed source of \
                 truth"
            );
        }
    }

    #[test]
    fn caixa_kind_wire_round_trips_through_from_wire() {
        // Total-round-trip pin on the (wire_name, from_wire) pair:
        // every arm's [`CaixaKind::wire_name`] output must parse back
        // through [`CaixaKind::from_wire`] to the same variant. Any
        // future accessor extension that adds a new arm to one side of
        // the pair without extending the other — a new `CaixaKind`
        // variant whose `wire_name` arm lands but whose `from_wire`
        // arm is forgotten, or a rename that touches `wire_name`'s
        // per-arm const without threading through `from_wire`'s peer
        // arm — trips here at caixa-core build time rather than
        // surfacing as a downstream K8s-CR round-trip miss (a
        // `caixa_into_cr` emit that lands a `spec.kind` byte-string
        // the paired `caixa_from_cr`'s `CaixaKind::from_wire` cannot
        // parse, silently falling through to the caller's
        // `.unwrap_or(CaixaKind::Biblioteca)` fallback).
        for &variant in CaixaKind::ALL {
            let wire = variant.wire_name();
            let parsed = CaixaKind::from_wire(wire).unwrap_or_else(|| {
                panic!(
                    "CaixaKind::from_wire({wire:?}) must accept every \
                     CaixaKind::wire_name output — got None for the \
                     wire byte-string of {variant:?}"
                )
            });
            assert_eq!(
                parsed, variant,
                "CaixaKind::from_wire(CaixaKind::{variant:?}.wire_name()) \
                 must return CaixaKind::{variant:?} — the (wire_name, \
                 from_wire) pair must form a total round-trip on the \
                 closed six-arm CaixaKind arm-set"
            );
        }
    }

    #[test]
    fn caixa_kind_from_wire_rejects_unknown_byte_strings() {
        // Rejection pin on the parser's accept-set: any string outside
        // the six-arm [`CaixaKind::wire_name`] output set must return
        // `None`. A future accidental widening of the accept-set (a
        // case-insensitive match that accepts `"biblioteca"` on the
        // wire axis, a hand-rolled Levenshtein-forgiving arm-lookup
        // that admits `"Biblioteka"` typos) would silently drift the
        // parser's accept-set from the emitter's — a K8s CR carrying
        // a malformed `spec.kind` byte-string that today's parser
        // rejects (letting the caller's `.unwrap_or(Biblioteca)`
        // fallback fire on the operator-visible-drift path) would then
        // land on a plausibly-wrong typed arm the caller does not
        // route through the fallback, silently binding the CR to the
        // wrong runtime contract. Also rejects the sibling
        // lowercase-Portuguese diagnostic-form strings (`"biblioteca"`
        // / `"servico"`), which are the *human-readable* form the
        // [`CaixaKind::as_str`] axis emits — the two-axis split
        // documented on the sibling
        // [`caixa_kind_display_matches_as_str_and_not_serialize_wire`]
        // pin explicitly forbids accepting one axis's byte-shapes as
        // parseable on the other axis.
        for bad in [
            "",
            "biblioteca",
            "servico",
            "aplicacao",
            "ACao",
            "unknown",
            "actor",
            "Biblioteka",
        ] {
            assert!(
                CaixaKind::from_wire(bad).is_none(),
                "CaixaKind::from_wire({bad:?}) must return None — the \
                 parser's accept-set is exactly the six CaixaKind::wire_name \
                 outputs; a widening would silently split the parser's \
                 accept-set from the emitter's"
            );
        }
    }

    #[test]
    fn caixa_kind_wire_name_is_const_fn() {
        // Const-context pin: [`CaixaKind::wire_name`] must remain
        // `const fn` (its match arms return `pub const` byte-strings,
        // so no non-const operation exists on the resolution path).
        // Downstream consumers reaching for the accessor from a
        // `const` context (a future substrate-wide const-fold-driven
        // audit table that materializes every kind's wire byte-string
        // at build time, a `const` gate on a per-arm CR-schema
        // registration) rely on the const-ness. A future accidental
        // downgrade to non-`const` (an added runtime helper reachable
        // only from a non-`const` context, a manual hand-rolled `impl`
        // that shadows this method) trips at caixa-core build time
        // rather than surfacing as a downstream `const`-context
        // regression far from the accessor declaration. Peer of the
        // sibling [`caixa_kind_is_variant_predicates_are_const_fn`]
        // pin on the [`gen_platform::IsVariant`] derive's per-arm
        // predicates.
        const BIBLIOTECA_WIRE: &str = CaixaKind::Biblioteca.wire_name();
        const BINARIO_WIRE: &str = CaixaKind::Binario.wire_name();
        const SERVICO_WIRE: &str = CaixaKind::Servico.wire_name();
        const SUPERVISOR_WIRE: &str = CaixaKind::Supervisor.wire_name();
        const APLICACAO_WIRE: &str = CaixaKind::Aplicacao.wire_name();
        const ACAO_WIRE: &str = CaixaKind::Acao.wire_name();
        assert_eq!(BIBLIOTECA_WIRE, "Biblioteca");
        assert_eq!(BINARIO_WIRE, "Binario");
        assert_eq!(SERVICO_WIRE, "Servico");
        assert_eq!(SUPERVISOR_WIRE, "Supervisor");
        assert_eq!(APLICACAO_WIRE, "Aplicacao");
        assert_eq!(ACAO_WIRE, "Acao");
    }

    #[test]
    fn caixa_kind_wire_consts_are_pairwise_distinct() {
        // Distinctness pin: the six [`crate::render::CAIXA_KIND_WIRE_*`]
        // consts must be pairwise distinct — an accidental copy-paste
        // flip that reroutes one arm's byte-string to also match
        // another silently collapses two per-kind wire arms onto one,
        // so a downstream K8s CR carrying the collapsed byte-string
        // round-trips through [`CaixaKind::from_wire`] to whichever
        // arm the parser's match cascade lands on first (the collapse
        // makes the outcome match-arm-ordering-dependent). Peer of the
        // sibling [`caixa_kind_label_consts_are_pairwise_distinct`]
        // pin on the human-readable-label axis.
        let all = [
            crate::render::CAIXA_KIND_WIRE_BIBLIOTECA,
            crate::render::CAIXA_KIND_WIRE_BINARIO,
            crate::render::CAIXA_KIND_WIRE_SERVICO,
            crate::render::CAIXA_KIND_WIRE_SUPERVISOR,
            crate::render::CAIXA_KIND_WIRE_APLICACAO,
            crate::render::CAIXA_KIND_WIRE_ACAO,
        ];
        for (i, a) in all.iter().enumerate() {
            for (j, b) in all.iter().enumerate() {
                if i != j {
                    assert_ne!(
                        a, b,
                        "CAIXA_KIND_WIRE_* consts must be pairwise \
                         distinct — found duplicate byte-string {a:?} \
                         at indices {i} and {j}"
                    );
                }
            }
        }
    }

    #[test]
    fn caixa_kind_label_consts_are_pairwise_distinct() {
        // Distinctness pin: the five
        // [`crate::render::CAIXA_KIND_LABEL_*`] consts must be pairwise
        // distinct — an accidental copy-paste flip that reroutes one
        // label's byte-string to also match another silently collapses
        // two per-kind labels onto one, so an operator reads
        // `biblioteca` for what should have surfaced as `servico` (or
        // vice versa). This pin catches any such flip at build time.
        // Mirror of the peer distinctness pins on other closed-set
        // typed axes (e.g.
        // `layout_missing_entry_kind_consts_are_pairwise_distinct`).
        let all = [
            crate::render::CAIXA_KIND_LABEL_BIBLIOTECA,
            crate::render::CAIXA_KIND_LABEL_BINARIO,
            crate::render::CAIXA_KIND_LABEL_SERVICO,
            crate::render::CAIXA_KIND_LABEL_SUPERVISOR,
            crate::render::CAIXA_KIND_LABEL_APLICACAO,
            crate::render::CAIXA_KIND_LABEL_ACAO,
        ];
        for (i, a) in all.iter().enumerate() {
            for (j, b) in all.iter().enumerate() {
                if i != j {
                    assert_ne!(
                        a, b,
                        "CAIXA_KIND_LABEL_* consts must be pairwise distinct \
                         — found duplicate byte-string {a:?} at indices {i} \
                         and {j}"
                    );
                }
            }
        }
    }

    #[test]
    fn caixa_kind_all_enumerates_every_variant_exactly_once() {
        // Fail-before-pass-after pin on the [`CaixaKind::ALL`]
        // exhaustive-iteration surface: the slice length matches the
        // arm count of the closed six-arm set, every variant appears
        // at least once, and no variant appears twice. A future arm
        // addition (an `Actor` virtual-actor arm the M5 Orleans-
        // inspired kind reaches through, per the sibling
        // [`CaixaKind::from_wire`] doc block) that grows the enum but
        // forgets to grow [`Self::ALL`] silently truncates every
        // downstream consumer's accept-set at the pre-addition
        // boundary — a future `feira --kind …` CLI-side "did you
        // mean" scan that iterates the slice, the future M4
        // admission-webhook's rejection body naming the accepted-
        // `:kind` list, any future round-trip fuzz harness — all read
        // through this slice, so a truncation there silently splits
        // every accept-set from the arm-set the paired
        // [`gen_platform::IsVariant`] predicates + [`Self::wire_name`]
        // / [`Self::as_str`] / [`Self::from_wire`] siblings walk.
        // Pinning the exhaustive-enumeration invariant here catches
        // the drift at caixa-core build time.
        //
        // Peer of the sibling
        // [`crate::aplicacao::tests::placement_strategy_all_enumerates_every_variant_once`]
        // (18c7342) / `rate_limit_unit_all_enumerates_every_variant_once`
        // (6bce03d) / `dep_list_all_enumerates_every_variant_once`
        // (45ee563) pins on the peer closed-set typed-enum axes.
        let all: &[CaixaKind] = CaixaKind::ALL;
        assert_eq!(
            all.len(),
            6,
            "CaixaKind::ALL must enumerate every variant of the \
             six-arm closed set (Biblioteca, Binario, Servico, \
             Supervisor, Aplicacao, Acao); got {all:?}"
        );
        for (i, a) in all.iter().enumerate() {
            for (j, b) in all.iter().enumerate() {
                if i != j {
                    assert_ne!(
                        a, b,
                        "CaixaKind::ALL must carry every variant \
                         exactly once — got duplicate {a:?} at \
                         indices {i} and {j}"
                    );
                }
            }
        }
        for variant in [
            CaixaKind::Biblioteca,
            CaixaKind::Binario,
            CaixaKind::Servico,
            CaixaKind::Supervisor,
            CaixaKind::Aplicacao,
            CaixaKind::Acao,
        ] {
            assert!(
                all.contains(&variant),
                "CaixaKind::ALL must contain {variant:?} — a future \
                 variant addition that grows the enum but forgets to \
                 grow the ALL slice silently truncates every \
                 downstream consumer's accept-set at the pre-addition \
                 boundary"
            );
        }
    }

    #[test]
    fn caixa_kind_all_is_the_from_wire_accept_set() {
        // Load-bearing pin on the two-axis identity: [`CaixaKind::ALL`]
        // is exactly the variant image of the [`CaixaKind::from_wire`]
        // accept-set — every arm in the slice parses back through
        // `from_wire ∘ wire_name` to itself, and the paired
        // [`caixa_kind_from_wire_rejects_unknown_byte_strings`] pin
        // guarantees `from_wire` rejects everything outside the six-
        // arm wire-string image. Together these two pins make the
        // slice the authoritative arm-set every consumer of the
        // closed six-arm [`CaixaKind`] discriminator reads through:
        // the future M4 admission-webhook can enumerate accepted
        // `:kind` values by walking [`Self::ALL`] and rendering each
        // arm's `wire_name`, the future `feira --kind …` "did you
        // mean" hint can score against the same slice, and no
        // consumer needs to re-inline a six-arm literal list. Any
        // future arm addition that grows one axis and forgets the
        // other trips here at caixa-core build time.
        for &variant in CaixaKind::ALL {
            let wire = variant.wire_name();
            assert_eq!(
                CaixaKind::from_wire(wire),
                Some(variant),
                "CaixaKind::from_wire(CaixaKind::{variant:?}.wire_name() = \
                 {wire:?}) must return Some({variant:?}) — CaixaKind::ALL \
                 must be a subset of the from_wire accept-set"
            );
        }
    }

    #[test]
    fn caixa_kind_as_ref_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the lifted
        // `impl AsRef<str> for CaixaKind` — asserts the standard-library
        // trait impl and the substrate-primitive [`CaixaKind::as_str`]
        // `pub const fn` accessor resolve to the same `&str` per
        // instance across the six-arm closed set, so any future silent
        // detour that routes the impl through a divergent projection
        // (a per-arm inline `match self { CaixaKind::Servico => "servico",
        // … }` re-inlining that opens a compile-time link to the
        // un-lifted arm-literal, a swap onto the PascalCase
        // [`CaixaKind::wire_name`] axis that would collide the
        // diagnostic / wire two-axis split the sibling
        // [`caixa_kind_display_matches_as_str_and_not_serialize_wire`]
        // pin makes load-bearing) trips at caixa-core test time under
        // `assert_eq!` rather than at a downstream `impl AsRef<str>`-
        // bound consumer's silent split. Sweeps every one of the six
        // arms [`CaixaKind::ALL`] carries so no arm's projection is
        // covered only by the sibling wire-format `Serialize` derive
        // path. Peer of the sibling
        // [`crate::supervisor::tests::restart_policy_as_ref_str_routes_through_as_str_accessor`]
        // (419ea81) /
        // [`crate::supervisor::tests::restart_strategy_as_ref_str_routes_through_as_str_accessor`]
        // (63eb1a4) /
        // [`crate::aplicacao::tests::placement_strategy_as_ref_str_routes_through_as_str_accessor`]
        // (d86edd2) pins on the paired M2/M3 closed-set typed enums,
        // and the
        // [`crate::version::tests::caixa_version_as_ref_str_routes_through_as_str_accessor`]
        // (16d5c7e) pin on the paired top-level `:versao` typed
        // newtype — the five pins together close the substrate
        // primitive's `AsRef<str>` projection axis on every closed-set
        // typed enum/newtype on the top-level + M2 + M3 caixa surface.
        for &variant in CaixaKind::ALL {
            assert_eq!(
                <CaixaKind as AsRef<str>>::as_ref(&variant),
                variant.as_str(),
                "AsRef<str> impl on CaixaKind::{variant:?} must \
                 byte-equal CaixaKind::as_str on the same instance — \
                 divergence signals a silent detour off the substrate-\
                 primitive accessor"
            );
        }
    }

    #[test]
    fn caixa_kind_as_ref_str_routes_through_display_via_shared_accessor() {
        // Fail-before-pass-after byte-parity pin on the three-path
        // convergence discipline the top-level [`CaixaKind`] discriminator
        // now carries on the diagnostic-`&str`-projection axis:
        // `<CaixaKind as AsRef<str>>::as_ref(&v)` (the newly lifted
        // impl), `format!("{v}")` (the pre-existing [`fmt::Display`]
        // impl), and `v.as_str()` (the substrate-primitive
        // `pub const fn` accessor both trait impls delegate through)
        // must resolve to the same byte-string on every instance
        // across the six-arm closed set. Refuses any future divergence
        // between the two trait impls (a stray [`fmt::Display::fmt`]
        // rewrite that hand-rolls the arms rather than delegating
        // through the shared accessor; a hypothetical `AsRef<str>`
        // rewrite that inlines a per-arm literal cascade) that would
        // silently split the two projection paths of the top-level
        // typed discriminator. Preserves the two-axis split the
        // sibling
        // [`caixa_kind_display_matches_as_str_and_not_serialize_wire`]
        // pin makes load-bearing: this pin asserts three paths
        // *converge* on the diagnostic axis, and the sibling pin
        // asserts the wire axis stays *distinct* from it. Mirrors the
        // sibling three-path-convergence discipline the peer
        // [`crate::aplicacao::PlacementStrategy`] carries on its
        // `AsRef<str>` / `Display` / `as_str` triple (aplicacao.rs pin
        // `placement_strategy_as_ref_str_routes_through_display_via_shared_accessor`,
        // d86edd2), the peer [`crate::supervisor::RestartPolicy`]
        // triple (supervisor.rs pin
        // `restart_policy_as_ref_str_routes_through_display_via_shared_accessor`,
        // 419ea81), the peer [`crate::supervisor::RestartStrategy`]
        // triple (supervisor.rs pin
        // `restart_strategy_as_ref_str_routes_through_display_via_shared_accessor`,
        // 63eb1a4), and the [`crate::CaixaVersion`] typed newtype
        // triple (version.rs pin
        // `caixa_version_as_ref_str_routes_through_display_via_shared_accessor`,
        // 16d5c7e).
        for &variant in CaixaKind::ALL {
            let via_as_ref: &str = <CaixaKind as AsRef<str>>::as_ref(&variant);
            let via_display: String = format!("{variant}");
            let via_accessor: &str = variant.as_str();
            assert_eq!(via_as_ref, via_accessor);
            assert_eq!(via_display, via_accessor);
            assert_eq!(via_as_ref, via_display.as_str());
        }
    }

    #[test]
    fn caixa_kind_try_from_str_routes_through_from_wire_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl TryFrom<&str> for CaixaKind` — asserts the standard-
        // library trait impl and the substrate-primitive
        // [`CaixaKind::from_wire`] `Option<Self>` accessor resolve to
        // the same six-arm accept-set across every arm the exhaustive
        // [`CaixaKind::ALL`] slice enumerates. Any future silent detour
        // that routes the trait impl through a divergent projection
        // (a per-arm inline `match s { "Biblioteca" => Ok(Self::Biblioteca),
        // … }` re-inlining that opens a compile-time link to the
        // un-lifted arm-literal, a hypothetical `#[serde(rename_all =
        // "…")]` attribute drift that silently splits the wire byte-
        // string from every consumer that reaches for this typed
        // dispatch) trips at caixa-core test time under `assert_eq!`
        // rather than at a downstream `impl TryFrom<&str>`-bound
        // consumer's silent split. Sweeps every one of the six arms
        // [`CaixaKind::ALL`] carries so no arm's projection is covered
        // only by the sibling method-named `from_wire` path.
        for &variant in CaixaKind::ALL {
            let wire = variant.wire_name();
            assert_eq!(
                <CaixaKind as TryFrom<&str>>::try_from(wire),
                Ok(variant),
                "TryFrom<&str> impl on CaixaKind must round-trip \
                 CaixaKind::{variant:?}.wire_name() = {wire:?} back to \
                 Ok(CaixaKind::{variant:?}) — divergence from \
                 CaixaKind::from_wire signals a silent detour off the \
                 substrate-primitive accessor"
            );
            assert_eq!(
                <CaixaKind as TryFrom<&str>>::try_from(wire).ok(),
                CaixaKind::from_wire(wire),
                "TryFrom<&str> ok()-projection on {wire:?} must \
                 byte-equal CaixaKind::from_wire on the same input"
            );
        }
    }

    #[test]
    fn caixa_kind_try_from_str_rejects_unknown_byte_strings() {
        // Rejection witness on the `impl TryFrom<&str> for CaixaKind`
        // — sweeps a candidate set of byte-strings outside the six-arm
        // PascalCase wire accept-set the sibling [`CaixaKind::wire_name`]
        // emits and asserts every one lands on `Err(())`, so a future
        // accidental widening of the trait impl's accept-set (a stray
        // additional `_ if s.eq_ignore_ascii_case("Biblioteca") =>
        // Ok(…)` case-fold path, a silent inclusion of the lowercase
        // Portuguese [`CaixaKind::as_str`] surface onto the wire axis
        // that would collide the two-axis split the sibling
        // [`caixa_kind_display_matches_as_str_and_not_serialize_wire`]
        // pin makes load-bearing) trips at caixa-core test time. The
        // candidate set includes the empty string, the six-arm
        // lowercase Portuguese diagnostic byte-strings the peer
        // [`CaixaKind::as_str`] axis emits (a caller who confuses the
        // wire axis with the diagnostic axis trips here rather than at
        // a downstream consumer's silent reject), a lowercase / mixed-
        // case fold of each PascalCase arm (a caller who assumes
        // case-fold acceptance trips here), and a small residual set
        // of plausible-but-wrong strings.
        let rejected: &[&str] = &[
            "",
            "biblioteca",
            "binario",
            "servico",
            "supervisor",
            "aplicacao",
            "acao",
            "BIBLIOTECA",
            "BINARIO",
            "SERVICO",
            "SUPERVISOR",
            "APLICACAO",
            "ACAO",
            "biBlioteca",
            "Bibliotecas",
            "Servicos",
            "library",
            "binary",
            "service",
            "application",
            " Biblioteca",
            "Biblioteca ",
            "Biblioteca\n",
            "\"Biblioteca\"",
        ];
        for &input in rejected {
            assert_eq!(
                <CaixaKind as TryFrom<&str>>::try_from(input),
                Err(()),
                "TryFrom<&str> impl on CaixaKind must reject the \
                 non-wire byte-string {input:?} — silent acceptance \
                 signals an accept-set widening off the paired \
                 CaixaKind::from_wire resolver"
            );
        }
    }

    #[test]
    fn caixa_kind_try_from_str_and_from_wire_partition_the_accept_set() {
        // Cross-axis partition pin: the paired `TryFrom<&str>` and
        // `from_wire` reverse projections must resolve identically on
        // *every* input, not just the ones [`CaixaKind::ALL`]
        // enumerates. Sweeps a mixed candidate set spanning accepted
        // (six-arm PascalCase wire byte-strings) and rejected
        // (lowercase diagnostic axis, empty, whitespace-padded,
        // quoted, English rebrand candidates) inputs and asserts the
        // trait's `Result::ok()` projection byte-equals the method-
        // named resolver's `Option<Self>` return-shape on each,
        // locking the two paths together by construction so any future
        // detour (a stray `try_from` special-case that widens or
        // narrows the accept-set outside the paired `from_wire`
        // resolver) trips at caixa-core test time. Pairs with the
        // sibling
        // [`caixa_kind_wire_round_trips_through_from_wire`] pin (which
        // asserts the forward+reverse round-trip on the method-named
        // axis) — this pin extends the round-trip discipline onto the
        // trait-idiomatic reverse axis.
        let candidates: &[&str] = &[
            "Biblioteca",
            "Binario",
            "Servico",
            "Supervisor",
            "Aplicacao",
            "Acao",
            "",
            "biblioteca",
            "servico",
            "unknown",
            "biBlioteca",
            "\"Biblioteca\"",
            " Servico ",
        ];
        for &input in candidates {
            let via_trait: Option<CaixaKind> = <CaixaKind as TryFrom<&str>>::try_from(input).ok();
            let via_method: Option<CaixaKind> = CaixaKind::from_wire(input);
            assert_eq!(
                via_trait, via_method,
                "TryFrom<&str> and from_wire must resolve identically \
                 on input {input:?} — divergence signals the two reverse-\
                 projection paths have drifted onto different accept-sets"
            );
        }
    }

    #[test]
    fn caixa_kind_from_str_routes_through_try_from_str_impl() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl std::str::FromStr for CaixaKind` — asserts the
        // standard-library `.parse()` parse-axis entry point and the
        // paired [`super::CaixaKind::try_from`] `TryFrom<&str>` impl
        // (which in turn routes through the substrate-primitive
        // [`super::CaixaKind::from_wire`] `Option<Self>` accessor)
        // resolve to the same six-arm accept-set across every arm the
        // exhaustive [`super::CaixaKind::ALL`] slice enumerates.
        // Extends the substrate-wide `FromStr` parse-axis campaign —
        // opened on [`crate::dep::DepList`] via 6167092 as first-
        // mover — onto the structurally most fundamental closed-set
        // typed enum. The peer method-named `from_wire` accessor and
        // the paired `TryFrom<&str>` trait impl fix the six-arm
        // PascalCase wire accept-set; this pin locks the
        // `FromStr::from_str` trait entry point onto the same set so
        // any future divergence (a stray per-arm `match s`
        // re-inlining that opens a compile-time link to an un-lifted
        // arm-literal, a swap onto a hand-rolled parser that widens
        // the accept-set past the six lifted
        // [`crate::render::CAIXA_KIND_WIRE_*`] consts) trips at
        // caixa-core test time.
        use std::str::FromStr;
        for &variant in CaixaKind::ALL {
            let wire = variant.wire_name();
            assert_eq!(
                <CaixaKind as FromStr>::from_str(wire),
                Ok(variant),
                "FromStr impl on CaixaKind must round-trip \
                 CaixaKind::{variant:?}.wire_name() = {wire:?} back to \
                 Ok(CaixaKind::{variant:?}) — divergence from \
                 CaixaKind::try_from signals a silent detour off the \
                 paired reverse-projection trait impl"
            );
            assert_eq!(
                <CaixaKind as FromStr>::from_str(wire).ok(),
                CaixaKind::from_wire(wire),
                "FromStr ok()-projection on {wire:?} must byte-equal \
                 CaixaKind::from_wire on the same input — divergence \
                 signals the two reverse-projection trait paths have \
                 drifted off the substrate-primitive accessor"
            );
            // `.parse::<CaixaKind>()` short-form witness — the stdlib
            // consumer surface that reaches the enum through the
            // `T: FromStr` bound, not through `TryFrom<&str>`.
            let via_parse: Result<CaixaKind, ()> = wire.parse();
            assert_eq!(
                via_parse,
                Ok(variant),
                "`{wire:?}`.parse::<CaixaKind>() must resolve to \
                 Ok(CaixaKind::{variant:?}) — divergence signals the \
                 stdlib `.parse()` short-form has drifted from the \
                 lifted `FromStr::from_str` impl"
            );
        }
    }

    #[test]
    fn caixa_kind_from_str_rejects_unknown_byte_strings() {
        // Rejection witness on the `impl FromStr for CaixaKind` —
        // sweeps candidate byte-strings outside the six-arm PascalCase
        // wire accept-set the sibling [`super::CaixaKind::wire_name`]
        // emits and asserts every one lands on `Err(())`, so a future
        // accidental widening of the trait impl's accept-set (a stray
        // case-fold path, a silent inclusion of the lowercase
        // Portuguese [`super::CaixaKind::as_str`] surface onto the
        // wire axis that would collide the two-axis split the sibling
        // [`caixa_kind_display_matches_as_str_and_not_serialize_wire`]
        // pin makes load-bearing) trips at caixa-core test time. Peer
        // of the sibling
        // `caixa_kind_try_from_str_rejects_unknown_byte_strings`
        // rejection witness — the two pins together bracket both
        // reverse-projection trait impls against the same rejected
        // set. The candidate set includes the empty string, the six-
        // arm lowercase Portuguese diagnostic byte-strings the peer
        // `CaixaKind::as_str` axis emits, a lowercase / mixed-case
        // fold of each PascalCase arm, and a small residual set of
        // plausible-but-wrong English rebrand candidates.
        use std::str::FromStr;
        let rejected: &[&str] = &[
            "",
            "biblioteca",
            "binario",
            "servico",
            "supervisor",
            "aplicacao",
            "acao",
            "BIBLIOTECA",
            "BINARIO",
            "SERVICO",
            "SUPERVISOR",
            "APLICACAO",
            "ACAO",
            "biBlioteca",
            "Bibliotecas",
            "Servicos",
            "library",
            "binary",
            "service",
            "application",
            " Biblioteca",
            "Biblioteca ",
            "Biblioteca\n",
            "\"Biblioteca\"",
        ];
        for &input in rejected {
            assert_eq!(
                <CaixaKind as FromStr>::from_str(input),
                Err(()),
                "FromStr impl on CaixaKind must reject unknown \
                 byte-string {input:?} — divergence from \
                 CaixaKind::from_wire on the same input signals a \
                 silent accept-set widening past the six lifted \
                 crate::render::CAIXA_KIND_WIRE_* wire constants"
            );
            assert_eq!(
                <CaixaKind as FromStr>::from_str(input).ok(),
                CaixaKind::from_wire(input),
                "FromStr ok()-projection on {input:?} must byte-equal \
                 CaixaKind::from_wire on the same input — divergence \
                 signals the FromStr trait path has drifted off the \
                 substrate-primitive accessor"
            );
            let via_parse: Result<CaixaKind, ()> = input.parse();
            assert_eq!(
                via_parse,
                Err(()),
                "`{input:?}`.parse::<CaixaKind>() must reject the \
                 unknown byte-string — divergence signals the stdlib \
                 `.parse()` short-form has drifted from the lifted \
                 `FromStr::from_str` impl"
            );
        }
    }

    #[test]
    fn caixa_kind_all_is_const_and_matches_iteration_count() {
        // Const-context pin: [`CaixaKind::ALL`] is a `pub const`
        // slice, so it materializes at build time. Downstream
        // consumers reaching for the slice from a `const` context (a
        // future substrate-wide const-fold-driven audit table that
        // materializes every kind's wire byte-string at build time, a
        // per-arm CR-schema registration in a `const` gate) rely on
        // the const-ness. A future accidental downgrade to a runtime
        // `fn ALL() -> Vec<Self>` reachable only from a non-`const`
        // context trips at caixa-core build time. Peer of the sibling
        // [`caixa_kind_wire_name_is_const_fn`] +
        // [`caixa_kind_is_variant_predicates_are_const_fn`] pins on
        // the peer accessor axes.
        const ALL: &[CaixaKind] = CaixaKind::ALL;
        const LEN: usize = ALL.len();
        assert_eq!(
            LEN, 6,
            "CaixaKind::ALL length must byte-equal the six-arm closed-set \
             cardinality at const-fold time"
        );
    }

    #[test]
    fn caixa_kind_from_into_static_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<CaixaKind> for &'static str` — asserts the standard-
        // library trait impl and the substrate-primitive
        // [`CaixaKind::as_str`] `pub const fn` accessor resolve to the
        // same six-arm emit-set across every arm the exhaustive
        // [`CaixaKind::ALL`] slice enumerates. Any future silent detour
        // that routes the trait impl through a divergent projection (a
        // per-arm inline `match kind { Biblioteca => "biblioteca", … }`
        // re-inlining that opens a compile-time link to the un-lifted
        // arm-literal, an accidental swap onto the sibling `PascalCase`
        // [`CaixaKind::wire_name`] axis that would collide the two-axis
        // human-readable/wire split the sibling
        // [`caixa_kind_display_matches_as_str_and_not_serialize_wire`]
        // pin makes load-bearing) trips at caixa-core test time under
        // `assert_eq!` rather than at a downstream
        // `impl Into<&'static str>`-bound consumer's silent split.
        // Sweeps every one of the six arms [`CaixaKind::ALL`] carries so
        // no arm's projection is covered only by the sibling method-
        // named `as_str` / [`std::fmt::Display`] / [`AsRef<str>`] paths.
        // Materializes the `<&'static str as From<CaixaKind>>::from`
        // output in a `const`-shape binding to make the `'static`
        // lifetime promise a build-time invariant — a future accidental
        // downgrade of any of the six arms'
        // [`crate::render::CAIXA_KIND_LABEL_*`] constants to a
        // non-`&'static str` (a `String::leak()`-produced return, a
        // `Box::leak`-cast) trips at caixa-core build time rather than
        // at a downstream `'static`-bound consumer.
        const BIBLIOTECA: &str = CaixaKind::Biblioteca.as_str();
        const BINARIO: &str = CaixaKind::Binario.as_str();
        const SERVICO: &str = CaixaKind::Servico.as_str();
        const SUPERVISOR: &str = CaixaKind::Supervisor.as_str();
        const APLICACAO: &str = CaixaKind::Aplicacao.as_str();
        const ACAO: &str = CaixaKind::Acao.as_str();
        for &variant in CaixaKind::ALL {
            let via_trait: &'static str = <&'static str as From<CaixaKind>>::from(variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait, via_method,
                "From<CaixaKind> for &'static str impl must round-trip \
                 CaixaKind::{variant:?} to the same lifted \
                 CAIXA_KIND_LABEL_* const CaixaKind::as_str returns — \
                 divergence signals a silent detour off the substrate-\
                 primitive accessor"
            );
            let via_into: &'static str = variant.into();
            assert_eq!(
                via_into, via_method,
                "Into<&'static str>::into on CaixaKind::{variant:?} must \
                 byte-equal CaixaKind::as_str on the same input — the \
                 blanket-derived Into shape must resolve to the same \
                 as_str dispatch as the explicit From impl"
            );
        }
        assert_eq!(
            [BIBLIOTECA, BINARIO, SERVICO, SUPERVISOR, APLICACAO, ACAO],
            [
                crate::render::CAIXA_KIND_LABEL_BIBLIOTECA,
                crate::render::CAIXA_KIND_LABEL_BINARIO,
                crate::render::CAIXA_KIND_LABEL_SERVICO,
                crate::render::CAIXA_KIND_LABEL_SUPERVISOR,
                crate::render::CAIXA_KIND_LABEL_APLICACAO,
                crate::render::CAIXA_KIND_LABEL_ACAO,
            ],
            "const-context CaixaKind::as_str must resolve to the six \
             lifted CAIXA_KIND_LABEL_* consts — a future accidental \
             downgrade of any arm to a non-const or non-static byte-\
             string breaks the `&'static str`-lifetime promise the \
             paired From<CaixaKind> for &'static str impl carries by \
             construction"
        );
    }

    #[test]
    fn caixa_kind_from_into_static_str_and_as_str_partition_the_emit_set() {
        // Cross-axis partition pin: the paired trait-idiomatic
        // `From<CaixaKind> for &'static str` forward projection and the
        // method-named [`CaixaKind::as_str`] forward projection must
        // resolve identically on *every* arm, not just the ones named
        // in the primary byte-parity pin above. Sweeps every
        // [`CaixaKind::ALL`] arm and asserts the trait's `From::from`
        // output byte-equals the method-named accessor's return-value
        // on each, locking the two forward-projection paths together by
        // construction so any future detour (a stray `From` special-
        // case that lands on a divergent per-arm literal outside the
        // paired `as_str` dispatch, a hypothetical rebrand touching one
        // axis without the other) trips at caixa-core test time. Peer
        // of the sibling M2-OTP-shape
        // [`crate::supervisor::tests::restart_strategy_from_into_static_str_and_as_str_partition_the_emit_set`]
        // (523157d) and
        // [`crate::supervisor::tests::restart_policy_from_into_static_str_and_as_str_partition_the_emit_set`]
        // (9fb37d0) partition pins on the sibling M2-OTP-shape closed-
        // set typed-enum discriminator axes — extends the round-trip
        // discipline onto the trait-idiomatic *forward* axis on the
        // structurally most fundamental closed-set typed enum on the
        // caixa surface.
        //
        // Also asserts three-path convergence on the diagnostic axis:
        // `<&'static str as From<CaixaKind>>::from`, `AsRef<str>::as_ref`,
        // and `std::fmt::Display` all resolve to the same lifted
        // [`crate::render::CAIXA_KIND_LABEL_*`] const per arm. The four-
        // path family (with the substrate-primitive
        // [`CaixaKind::as_str`] accessor) is closed by construction so
        // any future silent bifurcation lands at caixa-core test time.
        //
        // The round-trip on the trait-idiomatic axis pair
        // (`From<Self> for &'static str` + `TryFrom<&str> for Self`)
        // crosses through the [`CaixaKind::wire_name`] intermediate
        // vocabulary: the two projection endpoints resolve to
        // different byte-strings by design (the human-readable
        // lowercase Portuguese `"biblioteca"` on the forward axis vs.
        // the `PascalCase` wire `"Biblioteca"` on the reverse axis —
        // the two-axis split the sibling
        // [`caixa_kind_display_matches_as_str_and_not_serialize_wire`]
        // pin makes load-bearing). The round-trip witness threads
        // through [`CaixaKind::wire_name`] as the reverse-axis
        // vocabulary, so a future silent accidental collapse of either
        // axis onto the other (routing `From<Self> for &'static str`
        // through `wire_name`, or routing `TryFrom<&str>` through
        // `as_str`) trips here.
        for &variant in CaixaKind::ALL {
            let via_trait: &'static str = <&'static str as From<CaixaKind>>::from(variant);
            let via_method: &'static str = variant.as_str();
            let via_as_ref: &str = variant.as_ref();
            let via_display: String = variant.to_string();
            assert_eq!(
                via_trait, via_method,
                "From<CaixaKind> for &'static str and CaixaKind::as_str \
                 must resolve identically on CaixaKind::{variant:?} — \
                 divergence signals the two forward-projection paths \
                 have drifted onto different emit-sets"
            );
            assert_eq!(
                via_trait, via_as_ref,
                "From<CaixaKind> for &'static str and AsRef<str>::as_ref \
                 must resolve identically on CaixaKind::{variant:?} — \
                 the four-path forward-projection family (as_str, \
                 AsRef, Display, From<Self> for &'static str) must \
                 land on one lifted CAIXA_KIND_LABEL_* const per arm"
            );
            assert_eq!(
                via_trait,
                via_display.as_str(),
                "From<CaixaKind> for &'static str and Display must \
                 resolve identically on CaixaKind::{variant:?} — the \
                 four-path forward-projection family (as_str, AsRef, \
                 Display, From<Self> for &'static str) must land on one \
                 lifted CAIXA_KIND_LABEL_* const per arm"
            );
        }
        // Round-trip witness: every arm's forward-projected
        // `wire_name` output re-parses through the paired trait-
        // idiomatic reverse `TryFrom<&str>` back to the original
        // variant. The reverse `TryFrom<&str>` axis parses the
        // `PascalCase` wire vocabulary that [`CaixaKind::wire_name`]
        // emits, not the lowercase Portuguese diagnostic vocabulary
        // this commit's `From<Self> for &'static str` axis emits —
        // the two-axis split is by design, and the wire round-trip
        // through `wire_name` + `TryFrom<&str>` closes the vocabulary
        // gap by construction.
        for &variant in CaixaKind::ALL {
            let wire: &'static str = variant.wire_name();
            let re_parsed: Result<CaixaKind, ()> = <CaixaKind as TryFrom<&str>>::try_from(wire);
            assert_eq!(
                re_parsed,
                Ok(variant),
                "trait-idiomatic reverse axis (TryFrom<&str>) must \
                 round-trip CaixaKind::{variant:?} through wire_name \
                 back to Ok(CaixaKind::{variant:?}) — a break signals \
                 the wire-emit and reverse-parse axes have drifted \
                 onto different vocabularies"
            );
        }
        // Explicit two-axis-split witness: the forward
        // `From<Self> for &'static str` axis and the reverse
        // `TryFrom<&str>` axis land on *different* byte-strings by
        // design on every arm whose human-readable label differs from
        // its PascalCase wire form. Assert the two vocabularies stay
        // disjoint per-arm so a future accidental collapse (routing
        // one through the other's accessor) trips at caixa-core test
        // time under the inequality assertion below.
        for &variant in CaixaKind::ALL {
            let forward: &'static str = <&'static str as From<CaixaKind>>::from(variant);
            let wire: &'static str = variant.wire_name();
            assert_ne!(
                forward, wire,
                "forward `From<CaixaKind> for &'static str` axis \
                 (lowercase Portuguese label) and `wire_name` axis \
                 (PascalCase wire) must stay disjoint on \
                 CaixaKind::{variant:?} — a byte-equal collapse \
                 signals the two-axis split the substrate keys off has \
                 silently merged onto one vocabulary"
            );
        }
    }

    #[test]
    fn caixa_kind_from_borrowed_into_static_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<&CaixaKind> for &'static str` — asserts the
        // borrowed-input standard-library trait impl and the substrate-
        // primitive [`CaixaKind::as_str`] `pub const fn` accessor
        // resolve to the same six-arm emit-set across every arm the
        // exhaustive [`CaixaKind::ALL`] slice enumerates. Rust's `From`
        // trait does not auto-derive the borrowed-input sibling from a
        // paired owned-input impl (no `impl<T, U> From<&T> for U where
        // T: Copy, U: From<T>` blanket in `core`), so the borrowed-
        // input axis is a distinct trait-idiomatic surface that a
        // `.iter().map(Into::into)` shape over [`CaixaKind::ALL`]
        // (whose iterator yields `&CaixaKind`, not `CaixaKind`)
        // reaches through this impl and no other — the paired owned-
        // input [`From<CaixaKind>`] impl requires an explicit
        // `.copied()` / dereference before the trait fires.
        // Materializes the `<&'static str as From<&CaixaKind>>::from`
        // output in a `const`-shape binding to make the `'static`
        // lifetime promise a build-time invariant.
        const BIBLIOTECA: &str = CaixaKind::Biblioteca.as_str();
        const BINARIO: &str = CaixaKind::Binario.as_str();
        const SERVICO: &str = CaixaKind::Servico.as_str();
        const SUPERVISOR: &str = CaixaKind::Supervisor.as_str();
        const APLICACAO: &str = CaixaKind::Aplicacao.as_str();
        const ACAO: &str = CaixaKind::Acao.as_str();
        for variant in CaixaKind::ALL {
            let via_trait: &'static str = <&'static str as From<&CaixaKind>>::from(variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait, via_method,
                "From<&CaixaKind> for &'static str impl must round-trip \
                 &CaixaKind::{variant:?} to the same lifted \
                 CAIXA_KIND_LABEL_* const CaixaKind::as_str returns — \
                 divergence signals a silent detour off the substrate-\
                 primitive accessor"
            );
            let via_into: &'static str = variant.into();
            assert_eq!(
                via_into, via_method,
                "Into<&'static str>::into on &CaixaKind::{variant:?} \
                 must byte-equal CaixaKind::as_str on the same input — \
                 the blanket-derived Into shape must resolve to the \
                 same as_str dispatch as the explicit From impl"
            );
        }
        assert_eq!(
            [BIBLIOTECA, BINARIO, SERVICO, SUPERVISOR, APLICACAO, ACAO],
            [
                crate::render::CAIXA_KIND_LABEL_BIBLIOTECA,
                crate::render::CAIXA_KIND_LABEL_BINARIO,
                crate::render::CAIXA_KIND_LABEL_SERVICO,
                crate::render::CAIXA_KIND_LABEL_SUPERVISOR,
                crate::render::CAIXA_KIND_LABEL_APLICACAO,
                crate::render::CAIXA_KIND_LABEL_ACAO,
            ],
            "const-context CaixaKind::as_str must resolve to the six \
             lifted CAIXA_KIND_LABEL_* consts — the borrowed-input \
             From<&CaixaKind> for &'static str impl inherits its \
             `'static` lifetime promise from the same accessor the \
             owned-input sibling routes through"
        );
    }

    #[test]
    fn caixa_kind_from_owned_and_borrowed_into_static_str_agree_on_every_arm() {
        // Cross-axis partition pin: the paired trait-idiomatic
        // owned-input `From<CaixaKind> for &'static str` (edbb27b
        // campaign-shape) and borrowed-input `From<&CaixaKind> for
        // &'static str` (this lift) forward projections must resolve
        // identically on every arm, locking the two input-shape paths
        // together so any future detour trips at caixa-core test time.
        // Then a witness that a `.iter().map(Into::into)` pipe over
        // [`CaixaKind::ALL`] (whose iterator yields `&CaixaKind`)
        // materializes the six-arm accept-set through the borrowed-
        // input axis alone — the exact shape a future M4 admission-
        // webhook rejection body composer, a future substrate-wide
        // per-arm diagnostic column, or a
        // `HashMap::<&'static str, CaixaKind>::from_iter(
        //     CaixaKind::ALL.iter().map(|k| (k.into(), *k)))`-style
        // per-kind lookup reaches through — closing the two-way owned/
        // borrowed input-shape symmetry on the forward-projection
        // trait-idiomatic axis. Peer of the sibling
        // [`crate::dep::tests::dep_list_from_owned_and_borrowed_into_static_str_agree_on_every_arm`]
        // (64aa742) partition pin on the two-list dep-graph closed-set
        // discriminator axis — extends the borrowed-input axis
        // discipline onto the structurally most fundamental closed-set
        // typed enum on the caixa surface.
        for &variant in CaixaKind::ALL {
            let owned: &'static str = <&'static str as From<CaixaKind>>::from(variant);
            let borrowed: &'static str = <&'static str as From<&CaixaKind>>::from(&variant);
            assert_eq!(
                owned, borrowed,
                "From<CaixaKind> and From<&CaixaKind> for &'static str \
                 must resolve identically on CaixaKind::{variant:?} — \
                 divergence signals the owned-input and borrowed-input \
                 forward-projection paths have drifted onto different \
                 emit-sets"
            );
        }
        let via_iter: Vec<&'static str> = CaixaKind::ALL.iter().map(Into::into).collect();
        let via_method: Vec<&'static str> = CaixaKind::ALL.iter().map(|k| k.as_str()).collect();
        assert_eq!(
            via_iter, via_method,
            "`.iter().map(Into::into)` over CaixaKind::ALL must byte-\
             equal `.iter().map(|k| k.as_str())` on every arm — the \
             borrowed-input `From<&CaixaKind> for &'static str` axis \
             is what makes the `.iter().map(Into::into)` shape route \
             through the substrate-primitive `CaixaKind::as_str` \
             accessor rather than through a per-call-site `.copied()` \
             / dereference detour"
        );
    }

    #[test]
    fn caixa_kind_from_into_owned_string_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<CaixaKind> for String` — asserts the owned-`String`
        // -returning standard-library trait impl and the substrate-
        // primitive [`CaixaKind::as_str`] `pub const fn` accessor
        // resolve to the same six-arm emit-set across every arm the
        // exhaustive [`CaixaKind::ALL`] slice enumerates. Rust's
        // standard library does not carry a blanket
        // `impl<T: AsRef<str>> From<T> for String` (nor an
        // `impl<T: fmt::Display> From<T> for String`), so the
        // owned-`String` forward-projection axis is a distinct trait-
        // idiomatic surface that a `let key: String = kind.into();`-
        // shaped call site reaches through this impl and no other —
        // the paired sibling `From<CaixaKind> for &'static str` impl
        // forces every owned-`String` call site through an explicit
        // `.to_owned()` / `String::from` restatement. Peer of the
        // first-mover
        // [`crate::supervisor::tests::restart_strategy_from_into_owned_string_routes_through_as_str_accessor`]
        // (7baa18a) and the second-peer
        // [`crate::supervisor::tests::restart_policy_from_into_owned_string_routes_through_as_str_accessor`]
        // (7851725) — extends the trait-idiomatic owned-`String`
        // forward-projection axis onto the third (and structurally
        // most fundamental — every caixa carries a `:kind`) closed-
        // set typed enum on the caixa surface.
        for &variant in CaixaKind::ALL {
            let via_trait: String = <String as From<CaixaKind>>::from(variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_str(),
                via_method,
                "From<CaixaKind> for String impl must round-trip \
                 CaixaKind::{variant:?} to the same lifted \
                 CAIXA_KIND_LABEL_* const CaixaKind::as_str returns — \
                 divergence signals a silent detour off the substrate-\
                 primitive accessor"
            );
            let via_into: String = variant.into();
            assert_eq!(
                via_into.as_str(),
                via_method,
                "Into<String>::into on CaixaKind::{variant:?} must \
                 byte-equal CaixaKind::as_str on the same input — the \
                 blanket-derived Into shape must resolve to the same \
                 as_str dispatch as the explicit From impl"
            );
        }
    }

    #[test]
    fn caixa_kind_from_into_owned_string_and_static_str_agree_on_every_arm() {
        // Cross-axis partition pin: the paired trait-idiomatic
        // owned-`String` `From<CaixaKind> for String` (this lift) and
        // owned-`&'static str` `From<CaixaKind> for &'static str`
        // (edbb27b) forward projections must resolve identically on
        // every arm, locking the two return-type-shape paths together
        // so any future detour trips at caixa-core test time. Also
        // byte-parity witness against the sibling
        // [`ToString::to_string`] surface routed through
        // [`std::fmt::Display`] — the three owned-heap-string paths
        // (`.into::<String>()`, `String::from`, `.to_string()`) must
        // resolve identically on every arm so a future consumer that
        // picks any of the three lands on the same lifted
        // CAIXA_KIND_LABEL_* const. Then a `.iter().copied()
        // .map(String::from)` pipe witness over [`CaixaKind::ALL`]
        // that materializes the six-arm accept-set through the
        // owned-`String` axis alone — the exact shape a future M4
        // admission-webhook rejection body composer or a
        // `HashMap::<String, CaixaKind>::from_iter(
        //     CaixaKind::ALL.iter().copied().map(|k| (k.into(), k)))`-style
        // owned-key per-kind lookup reaches through — closing the
        // owned-`String` forward-projection axis's iterator-pipe
        // shape. Then a round-trip witness through the paired trait-
        // idiomatic reverse [`TryFrom<&str>`] axis on the wire-vocab
        // [`CaixaKind::wire_name`] emission (not the owned-`String`'s
        // [`String::as_str`] borrow, which lands on the lowercase
        // Portuguese diagnostic vocabulary the reverse axis does not
        // accept) — unlike the peer
        // [`crate::supervisor::RestartPolicy`] axis pair (whose
        // forward `From` emit and reverse `TryFrom` parse share one
        // `PascalCase` vocabulary by construction, so the owned-
        // `String` forward + reverse round-trip composes directly),
        // the [`CaixaKind::as_str`] emit and [`CaixaKind::from_wire`]
        // parse land on disjoint vocabularies by design (the two-axis
        // split the sibling
        // [`caixa_kind_display_matches_as_str_and_not_serialize_wire`]
        // pin makes load-bearing), so the round-trip crosses through
        // [`CaixaKind::wire_name`] as the reverse-axis vocabulary
        // rather than composing the owned-`String` emit directly.
        for &variant in CaixaKind::ALL {
            let owned_string: String = <String as From<CaixaKind>>::from(variant);
            let owned_static: &'static str = <&'static str as From<CaixaKind>>::from(variant);
            assert_eq!(
                owned_string.as_str(),
                owned_static,
                "From<CaixaKind> for String and From<CaixaKind> for \
                 &'static str must resolve identically on \
                 CaixaKind::{variant:?} — divergence signals the \
                 owned-`String` and owned-`&'static str` forward-\
                 projection return-type-shape paths have drifted onto \
                 different emit-sets"
            );
            let via_to_string: String = variant.to_string();
            assert_eq!(
                owned_string, via_to_string,
                "From<CaixaKind> for String must byte-equal \
                 CaixaKind::to_string on CaixaKind::{variant:?} — \
                 divergence signals the trait-idiomatic owned-`String` \
                 forward-projection axis and the ToString-through-\
                 Display axis have drifted onto different emit-sets"
            );
        }
        let via_iter: Vec<String> = CaixaKind::ALL.iter().copied().map(String::from).collect();
        let via_method: Vec<String> = CaixaKind::ALL
            .iter()
            .map(|k| k.as_str().to_owned())
            .collect();
        assert_eq!(
            via_iter, via_method,
            "`.iter().copied().map(String::from)` over CaixaKind::ALL \
             must byte-equal `.iter().map(|k| k.as_str().to_owned())` \
             on every arm — the owned-`String` `From<CaixaKind> for \
             String` axis is what makes the `String::from` composition \
             route through the substrate-primitive `CaixaKind::as_str` \
             accessor rather than through a per-call-site `.to_owned()` \
             / `String::from(kind.as_str())` detour"
        );
        for &variant in CaixaKind::ALL {
            let wire: &'static str = variant.wire_name();
            let re_parsed: Result<CaixaKind, ()> = <CaixaKind as TryFrom<&str>>::try_from(wire);
            assert_eq!(
                re_parsed,
                Ok(variant),
                "trait-idiomatic owned-`String` forward-projection + \
                 reverse-projection axis pair must round-trip \
                 CaixaKind::{variant:?} through wire_name and back \
                 through TryFrom<&str> — a break signals the wire-emit \
                 and reverse-parse axes have drifted onto different \
                 vocabularies (the owned-`String` forward emit lands on \
                 the lowercase Portuguese diagnostic vocabulary by \
                 design, so the round-trip crosses through wire_name \
                 rather than composing the owned-`String` emit directly)"
            );
        }
    }

    #[test]
    fn caixa_kind_from_into_borrowed_owned_string_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<&CaixaKind> for String` — asserts the borrowed-
        // input owned-`String`-returning standard-library trait impl
        // and the substrate-primitive [`super::CaixaKind::as_str`]
        // `pub const fn` accessor resolve to the same six-arm emit-set
        // across every arm the exhaustive [`super::CaixaKind::ALL`]
        // slice enumerates. Rust's standard library does not carry a
        // blanket `impl<T: AsRef<str>> From<&T> for String` (nor an
        // `impl<T: fmt::Display> From<&T> for String`), so the
        // borrowed-input owned-`String` forward-projection axis is a
        // distinct trait-idiomatic surface that a
        // `let key: String = (&kind).into();`-shaped call site reaches
        // through this impl and no other — the paired sibling
        // `From<CaixaKind> for String` impl forces every borrowed-
        // input call site through an explicit `Copy` deref
        // (`String::from(*kind)`) or an `.as_str().to_owned()` /
        // `.to_string()` detour. Peer of the first-mover
        // [`crate::supervisor::tests::restart_strategy_from_into_borrowed_owned_string_routes_through_as_str_accessor`]
        // (579385f), the second-peer
        // [`crate::supervisor::tests::restart_policy_from_into_borrowed_owned_string_routes_through_as_str_accessor`]
        // (8465740), and the third-peer
        // [`crate::dep::tests::dep_list_from_into_borrowed_owned_string_routes_through_as_str_accessor`]
        // (e0cb617) — extends the trait-idiomatic borrowed-input
        // owned-`String` forward-projection axis off the two-list
        // dep-graph axis onto the structurally most fundamental
        // closed-set fieldless typed enum peer on the caixa surface
        // (every caixa carries a `:kind`).
        for &variant in CaixaKind::ALL {
            let via_trait: String = <String as From<&CaixaKind>>::from(&variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_str(),
                via_method,
                "From<&CaixaKind> for String impl must round-trip \
                 &CaixaKind::{variant:?} to the same lifted \
                 CAIXA_KIND_LABEL_* const CaixaKind::as_str returns — \
                 divergence signals a silent detour off the substrate-\
                 primitive accessor"
            );
            let via_into: String = (&variant).into();
            assert_eq!(
                via_into.as_str(),
                via_method,
                "Into<String>::into on &CaixaKind::{variant:?} must \
                 byte-equal CaixaKind::as_str on the same input — the \
                 blanket-derived Into shape must resolve to the same \
                 as_str dispatch as the explicit From impl"
            );
        }
    }

    #[test]
    fn caixa_kind_from_into_borrowed_owned_string_agrees_with_paired_axes_on_every_arm() {
        // Cross-axis partition pin: the newly lifted trait-idiomatic
        // borrowed-input owned-`String` `From<&CaixaKind> for String`
        // (this lift), the paired owned-input owned-`String`
        // `From<CaixaKind> for String` (231a18c), the paired
        // borrowed-input owned-`&'static str` `From<&CaixaKind> for
        // &'static str` (5ab993a), and the paired owned-input
        // owned-`&'static str` `From<CaixaKind> for &'static str`
        // (edbb27b) — every corner of the `{Self, &Self} × {&'static
        // str, String}` 2×2 trait-idiomatic projection family — must
        // resolve identically on every arm, locking the four return-
        // shape × input-shape paths together so any future detour
        // trips at caixa-core test time. Also byte-parity witness
        // against the sibling [`ToString::to_string`] surface routed
        // through [`std::fmt::Display`] and a round-trip witness
        // through the paired trait-idiomatic reverse [`TryFrom<&str>`]
        // axis on the wire-vocab [`super::CaixaKind::wire_name`]
        // emission (not the owned-`String`'s [`String::as_str`]
        // borrow, which lands on the lowercase Portuguese diagnostic
        // vocabulary the reverse axis does not accept — the two-axis
        // split by design) that closes the two-way `&Self → String →
        // wire → Self` round-trip on the trait-idiomatic borrowed-
        // input owned-`String` forward + reverse axis pair via the
        // wire vocabulary rather than the emit vocabulary. Peer of
        // the first-mover
        // [`crate::supervisor::tests::restart_strategy_from_into_borrowed_owned_string_agrees_with_paired_axes_on_every_arm`]
        // (579385f), the second-peer
        // [`crate::supervisor::tests::restart_policy_from_into_borrowed_owned_string_agrees_with_paired_axes_on_every_arm`]
        // (8465740), and the third-peer
        // [`crate::dep::tests::dep_list_from_into_borrowed_owned_string_agrees_with_paired_axes_on_every_arm`]
        // (e0cb617) — closes the whole `{Self, &Self} × {&'static
        // str, String}` 2×2 projection corner on the fourth
        // substrate-wide closed-set fieldless typed enum peer (the
        // structurally most fundamental peer on the caixa surface).
        //
        // Unlike the peer M2 OTP-shape and dep-graph axis pairs
        // (whose forward `From` emit and reverse `TryFrom` parse
        // share one vocabulary by construction, so the borrowed-input
        // owned-`String` forward + reverse round-trip composes
        // directly through the owned-`String`'s [`String::as_str`]
        // borrow), the [`super::CaixaKind::as_str`] emit and
        // [`super::CaixaKind::from_wire`] parse land on disjoint
        // vocabularies by design — the two-axis split the sibling
        // [`caixa_kind_display_matches_as_str_and_not_serialize_wire`]
        // pin makes load-bearing — so the round-trip crosses through
        // [`super::CaixaKind::wire_name`] as the reverse-axis
        // vocabulary rather than composing the borrowed-input
        // owned-`String` emit directly.
        for &kind in CaixaKind::ALL {
            let borrowed_string: String = <String as From<&CaixaKind>>::from(&kind);
            let owned_string: String = <String as From<CaixaKind>>::from(kind);
            let borrowed_static: &'static str = <&'static str as From<&CaixaKind>>::from(&kind);
            let owned_static: &'static str = <&'static str as From<CaixaKind>>::from(kind);
            assert_eq!(
                borrowed_string, owned_string,
                "From<&CaixaKind> for String and From<CaixaKind> for \
                 String must resolve identically on \
                 CaixaKind::{kind:?} — divergence signals the \
                 borrowed-input and owned-input owned-`String` \
                 forward-projection input-shape paths have drifted \
                 onto different emit-sets"
            );
            assert_eq!(
                borrowed_string.as_str(),
                borrowed_static,
                "From<&CaixaKind> for String and From<&CaixaKind> for \
                 &'static str must resolve identically on \
                 CaixaKind::{kind:?} — divergence signals the \
                 borrowed-input `&'static str` and owned-`String` \
                 return-shape paths have drifted onto different \
                 emit-sets"
            );
            assert_eq!(
                borrowed_string.as_str(),
                owned_static,
                "From<&CaixaKind> for String and From<CaixaKind> for \
                 &'static str must resolve identically on \
                 CaixaKind::{kind:?} — divergence signals a break in \
                 the diagonal corner of the {{Self, &Self}} × \
                 {{&'static str, String}} 2×2 trait-idiomatic \
                 projection family"
            );
            let via_to_string: String = kind.to_string();
            assert_eq!(
                borrowed_string, via_to_string,
                "From<&CaixaKind> for String must byte-equal \
                 CaixaKind::to_string on CaixaKind::{kind:?} — \
                 divergence signals the trait-idiomatic borrowed-\
                 input owned-`String` forward-projection axis and the \
                 ToString-through-Display axis have drifted onto \
                 different emit-sets"
            );
        }
        let via_iter: Vec<String> = CaixaKind::ALL.iter().map(String::from).collect();
        let via_method: Vec<String> = CaixaKind::ALL
            .iter()
            .map(|k| k.as_str().to_owned())
            .collect();
        assert_eq!(
            via_iter, via_method,
            "`.iter().map(String::from)` over CaixaKind::ALL — a call \
             site whose iteration axis holds `&CaixaKind` by \
             construction — must byte-equal `.iter().map(|k| \
             k.as_str().to_owned())` on every arm — the borrowed-\
             input owned-`String` `From<&CaixaKind> for String` axis \
             is what makes the `String::from` composition route \
             through the substrate-primitive `CaixaKind::as_str` \
             accessor without a spurious `Copy` deref (which would \
             only be reachable through the owned-input `From<\
             CaixaKind> for String` axis by first calling `.copied()` \
             on the iterator)"
        );
        for &variant in CaixaKind::ALL {
            let wire: &'static str = variant.wire_name();
            let re_parsed: Result<CaixaKind, ()> = <CaixaKind as TryFrom<&str>>::try_from(wire);
            assert_eq!(
                re_parsed,
                Ok(variant),
                "trait-idiomatic borrowed-input owned-`String` \
                 forward-projection + reverse-projection axis pair \
                 must round-trip CaixaKind::{variant:?} through \
                 wire_name and back through TryFrom<&str> — a break \
                 signals the wire-emit and reverse-parse axes have \
                 drifted onto different vocabularies (the borrowed-\
                 input owned-`String` forward emit lands on the \
                 lowercase Portuguese diagnostic vocabulary by \
                 design, so the round-trip crosses through wire_name \
                 rather than composing the borrowed-input \
                 owned-`String` emit directly)"
            );
        }
    }

    #[test]
    fn caixa_kind_from_into_static_cow_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<CaixaKind> for std::borrow::Cow<'static, str>` —
        // asserts the standard-library trait impl and the substrate-
        // primitive [`super::CaixaKind::as_str`] `pub const fn`
        // accessor resolve to the same six-arm emit-set across every
        // arm the exhaustive [`super::CaixaKind::ALL`] slice
        // enumerates. Rust's standard library does not carry a
        // blanket `impl<T: AsRef<str>> From<T> for Cow<'static, str>`
        // (nor an `impl<T: fmt::Display> From<T> for
        // Cow<'static, str>`), so the `Cow<'static, str>` forward-
        // projection axis is a distinct trait-idiomatic surface that a
        // `let key: Cow<'static, str> = kind.into();`-shaped call site
        // reaches through this impl and no other — the paired sibling
        // `From<CaixaKind> for &'static str` and `From<CaixaKind> for
        // String` impls force every `Cow<'static, str>`-parameterized
        // call site through a `Cow::Borrowed(kind.as_str())` /
        // `Cow::Owned(kind.to_string())` composition whose type bounds
        // have no compile-time link back to the substrate primitive.
        //
        // Also asserts the projection lands on the zero-alloc
        // [`std::borrow::Cow::Borrowed`] arm (not the
        // [`std::borrow::Cow::Owned`] arm) — the substrate-primitive
        // [`super::CaixaKind::as_str`] accessor's `&'static str`
        // return lifetime by construction makes the borrowed arm the
        // type-correct projection with no runtime allocation. Any
        // future silent detour that routes the impl through the
        // owned arm (an accidental `Cow::Owned(kind.to_string())`
        // rewrite that would allocate on every call site where the
        // `&'static str` return of [`super::CaixaKind::as_str`] makes
        // the zero-alloc borrowed projection type-correct) trips at
        // caixa-core test time under the [`std::borrow::Cow::Borrowed`]
        // discriminator witness rather than at a downstream
        // `Cow<'static, str>`-bound consumer's silent allocation.
        //
        // First-mover on the substrate-wide trait-idiomatic
        // [`std::borrow::Cow<'static, str>`] forward-projection family
        // — extends the substrate discipline off the closed
        // `{Self, &Self} × {&'static str, String}` 2×2 forward-
        // projection corner onto the [`Cow<'static, str>`] axis on the
        // structurally most fundamental closed-set fieldless typed
        // enum peer on the caixa surface (every caixa carries a
        // `:kind`). Every future closed-set fieldless typed enum peer
        // on the substrate is a future target of the campaign.
        for &variant in CaixaKind::ALL {
            let via_trait: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<CaixaKind>>::from(variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<CaixaKind> for Cow<'static, str> impl must \
                 round-trip CaixaKind::{variant:?} to the same lifted \
                 CAIXA_KIND_LABEL_* const CaixaKind::as_str returns — \
                 divergence signals a silent detour off the \
                 substrate-primitive accessor"
            );
            assert!(
                matches!(via_trait, std::borrow::Cow::Borrowed(_)),
                "From<CaixaKind> for Cow<'static, str> impl must land \
                 on the zero-alloc Cow::Borrowed arm on \
                 CaixaKind::{variant:?} — a Cow::Owned outcome \
                 signals the projection has silently allocated where \
                 the substrate-primitive CaixaKind::as_str \
                 `&'static str` return makes the borrowed arm the \
                 type-correct projection"
            );
            let via_into: std::borrow::Cow<'static, str> = variant.into();
            assert_eq!(
                via_into.as_ref(),
                via_method,
                "Into<Cow<'static, str>>::into on \
                 CaixaKind::{variant:?} must byte-equal \
                 CaixaKind::as_str on the same input — the blanket-\
                 derived Into shape must resolve to the same as_str \
                 dispatch as the explicit From impl"
            );
            assert!(
                matches!(via_into, std::borrow::Cow::Borrowed(_)),
                "Into<Cow<'static, str>>::into on \
                 CaixaKind::{variant:?} must land on the zero-alloc \
                 Cow::Borrowed arm — the blanket-derived Into shape \
                 must resolve to the same Cow::Borrowed dispatch as \
                 the explicit From impl"
            );
        }
    }

    #[test]
    fn caixa_kind_from_into_static_cow_str_agrees_with_paired_axes_on_every_arm() {
        // Cross-axis partition pin: the newly lifted trait-idiomatic
        // `From<CaixaKind> for std::borrow::Cow<'static, str>` (this
        // lift), the paired owned-input `From<CaixaKind> for &'static
        // str` (edbb27b), and the paired owned-input
        // `From<CaixaKind> for String` (231a18c) forward projections
        // must resolve identically on every arm, locking the three
        // return-shape paths together by construction so any future
        // detour trips at caixa-core test time. Also byte-parity
        // witness against the sibling [`ToString::to_string`] surface
        // routed through [`std::fmt::Display`] — every owned-heap-
        // string path (the `Cow::Owned` promotion of this axis's
        // `.into_owned()`, `From<CaixaKind> for String`, and
        // `.to_string()`) resolves to the same lifted
        // [`crate::render::CAIXA_KIND_LABEL_*`] const per arm.
        //
        // Then a `.iter().copied().map(std::borrow::Cow::from)` pipe
        // witness over [`super::CaixaKind::ALL`] that materializes the
        // six-arm accept-set through the [`std::borrow::Cow<'static,
        // str>`] axis alone — the exact shape a future
        // `axum::response::IntoResponse` per-arm rejection-body
        // composer, a future M4 admission-webhook per-arm rejection-
        // reason emitter whose typing rules out the sibling
        // [`AsRef<str>`] borrowed return, or a future substrate-wide
        // per-arm diagnostic surface that binds through a
        // [`Cow<'static, str>`] boundary reaches through — closing
        // the composable-projection axis on the structurally most
        // fundamental closed-set fieldless typed enum peer on the
        // caixa surface. The pipe witness also pins the zero-alloc
        // discipline: every element in the collected vector satisfies
        // the [`std::borrow::Cow::Borrowed`] arm predicate, so a
        // future accidental silent-allocation regression on the
        // pipe's iteration axis is a caixa-core-test-time failure.
        for &variant in CaixaKind::ALL {
            let via_cow: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<CaixaKind>>::from(variant);
            let via_static: &'static str = <&'static str as From<CaixaKind>>::from(variant);
            let via_string: String = <String as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_cow.as_ref(),
                via_static,
                "From<CaixaKind> for Cow<'static, str> and \
                 From<CaixaKind> for &'static str must resolve \
                 identically on CaixaKind::{variant:?} — divergence \
                 signals the Cow<'static, str> and &'static str \
                 return-shape paths have drifted onto different \
                 emit-sets"
            );
            assert_eq!(
                via_cow.as_ref(),
                via_string.as_str(),
                "From<CaixaKind> for Cow<'static, str> and \
                 From<CaixaKind> for String must resolve identically \
                 on CaixaKind::{variant:?} — divergence signals the \
                 Cow<'static, str> and String return-shape paths \
                 have drifted onto different emit-sets"
            );
            let via_to_string: String = variant.to_string();
            assert_eq!(
                via_cow.as_ref(),
                via_to_string.as_str(),
                "From<CaixaKind> for Cow<'static, str> must byte-\
                 equal CaixaKind::to_string on CaixaKind::{variant:?} \
                 — divergence signals the trait-idiomatic \
                 Cow<'static, str> forward-projection axis and the \
                 ToString-through-Display axis have drifted onto \
                 different emit-sets"
            );
        }
        let via_iter: Vec<std::borrow::Cow<'static, str>> = CaixaKind::ALL
            .iter()
            .copied()
            .map(std::borrow::Cow::from)
            .collect();
        let via_method: Vec<std::borrow::Cow<'static, str>> = CaixaKind::ALL
            .iter()
            .map(|k| std::borrow::Cow::Borrowed(k.as_str()))
            .collect();
        assert_eq!(
            via_iter, via_method,
            "`.iter().copied().map(Cow::from)` over CaixaKind::ALL \
             must byte-equal `.iter().map(|k| \
             Cow::Borrowed(k.as_str()))` on every arm — the trait-\
             idiomatic `From<CaixaKind> for Cow<'static, str>` axis \
             is what makes the `Cow::from` composition route through \
             the substrate-primitive `CaixaKind::as_str` accessor \
             with the zero-alloc Cow::Borrowed arm by construction, \
             rather than a per-call-site \
             `Cow::Owned(kind.to_string())` allocation"
        );
        for cow in &via_iter {
            assert!(
                matches!(cow, std::borrow::Cow::Borrowed(_)),
                "every element of the .iter().copied().map(Cow::from) \
                 pipe over CaixaKind::ALL must land on the zero-alloc \
                 Cow::Borrowed arm — a Cow::Owned outcome on any arm \
                 signals the pipe's iteration axis has silently \
                 allocated where the substrate-primitive \
                 CaixaKind::as_str `&'static str` return makes the \
                 borrowed arm the type-correct projection"
            );
        }
    }

    #[test]
    fn caixa_kind_from_borrowed_into_static_cow_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<&CaixaKind> for std::borrow::Cow<'static, str>` —
        // asserts the borrowed-input standard-library trait impl and
        // the substrate-primitive [`super::CaixaKind::as_str`] `pub
        // const fn` accessor resolve to the same six-arm emit-set
        // across every arm the exhaustive [`super::CaixaKind::ALL`]
        // slice enumerates. Rust's standard library does not carry a
        // blanket `impl<T: AsRef<str>> From<&T> for Cow<'static, str>`
        // (nor a `Copy`-based `impl<T: Copy, U: From<T>> From<&T> for
        // U`), so the borrowed-input `Cow<'static, str>` forward-
        // projection axis is a distinct trait-idiomatic surface that a
        // `let key: Cow<'static, str> = (&kind).into();`-shaped call
        // site or a `CaixaKind::ALL.iter().map(Cow::from)`-shaped pipe
        // reaches through this impl and no other — the paired owned-
        // input `From<CaixaKind> for Cow<'static, str>` impl forces
        // every borrowed-input call site through an explicit `Copy`
        // deref (`Cow::from(*kind)`) or a `Cow::Borrowed(kind.as_str())`
        // open-code whose type bounds have no compile-time link back
        // to the substrate primitive.
        //
        // Also asserts the projection lands on the zero-alloc
        // [`std::borrow::Cow::Borrowed`] arm (not the
        // [`std::borrow::Cow::Owned`] arm) — the substrate-primitive
        // [`super::CaixaKind::as_str`] accessor's `&'static str`
        // return lifetime by construction makes the borrowed arm the
        // type-correct projection with no runtime allocation on the
        // borrowed-input surface just as on the paired owned-input
        // surface.
        //
        // Second peer on the substrate-wide trait-idiomatic
        // [`std::borrow::Cow<'static, str>`] forward-projection family
        // opened on the paired owned-input `From<CaixaKind> for
        // Cow<'static, str>` (99c1735) — closes the `{Self, &Self}`
        // input-shape corner of the [`Cow<'static, str>`] axis on the
        // structurally most fundamental closed-set fieldless typed
        // enum peer on the caixa surface (every caixa carries a
        // `:kind`). Every future closed-set fieldless typed enum peer
        // on the substrate is a future target of the campaign.
        for &variant in CaixaKind::ALL {
            let via_trait: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<&CaixaKind>>::from(&variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<&CaixaKind> for Cow<'static, str> impl must \
                 round-trip &CaixaKind::{variant:?} to the same lifted \
                 CAIXA_KIND_LABEL_* const CaixaKind::as_str returns — \
                 divergence signals a silent detour off the \
                 substrate-primitive accessor"
            );
            assert!(
                matches!(via_trait, std::borrow::Cow::Borrowed(_)),
                "From<&CaixaKind> for Cow<'static, str> impl must land \
                 on the zero-alloc Cow::Borrowed arm on \
                 CaixaKind::{variant:?} — a Cow::Owned outcome \
                 signals the projection has silently allocated where \
                 the substrate-primitive CaixaKind::as_str \
                 `&'static str` return makes the borrowed arm the \
                 type-correct projection"
            );
            let via_into: std::borrow::Cow<'static, str> = (&variant).into();
            assert_eq!(
                via_into.as_ref(),
                via_method,
                "Into<Cow<'static, str>>::into on &CaixaKind::{variant:?} \
                 must byte-equal CaixaKind::as_str on the same input \
                 — the blanket-derived Into shape must resolve to the \
                 same as_str dispatch as the explicit From impl"
            );
            assert!(
                matches!(via_into, std::borrow::Cow::Borrowed(_)),
                "Into<Cow<'static, str>>::into on &CaixaKind::{variant:?} \
                 must land on the zero-alloc Cow::Borrowed arm — the \
                 blanket-derived Into shape must resolve to the same \
                 Cow::Borrowed dispatch as the explicit From impl"
            );
        }
    }

    #[test]
    fn caixa_kind_from_borrowed_into_static_cow_str_agrees_with_paired_axes_on_every_arm() {
        // Cross-axis partition pin: the newly lifted trait-idiomatic
        // borrowed-input `From<&CaixaKind> for std::borrow::Cow<'static, str>`
        // (this lift), the paired owned-input `From<CaixaKind> for
        // std::borrow::Cow<'static, str>` (99c1735), the paired
        // borrowed-input owned-`&'static str` `From<&CaixaKind> for
        // &'static str` (5ab993a), and the paired borrowed-input
        // owned-`String` `From<&CaixaKind> for String` must resolve
        // identically on every arm, locking the four
        // return-shape × input-shape paths together by construction so
        // any future detour trips at caixa-core test time. Also byte-
        // parity witness against the sibling [`ToString::to_string`]
        // surface routed through [`std::fmt::Display`] — every owned-
        // heap-string path (this axis's `.into_owned()` promotion, the
        // paired [`From<&CaixaKind> for String`], and `.to_string()`)
        // resolves to the same lifted
        // [`crate::render::CAIXA_KIND_LABEL_*`] const per arm.
        //
        // Then a `.iter().map(std::borrow::Cow::from)` pipe witness
        // over [`super::CaixaKind::ALL`] — whose iterator yields
        // `&CaixaKind` by construction, so the borrowed-input
        // [`Cow<'static, str>`] axis is what routes the pipe through
        // the substrate-primitive [`super::CaixaKind::as_str`]
        // accessor without a spurious [`Copy`] deref (which would only
        // be reachable through the owned-input
        // [`From<CaixaKind> for Cow<'static, str>`] axis by first
        // calling `.copied()` on the iterator). The pipe witness also
        // pins the zero-alloc discipline: every element in the
        // collected vector satisfies the [`std::borrow::Cow::Borrowed`]
        // arm predicate, so a future accidental silent-allocation
        // regression on the pipe's iteration axis is a caixa-core-
        // test-time failure.
        for &kind in CaixaKind::ALL {
            let borrowed_cow: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<&CaixaKind>>::from(&kind);
            let owned_cow: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<CaixaKind>>::from(kind);
            let borrowed_static: &'static str = <&'static str as From<&CaixaKind>>::from(&kind);
            let borrowed_string: String = <String as From<&CaixaKind>>::from(&kind);
            assert_eq!(
                borrowed_cow, owned_cow,
                "From<&CaixaKind> for Cow<'static, str> and \
                 From<CaixaKind> for Cow<'static, str> must resolve \
                 identically on CaixaKind::{kind:?} — divergence \
                 signals the borrowed-input and owned-input \
                 Cow<'static, str> forward-projection input-shape \
                 paths have drifted onto different emit-sets"
            );
            assert_eq!(
                borrowed_cow.as_ref(),
                borrowed_static,
                "From<&CaixaKind> for Cow<'static, str> and \
                 From<&CaixaKind> for &'static str must resolve \
                 identically on CaixaKind::{kind:?} — divergence \
                 signals the borrowed-input Cow<'static, str> and \
                 &'static str return-shape paths have drifted onto \
                 different emit-sets"
            );
            assert_eq!(
                borrowed_cow.as_ref(),
                borrowed_string.as_str(),
                "From<&CaixaKind> for Cow<'static, str> and \
                 From<&CaixaKind> for String must resolve identically \
                 on CaixaKind::{kind:?} — divergence signals the \
                 borrowed-input Cow<'static, str> and owned-`String` \
                 return-shape paths have drifted onto different \
                 emit-sets"
            );
            let via_to_string: String = kind.to_string();
            assert_eq!(
                borrowed_cow.as_ref(),
                via_to_string.as_str(),
                "From<&CaixaKind> for Cow<'static, str> must byte-\
                 equal CaixaKind::to_string on CaixaKind::{kind:?} — \
                 divergence signals the trait-idiomatic borrowed-\
                 input Cow<'static, str> forward-projection axis and \
                 the ToString-through-Display axis have drifted onto \
                 different emit-sets"
            );
        }
        let via_iter: Vec<std::borrow::Cow<'static, str>> =
            CaixaKind::ALL.iter().map(std::borrow::Cow::from).collect();
        let via_method: Vec<std::borrow::Cow<'static, str>> = CaixaKind::ALL
            .iter()
            .map(|k| std::borrow::Cow::Borrowed(k.as_str()))
            .collect();
        assert_eq!(
            via_iter, via_method,
            "`.iter().map(Cow::from)` over CaixaKind::ALL — a call \
             site whose iteration axis holds `&CaixaKind` by \
             construction — must byte-equal `.iter().map(|k| \
             Cow::Borrowed(k.as_str()))` on every arm — the \
             borrowed-input Cow<'static, str> `From<&CaixaKind> for \
             Cow<'static, str>` axis is what makes the `Cow::from` \
             composition route through the substrate-primitive \
             `CaixaKind::as_str` accessor with the zero-alloc \
             Cow::Borrowed arm by construction and without a spurious \
             `Copy` deref (which would only be reachable through the \
             owned-input `From<CaixaKind> for Cow<'static, str>` axis \
             by first calling `.copied()` on the iterator)"
        );
        for cow in &via_iter {
            assert!(
                matches!(cow, std::borrow::Cow::Borrowed(_)),
                "every element of the .iter().map(Cow::from) pipe \
                 over CaixaKind::ALL must land on the zero-alloc \
                 Cow::Borrowed arm — a Cow::Owned outcome on any arm \
                 signals the pipe's iteration axis has silently \
                 allocated where the substrate-primitive \
                 CaixaKind::as_str `&'static str` return makes the \
                 borrowed arm the type-correct projection"
            );
        }
    }

    #[test]
    fn caixa_kind_from_into_box_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<CaixaKind> for Box<str>` — asserts the owned-input
        // standard-library trait impl and the substrate-primitive
        // [`super::CaixaKind::as_str`] `pub const fn` accessor resolve to
        // the same six-arm lowercase-Portuguese emit-set across every arm
        // the exhaustive [`super::CaixaKind::ALL`] slice enumerates.
        // Rust's standard library carries `impl From<&str> for Box<str>`
        // and `impl From<String> for Box<str>` but no blanket
        // `impl<T: AsRef<str>> From<T> for Box<str>`, so this axis is a
        // distinct trait-idiomatic surface that a
        // `let key: Box<str> = kind.into();`-shaped call site reaches
        // through this impl and no other — a paired
        // `Box::from(kind.as_str())` open-code has no compile-time link
        // back to the substrate primitive.
        for &variant in CaixaKind::ALL {
            let via_trait: Box<str> = <Box<str> as From<CaixaKind>>::from(variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<CaixaKind> for Box<str> impl must round-trip \
                 CaixaKind::{variant:?} to the same lowercase-Portuguese \
                 byte-string CaixaKind::as_str returns — divergence \
                 signals a silent detour off the substrate-primitive \
                 accessor"
            );
            let via_into: Box<str> = variant.into();
            assert_eq!(
                via_into.as_ref(),
                via_method,
                "Into<Box<str>>::into on CaixaKind::{variant:?} must \
                 byte-equal CaixaKind::as_str on the same input — the \
                 blanket-derived Into shape must resolve to the same \
                 as_str dispatch as the explicit From impl"
            );
        }
    }

    #[test]
    fn caixa_kind_from_borrowed_into_box_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<&CaixaKind> for Box<str>` — asserts the borrowed-
        // input standard-library trait impl and the substrate-primitive
        // [`super::CaixaKind::as_str`] `pub const fn` accessor resolve to
        // the same six-arm lowercase-Portuguese emit-set across every arm
        // the exhaustive [`super::CaixaKind::ALL`] slice enumerates.
        // Rust's standard library carries `impl From<&str> for Box<str>`
        // and `impl From<String> for Box<str>` but no blanket
        // `impl<T: AsRef<str>> From<&T> for Box<str>` (nor a `Copy`-based
        // `impl<T: Copy, U: From<T>> From<&T> for U`), so the borrowed-
        // input [`Box<str>`] forward-projection axis is a distinct trait-
        // idiomatic surface that a
        // `CaixaKind::ALL.iter().map(Box::<str>::from)`-shaped pipe
        // (whose iterator over `&'static [CaixaKind]` yields `&CaixaKind`
        // by construction) or a `let key: Box<str> = (&kind).into();`-
        // shaped call site reaches through this impl and no other.
        for &variant in CaixaKind::ALL {
            let via_trait: Box<str> = <Box<str> as From<&CaixaKind>>::from(&variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<&CaixaKind> for Box<str> impl must round-trip \
                 &CaixaKind::{variant:?} to the same lowercase-\
                 Portuguese byte-string CaixaKind::as_str returns — \
                 divergence signals a silent detour off the substrate-\
                 primitive accessor"
            );
            let via_into: Box<str> = (&variant).into();
            assert_eq!(
                via_into.as_ref(),
                via_method,
                "Into<Box<str>>::into on &CaixaKind::{variant:?} must \
                 byte-equal CaixaKind::as_str on the same input — the \
                 blanket-derived Into shape on the borrowed-input \
                 surface must resolve to the same as_str dispatch as \
                 the explicit From impl"
            );
        }

        // Pipe witness — the distinguishing shape that forces the
        // borrowed-input axis to be independent of the owned-input peer.
        // `CaixaKind::ALL.iter()` yields `&CaixaKind` by construction, so
        // `.map(Box::<str>::from)` resolves through the borrowed-input
        // `From<&CaixaKind> for Box<str>` impl and no other — without
        // this axis, the same pipe would force an explicit `.copied()`
        // restatement whose type bounds bypass the substrate primitive.
        let via_pipe: Vec<Box<str>> = CaixaKind::ALL.iter().map(Box::<str>::from).collect();
        let via_accessor: Vec<&'static str> = CaixaKind::ALL.iter().map(|k| k.as_str()).collect();
        assert_eq!(
            via_pipe.len(),
            via_accessor.len(),
            "CaixaKind::ALL.iter().map(Box::<str>::from) pipe must \
             preserve arity against the paired CaixaKind::as_str \
             accessor — a length divergence signals the borrowed-input \
             axis has silently rejected an arm"
        );
        for (pipe_arm, accessor_arm) in via_pipe.iter().zip(via_accessor.iter()) {
            assert_eq!(
                pipe_arm.as_ref(),
                *accessor_arm,
                "CaixaKind::ALL.iter().map(Box::<str>::from) pipe must \
                 byte-equal the paired CaixaKind::ALL.iter().map(|k| \
                 k.as_str()) pipe on every arm — divergence signals the \
                 borrowed-input `From<&CaixaKind> for Box<str>` axis \
                 has silently detoured off the substrate-primitive \
                 accessor"
            );
        }
    }

    #[test]
    fn caixa_kind_from_into_arc_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<CaixaKind> for std::sync::Arc<str>` — asserts the
        // owned-input standard-library trait impl and the substrate-
        // primitive [`super::CaixaKind::as_str`] `pub const fn` accessor
        // resolve to the same six-arm lowercase-Portuguese emit-set across
        // every arm the exhaustive [`super::CaixaKind::ALL`] slice
        // enumerates. Opens the caixa-core-internal tier of the substrate-
        // wide [`std::sync::Arc<str>`] forward-projection campaign on the
        // structurally most fundamental caixa-core closed-set fieldless
        // typed enum peer — after the M2 OTP-shape tier
        // ([`crate::supervisor::RestartStrategy`],
        // [`crate::supervisor::RestartPolicy`]), the M3 mesh-shape tier
        // ([`crate::aplicacao::PlacementStrategy`],
        // [`crate::aplicacao::WitShape`],
        // [`crate::aplicacao::RateLimitUnit`]), and the outside-`caixa-
        // core` tier (`InvariantKind`, `ArchVerdict`, `Severity`,
        // `FixSafety`, `Semantic`, `FerriteRuntime`) already closed on
        // this same axis. Rust's standard library carries
        // `impl From<&str> for std::sync::Arc<str>` and
        // `impl From<String> for std::sync::Arc<str>` but no blanket
        // `impl<T: AsRef<str>> From<T> for std::sync::Arc<str>` (nor an
        // `impl<T: fmt::Display> From<T> for std::sync::Arc<str>`), so this
        // axis is a distinct trait-idiomatic surface that a
        // `let key: std::sync::Arc<str> = kind.into();`-shaped call site
        // reaches through this impl and no other — a paired
        // `std::sync::Arc::<str>::from(kind.as_str())` open-code has no
        // compile-time link back to the substrate primitive, and a two-
        // step `std::sync::Arc::<str>::from(String::from(kind))`
        // composition through the owned-`String` axis allocates twice
        // (once into the intermediate `String`, once into the
        // [`std::sync::Arc<str>`] on the `From<String>` conversion) where
        // the single-step trait impl allocates once.
        //
        // Cross-axis byte-parity witness against the sibling owned-input
        // `{&'static str, String, Cow<'static, str>, Box<str>}` return-
        // shape axes — locking the five return-shape paths on the owned-
        // input surface together by construction so any future detour off
        // the substrate-primitive [`super::CaixaKind::as_str`] accessor
        // trips at caixa-core test time.
        for &variant in CaixaKind::ALL {
            let via_trait: std::sync::Arc<str> =
                <std::sync::Arc<str> as From<CaixaKind>>::from(variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<CaixaKind> for std::sync::Arc<str> impl must round-\
                 trip CaixaKind::{variant:?} to the same lowercase-\
                 Portuguese byte-string CaixaKind::as_str returns — \
                 divergence signals a silent detour off the substrate-\
                 primitive accessor"
            );
            let via_into: std::sync::Arc<str> = variant.into();
            assert_eq!(
                via_into.as_ref(),
                via_method,
                "Into<std::sync::Arc<str>>::into on CaixaKind::{variant:?} \
                 must byte-equal CaixaKind::as_str on the same input — \
                 the blanket-derived Into shape must resolve to the same \
                 as_str dispatch as the explicit From impl"
            );
            let owned_static: &'static str = <&'static str as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_static,
                "From<CaixaKind> for std::sync::Arc<str> and \
                 From<CaixaKind> for &'static str must resolve identically \
                 on CaixaKind::{variant:?} — divergence signals the owned-\
                 input std::sync::Arc<str> and &'static str return-shape \
                 paths have drifted onto different emit-sets"
            );
            let owned_string: String = <String as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_string.as_str(),
                "From<CaixaKind> for std::sync::Arc<str> and \
                 From<CaixaKind> for String must resolve identically on \
                 CaixaKind::{variant:?} — divergence signals the owned-\
                 input std::sync::Arc<str> and owned-`String` return-shape \
                 paths have drifted onto different emit-sets"
            );
            let owned_cow: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_cow.as_ref(),
                "From<CaixaKind> for std::sync::Arc<str> and \
                 From<CaixaKind> for Cow<'static, str> must resolve \
                 identically on CaixaKind::{variant:?} — divergence \
                 signals the owned-input std::sync::Arc<str> and \
                 Cow<'static, str> return-shape paths have drifted onto \
                 different emit-sets"
            );
            let owned_box: Box<str> = <Box<str> as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_box.as_ref(),
                "From<CaixaKind> for std::sync::Arc<str> and \
                 From<CaixaKind> for Box<str> must resolve identically on \
                 CaixaKind::{variant:?} — divergence signals the owned-\
                 input std::sync::Arc<str> and Box<str> return-shape paths \
                 have drifted onto different emit-sets"
            );
        }
    }

    #[test]
    #[allow(
        clippy::too_many_lines,
        reason = "cross-axis partition pin folds four borrowed-input \
                  return-shape paths (&'static str, String, Cow<'static, \
                  str>, Box<str>) plus the paired owned-input Arc<str> \
                  witness and the .iter().map(std::sync::Arc::<str>::from) \
                  pipe witness into one exhaustive round-trip over \
                  CaixaKind::ALL — the accepted line-count cost of keying \
                  the whole borrowed-input Arc<str> corner to the \
                  substrate-primitive as_str accessor at the same test-site"
    )]
    fn caixa_kind_from_borrowed_into_arc_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<&CaixaKind> for std::sync::Arc<str>` — asserts the
        // borrowed-input standard-library trait impl and the substrate-
        // primitive [`super::CaixaKind::as_str`] `pub const fn` accessor
        // resolve to the same six-arm lowercase-Portuguese emit-set across
        // every arm the exhaustive [`super::CaixaKind::ALL`] slice
        // enumerates. Rust's standard library does not carry a blanket
        // `impl<T: AsRef<str>> From<&T> for std::sync::Arc<str>` (nor a
        // `Copy`-based `impl<T: Copy, U: From<T>> From<&T> for U`), so
        // the borrowed-input `std::sync::Arc<str>` forward-projection axis
        // is a distinct trait-idiomatic surface that a
        // `let key: std::sync::Arc<str> = (&kind).into();`-shaped call
        // site or a
        // `CaixaKind::ALL.iter().map(std::sync::Arc::<str>::from)`-shaped
        // pipe reaches through this impl and no other — the paired owned-
        // input `From<CaixaKind> for std::sync::Arc<str>` impl alone
        // forces every borrowed-input call site through a spurious `Copy`
        // deref (`std::sync::Arc::<str>::from((*kind).as_str())`) or a
        // `.copied()` restatement whose type bounds have no compile-time
        // link back to the substrate primitive.
        //
        // Closes the `{Self, &Self}` input-shape corner on the caixa-
        // core-internal tier of the substrate-wide trait-idiomatic
        // [`std::sync::Arc<str>`] forward-projection campaign for the
        // structurally most fundamental caixa-core enum peer, matching
        // the `{Self, &Self} × {&'static str, String, Cow<'static, str>,
        // Box<str>}` 2×4 forward-projection matrix the peer projection
        // surfaces already close on this same enum.
        //
        // Cross-axis partition pin against the paired owned-input
        // [`From<CaixaKind> for std::sync::Arc<str>`] and the sibling
        // borrowed-input `{&'static str, String, Cow<'static, str>,
        // Box<str>}` return-shape axes — locking the five return-shape ×
        // input-shape paths on the borrowed-input surface together by
        // construction so any future detour off the substrate-primitive
        // accessor trips at caixa-core test time. Then a
        // `.iter().map(std::sync::Arc::<str>::from)` pipe witness over
        // [`super::CaixaKind::ALL`] — whose iterator yields `&CaixaKind`
        // by construction, so the borrowed-input
        // [`std::sync::Arc<str>`] axis is what routes the pipe through
        // the substrate-primitive [`super::CaixaKind::as_str`] accessor
        // without a spurious [`Copy`] deref (which would only be
        // reachable through the owned-input
        // [`From<CaixaKind> for std::sync::Arc<str>`] axis by first
        // calling `.copied()` on the iterator).
        for &variant in CaixaKind::ALL {
            let via_trait: std::sync::Arc<str> =
                <std::sync::Arc<str> as From<&CaixaKind>>::from(&variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<&CaixaKind> for std::sync::Arc<str> impl must round-\
                 trip &CaixaKind::{variant:?} to the same lowercase-\
                 Portuguese byte-string CaixaKind::as_str returns — \
                 divergence signals a silent detour off the substrate-\
                 primitive accessor"
            );
            let via_into: std::sync::Arc<str> = (&variant).into();
            assert_eq!(
                via_into.as_ref(),
                via_method,
                "Into<std::sync::Arc<str>>::into on &CaixaKind::\
                 {variant:?} must byte-equal CaixaKind::as_str on the \
                 same input — the blanket-derived Into shape on the \
                 borrowed-input surface must resolve to the same as_str \
                 dispatch as the explicit From impl"
            );
            let owned_arc: std::sync::Arc<str> =
                <std::sync::Arc<str> as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait, owned_arc,
                "From<&CaixaKind> for std::sync::Arc<str> and \
                 From<CaixaKind> for std::sync::Arc<str> must resolve \
                 identically on CaixaKind::{variant:?} — divergence \
                 signals the borrowed-input and owned-input \
                 std::sync::Arc<str> forward-projection input-shape paths \
                 have drifted onto different emit-sets"
            );
            let borrowed_static: &'static str = <&'static str as From<&CaixaKind>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_static,
                "From<&CaixaKind> for std::sync::Arc<str> and \
                 From<&CaixaKind> for &'static str must resolve \
                 identically on CaixaKind::{variant:?} — divergence \
                 signals the borrowed-input std::sync::Arc<str> and \
                 &'static str return-shape paths have drifted onto \
                 different emit-sets"
            );
            let borrowed_string: String = <String as From<&CaixaKind>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_string.as_str(),
                "From<&CaixaKind> for std::sync::Arc<str> and \
                 From<&CaixaKind> for String must resolve identically on \
                 CaixaKind::{variant:?} — divergence signals the \
                 borrowed-input std::sync::Arc<str> and owned-`String` \
                 return-shape paths have drifted onto different emit-sets"
            );
            let borrowed_cow: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<&CaixaKind>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_cow.as_ref(),
                "From<&CaixaKind> for std::sync::Arc<str> and \
                 From<&CaixaKind> for Cow<'static, str> must resolve \
                 identically on CaixaKind::{variant:?} — divergence \
                 signals the borrowed-input std::sync::Arc<str> and \
                 Cow<'static, str> return-shape paths have drifted onto \
                 different emit-sets"
            );
            let borrowed_box: Box<str> = <Box<str> as From<&CaixaKind>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_box.as_ref(),
                "From<&CaixaKind> for std::sync::Arc<str> and \
                 From<&CaixaKind> for Box<str> must resolve identically \
                 on CaixaKind::{variant:?} — divergence signals the \
                 borrowed-input std::sync::Arc<str> and Box<str> return-\
                 shape paths have drifted onto different emit-sets"
            );
        }
        let via_iter: Vec<std::sync::Arc<str>> = CaixaKind::ALL
            .iter()
            .map(std::sync::Arc::<str>::from)
            .collect();
        let via_method: Vec<std::sync::Arc<str>> = CaixaKind::ALL
            .iter()
            .map(|k| std::sync::Arc::<str>::from(k.as_str()))
            .collect();
        assert_eq!(
            via_iter, via_method,
            "`.iter().map(std::sync::Arc::<str>::from)` over \
             CaixaKind::ALL — a call site whose iteration axis holds \
             `&CaixaKind` by construction — must byte-equal \
             `.iter().map(|k| std::sync::Arc::<str>::from(k.as_str()))` \
             on every arm — the borrowed-input std::sync::Arc<str> \
             `From<&CaixaKind> for std::sync::Arc<str>` axis is what \
             makes the `std::sync::Arc::<str>::from` composition route \
             through the substrate-primitive `CaixaKind::as_str` \
             accessor without a spurious `Copy` deref (which would only \
             be reachable through the owned-input \
             `From<CaixaKind> for std::sync::Arc<str>` axis by first \
             calling `.copied()` on the iterator)"
        );
    }

    #[test]
    fn caixa_kind_wire_names_covers_every_arm() {
        // Load-bearing pin on the substrate-canonical
        // [`CaixaKind::WIRE_NAMES`] exhaustive accept-set roster on the
        // PascalCase wire byte-string axis: every variant of the sibling
        // [`CaixaKind::ALL`] exhaustive-iteration surface must project
        // through [`CaixaKind::wire_name`] onto an entry the
        // [`CaixaKind::WIRE_NAMES`] roster carries, and the roster's
        // length must byte-equal `CaixaKind::ALL.len()` so a silent
        // skew between the [`CaixaKind::wire_name`] match's arm-set
        // and the roster's arm-set trips here at caixa-core test time
        // rather than at a downstream M4
        // `mesh.pleme.io/v1alpha1/Caixa` CR admission-webhook rejection
        // body's wire-form `:kind` accepted-set enumeration miss / a
        // fleet-side operator's per-cluster catalog enumeration miss /
        // a `feira --kind …` "did you mean" hint drift. A future arm
        // addition (an `Actor` virtual-actor arm the M5 Orleans-
        // inspired kind reaches through — the candidate future arm
        // named in the sibling [`CaixaKind::from_wire`] doc block)
        // extends [`CaixaKind::ALL`] as a single edit and this pin
        // sweeps the new arm by iteration; the paired
        // [`CaixaKind::WIRE_NAMES`] roster must grow in lockstep or
        // this assertion trips. Every entry is further pinned to open
        // with an ASCII uppercase byte so a silent collapse of the two
        // axes (an entry byte-identical to a sibling
        // [`CaixaKind::as_str`] lowercase-Portuguese label that would
        // let a wire-axis consumer accept the human-readable diagnostic
        // byte-string) trips here rather than at a downstream K8s-CR
        // round-trip miss.
        //
        // Peer of the sibling
        // [`crate::upgrade::tests::upgrade_instruction_wire_forms_covers_every_arm`]
        // (cc42c0e) and
        // [`crate::upgrade::tests::upgrade_instruction_lisp_forms_covers_every_arm`]
        // (1898d77) pins on the OTP-appup discriminator's wire and
        // author-surface roster axes — the same closed-set-roster
        // exhaustive-coverage discipline extended here onto the
        // structurally most fundamental caixa-core enum.
        //
        // Fail-before-pass-after locally verified by mutating one arm
        // of the paired [`crate::render::CAIXA_KIND_WIRE_*`] const
        // family (e.g. dropping the trailing `a` from `"Biblioteca"`
        // → `"Bibliotec"`) — the length pin still passes but the
        // `contains` check fires on the mutated arm; and by shortening
        // the roster to five entries — the length pin fires first.
        assert_eq!(
            CaixaKind::WIRE_NAMES.len(),
            CaixaKind::ALL.len(),
            "CaixaKind::WIRE_NAMES.len() must byte-equal \
             CaixaKind::ALL.len() — a mismatch means the roster and \
             the enum's arm-set have drifted; the two rosters \
             enumerate the same closed six-arm set through different \
             axes (variant vs. wire byte-string) and downstream \
             consumers that fan through both will silently disagree \
             on the accepted arm-set"
        );
        for &variant in CaixaKind::ALL {
            let wire = variant.wire_name();
            assert!(
                CaixaKind::WIRE_NAMES.contains(&wire),
                "CaixaKind::{variant:?}.wire_name() = {wire:?} must be \
                 a member of CaixaKind::WIRE_NAMES — the emitter and \
                 the roster have drifted out of lockstep"
            );
        }
        for tag in CaixaKind::WIRE_NAMES {
            let first = tag.chars().next().unwrap_or_else(|| {
                panic!(
                    "CaixaKind::WIRE_NAMES entry {tag:?} must be a \
                     non-empty PascalCase byte-string"
                )
            });
            assert!(
                first.is_ascii_uppercase(),
                "CaixaKind::WIRE_NAMES entry {tag:?} must open with an \
                 ASCII uppercase byte (PascalCase wire form) — a \
                 lowercase entry would collide the roster with the \
                 sibling CaixaKind::as_str lowercase-Portuguese label \
                 axis"
            );
        }
    }

    #[test]
    fn caixa_kind_labels_covers_every_arm() {
        // Load-bearing pin on the substrate-canonical
        // [`CaixaKind::LABELS`] exhaustive accept-set roster on the
        // lowercase-Portuguese human-readable label axis: every variant
        // of the sibling [`CaixaKind::ALL`] exhaustive-iteration surface
        // must project through [`CaixaKind::as_str`] onto an entry the
        // [`CaixaKind::LABELS`] roster carries, and the roster's length
        // must byte-equal `CaixaKind::ALL.len()` so a silent skew between
        // the [`CaixaKind::as_str`] match's arm-set and the roster's
        // arm-set trips here at caixa-core test time rather than at a
        // downstream `feira app graph` per-Aplicacao `:kind`-histogram
        // column's zero-count-arm miss / a future wasm-operator
        // rejection-body user-facing diagnostic's accepted-label
        // enumeration miss / a `tracing::field::valuable::Value::List`
        // structured-log accepted-label emit's drift. A future arm
        // addition (an `Actor` virtual-actor arm the M5 Orleans-inspired
        // kind reaches through — the candidate future arm named in the
        // sibling [`CaixaKind::from_wire`] doc block) extends
        // [`CaixaKind::ALL`] as a single edit and this pin sweeps the
        // new arm by iteration; the paired [`CaixaKind::LABELS`] roster
        // must grow in lockstep or this assertion trips. Every entry is
        // further pinned to open with an ASCII lowercase byte so a
        // silent collapse of the two axes (an entry byte-identical to a
        // sibling [`CaixaKind::wire_name`] PascalCase byte-string that
        // would let a label-axis consumer accept the wire byte-string)
        // trips here rather than at a downstream consumer's vocabulary
        // collision miss.
        //
        // Second corner on the two-axis roster split — peer of the
        // sibling [`caixa_kind_wire_names_covers_every_arm`] (bd708bd)
        // pin on the PascalCase wire byte-string axis. The two rosters
        // enumerate the same closed six-arm set through the two-axis
        // split the sibling
        // [`caixa_kind_display_matches_as_str_and_not_serialize_wire`]
        // pin already makes load-bearing (wire ≠ human-readable; the
        // split is by design). Peer of the sibling
        // [`crate::upgrade::tests::upgrade_instruction_lisp_forms_covers_every_arm`]
        // (1898d77) and
        // [`crate::upgrade::tests::upgrade_instruction_wire_forms_covers_every_arm`]
        // (cc42c0e) pins on the OTP-appup discriminator's two-axis
        // roster split.
        //
        // Fail-before-pass-after locally verified by mutating one arm
        // of the paired [`crate::render::CAIXA_KIND_LABEL_*`] const
        // family (e.g. dropping the trailing `a` from `"biblioteca"`
        // → `"bibliotec"`) — the length pin still passes but the
        // `contains` check fires on the mutated arm; and by shortening
        // the roster to five entries — the length pin fires first.
        assert_eq!(
            CaixaKind::LABELS.len(),
            CaixaKind::ALL.len(),
            "CaixaKind::LABELS.len() must byte-equal \
             CaixaKind::ALL.len() — a mismatch means the roster and \
             the enum's arm-set have drifted; the two rosters \
             enumerate the same closed six-arm set through different \
             axes (variant vs. lowercase-Portuguese human-readable \
             label byte-string) and downstream consumers that fan \
             through both will silently disagree on the accepted \
             arm-set"
        );
        for &variant in CaixaKind::ALL {
            let label = variant.as_str();
            assert!(
                CaixaKind::LABELS.contains(&label),
                "CaixaKind::{variant:?}.as_str() = {label:?} must be \
                 a member of CaixaKind::LABELS — the emitter and the \
                 roster have drifted out of lockstep"
            );
        }
        for tag in CaixaKind::LABELS {
            let first = tag.chars().next().unwrap_or_else(|| {
                panic!(
                    "CaixaKind::LABELS entry {tag:?} must be a \
                     non-empty lowercase-Portuguese human-readable \
                     label byte-string"
                )
            });
            assert!(
                first.is_ascii_lowercase(),
                "CaixaKind::LABELS entry {tag:?} must open with an \
                 ASCII lowercase byte (lowercase-Portuguese label \
                 form) — an uppercase entry would collide the roster \
                 with the sibling CaixaKind::wire_name PascalCase wire \
                 axis"
            );
        }
    }

    #[test]
    #[allow(
        clippy::too_many_lines,
        reason = "cross-axis partition pin folds five owned-input \
                  return-shape paths (&'static str, String, Cow<'static, \
                  str>, Box<str>, std::sync::Arc<str>) plus the paired \
                  Rc<str> witness into one exhaustive round-trip over \
                  CaixaKind::ALL — the accepted line-count cost of keying \
                  the whole owned-input Rc<str> corner to the substrate-\
                  primitive as_str accessor at the same test-site"
    )]
    fn caixa_kind_from_into_rc_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<CaixaKind> for std::rc::Rc<str>` — asserts the
        // owned-input standard-library trait impl and the substrate-
        // primitive [`super::CaixaKind::as_str`] `pub const fn` accessor
        // resolve to the same six-arm lowercase-Portuguese emit-set
        // across every arm the exhaustive [`super::CaixaKind::ALL`]
        // slice enumerates. Opens the substrate-wide
        // [`std::rc::Rc<str>`] forward-projection campaign on the
        // closed-set fieldless typed-enum family via the structurally
        // most fundamental caixa-core enum peer.
        //
        // Rust's standard library carries `impl From<&str> for
        // std::rc::Rc<str>` and `impl From<String> for std::rc::Rc<str>`
        // but no blanket `impl<T: AsRef<str>> From<T> for
        // std::rc::Rc<str>` — and no blanket `impl<T> From<T> for
        // std::rc::Rc<str> where std::sync::Arc<str>: From<T>` — so
        // this axis is a distinct trait-idiomatic surface that a
        // `let key: std::rc::Rc<str> = kind.into();`-shaped call site
        // reaches through this impl and no other. A paired
        // `std::rc::Rc::<str>::from(kind.as_str())` open-code has no
        // compile-time link back to the substrate primitive, and a
        // two-step `std::rc::Rc::<str>::from(String::from(kind))`
        // composition through the owned-`String` axis allocates twice
        // where the single-step trait impl allocates once.
        //
        // Cross-axis byte-parity witness against the sibling owned-
        // input `{&'static str, String, Cow<'static, str>, Box<str>,
        // std::sync::Arc<str>}` return-shape axes — locking the six
        // return-shape paths on the owned-input surface together by
        // construction so any future detour off the substrate-
        // primitive [`super::CaixaKind::as_str`] accessor trips at
        // caixa-core test time.
        for &variant in CaixaKind::ALL {
            let via_trait: std::rc::Rc<str> = <std::rc::Rc<str> as From<CaixaKind>>::from(variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<CaixaKind> for std::rc::Rc<str> impl must round-\
                 trip CaixaKind::{variant:?} to the same lowercase-\
                 Portuguese byte-string CaixaKind::as_str returns — \
                 divergence signals a silent detour off the substrate-\
                 primitive accessor"
            );
            let via_into: std::rc::Rc<str> = variant.into();
            assert_eq!(
                via_into.as_ref(),
                via_method,
                "Into<std::rc::Rc<str>>::into on CaixaKind::{variant:?} \
                 must byte-equal CaixaKind::as_str on the same input — \
                 the blanket-derived Into shape must resolve to the \
                 same as_str dispatch as the explicit From impl"
            );
            let owned_static: &'static str = <&'static str as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_static,
                "From<CaixaKind> for std::rc::Rc<str> and \
                 From<CaixaKind> for &'static str must resolve \
                 identically on CaixaKind::{variant:?} — divergence \
                 signals the owned-input std::rc::Rc<str> and \
                 &'static str return-shape paths have drifted onto \
                 different emit-sets"
            );
            let owned_string: String = <String as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_string.as_str(),
                "From<CaixaKind> for std::rc::Rc<str> and \
                 From<CaixaKind> for String must resolve identically \
                 on CaixaKind::{variant:?} — divergence signals the \
                 owned-input std::rc::Rc<str> and owned-`String` \
                 return-shape paths have drifted onto different emit-\
                 sets"
            );
            let owned_cow: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_cow.as_ref(),
                "From<CaixaKind> for std::rc::Rc<str> and \
                 From<CaixaKind> for Cow<'static, str> must resolve \
                 identically on CaixaKind::{variant:?} — divergence \
                 signals the owned-input std::rc::Rc<str> and \
                 Cow<'static, str> return-shape paths have drifted \
                 onto different emit-sets"
            );
            let owned_box: Box<str> = <Box<str> as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_box.as_ref(),
                "From<CaixaKind> for std::rc::Rc<str> and \
                 From<CaixaKind> for Box<str> must resolve identically \
                 on CaixaKind::{variant:?} — divergence signals the \
                 owned-input std::rc::Rc<str> and Box<str> return-\
                 shape paths have drifted onto different emit-sets"
            );
            let owned_arc: std::sync::Arc<str> =
                <std::sync::Arc<str> as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_arc.as_ref(),
                "From<CaixaKind> for std::rc::Rc<str> and \
                 From<CaixaKind> for std::sync::Arc<str> must resolve \
                 identically on CaixaKind::{variant:?} — divergence \
                 signals the owned-input single-threaded-refcounted \
                 std::rc::Rc<str> and atomically-refcounted \
                 std::sync::Arc<str> return-shape paths have drifted \
                 onto different emit-sets"
            );
        }
    }

    #[test]
    #[allow(
        clippy::too_many_lines,
        reason = "cross-axis partition pin folds five borrowed-input \
                  return-shape paths (&'static str, String, Cow<'static, \
                  str>, Box<str>, std::sync::Arc<str>) plus the paired \
                  owned-input Rc<str> witness and the \
                  .iter().map(std::rc::Rc::<str>::from) pipe witness \
                  into one exhaustive round-trip over CaixaKind::ALL — \
                  the accepted line-count cost of keying the whole \
                  borrowed-input Rc<str> corner to the substrate-\
                  primitive as_str accessor at the same test-site"
    )]
    fn caixa_kind_from_borrowed_into_rc_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<&CaixaKind> for std::rc::Rc<str>` — asserts the
        // borrowed-input standard-library trait impl and the substrate-
        // primitive [`super::CaixaKind::as_str`] `pub const fn`
        // accessor resolve to the same six-arm lowercase-Portuguese
        // emit-set across every arm the exhaustive
        // [`super::CaixaKind::ALL`] slice enumerates. Rust's standard
        // library does not carry a blanket
        // `impl<T: AsRef<str>> From<&T> for std::rc::Rc<str>` (nor a
        // `Copy`-based `impl<T: Copy, U: From<T>> From<&T> for U`), so
        // the borrowed-input `std::rc::Rc<str>` forward-projection
        // axis is a distinct trait-idiomatic surface that a
        // `let key: std::rc::Rc<str> = (&kind).into();`-shaped call
        // site or a
        // `CaixaKind::ALL.iter().map(std::rc::Rc::<str>::from)`-shaped
        // pipe reaches through this impl and no other — the paired
        // owned-input `From<CaixaKind> for std::rc::Rc<str>` impl
        // alone forces every borrowed-input call site through a
        // spurious `Copy` deref
        // (`std::rc::Rc::<str>::from((*kind).as_str())`) or a
        // `.copied()` restatement whose type bounds have no compile-
        // time link back to the substrate primitive.
        //
        // Closes the `{Self, &Self}` input-shape corner on the
        // substrate-wide trait-idiomatic [`std::rc::Rc<str>`] forward-
        // projection axis for the structurally most fundamental
        // closed-set fieldless typed enum on the caixa substrate,
        // matching the `{Self, &Self} × {&'static str, String,
        // Cow<'static, str>, Box<str>, std::sync::Arc<str>}` 2×5
        // forward-projection matrix the peer projection surfaces
        // already close on this same enum.
        for &variant in CaixaKind::ALL {
            let via_trait: std::rc::Rc<str> =
                <std::rc::Rc<str> as From<&CaixaKind>>::from(&variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<&CaixaKind> for std::rc::Rc<str> impl must \
                 round-trip &CaixaKind::{variant:?} to the same \
                 lowercase-Portuguese byte-string CaixaKind::as_str \
                 returns — divergence signals a silent detour off the \
                 substrate-primitive accessor"
            );
            let via_into: std::rc::Rc<str> = (&variant).into();
            assert_eq!(
                via_into.as_ref(),
                via_method,
                "Into<std::rc::Rc<str>>::into on &CaixaKind::\
                 {variant:?} must byte-equal CaixaKind::as_str on the \
                 same input — the blanket-derived Into shape on the \
                 borrowed-input surface must resolve to the same \
                 as_str dispatch as the explicit From impl"
            );
            let owned_rc: std::rc::Rc<str> = <std::rc::Rc<str> as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait, owned_rc,
                "From<&CaixaKind> for std::rc::Rc<str> and \
                 From<CaixaKind> for std::rc::Rc<str> must resolve \
                 identically on CaixaKind::{variant:?} — divergence \
                 signals the borrowed-input and owned-input \
                 std::rc::Rc<str> forward-projection input-shape paths \
                 have drifted onto different emit-sets"
            );
            let borrowed_static: &'static str = <&'static str as From<&CaixaKind>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_static,
                "From<&CaixaKind> for std::rc::Rc<str> and \
                 From<&CaixaKind> for &'static str must resolve \
                 identically on CaixaKind::{variant:?} — divergence \
                 signals the borrowed-input std::rc::Rc<str> and \
                 &'static str return-shape paths have drifted onto \
                 different emit-sets"
            );
            let borrowed_string: String = <String as From<&CaixaKind>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_string.as_str(),
                "From<&CaixaKind> for std::rc::Rc<str> and \
                 From<&CaixaKind> for String must resolve identically \
                 on CaixaKind::{variant:?} — divergence signals the \
                 borrowed-input std::rc::Rc<str> and owned-`String` \
                 return-shape paths have drifted onto different emit-\
                 sets"
            );
            let borrowed_cow: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<&CaixaKind>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_cow.as_ref(),
                "From<&CaixaKind> for std::rc::Rc<str> and \
                 From<&CaixaKind> for Cow<'static, str> must resolve \
                 identically on CaixaKind::{variant:?} — divergence \
                 signals the borrowed-input std::rc::Rc<str> and \
                 Cow<'static, str> return-shape paths have drifted \
                 onto different emit-sets"
            );
            let borrowed_box: Box<str> = <Box<str> as From<&CaixaKind>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_box.as_ref(),
                "From<&CaixaKind> for std::rc::Rc<str> and \
                 From<&CaixaKind> for Box<str> must resolve \
                 identically on CaixaKind::{variant:?} — divergence \
                 signals the borrowed-input std::rc::Rc<str> and \
                 Box<str> return-shape paths have drifted onto \
                 different emit-sets"
            );
            let borrowed_arc: std::sync::Arc<str> =
                <std::sync::Arc<str> as From<&CaixaKind>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_arc.as_ref(),
                "From<&CaixaKind> for std::rc::Rc<str> and \
                 From<&CaixaKind> for std::sync::Arc<str> must \
                 resolve identically on CaixaKind::{variant:?} — \
                 divergence signals the borrowed-input single-threaded-\
                 refcounted std::rc::Rc<str> and atomically-refcounted \
                 std::sync::Arc<str> return-shape paths have drifted \
                 onto different emit-sets"
            );
        }
        // `.iter().map(std::rc::Rc::<str>::from)` pipe witness over
        // [`super::CaixaKind::ALL`] — whose iterator yields
        // `&CaixaKind` by construction, so the borrowed-input
        // [`std::rc::Rc<str>`] axis is what routes the pipe through
        // the substrate-primitive [`super::CaixaKind::as_str`]
        // accessor without a spurious [`Copy`] deref (which would
        // only be reachable through the owned-input
        // [`From<CaixaKind> for std::rc::Rc<str>`] axis by first
        // calling `.copied()` on the iterator).
        let pipe: Vec<std::rc::Rc<str>> = CaixaKind::ALL
            .iter()
            .map(std::rc::Rc::<str>::from)
            .collect();
        assert_eq!(pipe.len(), CaixaKind::ALL.len());
        for (i, &variant) in CaixaKind::ALL.iter().enumerate() {
            assert_eq!(
                pipe[i].as_ref(),
                variant.as_str(),
                "`.iter().map(std::rc::Rc::<str>::from)` pipe over \
                 CaixaKind::ALL must yield the same lowercase-\
                 Portuguese byte-string CaixaKind::as_str returns for \
                 CaixaKind::{variant:?}"
            );
        }
    }

    #[test]
    #[allow(
        clippy::too_many_lines,
        reason = "cross-axis partition pin folds the substrate-primitive \
                  as_str accessor's `.as_bytes()` byte-tail plus the \
                  paired str-view (AsRef<str>, Display, as_str) and \
                  reverse-projection ({&'static str, String, Cow<'static, \
                  str>, Box<str>, std::sync::Arc<str>, std::rc::Rc<str>}) \
                  return-shape axes' `.as_bytes()` byte-tails plus a \
                  <T: AsRef<[u8]>>-bound-consumer witness plus a \
                  blake3::Hasher::update-shape byte-input surface witness \
                  into one exhaustive round-trip over CaixaKind::ALL — the \
                  accepted line-count cost of opening the byte-view axis \
                  keyed to the substrate-primitive as_str accessor at the \
                  same test-site"
    )]
    #[allow(
        clippy::needless_borrows_for_generic_args,
        reason = "the borrowed-input surface (&variant) is exercised \
                  deliberately: the `<T: AsRef<[u8]>>`-bound consumer and \
                  the `blake3::Hasher::update`-shape byte-input surface \
                  both accept either owned or borrowed input through the \
                  standard-library blanket `impl<T: ?Sized + AsRef<[u8]>> \
                  AsRef<[u8]> for &T`, and this pin round-trips both \
                  input shapes to lock the borrowed-input path load-\
                  bearing against a future silent regression"
    )]
    fn caixa_kind_as_ref_bytes_routes_through_as_str_accessor() {
        // `<T: AsRef<[u8]>>`-bound-consumer witness helper: a generic
        // byte-input function accepts a [`super::CaixaKind`] directly
        // through the trait bound, without the caller open-coding the
        // two-hop `kind.as_str().as_bytes()` composition. Lifted to the
        // top of the function per `clippy::items_after_statements`.
        fn generic_bytes_sink<T: AsRef<[u8]>>(t: T) -> Vec<u8> {
            t.as_ref().to_vec()
        }
        // `blake3::Hasher::update`-shape byte-input surface mock: mirrors
        // `blake3::Hasher::update` / `ring::digest::Context::update` /
        // `sha2::Sha256::update`'s `impl AsRef<[u8]>`-bound `update`
        // signature so a per-caixa BLAKE3 content-address closure that
        // composes `hasher.update(kind)` on the [`crate::Lacre`] closure
        // builder reaches the substrate-primitive `as_str` accessor
        // through the [`super::CaixaKind`] `AsRef<[u8]>` axis and no
        // other. Lifted to the top of the function per
        // `clippy::items_after_statements`.
        struct MockHasher(Vec<u8>);
        impl MockHasher {
            fn new() -> Self {
                Self(Vec::new())
            }
            fn update(&mut self, bytes: impl AsRef<[u8]>) -> &mut Self {
                self.0.extend_from_slice(bytes.as_ref());
                self
            }
            fn finalize(self) -> Vec<u8> {
                self.0
            }
        }

        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl AsRef<[u8]> for CaixaKind` — asserts the trait-
        // idiomatic byte-view standard-library impl and the substrate-
        // primitive [`super::CaixaKind::as_str`] `pub const fn`
        // accessor's `.as_bytes()` byte-tail resolve to the same six-
        // arm lowercase-Portuguese byte-string emit-set across every
        // arm the exhaustive [`super::CaixaKind::ALL`] slice
        // enumerates. Opens the substrate-wide trait-idiomatic
        // byte-view axis on the closed-set fieldless typed-enum family
        // through the structurally most fundamental caixa-core enum
        // peer — the first-mover on the byte-projection axis in the
        // same manner [`std::str::FromStr`] (c452cae) opened the
        // trait-idiomatic parse axis and
        // [`From<Self> for std::rc::Rc<str>`] (e04aff0) opened the
        // trait-idiomatic single-threaded-refcounted reverse-
        // projection axis on this same enum.
        //
        // Rust's standard library carries `impl AsRef<[u8]> for str`
        // and `impl AsRef<[u8]> for String`, so a two-hop composition
        // `kind.as_str().as_bytes()` (or the equally two-hop
        // `AsRef::<str>::as_ref(&kind).as_bytes()`) is reachable
        // through the pre-existing str-view axis alone. But that two-
        // hop shape has no compile-time link back to the byte-
        // projection axis, forces every downstream
        // `<T: AsRef<[u8]>>`-bound consumer to open-code the two-hop
        // composition at every call site, and admits a silent split
        // whenever a future call site takes a sibling reverse-
        // projection axis whose `.as_bytes()` byte-tail carries no
        // compile-time byte-view surface. This impl closes the byte-
        // view axis at the substrate-primitive [`super::CaixaKind::
        // as_str`] accessor so every future `<T: AsRef<[u8]>>`-bound
        // consumer reaches the same lifted
        // [`super::crate::render::CAIXA_KIND_LABEL_*`] const roster
        // the paired str-view axes already return through — through
        // one trait dispatch.
        for &variant in CaixaKind::ALL {
            let via_trait: &[u8] = <CaixaKind as AsRef<[u8]>>::as_ref(&variant);
            let via_method_bytes: &[u8] = variant.as_str().as_bytes();
            assert_eq!(
                via_trait, via_method_bytes,
                "AsRef<[u8]> for CaixaKind impl must byte-equal \
                 CaixaKind::as_str().as_bytes() on CaixaKind::\
                 {variant:?} — divergence signals a silent detour off \
                 the substrate-primitive accessor"
            );
            // Cross-axis witness against the paired str-view axes'
            // `.as_bytes()` byte-tails: [`AsRef<str>`] /
            // [`std::fmt::Display`] / [`super::CaixaKind::as_str`] all
            // resolve to the same lifted
            // [`super::crate::render::CAIXA_KIND_LABEL_*`] const roster,
            // and the byte-view axis must byte-equal each of their
            // `.as_bytes()` byte-tails by construction — locking the
            // str-view and byte-view axes together at the substrate-
            // primitive accessor.
            let str_view_ref: &str = <CaixaKind as AsRef<str>>::as_ref(&variant);
            assert_eq!(
                via_trait,
                str_view_ref.as_bytes(),
                "AsRef<[u8]> for CaixaKind and AsRef<str> for \
                 CaixaKind must resolve to byte-equal byte-tails on \
                 CaixaKind::{variant:?} — divergence signals the \
                 byte-view and str-view axes have drifted off the same \
                 substrate-primitive as_str accessor"
            );
            let display_bytes = variant.to_string();
            assert_eq!(
                via_trait,
                display_bytes.as_bytes(),
                "AsRef<[u8]> for CaixaKind and \
                 <CaixaKind as std::fmt::Display>::to_string must \
                 resolve to byte-equal byte-tails on CaixaKind::\
                 {variant:?} — divergence signals the byte-view axis \
                 and the Display formatter axis have drifted off the \
                 same substrate-primitive as_str accessor"
            );
            // Cross-axis witness against the paired reverse-
            // projection axes' `.as_bytes()` byte-tails: every one of
            // `{&'static str, String, Cow<'static, str>, Box<str>,
            // std::sync::Arc<str>, std::rc::Rc<str>}` allocates (or
            // borrows) the same lowercase-Portuguese byte-string the
            // substrate-primitive accessor emits, so the byte-view
            // axis must byte-equal each of their `.as_bytes()` byte-
            // tails by construction.
            let owned_static: &'static str = <&'static str as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait,
                owned_static.as_bytes(),
                "AsRef<[u8]> for CaixaKind and From<CaixaKind> for \
                 &'static str must resolve to byte-equal byte-tails on \
                 CaixaKind::{variant:?}"
            );
            let owned_string: String = <String as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait,
                owned_string.as_bytes(),
                "AsRef<[u8]> for CaixaKind and From<CaixaKind> for \
                 String must resolve to byte-equal byte-tails on \
                 CaixaKind::{variant:?}"
            );
            let owned_cow: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait,
                owned_cow.as_bytes(),
                "AsRef<[u8]> for CaixaKind and From<CaixaKind> for \
                 Cow<'static, str> must resolve to byte-equal byte-\
                 tails on CaixaKind::{variant:?}"
            );
            let owned_box: Box<str> = <Box<str> as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait,
                owned_box.as_bytes(),
                "AsRef<[u8]> for CaixaKind and From<CaixaKind> for \
                 Box<str> must resolve to byte-equal byte-tails on \
                 CaixaKind::{variant:?}"
            );
            let owned_arc: std::sync::Arc<str> =
                <std::sync::Arc<str> as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait,
                owned_arc.as_bytes(),
                "AsRef<[u8]> for CaixaKind and From<CaixaKind> for \
                 std::sync::Arc<str> must resolve to byte-equal byte-\
                 tails on CaixaKind::{variant:?}"
            );
            let owned_rc_str: std::rc::Rc<str> =
                <std::rc::Rc<str> as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_trait,
                owned_rc_str.as_bytes(),
                "AsRef<[u8]> for CaixaKind and From<CaixaKind> for \
                 std::rc::Rc<str> must resolve to byte-equal byte-\
                 tails on CaixaKind::{variant:?}"
            );
            // Reject the wire-axis PascalCase byte-string: the byte-
            // view axis must not silently collapse onto the sibling
            // [`super::CaixaKind::wire_name`] axis, whose bytes differ
            // on every arm (`"Biblioteca"` vs. `"biblioteca"`, …). A
            // future silent swap onto the wire axis (a per-arm
            // rebrand, a hypothetical
            // `#[serde(rename_all = "…")]`-shape re-inlining that
            // collapses the two-axis split) trips here.
            let wire_bytes = variant.wire_name().as_bytes();
            assert_ne!(
                via_trait, wire_bytes,
                "AsRef<[u8]> for CaixaKind must land on the \
                 lowercase-Portuguese diagnostic byte-string \
                 (CaixaKind::as_str), not the PascalCase wire byte-\
                 string (CaixaKind::wire_name) — the two-axis split \
                 is by design; if this fails on CaixaKind::{variant:?}, \
                 the byte-view axis has silently collapsed onto the \
                 wire axis"
            );
        }
        // `<T: AsRef<[u8]>>`-bound-consumer witness: the generic byte-
        // input function `generic_bytes_sink` (lifted above per
        // `clippy::items_after_statements`) accepts a [`super::CaixaKind`]
        // directly through the trait bound, without the caller open-
        // coding the two-hop `kind.as_str().as_bytes()` composition.
        // This is the shape that reaches the caixa-lacre BLAKE3
        // content-address closure's `blake3::Hasher::update(impl
        // AsRef<[u8]>)` byte-input surface through this impl and no
        // other.
        for &variant in CaixaKind::ALL {
            let via_generic = generic_bytes_sink(variant);
            let via_borrowed_generic = generic_bytes_sink(&variant);
            let via_method_bytes = variant.as_str().as_bytes().to_vec();
            assert_eq!(
                via_generic, via_method_bytes,
                "generic `<T: AsRef<[u8]>>`-bound consumer on \
                 CaixaKind::{variant:?} must yield the same byte-tail \
                 CaixaKind::as_str().as_bytes() returns — divergence \
                 signals the byte-view axis fails to bridge a generic \
                 byte-input trait bound to the substrate-primitive \
                 accessor"
            );
            assert_eq!(
                via_borrowed_generic, via_method_bytes,
                "generic `<T: AsRef<[u8]>>`-bound consumer on \
                 &CaixaKind::{variant:?} must yield the same byte-tail \
                 CaixaKind::as_str().as_bytes() returns — the borrowed-
                 input surface must resolve to the same as_str dispatch"
            );
        }
        // `blake3::Hasher::update`-shape byte-input surface witness on
        // the caixa-lacre compounding target: the `MockHasher` (lifted
        // above per `clippy::items_after_statements`) mirrors
        // `blake3::Hasher::update` / `ring::digest::Context::update` /
        // `sha2::Sha256::update`'s `impl AsRef<[u8]>`-bound update
        // signature and accepts a [`super::CaixaKind`] directly,
        // routing its byte-tail through the substrate-primitive
        // `as_str` accessor — the shape a future per-caixa BLAKE3
        // content-address closure composes to fold a `:kind`
        // discriminator byte-tag into the [`crate::Lacre`] closure
        // body.
        for &variant in CaixaKind::ALL {
            let mut owned_hasher = MockHasher::new();
            owned_hasher.update(variant);
            let owned_folded = owned_hasher.finalize();
            assert_eq!(
                owned_folded,
                variant.as_str().as_bytes(),
                "`hasher.update(kind)`-shape composition on \
                 CaixaKind::{variant:?} must fold the same byte-tail \
                 CaixaKind::as_str().as_bytes() returns — the shape a \
                 future per-caixa BLAKE3 content-address closure \
                 composes to fold a `:kind` discriminator byte-tag into \
                 the Lacre closure body"
            );
            let mut borrowed_hasher = MockHasher::new();
            borrowed_hasher.update(&variant);
            let borrowed_folded = borrowed_hasher.finalize();
            assert_eq!(
                borrowed_folded,
                variant.as_str().as_bytes(),
                "`hasher.update(&kind)`-shape composition on \
                 &CaixaKind::{variant:?} must fold the same byte-tail \
                 CaixaKind::as_str().as_bytes() returns — the borrowed-\
                 input surface must resolve to the same as_str dispatch"
            );
        }
    }

    #[test]
    #[expect(
        clippy::too_many_lines,
        reason = "the byte-owned reverse-projection axis is opened here \
                  as the first-mover on the substrate-wide byte-owned \
                  Vec<u8>-output projection family, so the pin binds the \
                  new impl against every paired byte-view and str-view \
                  axis on the same enum plus a generic \
                  <T: Into<Vec<u8>>>-bound consumer witness and a \
                  std::io::Write::write_all-shape owned-byte-sink surface \
                  witness on both owned and borrowed input shapes to lock \
                  the whole family against a future silent regression"
    )]
    fn caixa_kind_from_into_owned_vec_bytes_routes_through_as_str_accessor() {
        // `<T: Into<Vec<u8>>>`-bound-consumer witness helper: a generic
        // owned-byte-input function accepts a [`super::CaixaKind`]
        // directly through the trait bound, without the caller open-
        // coding the three-hop `kind.as_str().as_bytes().to_vec()`
        // composition. Lifted to the top of the function per
        // `clippy::items_after_statements`.
        fn generic_owned_bytes_sink<T: Into<Vec<u8>>>(t: T) -> Vec<u8> {
            t.into()
        }
        // `std::io::Write::write_all`-shape owned-byte-sink surface mock:
        // mirrors `std::io::Write::write_all` /
        // `bytes::BytesMut::extend_from_slice` / any per-arm audit-log
        // byte-sink that consumes a `Vec<u8>` payload via `Into<Vec<u8>>`,
        // so a future per-caixa per-`:kind` audit-log emit reaches the
        // substrate-primitive `as_str` accessor through the byte-owned
        // reverse-projection axis and no other. Lifted to the top of the
        // function per `clippy::items_after_statements`.
        struct MockOwnedByteSink(Vec<u8>);
        impl MockOwnedByteSink {
            fn new() -> Self {
                Self(Vec::new())
            }
            fn write_all(&mut self, bytes: impl Into<Vec<u8>>) -> &mut Self {
                self.0.extend_from_slice(&bytes.into());
                self
            }
            fn finalize(self) -> Vec<u8> {
                self.0
            }
        }

        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<CaixaKind> for Vec<u8>` and
        // `impl From<&CaixaKind> for Vec<u8>` — asserts the trait-
        // idiomatic byte-owned reverse-projection standard-library
        // impls and the substrate-primitive [`super::CaixaKind::as_str`]
        // `pub const fn` accessor's `.as_bytes().to_vec()` byte-tail
        // resolve to the same six-arm lowercase-Portuguese byte-string
        // emit-set across every arm the exhaustive
        // [`super::CaixaKind::ALL`] slice enumerates. Opens the
        // substrate-wide trait-idiomatic byte-owned reverse-projection
        // axis on the closed-set fieldless typed-enum family through
        // the structurally most fundamental caixa-core enum peer — the
        // first-mover on the byte-owned reverse-projection axis in the
        // same manner [`AsRef<[u8]>`] (69d8d86) opened the trait-
        // idiomatic byte-view axis on this same enum.
        for &variant in CaixaKind::ALL {
            let via_owned_from: Vec<u8> = <Vec<u8> as From<CaixaKind>>::from(variant);
            let via_borrowed_from: Vec<u8> = <Vec<u8> as From<&CaixaKind>>::from(&variant);
            let via_method_bytes: Vec<u8> = variant.as_str().as_bytes().to_vec();
            assert_eq!(
                via_owned_from, via_method_bytes,
                "From<CaixaKind> for Vec<u8> impl must byte-equal \
                 CaixaKind::as_str().as_bytes().to_vec() on \
                 CaixaKind::{variant:?} — divergence signals a silent \
                 detour off the substrate-primitive accessor"
            );
            assert_eq!(
                via_borrowed_from, via_method_bytes,
                "From<&CaixaKind> for Vec<u8> impl must byte-equal \
                 CaixaKind::as_str().as_bytes().to_vec() on \
                 CaixaKind::{variant:?} — divergence signals a silent \
                 detour off the substrate-primitive accessor"
            );
            assert_eq!(
                via_owned_from, via_borrowed_from,
                "From<CaixaKind> for Vec<u8> and \
                 From<&CaixaKind> for Vec<u8> must byte-equal each \
                 other on CaixaKind::{variant:?} — divergence signals \
                 the owned-input and borrowed-input paths have drifted \
                 off the same substrate-primitive as_str accessor"
            );
            // Cross-axis witness against the paired [`AsRef<[u8]>`]
            // borrowed byte-view axis: the byte-owned reverse-projection
            // axis must byte-equal the paired borrowed byte-view axis
            // by construction — locking the byte-view and byte-owned
            // axes together at the substrate-primitive accessor.
            let borrowed_bytes: &[u8] = <CaixaKind as AsRef<[u8]>>::as_ref(&variant);
            assert_eq!(
                via_owned_from,
                borrowed_bytes.to_vec(),
                "From<CaixaKind> for Vec<u8> and AsRef<[u8]> for \
                 CaixaKind must resolve to byte-equal byte-tails on \
                 CaixaKind::{variant:?} — divergence signals the byte-\
                 owned and byte-view axes have drifted off the same \
                 substrate-primitive as_str accessor"
            );
            // Cross-axis witness against the str-owned reverse-projection
            // family's `.into_bytes()` / `.as_bytes().to_vec()` byte-
            // tails: every one of `{String, Cow<'static, str>, Box<str>,
            // std::sync::Arc<str>, std::rc::Rc<str>}` allocates (or
            // borrows) the same lowercase-Portuguese byte-string the
            // substrate-primitive accessor emits, so the byte-owned axis
            // must byte-equal each of their owned byte-tails by
            // construction.
            let owned_string: String = <String as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_owned_from,
                owned_string.into_bytes(),
                "From<CaixaKind> for Vec<u8> and \
                 String::from(kind).into_bytes() must resolve to byte-\
                 equal byte-tails on CaixaKind::{variant:?}"
            );
            let owned_cow: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_owned_from,
                owned_cow.as_bytes().to_vec(),
                "From<CaixaKind> for Vec<u8> and \
                 From<CaixaKind> for Cow<'static, str> must resolve to \
                 byte-equal byte-tails on CaixaKind::{variant:?}"
            );
            let owned_box: Box<str> = <Box<str> as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_owned_from,
                owned_box.as_bytes().to_vec(),
                "From<CaixaKind> for Vec<u8> and \
                 From<CaixaKind> for Box<str> must resolve to byte-\
                 equal byte-tails on CaixaKind::{variant:?}"
            );
            let owned_arc: std::sync::Arc<str> =
                <std::sync::Arc<str> as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_owned_from,
                owned_arc.as_bytes().to_vec(),
                "From<CaixaKind> for Vec<u8> and \
                 From<CaixaKind> for std::sync::Arc<str> must resolve \
                 to byte-equal byte-tails on CaixaKind::{variant:?}"
            );
            let owned_rc_str: std::rc::Rc<str> =
                <std::rc::Rc<str> as From<CaixaKind>>::from(variant);
            assert_eq!(
                via_owned_from,
                owned_rc_str.as_bytes().to_vec(),
                "From<CaixaKind> for Vec<u8> and \
                 From<CaixaKind> for std::rc::Rc<str> must resolve to \
                 byte-equal byte-tails on CaixaKind::{variant:?}"
            );
            // Reject the wire-axis PascalCase byte-string: the byte-
            // owned reverse-projection axis must not silently collapse
            // onto the sibling [`super::CaixaKind::wire_name`] axis,
            // whose bytes differ on every arm (`"Biblioteca"` vs.
            // `"biblioteca"`, …). A future silent swap onto the wire
            // axis (a per-arm rebrand, a hypothetical
            // `#[serde(rename_all = "…")]`-shape re-inlining that
            // collapses the two-axis split) trips here.
            let wire_bytes = variant.wire_name().as_bytes().to_vec();
            assert_ne!(
                via_owned_from, wire_bytes,
                "From<CaixaKind> for Vec<u8> must land on the \
                 lowercase-Portuguese diagnostic byte-string \
                 (CaixaKind::as_str), not the PascalCase wire byte-\
                 string (CaixaKind::wire_name) — the two-axis split \
                 is by design; if this fails on CaixaKind::{variant:?}, \
                 the byte-owned axis has silently collapsed onto the \
                 wire axis"
            );
        }
        // `<T: Into<Vec<u8>>>`-bound-consumer witness on both owned and
        // borrowed input shapes: the generic owned-byte-input function
        // `generic_owned_bytes_sink` (lifted above per
        // `clippy::items_after_statements`) accepts a
        // [`super::CaixaKind`] and a `&CaixaKind` directly through the
        // trait bound, without the caller open-coding the three-hop
        // `kind.as_str().as_bytes().to_vec()` composition.
        for &variant in CaixaKind::ALL {
            let via_generic_owned = generic_owned_bytes_sink(variant);
            // Bind the borrowed-input path through an explicit
            // `&CaixaKind` local so the generic-consumer witness routes
            // through `From<&CaixaKind> for Vec<u8>` (T binds to
            // `&CaixaKind`) rather than clippy-collapsing the borrow
            // onto the owned-input `From<CaixaKind> for Vec<u8>` peer.
            let variant_ref: &CaixaKind = &variant;
            let via_generic_borrowed = generic_owned_bytes_sink(variant_ref);
            let via_method_bytes = variant.as_str().as_bytes().to_vec();
            assert_eq!(
                via_generic_owned, via_method_bytes,
                "generic `<T: Into<Vec<u8>>>`-bound consumer on \
                 CaixaKind::{variant:?} must yield the same byte-tail \
                 CaixaKind::as_str().as_bytes().to_vec() returns — \
                 divergence signals the byte-owned axis fails to bridge \
                 a generic owned-byte-input trait bound to the \
                 substrate-primitive accessor"
            );
            assert_eq!(
                via_generic_borrowed, via_method_bytes,
                "generic `<T: Into<Vec<u8>>>`-bound consumer on \
                 &CaixaKind::{variant:?} must yield the same byte-tail \
                 CaixaKind::as_str().as_bytes().to_vec() returns — the \
                 borrowed-input surface must resolve to the same \
                 as_str dispatch"
            );
        }
        // `std::io::Write::write_all`-shape owned-byte-sink surface
        // witness: the `MockOwnedByteSink` (lifted above per
        // `clippy::items_after_statements`) mirrors
        // `std::io::Write::write_all` /
        // `bytes::BytesMut::extend_from_slice`'s `impl Into<Vec<u8>>`-
        // bound owned-byte input signature and accepts a
        // [`super::CaixaKind`] directly on both owned and borrowed input
        // shapes, routing its byte-tail through the substrate-primitive
        // `as_str` accessor — the shape a future per-caixa per-`:kind`
        // audit-log emit composes to fold a `:kind` discriminator byte-
        // tag into a downstream owned-byte-sink surface.
        for &variant in CaixaKind::ALL {
            let mut owned_sink = MockOwnedByteSink::new();
            owned_sink.write_all(variant);
            let owned_folded = owned_sink.finalize();
            assert_eq!(
                owned_folded,
                variant.as_str().as_bytes(),
                "`sink.write_all(kind)`-shape composition on \
                 CaixaKind::{variant:?} must fold the same byte-tail \
                 CaixaKind::as_str().as_bytes() returns"
            );
            let mut borrowed_sink = MockOwnedByteSink::new();
            // Same explicit `&CaixaKind` binding as the generic-consumer
            // witness above: routes the owned-byte-sink surface through
            // `From<&CaixaKind> for Vec<u8>` (T binds to `&CaixaKind`)
            // rather than clippy-collapsing the borrow onto the owned-
            // input peer.
            let variant_ref: &CaixaKind = &variant;
            borrowed_sink.write_all(variant_ref);
            let borrowed_folded = borrowed_sink.finalize();
            assert_eq!(
                borrowed_folded,
                variant.as_str().as_bytes(),
                "`sink.write_all(&kind)`-shape composition on \
                 &CaixaKind::{variant:?} must fold the same byte-tail \
                 CaixaKind::as_str().as_bytes() returns — the borrowed-\
                 input surface must resolve to the same as_str dispatch"
            );
        }
    }

    #[test]
    fn caixa_kind_try_from_bytes_routes_through_from_wire_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl TryFrom<&[u8]> for CaixaKind` — asserts the trait-idiomatic
        // byte-view reverse-projection standard-library impl and the
        // substrate-primitive [`super::CaixaKind::from_wire`] `Option<Self>`
        // accessor resolve to the same six-arm `PascalCase` wire accept-set
        // across every arm the exhaustive [`super::CaixaKind::ALL`] slice
        // enumerates. Opens the substrate-wide trait-idiomatic byte-view
        // reverse-projection axis on the closed-set fieldless typed-enum
        // family through the structurally most fundamental caixa-core enum
        // peer — mirror of the paired [`TryFrom<&str> for CaixaKind`] str-
        // view reverse-projection axis, and the byte-view companion of the
        // pre-existing byte-owned reverse-projection family
        // ([`AsRef<[u8]>`], [`From<CaixaKind> for Vec<u8>`],
        // [`From<&CaixaKind> for Vec<u8>`]) on this same enum.
        //
        // Rust's standard library carries no blanket
        // `impl<T: for<'a> TryFrom<&'a str>> TryFrom<&[u8]> for T`, so a
        // two-hop composition through [`std::str::from_utf8`] + the paired
        // [`TryFrom<&str>`] axis is reachable through the pre-existing str-
        // view reverse-projection axis alone. But that two-hop shape has no
        // compile-time link back to the byte-view reverse-projection axis,
        // forces every downstream `<T: for<'a> TryFrom<&'a [u8]>>`-bound
        // consumer to open-code the composition at every call site, and
        // admits a silent split whenever a future call site takes a sibling
        // byte-projection axis whose parse arm-set carries no compile-time
        // byte-view surface. This impl closes the byte-view reverse-
        // projection axis at the substrate-primitive
        // [`super::CaixaKind::from_wire`] accessor so every future
        // `<T: for<'a> TryFrom<&'a [u8]>>`-bound consumer reaches the same
        // six-arm `PascalCase` wire accept-set through one trait dispatch.
        for &variant in CaixaKind::ALL {
            let wire_bytes: &[u8] = variant.wire_name().as_bytes();
            assert_eq!(
                <CaixaKind as TryFrom<&[u8]>>::try_from(wire_bytes),
                Ok(variant),
                "TryFrom<&[u8]> impl on CaixaKind must round-trip \
                 CaixaKind::{variant:?}.wire_name().as_bytes() back to \
                 Ok(CaixaKind::{variant:?}) — divergence from \
                 CaixaKind::from_wire signals a silent detour off the \
                 substrate-primitive accessor"
            );
            assert_eq!(
                <CaixaKind as TryFrom<&[u8]>>::try_from(wire_bytes).ok(),
                CaixaKind::from_wire(variant.wire_name()),
                "TryFrom<&[u8]> ok()-projection on \
                 CaixaKind::{variant:?}.wire_name().as_bytes() must byte-\
                 equal CaixaKind::from_wire on the paired &str input"
            );
            // Cross-axis witness: the byte-view reverse-projection axis must
            // agree with the paired str-view reverse-projection axis
            // ([`TryFrom<&str>`]) on every accepted arm — the two reverse
            // paths share one `PascalCase` wire vocabulary through the
            // substrate-primitive `from_wire` accessor.
            let via_str: Result<CaixaKind, ()> =
                <CaixaKind as TryFrom<&str>>::try_from(variant.wire_name());
            let via_bytes: Result<CaixaKind, ()> =
                <CaixaKind as TryFrom<&[u8]>>::try_from(wire_bytes);
            assert_eq!(
                via_bytes, via_str,
                "TryFrom<&[u8]> and TryFrom<&str> reverse-projection axes \
                 on CaixaKind must agree on CaixaKind::{variant:?} — \
                 divergence signals the byte-view and str-view reverse \
                 paths have drifted off the same substrate-primitive \
                 from_wire accessor"
            );
        }
    }

    #[test]
    fn caixa_kind_try_from_bytes_rejects_unknown_and_non_utf8_bytes() {
        // Rejection witness on the `impl TryFrom<&[u8]> for CaixaKind` —
        // sweeps two rejection paths the byte-view reverse-projection axis
        // collapses onto the single unit-error `Err(())` return: the
        // invalid-UTF-8 rejection path ([`std::str::from_utf8`] returns
        // `Err` before [`super::CaixaKind::from_wire`] runs) and the
        // valid-UTF-8-but-unknown-wire rejection path
        // ([`super::CaixaKind::from_wire`] returns `None` on a byte-string
        // outside the six-arm `PascalCase` accept-set). Both must reject,
        // so a future accidental widening of the trait impl's accept-set
        // (a case-fold path, a silent inclusion of the lowercase Portuguese
        // [`super::CaixaKind::as_str`] surface onto the wire axis that
        // would collide the two-axis split the sibling
        // [`caixa_kind_display_matches_as_str_and_not_serialize_wire`] pin
        // makes load-bearing, a `#[serde(rename_all = "…")]` attribute
        // drift that widens the parse arm-set silently, a stray fallback
        // that maps invalid UTF-8 onto a default arm rather than the
        // trait-idiomatic `Err(())`) trips at caixa-core test time.
        //
        // Non-UTF-8 candidates:
        //   - a lone 0xFF byte (never valid as a UTF-8 leading byte)
        //   - a lone 0x80 continuation byte with no leading byte
        //   - a truncated multi-byte sequence (0xC3 without its continuation)
        //   - a UTF-16 BOM-style byte pair the UTF-8 validator rejects
        let non_utf8_rejected: &[&[u8]] = &[
            &[0xFF],
            &[0x80],
            &[0xC3],
            &[0xFF, 0xFE],
            &[0xED, 0xA0, 0x80], // UTF-16 surrogate half — rejected by UTF-8
        ];
        for &input in non_utf8_rejected {
            assert_eq!(
                <CaixaKind as TryFrom<&[u8]>>::try_from(input),
                Err(()),
                "TryFrom<&[u8]> impl on CaixaKind must reject the non-\
                 UTF-8 byte-sequence {input:?} with Err(()) — silent \
                 acceptance signals the UTF-8 validation path collapsed \
                 onto a default arm rather than the trait-idiomatic \
                 unit-error"
            );
        }
        // Valid-UTF-8-but-unknown-wire candidates: the empty byte-string,
        // the six-arm lowercase Portuguese diagnostic byte-strings the peer
        // [`super::CaixaKind::as_str`] axis emits (a caller who confuses
        // the wire axis with the diagnostic axis trips here), a lowercase
        // fold of a PascalCase arm, and a small residual of plausible-but-
        // wrong strings.
        let unknown_wire_rejected: &[&[u8]] = &[
            b"",
            b"biblioteca",
            b"binario",
            b"servico",
            b"supervisor",
            b"aplicacao",
            b"acao",
            b"BIBLIOTECA",
            b"biBlioteca",
            b"Bibliotecas",
            b"library",
            b"service",
            b" Biblioteca",
            b"Biblioteca ",
            b"Biblioteca\n",
            b"\"Biblioteca\"",
        ];
        for &input in unknown_wire_rejected {
            assert_eq!(
                <CaixaKind as TryFrom<&[u8]>>::try_from(input),
                Err(()),
                "TryFrom<&[u8]> impl on CaixaKind must reject the valid-\
                 UTF-8-but-unknown-wire byte-string {input:?} with \
                 Err(()) — silent acceptance signals an accept-set \
                 widening off the paired CaixaKind::from_wire resolver"
            );
            // Cross-axis witness: on a byte-string that is valid UTF-8, the
            // byte-view reverse-projection axis must agree with the paired
            // str-view reverse-projection axis ([`TryFrom<&str>`]) — both
            // route through the same [`super::CaixaKind::from_wire`]
            // resolver, so the two rejection paths align by construction.
            if let Ok(s) = std::str::from_utf8(input) {
                assert_eq!(
                    <CaixaKind as TryFrom<&[u8]>>::try_from(input),
                    <CaixaKind as TryFrom<&str>>::try_from(s),
                    "TryFrom<&[u8]> and TryFrom<&str> reverse-projection \
                     axes on CaixaKind must agree on the valid-UTF-8 \
                     input {input:?} — divergence signals the two \
                     reverse paths have drifted off the same \
                     substrate-primitive from_wire accessor"
                );
            }
        }
    }

    #[test]
    fn caixa_kind_try_from_vec_bytes_routes_through_borrowed_byte_view_axis() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl TryFrom<Vec<u8>> for CaixaKind` — asserts the trait-
        // idiomatic owned-byte-vec reverse-projection standard-library
        // impl and the sibling borrowed-input [`TryFrom<&[u8]>`] axis
        // resolve to the same six-arm `PascalCase` wire accept-set
        // across every arm the exhaustive [`super::CaixaKind::ALL`]
        // slice enumerates. Opens the substrate-wide trait-idiomatic
        // byte-owned reverse-projection axis on the closed-set
        // fieldless typed-enum family through the structurally most
        // fundamental caixa-core enum peer — owned-input mirror of the
        // paired [`TryFrom<&[u8]>`] byte-view reverse-projection axis
        // (18d1940), and byte-owned reverse companion of the pre-
        // existing byte-owned *forward*-projection pair
        // ([`From<CaixaKind> for Vec<u8>`], [`From<&CaixaKind> for
        // Vec<u8>`]) on this same enum.
        //
        // Rust's standard library carries no blanket
        // `impl<T: for<'a> TryFrom<&'a [u8]>> TryFrom<Vec<u8>> for T`,
        // so an owned-byte-vec caller otherwise picks between an
        // open-coded `<T as TryFrom<&[u8]>>::try_from(bytes.as_slice())`
        // at every call site whose type bounds have no compile-time
        // link back to the byte-owned reverse-projection axis, or a
        // `String::from_utf8(bytes)` two-hop shape whose error surface
        // leaks the standard-library `FromUtf8Error` type. This impl
        // closes the byte-owned reverse-projection axis at the
        // substrate-primitive [`super::CaixaKind::from_wire`] accessor
        // so every future `<T: TryFrom<Vec<u8>>>`-bound owned-byte-vec
        // consumer reaches the same six-arm `PascalCase` wire accept-
        // set through one trait dispatch.
        for &variant in CaixaKind::ALL {
            let wire_bytes: Vec<u8> = variant.wire_name().as_bytes().to_vec();
            assert_eq!(
                <CaixaKind as TryFrom<Vec<u8>>>::try_from(wire_bytes.clone()),
                Ok(variant),
                "TryFrom<Vec<u8>> impl on CaixaKind must round-trip \
                 CaixaKind::{variant:?}.wire_name().as_bytes().to_vec() \
                 back to Ok(CaixaKind::{variant:?}) — divergence from \
                 the sibling TryFrom<&[u8]> axis signals a silent detour \
                 off the substrate-primitive from_wire accessor"
            );
            // Cross-axis witness: the owned-byte-vec reverse-projection
            // axis must agree with the borrowed byte-slice reverse-
            // projection axis on every accepted arm — the two axes
            // share one `PascalCase` wire vocabulary through the
            // substrate-primitive `from_wire` accessor, and the owned-
            // input axis delegates to the borrowed peer by design.
            let via_owned: Result<CaixaKind, ()> =
                <CaixaKind as TryFrom<Vec<u8>>>::try_from(wire_bytes.clone());
            let via_borrowed: Result<CaixaKind, ()> =
                <CaixaKind as TryFrom<&[u8]>>::try_from(wire_bytes.as_slice());
            assert_eq!(
                via_owned, via_borrowed,
                "TryFrom<Vec<u8>> and TryFrom<&[u8]> reverse-projection \
                 axes on CaixaKind must agree on CaixaKind::{variant:?} \
                 — divergence signals the owned-input and borrowed-\
                 input byte-view reverse paths have drifted off the \
                 same substrate-primitive from_wire accessor"
            );
            // Cross-axis witness against the paired str-view reverse
            // axis ([`TryFrom<&str>`]) — the three reverse paths (str-
            // view, byte-view borrowed, byte-view owned) share one
            // substrate primitive.
            let via_str: Result<CaixaKind, ()> =
                <CaixaKind as TryFrom<&str>>::try_from(variant.wire_name());
            assert_eq!(
                via_owned, via_str,
                "TryFrom<Vec<u8>> and TryFrom<&str> reverse-projection \
                 axes on CaixaKind must agree on CaixaKind::{variant:?} \
                 — divergence signals the byte-owned and str-view \
                 reverse paths have drifted off the same substrate-\
                 primitive from_wire accessor"
            );
        }
        // Deliberate non-witness: this reverse-projection axis is *not*
        // round-tripped against the byte-owned *forward*-projection
        // pair ([`From<CaixaKind> for Vec<u8>`], [`From<&CaixaKind>
        // for Vec<u8>`]) — the two axes operate on different
        // vocabularies by design on this enum. The forward pair folds
        // through the lowercase-Portuguese [`super::CaixaKind::as_str`]
        // diagnostic surface (`"biblioteca"` / `"servico"` / …),
        // while the reverse axis routes through the substrate-primitive
        // [`super::CaixaKind::from_wire`] `PascalCase` wire accept-set
        // (`"Biblioteca"` / `"Servico"` / …) — a two-axis split the
        // sibling
        // [`caixa_kind_display_matches_as_str_and_not_serialize_wire`]
        // pin already makes load-bearing. That the two byte-vec
        // tails are *not* interchangeable on this enum is a load-
        // bearing property of the wire-vs-diagnostic split, and this
        // non-round-trip is what preserves it.
    }

    #[test]
    fn caixa_kind_try_from_vec_bytes_rejects_unknown_and_non_utf8_bytes() {
        // Rejection witness on the `impl TryFrom<Vec<u8>> for CaixaKind`
        // — sweeps the same two rejection paths the sibling borrowed
        // `TryFrom<&[u8]>` axis collapses onto the single unit-error
        // return: the invalid-UTF-8 rejection path (`std::str::from_utf8`
        // on the underlying byte-slice returns `Err` before
        // [`super::CaixaKind::from_wire`] runs) and the valid-UTF-8-
        // but-unknown-wire rejection path
        // ([`super::CaixaKind::from_wire`] returns `None` on a byte-
        // string outside the six-arm `PascalCase` accept-set). Both
        // must reject so a future accidental widening of the trait
        // impl's accept-set (a case-fold path, a silent inclusion of
        // the lowercase Portuguese diagnostic surface onto the wire
        // axis that would collide the two-axis split, an
        // `Option::unwrap_or_default`-shape fallback that maps invalid
        // UTF-8 onto a default arm rather than the trait-idiomatic
        // `Err(())`, a stray `String::from_utf8_lossy` detour that
        // widens the input surface with the U+FFFD replacement
        // character) trips at caixa-core test time.
        let non_utf8_rejected: &[&[u8]] = &[
            &[0xFF],
            &[0x80],
            &[0xC3],
            &[0xFF, 0xFE],
            &[0xED, 0xA0, 0x80], // UTF-16 surrogate half — rejected by UTF-8
        ];
        for &input in non_utf8_rejected {
            let owned: Vec<u8> = input.to_vec();
            assert_eq!(
                <CaixaKind as TryFrom<Vec<u8>>>::try_from(owned),
                Err(()),
                "TryFrom<Vec<u8>> impl on CaixaKind must reject the \
                 non-UTF-8 byte-sequence {input:?} with Err(()) — \
                 silent acceptance signals the UTF-8 validation path \
                 collapsed onto a default arm rather than the trait-\
                 idiomatic unit-error"
            );
            // Cross-axis witness: the owned-input axis must agree with
            // the borrowed-input axis on every rejected input.
            assert_eq!(
                <CaixaKind as TryFrom<Vec<u8>>>::try_from(input.to_vec()),
                <CaixaKind as TryFrom<&[u8]>>::try_from(input),
                "TryFrom<Vec<u8>> and TryFrom<&[u8]> reverse-projection \
                 axes on CaixaKind must agree on the non-UTF-8 input \
                 {input:?} — divergence signals the owned-input and \
                 borrowed-input byte-view reverse paths have drifted \
                 off the same substrate-primitive from_wire accessor"
            );
        }
        // Valid-UTF-8-but-unknown-wire candidates: the empty byte-
        // string, the six-arm lowercase Portuguese diagnostic byte-
        // strings the peer [`super::CaixaKind::as_str`] axis emits (a
        // caller who confuses the wire axis with the diagnostic axis
        // trips here), a lowercase fold of a PascalCase arm, and a
        // small residual of plausible-but-wrong strings.
        let unknown_wire_rejected: &[&[u8]] = &[
            b"",
            b"biblioteca",
            b"binario",
            b"servico",
            b"supervisor",
            b"aplicacao",
            b"acao",
            b"BIBLIOTECA",
            b"biBlioteca",
            b"Bibliotecas",
            b"library",
            b"service",
            b" Biblioteca",
            b"Biblioteca ",
            b"Biblioteca\n",
            b"\"Biblioteca\"",
        ];
        for &input in unknown_wire_rejected {
            let owned: Vec<u8> = input.to_vec();
            assert_eq!(
                <CaixaKind as TryFrom<Vec<u8>>>::try_from(owned),
                Err(()),
                "TryFrom<Vec<u8>> impl on CaixaKind must reject the \
                 valid-UTF-8-but-unknown-wire byte-string {input:?} \
                 with Err(()) — silent acceptance signals an accept-\
                 set widening off the paired CaixaKind::from_wire \
                 resolver"
            );
            // Cross-axis witness against the borrowed byte-view axis:
            // the two paths must agree by construction, since the owned
            // axis delegates to the borrowed peer.
            assert_eq!(
                <CaixaKind as TryFrom<Vec<u8>>>::try_from(input.to_vec()),
                <CaixaKind as TryFrom<&[u8]>>::try_from(input),
                "TryFrom<Vec<u8>> and TryFrom<&[u8]> reverse-projection \
                 axes on CaixaKind must agree on the valid-UTF-8-but-\
                 unknown-wire input {input:?} — divergence signals the \
                 owned-input and borrowed-input byte-view reverse \
                 paths have drifted off the same substrate-primitive \
                 from_wire accessor"
            );
        }
    }
}