caixa-theme 0.1.609

Nord palette + blackmatter style overlays for caixa diagnostics, formatter output, LSP semantic tokens, and nvim plugin colors.
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
//! The small semantic-style enum every caixa tool agrees on.

use serde::{Deserialize, Serialize};

/// Substrate-canonical `"keyword"` lowercase kebab-case wire-form tag
/// for [`Semantic::Keyword`] — the one canonical byte-string the paired
/// forward emitter [`Semantic::as_str`], the paired reverse parser
/// [`Semantic::from_wire`], and the paired exhaustive-roster
/// [`Semantic::WIRE_NAMES`] axis all route through, so a future rebrand
/// of the tag (a per-arm slug tightening on a future
/// `feira lint --list-styles` operator-facing enumeration verb, a
/// per-`SemanticTokenType` `caixa-lsp` re-mapping the LSP spec grows,
/// a `blackmatter-shell` `data-semantic="<kebab>"` DOM-attribute
/// re-convention) reaches every one of the sibling substrate-primitive
/// dispatches through a single caixa-theme edit here — not an
/// open-coded three-site parallel-maintained inline byte-string. Peer
/// of the fifteen other `CAIXA_THEME_SEMANTIC_WIRE_*` const family
/// entries on the sixteen-arm caixa-theme semantic-style
/// canonical-lowercase-kebab wire-form axis.
///
/// Same closed-set lifted-const discipline the paired caixa-lint
/// diagnostic-severity axis' [`CAIXA_LINT_SEVERITY_WIRE_*`] (a199462) /
/// caixa-lint fix-safety-tier axis' [`CAIXA_LINT_FIX_SAFETY_WIRE_*`]
/// (5837236) / caixa-arch invariant-kind axis'
/// `CAIXA_ARCH_INVARIANT_KIND_WIRE_*` (78f5522) / caixa-arch verdict-
/// outcome axis' `CAIXA_ARCH_VERDICT_WIRE_*` (ebddef0) const families
/// carry — extends the paired substrate-primitive wire-form lift onto
/// the fifth outside-caixa-core closed-set fieldless typed enum on the
/// caixa surface (the caixa-theme semantic-style axis, and the first
/// inside `caixa-theme`).
///
/// Pinned load-bearing at the substrate-primitive level by
/// [`tests::semantic_wire_names_covers_every_arm`] (paired roster
/// coverage pin closing this const family into
/// [`Semantic::WIRE_NAMES`]).
pub const CAIXA_THEME_SEMANTIC_WIRE_KEYWORD: &str = "keyword";

/// Substrate-canonical `"symbol"` lowercase kebab-case wire-form tag
/// for [`Semantic::Symbol`] — peer of the fifteen other
/// `CAIXA_THEME_SEMANTIC_WIRE_*` const family entries on the sixteen-
/// arm caixa-theme semantic-style canonical-lowercase-kebab wire-form
/// axis. See [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] for the full lift
/// rationale.
pub const CAIXA_THEME_SEMANTIC_WIRE_SYMBOL: &str = "symbol";

/// Substrate-canonical `"keyword-arg"` lowercase kebab-case wire-form
/// tag for [`Semantic::KeywordArg`] — peer of the fifteen other
/// `CAIXA_THEME_SEMANTIC_WIRE_*` const family entries on the sixteen-
/// arm caixa-theme semantic-style canonical-lowercase-kebab wire-form
/// axis. See [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] for the full lift
/// rationale.
pub const CAIXA_THEME_SEMANTIC_WIRE_KEYWORD_ARG: &str = "keyword-arg";

/// Substrate-canonical `"string"` lowercase kebab-case wire-form tag
/// for [`Semantic::String`] — peer of the fifteen other
/// `CAIXA_THEME_SEMANTIC_WIRE_*` const family entries on the sixteen-
/// arm caixa-theme semantic-style canonical-lowercase-kebab wire-form
/// axis. See [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] for the full lift
/// rationale.
pub const CAIXA_THEME_SEMANTIC_WIRE_STRING: &str = "string";

/// Substrate-canonical `"number"` lowercase kebab-case wire-form tag
/// for [`Semantic::Number`] — peer of the fifteen other
/// `CAIXA_THEME_SEMANTIC_WIRE_*` const family entries on the sixteen-
/// arm caixa-theme semantic-style canonical-lowercase-kebab wire-form
/// axis. See [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] for the full lift
/// rationale.
pub const CAIXA_THEME_SEMANTIC_WIRE_NUMBER: &str = "number";

/// Substrate-canonical `"literal"` lowercase kebab-case wire-form tag
/// for [`Semantic::Literal`] — peer of the fifteen other
/// `CAIXA_THEME_SEMANTIC_WIRE_*` const family entries on the sixteen-
/// arm caixa-theme semantic-style canonical-lowercase-kebab wire-form
/// axis. See [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] for the full lift
/// rationale.
pub const CAIXA_THEME_SEMANTIC_WIRE_LITERAL: &str = "literal";

/// Substrate-canonical `"comment"` lowercase kebab-case wire-form tag
/// for [`Semantic::Comment`] — peer of the fifteen other
/// `CAIXA_THEME_SEMANTIC_WIRE_*` const family entries on the sixteen-
/// arm caixa-theme semantic-style canonical-lowercase-kebab wire-form
/// axis. See [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] for the full lift
/// rationale.
pub const CAIXA_THEME_SEMANTIC_WIRE_COMMENT: &str = "comment";

/// Substrate-canonical `"accent"` lowercase kebab-case wire-form tag
/// for [`Semantic::Accent`] — peer of the fifteen other
/// `CAIXA_THEME_SEMANTIC_WIRE_*` const family entries on the sixteen-
/// arm caixa-theme semantic-style canonical-lowercase-kebab wire-form
/// axis. See [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] for the full lift
/// rationale.
pub const CAIXA_THEME_SEMANTIC_WIRE_ACCENT: &str = "accent";

/// Substrate-canonical `"muted"` lowercase kebab-case wire-form tag for
/// [`Semantic::Muted`] — peer of the fifteen other
/// `CAIXA_THEME_SEMANTIC_WIRE_*` const family entries on the sixteen-
/// arm caixa-theme semantic-style canonical-lowercase-kebab wire-form
/// axis. See [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] for the full lift
/// rationale.
pub const CAIXA_THEME_SEMANTIC_WIRE_MUTED: &str = "muted";

/// Substrate-canonical `"error"` lowercase kebab-case wire-form tag for
/// [`Semantic::Error`] — peer of the fifteen other
/// `CAIXA_THEME_SEMANTIC_WIRE_*` const family entries on the sixteen-
/// arm caixa-theme semantic-style canonical-lowercase-kebab wire-form
/// axis. See [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] for the full lift
/// rationale.
pub const CAIXA_THEME_SEMANTIC_WIRE_ERROR: &str = "error";

/// Substrate-canonical `"warning"` lowercase kebab-case wire-form tag
/// for [`Semantic::Warning`] — peer of the fifteen other
/// `CAIXA_THEME_SEMANTIC_WIRE_*` const family entries on the sixteen-
/// arm caixa-theme semantic-style canonical-lowercase-kebab wire-form
/// axis. See [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] for the full lift
/// rationale.
pub const CAIXA_THEME_SEMANTIC_WIRE_WARNING: &str = "warning";

/// Substrate-canonical `"info"` lowercase kebab-case wire-form tag for
/// [`Semantic::Info`] — peer of the fifteen other
/// `CAIXA_THEME_SEMANTIC_WIRE_*` const family entries on the sixteen-
/// arm caixa-theme semantic-style canonical-lowercase-kebab wire-form
/// axis. See [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] for the full lift
/// rationale.
pub const CAIXA_THEME_SEMANTIC_WIRE_INFO: &str = "info";

/// Substrate-canonical `"hint"` lowercase kebab-case wire-form tag for
/// [`Semantic::Hint`] — peer of the fifteen other
/// `CAIXA_THEME_SEMANTIC_WIRE_*` const family entries on the sixteen-
/// arm caixa-theme semantic-style canonical-lowercase-kebab wire-form
/// axis. See [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] for the full lift
/// rationale.
pub const CAIXA_THEME_SEMANTIC_WIRE_HINT: &str = "hint";

/// Substrate-canonical `"added"` lowercase kebab-case wire-form tag for
/// [`Semantic::Added`] — peer of the fifteen other
/// `CAIXA_THEME_SEMANTIC_WIRE_*` const family entries on the sixteen-
/// arm caixa-theme semantic-style canonical-lowercase-kebab wire-form
/// axis. See [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] for the full lift
/// rationale.
pub const CAIXA_THEME_SEMANTIC_WIRE_ADDED: &str = "added";

/// Substrate-canonical `"removed"` lowercase kebab-case wire-form tag
/// for [`Semantic::Removed`] — peer of the fifteen other
/// `CAIXA_THEME_SEMANTIC_WIRE_*` const family entries on the sixteen-
/// arm caixa-theme semantic-style canonical-lowercase-kebab wire-form
/// axis. See [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] for the full lift
/// rationale.
pub const CAIXA_THEME_SEMANTIC_WIRE_REMOVED: &str = "removed";

/// Substrate-canonical `"unchanged"` lowercase kebab-case wire-form tag
/// for [`Semantic::Unchanged`] — peer of the fifteen other
/// `CAIXA_THEME_SEMANTIC_WIRE_*` const family entries on the sixteen-
/// arm caixa-theme semantic-style canonical-lowercase-kebab wire-form
/// axis. See [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] for the full lift
/// rationale.
pub const CAIXA_THEME_SEMANTIC_WIRE_UNCHANGED: &str = "unchanged";

#[derive(
    Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize, gen_platform::IsVariant,
)]
pub enum Semantic {
    /// Language keywords — `defcaixa`, `defteia`, `let`, `lambda`, etc.
    Keyword,
    /// Non-keyword symbols — identifiers, function names, variant names.
    Symbol,
    /// `:keyword-positioned` atoms.
    KeywordArg,
    /// `"string literals"`.
    String,
    /// `42`, `3.14`.
    Number,
    /// `#t`, `#f`, `nil`.
    Literal,
    /// `; comments`.
    Comment,
    /// Primary accent — useful for highlights, carets, focused tokens.
    Accent,
    /// Dim text — metadata, line numbers, help text.
    Muted,

    // Diagnostic severities.
    Error,
    Warning,
    Info,
    Hint,

    // Diff decorations — used by formatter preview and lint output.
    Added,
    Removed,
    Unchanged,
}

impl Semantic {
    /// Every variant of [`Semantic`] in declaration order.
    ///
    /// The single canonical arm-list every substrate consumer that has
    /// to walk the closed 15-arm semantic-style partition (the two
    /// theme overlays' exhaustive-match resolver functions
    /// `blackmatter_dark_color` / `blackmatter_light_color` in
    /// [`crate::blackmatter`], the future LSP-side per-Semantic
    /// `SemanticTokenType` dispatch at
    /// `caixa-lsp/src/main.rs`, a future
    /// `feira lint --list-styles` operator-facing enumeration verb)
    /// reads for. Peer of the sibling closed-set fieldless typed
    /// enums' `ALL` slices already carried by
    /// [`caixa_core::CaixaKind`] /
    /// [`caixa_core::supervisor::RestartStrategy`] /
    /// [`caixa_core::supervisor::RestartPolicy`] /
    /// [`caixa_core::aplicacao::PlacementStrategy`] /
    /// [`caixa_core::upgrade::UpgradeInstruction`] /
    /// `caixa_lint::diagnostic::Severity` /
    /// `caixa_lint::diagnostic::FixSafety` /
    /// `caixa_arch::InvariantKind` / `caixa_arch::ArchVerdict` /
    /// `caixa_provedor::FerriteRuntime` closed-set typed-enum
    /// discriminator axes.
    pub const ALL: &'static [Self] = &[
        Self::Keyword,
        Self::Symbol,
        Self::KeywordArg,
        Self::String,
        Self::Number,
        Self::Literal,
        Self::Comment,
        Self::Accent,
        Self::Muted,
        Self::Error,
        Self::Warning,
        Self::Info,
        Self::Hint,
        Self::Added,
        Self::Removed,
        Self::Unchanged,
    ];

    /// Exhaustive accept-set roster on the [`Semantic`] closed-set
    /// enum's canonical-lowercase-kebab wire-form axis — the single
    /// slice every consumer that enumerates the accepted semantic-style
    /// byte-strings dispatches through (a future
    /// `feira lint --list-styles` operator-facing enumeration verb
    /// rendering the accepted-tag list, a future `caixa-lsp`-side
    /// per-`SemanticTokenType` registration walk that enumerates every
    /// accepted per-arm kebab byte-string on startup, a future
    /// `caixa.nvim` per-highlight-group re-loader binding every
    /// accepted kebab identifier back to the typed enum, a future
    /// `blackmatter-shell` per-arm `data-semantic="<kebab>"`
    /// DOM-attribute emission walk, a `tracing::field::valuable::Value::List`
    /// structured-log accepted-style emit on the paint-side emission
    /// path). Routed byte-for-byte through the paired
    /// [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD`] /
    /// [`CAIXA_THEME_SEMANTIC_WIRE_SYMBOL`] /
    /// [`CAIXA_THEME_SEMANTIC_WIRE_KEYWORD_ARG`] /
    /// [`CAIXA_THEME_SEMANTIC_WIRE_STRING`] /
    /// [`CAIXA_THEME_SEMANTIC_WIRE_NUMBER`] /
    /// [`CAIXA_THEME_SEMANTIC_WIRE_LITERAL`] /
    /// [`CAIXA_THEME_SEMANTIC_WIRE_COMMENT`] /
    /// [`CAIXA_THEME_SEMANTIC_WIRE_ACCENT`] /
    /// [`CAIXA_THEME_SEMANTIC_WIRE_MUTED`] /
    /// [`CAIXA_THEME_SEMANTIC_WIRE_ERROR`] /
    /// [`CAIXA_THEME_SEMANTIC_WIRE_WARNING`] /
    /// [`CAIXA_THEME_SEMANTIC_WIRE_INFO`] /
    /// [`CAIXA_THEME_SEMANTIC_WIRE_HINT`] /
    /// [`CAIXA_THEME_SEMANTIC_WIRE_ADDED`] /
    /// [`CAIXA_THEME_SEMANTIC_WIRE_REMOVED`] /
    /// [`CAIXA_THEME_SEMANTIC_WIRE_UNCHANGED`] lifted `pub const`
    /// scalars in variant declaration order so a future arm rebrand
    /// touches one const rather than an open-coded sixteen-site
    /// parallel-maintained array literal.
    ///
    /// Peer of the sibling closed-set typed enums'
    /// [`caixa_core::CaixaKind::WIRE_NAMES`] (bd708bd),
    /// [`caixa_core::supervisor::RestartStrategy::WIRE_NAMES`] (3033f45),
    /// [`caixa_core::supervisor::RestartPolicy::WIRE_NAMES`] (ce9412b),
    /// [`caixa_core::aplicacao::PlacementStrategy::WIRE_NAMES`] (3e5b194),
    /// [`caixa_core::render::PathShapeViolation::WIRE_NAMES`] (0330bd3),
    /// [`caixa_core::CaixaDialeto::WIRE_NAMES`] (0402726),
    /// `caixa_arch::invariants::InvariantKind::WIRE_NAMES` (78f5522),
    /// `caixa_arch::report::ArchVerdict::WIRE_NAMES` (ebddef0),
    /// `caixa_lint::diagnostic::Severity::WIRE_NAMES` (a199462), and
    /// `caixa_lint::diagnostic::FixSafety::WIRE_NAMES` (5837236)
    /// rosters — extends the paired exhaustive-roster axis onto the
    /// *fifth outside*-caixa-core closed-set fieldless typed enum on
    /// the caixa surface (the caixa-theme semantic-style axis, and the
    /// first inside `caixa-theme`), with `caixa_provedor::FerriteRuntime`
    /// remaining as the only outside-caixa-core closed-set fieldless
    /// typed enum whose paired exhaustive-roster axis is still open.
    ///
    /// A future variant addition (a `Namespace` tier between
    /// [`Self::Symbol`] and [`Self::KeywordArg`] for the M4 tatara-lisp
    /// module system's qualified-name semantic-token dispatch, a
    /// `Deleted` tier for a hard-delete-mark distinct from
    /// [`Self::Removed`] the future 3-way diff surface grows — both
    /// trajectory items the sibling [`Self::ALL`] doc block already
    /// names) extends this roster as a single edit — the compiler-
    /// checked exhaustiveness on [`Self::as_str`]'s match and the
    /// paired [`tests::semantic_wire_names_covers_every_arm`] pin's
    /// length / membership / order / round-trip gates keep the roster,
    /// the emitter [`Self::as_str`], and the parser [`Self::from_wire`]
    /// in structural lockstep by construction.
    ///
    /// Pinned load-bearing by
    /// [`tests::semantic_wire_names_covers_every_arm`].
    pub const WIRE_NAMES: &'static [&'static str] = &[
        CAIXA_THEME_SEMANTIC_WIRE_KEYWORD,
        CAIXA_THEME_SEMANTIC_WIRE_SYMBOL,
        CAIXA_THEME_SEMANTIC_WIRE_KEYWORD_ARG,
        CAIXA_THEME_SEMANTIC_WIRE_STRING,
        CAIXA_THEME_SEMANTIC_WIRE_NUMBER,
        CAIXA_THEME_SEMANTIC_WIRE_LITERAL,
        CAIXA_THEME_SEMANTIC_WIRE_COMMENT,
        CAIXA_THEME_SEMANTIC_WIRE_ACCENT,
        CAIXA_THEME_SEMANTIC_WIRE_MUTED,
        CAIXA_THEME_SEMANTIC_WIRE_ERROR,
        CAIXA_THEME_SEMANTIC_WIRE_WARNING,
        CAIXA_THEME_SEMANTIC_WIRE_INFO,
        CAIXA_THEME_SEMANTIC_WIRE_HINT,
        CAIXA_THEME_SEMANTIC_WIRE_ADDED,
        CAIXA_THEME_SEMANTIC_WIRE_REMOVED,
        CAIXA_THEME_SEMANTIC_WIRE_UNCHANGED,
    ];

    /// Canonical kebab-case discriminator scalar for this variant — the
    /// single substrate-primitive `&'static str` projection every
    /// downstream consumer of the closed 16-arm [`Semantic`] partition
    /// (a future LSP-side per-Semantic `SemanticTokenType` name-mapping
    /// dispatch at `caixa-lsp/src/main.rs`, a future
    /// `feira lint --list-styles` operator-facing enumeration verb, a
    /// future `caixa.nvim` per-Semantic highlight-group name resolver
    /// that reaches for a stable kebab identifier per arm, a future
    /// `blackmatter-shell` per-arm classname the terminal emitter
    /// composes into a `data-semantic="<kebab>"` attribute) reaches
    /// through. Kebab-case matches the peer
    /// [`gen_platform::IsVariant`]-derived kebab discriminant convention
    /// the sibling closed-set typed enums
    /// ([`caixa_core::CaixaKind::as_str`],
    /// [`caixa_core::supervisor::RestartStrategy::as_str`],
    /// [`caixa_core::supervisor::RestartPolicy::as_str`],
    /// [`caixa_core::aplicacao::PlacementStrategy::as_str`],
    /// [`caixa_core::upgrade::UpgradeInstruction::as_str`],
    /// `caixa_lint::diagnostic::Severity::as_str`,
    /// `caixa_lint::diagnostic::FixSafety::as_str`,
    /// `caixa_arch::InvariantKind::as_str`,
    /// `caixa_arch::ArchVerdict::as_str`,
    /// `caixa_provedor::FerriteRuntime::variant_slug`) already emit
    /// on their canonical `&'static str` projection axis.
    ///
    /// The 16 arms return the kebab-case forms of their `PascalCase`
    /// variant names (`Keyword` → `"keyword"`, `KeywordArg` →
    /// `"keyword-arg"`, `Unchanged` → `"unchanged"`, etc.), matching
    /// the peer closed-set typed-enum canonical byte-string conventions.
    ///
    /// Peer of the [`std::fmt::Display`] and [`AsRef<str>`] impls on
    /// this enum, which both route through this accessor so
    /// `format!("{s}")`, `s.as_str()`, and
    /// `<Semantic as AsRef<str>>::as_ref(&s)` resolve to the same
    /// per-arm byte-string.
    #[must_use]
    pub const fn as_str(self) -> &'static str {
        match self {
            Self::Keyword => CAIXA_THEME_SEMANTIC_WIRE_KEYWORD,
            Self::Symbol => CAIXA_THEME_SEMANTIC_WIRE_SYMBOL,
            Self::KeywordArg => CAIXA_THEME_SEMANTIC_WIRE_KEYWORD_ARG,
            Self::String => CAIXA_THEME_SEMANTIC_WIRE_STRING,
            Self::Number => CAIXA_THEME_SEMANTIC_WIRE_NUMBER,
            Self::Literal => CAIXA_THEME_SEMANTIC_WIRE_LITERAL,
            Self::Comment => CAIXA_THEME_SEMANTIC_WIRE_COMMENT,
            Self::Accent => CAIXA_THEME_SEMANTIC_WIRE_ACCENT,
            Self::Muted => CAIXA_THEME_SEMANTIC_WIRE_MUTED,
            Self::Error => CAIXA_THEME_SEMANTIC_WIRE_ERROR,
            Self::Warning => CAIXA_THEME_SEMANTIC_WIRE_WARNING,
            Self::Info => CAIXA_THEME_SEMANTIC_WIRE_INFO,
            Self::Hint => CAIXA_THEME_SEMANTIC_WIRE_HINT,
            Self::Added => CAIXA_THEME_SEMANTIC_WIRE_ADDED,
            Self::Removed => CAIXA_THEME_SEMANTIC_WIRE_REMOVED,
            Self::Unchanged => CAIXA_THEME_SEMANTIC_WIRE_UNCHANGED,
        }
    }

    /// Reverse projection on the [`Semantic`] closed 16-arm enum's
    /// canonical kebab-tag axis — parses a `"keyword"` / `"symbol"` /
    /// `"keyword-arg"` / `"string"` / `"number"` / `"literal"` /
    /// `"comment"` / `"accent"` / `"muted"` / `"error"` / `"warning"` /
    /// `"info"` / `"hint"` / `"added"` / `"removed"` / `"unchanged"` wire
    /// byte-string back to the typed enum, or returns `None` when `s`
    /// lies outside the 16-arm accept-set [`Self::as_str`] emits. The
    /// single `&str → Self` projection every future re-entry point on
    /// the caixa-theme semantic-style axis dispatches through (a future
    /// `feira lint --list-styles` operator-facing enumeration verb
    /// hydrating a per-arm row from a stored kebab identifier back to
    /// the typed enum before rendering, a future `caixa-lsp`-side
    /// per-`SemanticTokenType` re-parse binding a prior
    /// [`Self::as_str`] output back to the typed enum for
    /// per-Semantic-highlight dispatch, a future `caixa.nvim` per-
    /// Semantic highlight-group resolver re-loading a stored kebab
    /// identifier back to the typed enum, a future `blackmatter-shell`
    /// per-arm classname reverse-lookup binding a
    /// `data-semantic="<kebab>"` DOM attribute back to the typed enum
    /// for per-arm style dispatch, a `tracing::field::Value::Str`-arm
    /// structured-log re-loader binding a prior emission's
    /// [`Self::as_str`] output back to the typed enum for cross-run
    /// per-Semantic-paint-histogram diff) would have had to re-inline a
    /// 16-arm `match s` cascade that expressed no compile-time link back
    /// to the substrate primitive.
    ///
    /// Same closed-set-reverse-projection discipline the sibling
    /// [`caixa_core::CaixaKind::from_wire`] (2aa6d23),
    /// [`caixa_core::CaixaDialeto::from_wire`] (d0e65ea),
    /// [`caixa_core::supervisor::RestartStrategy::from_wire`] (4eec29c),
    /// [`caixa_core::supervisor::RestartPolicy::from_wire`] (dd32ccf),
    /// [`caixa_core::aplicacao::PlacementStrategy::from_wire`] (18c7342),
    /// [`caixa_core::dep::DepList::from_wire`] (45ee563),
    /// [`caixa_core::render::PathShapeViolation::from_wire`] (aebd9c6),
    /// `caixa_arch::invariants::InvariantKind::from_wire` (b9e4e61),
    /// `caixa_arch::report::ArchVerdict::from_wire` (6afe564),
    /// `caixa_lint::diagnostic::Severity::from_wire` (5afff0e), and
    /// `caixa_lint::diagnostic::FixSafety::from_wire` (bd505a1) typed
    /// enums carry on the peer wire-side `str → Self` axes — extends
    /// the substrate-wide `(as_str, from_wire)` round-trip family onto
    /// the caixa-theme closed-set fieldless typed-enum axis (the first
    /// closed-set fieldless typed enum on `caixa-theme` to converge on
    /// the reverse-projection discipline), matching the same two-way
    /// `str ↔ Self` round-trip every sibling closed-set enum already
    /// carries. Method-named `from_wire` (not `from_str`) to match the
    /// peer shapes verbatim and side-step a
    /// `clippy::should_implement_trait` lint that a plain `from_str`
    /// name would otherwise trigger without paired
    /// [`std::str::FromStr`] impl scaffolding this axis does not carry
    /// today. Returns `Option<Self>` (rather than `Result<Self, _>`) to
    /// match the peer shapes: the caller picks the diagnostic form
    /// appropriate for its use site (a `feira lint --list-styles` CLI
    /// arg-parse renders its own per-verb error message; a future
    /// admission-webhook rejection body wraps the `None` outcome with
    /// the accepted-set enumeration `Semantic::ALL.iter().map(…)` for
    /// operator diagnostics).
    ///
    /// Pinned load-bearing at the substrate-primitive level by
    /// [`tests::semantic_from_wire_accepts_every_as_str_output`]
    /// (round-trip witness against the peer [`Self::as_str`] axis) and
    /// [`tests::semantic_from_wire_rejects_unknown_byte_strings`]
    /// (rejection witness against silent accept-set widening).
    #[must_use]
    pub fn from_wire(s: &str) -> Option<Self> {
        match s {
            CAIXA_THEME_SEMANTIC_WIRE_KEYWORD => Some(Self::Keyword),
            CAIXA_THEME_SEMANTIC_WIRE_SYMBOL => Some(Self::Symbol),
            CAIXA_THEME_SEMANTIC_WIRE_KEYWORD_ARG => Some(Self::KeywordArg),
            CAIXA_THEME_SEMANTIC_WIRE_STRING => Some(Self::String),
            CAIXA_THEME_SEMANTIC_WIRE_NUMBER => Some(Self::Number),
            CAIXA_THEME_SEMANTIC_WIRE_LITERAL => Some(Self::Literal),
            CAIXA_THEME_SEMANTIC_WIRE_COMMENT => Some(Self::Comment),
            CAIXA_THEME_SEMANTIC_WIRE_ACCENT => Some(Self::Accent),
            CAIXA_THEME_SEMANTIC_WIRE_MUTED => Some(Self::Muted),
            CAIXA_THEME_SEMANTIC_WIRE_ERROR => Some(Self::Error),
            CAIXA_THEME_SEMANTIC_WIRE_WARNING => Some(Self::Warning),
            CAIXA_THEME_SEMANTIC_WIRE_INFO => Some(Self::Info),
            CAIXA_THEME_SEMANTIC_WIRE_HINT => Some(Self::Hint),
            CAIXA_THEME_SEMANTIC_WIRE_ADDED => Some(Self::Added),
            CAIXA_THEME_SEMANTIC_WIRE_REMOVED => Some(Self::Removed),
            CAIXA_THEME_SEMANTIC_WIRE_UNCHANGED => Some(Self::Unchanged),
            _ => None,
        }
    }
}

/// [`std::fmt::Display`] routed through [`Semantic::as_str`], so the
/// pretty-printed byte-string every consumer that formats the semantic
/// style as user-facing text lands on (a future `feira lint --list-styles`
/// operator-facing enumeration verb's per-arm line, a future
/// `caixa-lsp` diagnostic-source line naming the offending semantic,
/// a future `caixa.nvim` per-Semantic highlight-group name emitter,
/// a `tracing::field::display(&sem)` structured-log recorder on the
/// paint-side emit path) reaches for the same lifted kebab-case
/// per-arm byte-string [`Semantic::as_str`] returns.
///
/// Peer of the sibling [`std::fmt::Display`] impls on the closed-set
/// typed enums the substrate carries — [`caixa_core::CaixaKind`],
/// [`caixa_core::supervisor::RestartStrategy`],
/// [`caixa_core::supervisor::RestartPolicy`],
/// [`caixa_core::aplicacao::PlacementStrategy`],
/// [`caixa_core::upgrade::UpgradeInstruction`],
/// `caixa_lint::diagnostic::Severity`,
/// `caixa_lint::diagnostic::FixSafety`,
/// `caixa_arch::InvariantKind`, `caixa_arch::ArchVerdict`,
/// `caixa_provedor::FerriteRuntime` — extended to the second-to-last
/// un-lifted `caixa-theme` closed-set fieldless typed enum on the
/// substrate-wide `(as_str, AsRef<str>, Display)` canonical-projection
/// triple ratchet the prior lifts converged onto.
impl std::fmt::Display for Semantic {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}

/// Substrate-canonical [`AsRef<str>`] projection on the caixa-theme
/// [`Semantic`] closed-set fieldless typed enum — routes through the
/// same [`Semantic::as_str`] `pub const fn` scalar accessor the paired
/// [`std::fmt::Display`] impl already reaches for.
///
/// Peer of the sibling [`AsRef<str>`] impls the substrate carries on
/// [`caixa_core::CaixaKind`], [`caixa_core::CaixaVersion`],
/// [`caixa_core::CaixaDialeto`], [`caixa_core::dep::DepList`],
/// [`caixa_core::supervisor::RestartStrategy`],
/// [`caixa_core::supervisor::RestartPolicy`],
/// [`caixa_core::aplicacao::PlacementStrategy`],
/// [`caixa_core::aplicacao::RateLimitUnit`],
/// `caixa_lint::diagnostic::Severity`,
/// `caixa_arch::InvariantKind`, `caixa_arch::ArchVerdict`,
/// `caixa_provedor::FerriteRuntime` — extends the substrate-wide
/// `(as_str, AsRef<str>, Display)` canonical-projection triple onto
/// the caixa-theme closed-set typed-enum axis, so a future consumer
/// bound through the trait-idiomatic `.as_ref()` (a
/// `HashMap::get::<str>(sem.as_ref())` per-Semantic style-lookup, a
/// future `caixa-lsp` `SemanticTokenType::new(sem.as_ref())`
/// registration site, any `impl AsRef<str>`-bound generic function)
/// reaches the same kebab byte-string [`Semantic::as_str`] returns
/// rather than an open-coded `.as_str()` projection at every
/// wire-up.
impl AsRef<str> for Semantic {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// Trait-idiomatic reverse projection on the [`Semantic`] closed 16-arm
/// caixa-theme semantic-style axis — routes byte-for-byte through the
/// paired substrate-primitive [`Semantic::from_wire`] `Option<Self>`
/// accessor so every future consumer that binds a canonical semantic
/// tag through the standard-library `.try_into()` / [`TryFrom`] axis
/// (a future `feira lint --semantic=<kebab>` CLI arg-parse that
/// composes into `let sem: Semantic = s.try_into()?`, a future
/// `caixa-lsp` per-token re-parse hydrating a prior
/// [`Semantic::as_str`] output back to the typed enum for
/// `SemanticTokenType` dispatch, a future `caixa.nvim` per-highlight-
/// group re-loader binding a stored kebab byte-string back through the
/// typed enum, a generic `<T: TryFrom<&str>>`-bound theme-overlay
/// re-loader over any of the substrate's closed-set typed enums)
/// reaches the same 16-arm accept-set the sibling
/// [`Semantic::from_wire`] resolver parses through and the sibling
/// [`Semantic::as_str`] emits, rather than an open-coded per-arm
/// `match s { "keyword" => …, "symbol" => …, … _ => … }` 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>`], [`Semantic::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 the sibling method-named [`Semantic::from_wire`] would trigger
/// under a `FromStr` impl (the same design tradeoff the peer
/// [`caixa_core::CaixaKind`] (3c83606),
/// [`caixa_core::CaixaDialeto`] (bf33136),
/// [`caixa_core::aplicacao::PlacementStrategy`] (6fd00cd),
/// [`caixa_core::supervisor::RestartStrategy`] (5b828ed),
/// [`caixa_core::supervisor::RestartPolicy`] (6fdd0d9),
/// [`caixa_core::aplicacao::WitShape`] (5472902),
/// [`caixa_core::aplicacao::RateLimitUnit`] (bf78400),
/// [`caixa_core::render::PathShapeViolation`] (e67e48a),
/// `caixa_arch::invariants::InvariantKind` (e21a857),
/// `caixa_arch::report::ArchVerdict` (0a4cc45),
/// `caixa_lint::diagnostic::Severity` (a7bf74c), and
/// `caixa_lint::diagnostic::FixSafety` (df86c94) blocks note) — this
/// impl closes the trait-idiomatic reverse axis without disturbing the
/// method-named `from_wire` shape every peer closed-set typed enum
/// already carries.
///
/// `type Error = ()` matches the sibling [`Semantic::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 lint --semantic` CLI arg-parse composes its own
/// per-verb "unknown semantic-style tag: <arg> — accepted: {…}"
/// message enumerating [`Semantic::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 axis-error to a per-verb error type). Same
/// shape the peer sibling reverse-projection axes carry. The return-
/// shape uses fully-qualified `<Self as TryFrom<&str>>::Error` because
/// the associated-type name would otherwise collide with the
/// [`Self::Error`] variant on the same primitive (the identical
/// ambiguous-associated-item defect the sibling
/// `impl TryFrom<&str> for Severity` (a7bf74c) already threads around
/// under `#[deny(future_incompatible)]`).
///
/// The paired [`TryFrom<&str>`] impl reaches the same 16-arm accept-
/// set the [`Semantic::from_wire`] resolver dispatches through, so any
/// future arm addition (a `Namespace` tier between [`Self::Symbol`]
/// and [`Self::KeywordArg`] for the M4 tatara-lisp module system's
/// qualified-name semantic-token dispatch, a `Deleted` tier for a
/// hard-delete-mark distinct from [`Self::Removed`] the future 3-way
/// diff surface grows — both trajectory items the sibling
/// [`Semantic::ALL`] doc block already names) grows the trait-
/// idiomatic axis by construction: one caixa-theme edit on
/// [`Semantic::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.
///
/// Extends the substrate-wide closed-set-enum trait-idiomatic
/// reverse-projection family ([`caixa_core::CaixaKind`] via 3c83606,
/// [`caixa_core::CaixaDialeto`] via bf33136,
/// [`caixa_core::aplicacao::PlacementStrategy`] via 6fd00cd,
/// [`caixa_core::supervisor::RestartStrategy`] via 5b828ed,
/// [`caixa_core::supervisor::RestartPolicy`] via 6fdd0d9,
/// [`caixa_core::aplicacao::WitShape`] via 5472902,
/// [`caixa_core::aplicacao::RateLimitUnit`] via bf78400,
/// [`caixa_core::render::PathShapeViolation`] via e67e48a,
/// `caixa_arch::invariants::InvariantKind` via e21a857,
/// `caixa_arch::report::ArchVerdict` via 0a4cc45,
/// `caixa_lint::diagnostic::Severity` via a7bf74c, and
/// `caixa_lint::diagnostic::FixSafety` via df86c94) onto the first
/// closed-set fieldless typed enum on the caixa-theme surface — the
/// semantic-style 16-arm accept-set every per-Semantic paint dispatch,
/// every future `caixa-lsp` per-SemanticTokenType wire-up, and every
/// future `caixa.nvim` per-highlight-group re-loader keys off. The
/// thirteenth peer on the substrate surface, and the first inside
/// `caixa-theme`; with `caixa_provedor::FerriteRuntime` remaining as
/// the only outside-caixa-core closed-set fieldless typed enum whose
/// trait-idiomatic axis is still open.
///
/// Pinned load-bearing by
/// [`tests::semantic_try_from_str_routes_through_from_wire_accessor`]
/// (byte-parity pin against [`Semantic::from_wire`] across the 16-arm
/// accept-set) and
/// [`tests::semantic_try_from_str_rejects_unknown_byte_strings`]
/// (rejection witness against silent accept-set widening).
impl TryFrom<&str> for Semantic {
    type Error = ();

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

/// Standard-library trait-idiomatic [`std::str::FromStr`] impl on the
/// [`Semantic`] closed-set caixa-theme semantic-style typed enum —
/// routes byte-for-byte through the paired
/// [`TryFrom<&str> for Semantic`] impl (which in turn routes through
/// the substrate-primitive [`Semantic::from_wire`] `Option<Self>`
/// accessor), so `"...".parse::<Semantic>()` /
/// `<Semantic as FromStr>::from_str(…)` reaches the same 16-arm
/// canonical-lowercase-kebab accept-set the sibling method-named
/// [`Semantic::from_wire`] resolver and the paired [`TryFrom<&str>`]
/// impl already resolve against.
///
/// Extends the substrate-wide trait-idiomatic `str::parse`-axis
/// campaign — opened on [`caixa_core::dep::DepList`] via 6167092 as
/// first-mover on the two-list dep-graph closed-set typed enum, then
/// extended onto [`caixa_core::CaixaKind`] (9867432),
/// [`caixa_core::aplicacao::PlacementStrategy`] (62ef49a),
/// [`caixa_core::CaixaDialeto`] (ff01b2f),
/// [`caixa_arch::invariants::InvariantKind`] (fb16072),
/// [`caixa_arch::report::ArchVerdict`] (40e9dfd),
/// `caixa_lint::diagnostic::Severity` (6b0a08c),
/// `caixa_lint::diagnostic::FixSafety` (eb6942b), and
/// [`caixa_core::render::PathShapeViolation`] (b0b578c) — onto the
/// *first* closed-set fieldless typed enum on the caixa-theme surface:
/// the 16-arm semantic-style accept-set every per-`Semantic` paint
/// dispatch, every future `caixa-lsp`-side per-`SemanticTokenType`
/// wire-up, every future `caixa.nvim` per-highlight-group re-loader,
/// and every future `blackmatter-shell` per-arm
/// `data-semantic="<kebab>"` DOM-attribute emission dispatches through.
/// Coherent by construction on this enum specifically: [`Semantic`]
/// carries exactly one canonical-lowercase-kebab wire axis with no
/// paired secondary parse surface, so — unlike the peer
/// [`caixa_core::supervisor::RestartStrategy`] /
/// [`caixa_core::supervisor::RestartPolicy`] (whose paired
/// [`gen_platform::FromStrKind`]-derived kebab-case `FromStr` on the
/// dispatcher-catalog axis rules a second `FromStr` impl out by
/// coherence) and unlike the peer
/// [`caixa_core::aplicacao::WitShape`] /
/// [`caixa_core::aplicacao::RateLimitUnit`] (whose two-axis splits
/// motivate deliberate deferral of the `FromStr` axis so a plain
/// `s.parse::<T>()` cannot obscure which axis the caller reaches),
/// lifting [`FromStr`] onto [`Semantic`] cannot collide with a second
/// parse axis it does not carry.
///
/// [`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::<Semantic>()`
/// short-form on every consumer (a future
/// `feira lint --list-styles=<semantic>` clap-style arg-parse composes
/// `arg.parse::<Semantic>()`; a `serde` string-tagged deserializer with
/// a `#[serde(with = "serde_with::DisplayFromStr")]` shim routes
/// through the same `FromStr` bound; a future `caixa-lsp`-side
/// per-`SemanticTokenType` startup registration walk that reads a
/// declaration-order kebab list from configuration reaches the typed
/// enum through `line.parse::<Semantic>()` without a per-consumer
/// [`TryFrom<&str>`] restatement; a `caixa.nvim`-side
/// per-highlight-group re-loader binding a prior emission's
/// [`Semantic::as_str`] output back to the typed enum for cross-run
/// palette-histogram diff reaches the same axis through the stdlib
/// `.parse()` short-form; a future `blackmatter-shell`
/// `data-semantic="<kebab>"` DOM-attribute round-trip that walks
/// `element.dataset.semantic.parse::<Semantic>()` on the client-side
/// paint dispatch reaches the same axis through the stdlib
/// short-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 16-arm accept-set by construction. A future arm
/// addition (a `Deprecated` decoration between [`Self::Removed`] and
/// [`Self::Unchanged`] the future formatter-preview grows to mark
/// soft-delete regions distinct from hard-delete [`Self::Removed`] the
/// future 3-way diff surface grows — the trajectory item the sibling
/// [`Semantic::ALL`] doc block already names) reaches every parse path
/// through one caixa-theme edit on the substrate-primitive
/// [`Semantic::from_wire`] accessor, not a coordinated rewrite across
/// the two reverse-projection trait impls.
///
/// Pinned load-bearing by
/// [`tests::semantic_from_str_routes_through_try_from_str_impl`]
/// (byte-parity pin across the 16-arm accept-set + delegated
/// `.parse()`-projection witness) and
/// [`tests::semantic_from_str_rejects_unknown_byte_strings`]
/// (rejection witness against silent accept-set widening).
impl std::str::FromStr for Semantic {
    type Err = ();

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

/// Standard-library trait-idiomatic forward projection on the
/// [`Semantic`] closed 16-arm caixa-theme semantic-style axis. Routes
/// byte-for-byte through the paired substrate-primitive
/// [`Semantic::as_str`] `pub const fn` accessor so
/// `<&'static str>::from(sem)` / `sem.into::<&'static str>()` reaches
/// the same 16-arm canonical-lowercase kebab emit-set the sibling
/// method-named accessor dispatches through and the sibling
/// [`std::fmt::Display for Semantic`] / [`AsRef<str> for Semantic`]
/// impls also route through.
///
/// Extends the substrate-wide closed-set-enum trait-idiomatic
/// forward-projection family
/// ([`caixa_core::supervisor::RestartStrategy`] via 523157d,
/// [`caixa_core::supervisor::RestartPolicy`] via 9fb37d0,
/// [`caixa_core::CaixaKind`] via edb827b,
/// [`caixa_core::CaixaDialeto`] via c189a6f,
/// [`caixa_core::aplicacao::PlacementStrategy`] via afa3562,
/// [`caixa_core::aplicacao::WitShape`] via 56998ec,
/// [`caixa_core::aplicacao::RateLimitUnit`] via 7fdfbf4,
/// [`caixa_core::render::PathShapeViolation`] via 070a6de,
/// [`caixa_arch::invariants::InvariantKind`] via f2ca7bc,
/// [`caixa_arch::report::ArchVerdict`] via d4559cb,
/// `caixa_lint::diagnostic::Severity` via 5cc3b8b, and
/// `caixa_lint::diagnostic::FixSafety` via 2a56127) onto the first
/// closed-set fieldless typed enum on the caixa-theme surface — the
/// semantic-style 16-arm accept-set every per-Semantic paint dispatch,
/// every future `caixa-lsp` per-`SemanticTokenType` wire-up, every
/// future `caixa.nvim` per-highlight-group re-loader, and every future
/// `blackmatter-shell` per-arm `data-semantic="<kebab>"` DOM emission
/// keys off. The thirteenth peer on the substrate surface, closing the
/// caixa-theme closed-set fieldless typed-enum axis onto the trait-
/// idiomatic forward-projection axis and matching the paired trait-
/// idiomatic reverse-projection axis (already closed via bd7da69 on
/// this enum), with only `caixa_provedor::FerriteRuntime` remaining as
/// the last outside-caixa-core closed-set fieldless typed enum whose
/// trait-idiomatic forward axis is still open.
///
/// Pairs with the sibling [`TryFrom<&str> for Semantic`] impl (bd7da69)
/// to close the two-way `Self ↔ &'static str` round-trip on the
/// trait-idiomatic axis pair, mirroring the pre-existing method-named
/// [`Semantic::as_str`] + [`Semantic::from_wire`] pair on the
/// substrate-primitive axis pair.
///
/// Return type is `&'static str` by construction — every
/// [`Semantic::as_str`] arm resolves to an inline `"keyword"` /
/// `"symbol"` / `"keyword-arg"` / `"string"` / `"number"` /
/// `"literal"` / `"comment"` / `"accent"` / `"muted"` / `"error"` /
/// `"warning"` / `"info"` / `"hint"` / `"added"` / `"removed"` /
/// `"unchanged"` `&'static str` literal, so the trait's return-type
/// promise is upheld structurally without a [`String::leak`] cast or a
/// per-arm inline literal outside the paired [`Semantic::as_str`]
/// dispatch.
///
/// The paired [`Semantic::as_str`] accessor's 16-arm emit-set is the
/// single source of truth — every future arm addition (a `Namespace`
/// tier between [`Self::Symbol`] and [`Self::KeywordArg`] for the M4
/// tatara-lisp module system's qualified-name semantic-token dispatch,
/// a `Deleted` tier for a hard-delete-mark distinct from
/// [`Self::Removed`] the future 3-way diff surface grows — both
/// trajectory items the sibling [`Semantic::ALL`] doc block already
/// names) grows the trait-idiomatic forward axis by construction: one
/// caixa-theme edit on [`Semantic::as_str`] extends every one of the
/// sibling forward-projection paths ([`std::fmt::Display`],
/// [`AsRef<str>`], [`Semantic::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.
///
/// Pinned load-bearing by
/// [`tests::semantic_from_into_static_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`Semantic::as_str`] across the 16-arm
/// emit-set, plus a `const`-context materialization witness for the
/// `&'static str` lifetime promise routed through the paired
/// [`Semantic::as_str`] `pub const fn` accessor, plus a paired
/// `.into()` shape assertion covering the blanket-derived
/// `Into<&'static str>` shape) and
/// [`tests::semantic_from_into_static_str_and_as_str_partition_the_emit_set`]
/// (partition pin asserting `<&'static str as From<Semantic>>::from`
/// and [`Semantic::as_str`] agree on every arm, plus a two-way direct
/// round-trip witness through the paired trait-idiomatic
/// [`TryFrom<&str>`] axis that closes the two-way
/// `Self ↔ &'static str` round-trip on the trait-idiomatic axis pair
/// — the emit-side [`Semantic::as_str`] and the parse-side
/// [`Semantic::from_wire`] dispatch on the same 16 inline canonical-
/// lowercase kebab byte-strings by construction, so round-tripping
/// composes the two trait impls directly).
impl From<Semantic> for &'static str {
    fn from(sem: Semantic) -> &'static str {
        sem.as_str()
    }
}

/// Trait-idiomatic *borrowed-input* forward projection on the
/// [`Semantic`] closed 16-arm caixa-theme semantic-style axis onto the
/// `&'static str` axis — the borrowed-input companion to the paired
/// owned-input [`From<Semantic> for &'static str`] impl immediately
/// above. Routes byte-for-byte through the same substrate-primitive
/// [`Semantic::as_str`] `pub const fn` accessor so every consumer that
/// binds a `&Semantic` through the standard-library `.into()` /
/// [`From<&Self> for &'static str`] axis (a
/// `Semantic::ALL.iter().map(<&'static str>::from).collect::<Vec<_>>()`
/// per-arm accept-set materializer — whose iterator over
/// `&'static [Semantic]` yields `&Semantic`, not `Semantic`, so the
/// owned-input [`From<Semantic>`] axis alone forces every call site
/// through an explicit `.copied()` / dereference / [`Copy`]-bound
/// restatement rather than the direct trait-idiomatic projection; a
/// future `feira lint --list-styles` operator-facing enumeration verb
/// composed via `Semantic::ALL.iter().map(Into::into)`; a future
/// `caixa-lsp` per-`SemanticTokenType` registration walk that borrows
/// `&Semantic` off a stored per-style row; a future `caixa.nvim` per-
/// highlight-group re-loader that borrows `&Semantic` off the loaded
/// theme-overlay table; a future
/// `HashMap::<&'static str, _>::from_iter(Semantic::ALL.iter().map(
///     |sem| (<&'static str>::from(sem), 0)))` per-Semantic-paint
/// histogram seed a future `blackmatter-shell` per-arm
/// `data-semantic="<kebab>"` DOM-attribute emit path composes) reaches
/// the same 16-arm `"keyword"` / `"symbol"` / `"keyword-arg"` /
/// `"string"` / `"number"` / `"literal"` / `"comment"` / `"accent"` /
/// `"muted"` / `"error"` / `"warning"` / `"info"` / `"hint"` /
/// `"added"` / `"removed"` / `"unchanged"` canonical-lowercase kebab
/// emit-set the paired owned-input [`From<Semantic> for &'static str`],
/// the sibling [`std::fmt::Display`], [`AsRef<str>`], and
/// [`Semantic::as_str`] surfaces already return.
///
/// Fifteenth and final peer on the substrate-wide trait-idiomatic
/// *borrowed-input* `&'static str`-returning forward-projection family
/// already carried by [`caixa_core::dep::DepList`] (64aa742,
/// first-mover), [`caixa_core::CaixaKind`],
/// [`caixa_core::CaixaDialeto`],
/// [`caixa_core::supervisor::RestartStrategy`],
/// [`caixa_core::supervisor::RestartPolicy`],
/// [`caixa_core::aplicacao::PlacementStrategy`],
/// [`caixa_core::aplicacao::WitShape`],
/// [`caixa_core::aplicacao::RateLimitUnit`],
/// [`caixa_core::render::PathShapeViolation`] (cdf4e95, first render-
/// side arm), [`caixa_arch::invariants::InvariantKind`] (238d886,
/// first outside-`caixa-core` arm), [`caixa_arch::report::ArchVerdict`]
/// (73bda50), `caixa_lint::diagnostic::Severity` (2b9003f),
/// `caixa_lint::diagnostic::FixSafety` (d8769ab), and
/// `caixa_provedor::FerriteRuntime` (676d693). 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(*sem)` / `sem.as_str()` detour whose type
/// bounds have no compile-time link to the substrate primitive.
/// Lifting the borrowed-input axis on the caixa-theme semantic-style
/// 16-arm closed-set fieldless typed enum closes that gap on the same
/// trajectory the paired owned-input axis
/// ([`impl From<Semantic> for &'static str`] immediately above) already
/// opened, and closes the trait-idiomatic *borrowed-input*
/// `&'static str`-returning axis on the last remaining substrate-wide
/// closed-set fieldless typed enum whose borrowed-input axis was still
/// open — the substrate-wide 2×2-completion campaign now covers every
/// closed-set fieldless typed enum on the caixa surface on the
/// borrowed-input `&'static str`-returning axis.
///
/// Pinned load-bearing by
/// [`tests::semantic_from_borrowed_into_static_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`Semantic::as_str`] across the 16-arm
/// emit-set via a borrowed input, plus a `const`-context
/// materialization witness for the `&'static str` lifetime promise)
/// and
/// [`tests::semantic_from_owned_and_borrowed_into_static_str_agree_on_every_arm`]
/// (cross-axis partition pin against the paired owned-input
/// [`From<Semantic> for &'static str`] impl, plus a
/// `.iter().map(Into::into)` pipe witness over [`Semantic::ALL`] whose
/// iterator yields `&Semantic` by construction so this borrowed-input
/// axis is what routes the pipe through the substrate-primitive
/// accessor without a spurious `Copy` deref).
impl From<&Semantic> for &'static str {
    fn from(sem: &Semantic) -> &'static str {
        sem.as_str()
    }
}

/// Trait-idiomatic *owned-input, owned-`String` output* forward
/// projection on the [`Semantic`] closed 16-arm caixa-theme
/// semantic-style axis — the owned-`String` companion to the paired
/// [`From<Semantic> for &'static str`] and
/// [`From<&Semantic> for &'static str`] siblings immediately above.
/// Routes byte-for-byte through the substrate-primitive
/// [`Semantic::as_str`] `pub const fn` accessor via
/// [`str::to_owned`] so every consumer that binds a [`Semantic`]
/// through the standard-library `.into()` / [`From<Self> for String`]
/// axis (a `let key: String = sem.into();`-shaped downstream call
/// site; a future `serde_json::Value::String(sem.into())` structured-
/// payload composer where the `Value::String` arm typing demands an
/// owned [`String`] and the sibling `&'static str`-returning axes
/// force an explicit `.to_owned()` / [`String::from`] restatement at
/// every call site; a future
/// `HashMap::<String, Semantic>::from_iter` per-semantic lookup on
/// a future `caixa-lsp` per-`SemanticTokenType` registration path
/// where the map's key type is owned [`String`] rather than
/// `&'static str`; a future
/// [`std::borrow::Cow::<'static, str>::Owned(sem.into())`] composer
/// on a future `feira lint --list-styles` operator-facing enumeration
/// verb's per-arm row where an owned [`Cow`] arm typing rules;
/// a future `caixa.nvim` per-highlight-group re-loader that stores
/// the per-Semantic kebab identifier as an owned [`String`] on the
/// theme-overlay table; a future `blackmatter-shell` per-arm
/// `data-semantic="<kebab>"` DOM emission whose serializer's
/// [`Serialize`] impl on [`String`] owns the emit-path) reaches the
/// same 16-arm `"keyword"` / `"symbol"` / `"keyword-arg"` /
/// `"string"` / `"number"` / `"literal"` / `"comment"` / `"accent"` /
/// `"muted"` / `"error"` / `"warning"` / `"info"` / `"hint"` /
/// `"added"` / `"removed"` / `"unchanged"` canonical-lowercase kebab
/// emit-set the paired `&'static str`-returning axes, the sibling
/// [`std::fmt::Display`], [`AsRef<str>`], and [`Semantic::as_str`]
/// surfaces already return — no `.to_owned()` /
/// `String::from(sem.as_str())` detour whose type bounds have no
/// compile-time link to the substrate primitive.
///
/// 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`] /
/// [`From<&Self> for &'static str`] quadruple but not the owned-
/// `String` axis forces every owned-string call site through the
/// detour above. This lift closes that axis on the sole closed-set
/// fieldless typed enum on the caixa-theme surface (the semantic-
/// style 16-arm axis), extending the substrate-wide
/// `{Self, &Self} × {&'static str, String}` 2×2-completion campaign
/// onto the sixth outside-`caixa-core` closed-set fieldless typed
/// enum on the caixa surface — matching the trajectory each of the
/// twelve prior peer enums —
/// [`caixa_core::supervisor::RestartStrategy`] (7baa18a, first-mover
/// on this axis), [`caixa_core::supervisor::RestartPolicy`] (7851725),
/// [`caixa_core::CaixaKind`] (231a18c),
/// [`caixa_core::CaixaDialeto`] (88942cd),
/// [`caixa_core::dep::DepList`] (32b0ee8),
/// [`caixa_core::aplicacao::PlacementStrategy`] (1154c2f),
/// [`caixa_core::aplicacao::WitShape`] (79a8723),
/// [`caixa_core::aplicacao::RateLimitUnit`] (c7d687d),
/// [`caixa_core::render::PathShapeViolation`] (6e0479a, first render-
/// side arm), [`caixa_arch::invariants::InvariantKind`] (1afd8d5,
/// first outside-`caixa-core` arm — the paired severity-classification
/// axis on the caixa-arch invariant-kind closed-set enum),
/// [`caixa_arch::report::ArchVerdict`] (cc80a53, the paired verdict-
/// outcome axis on the sibling caixa-arch closed-set enum),
/// `caixa_lint::diagnostic::Severity` (4635d4e),
/// `caixa_lint::diagnostic::FixSafety` (e4d73c6), and
/// `caixa_provedor::FerriteRuntime` (1e14fde, the paired ferrite-
/// runtime axis on the sole caixa-provedor closed-set enum) —
/// followed on the same 2×2-completion campaign.
///
/// Pinned load-bearing by
/// [`tests::semantic_from_into_owned_string_routes_through_as_str_accessor`]
/// (byte-parity pin against [`Semantic::as_str`] across the 16-arm
/// emit-set via the owned-`String` surface, plus a blanket-derived
/// `Into<String>` shape witness) and
/// [`tests::semantic_from_into_owned_string_and_static_str_agree_on_every_arm`]
/// (cross-axis partition pin against the paired owned-input
/// `&'static str`-returning [`From<Semantic> for &'static str`] impl
/// and the [`ToString::to_string`]-through-[`std::fmt::Display`]
/// surface, plus a `.iter().copied().map(String::from)` pipe witness
/// over [`Semantic::ALL`], plus a direct `Self → String → Self`
/// round-trip witness through the paired [`TryFrom<&str>`] axis on
/// the owned-[`String`]'s [`String::as_str`] borrow).
impl From<Semantic> for String {
    fn from(sem: Semantic) -> String {
        sem.as_str().to_owned()
    }
}

/// Trait-idiomatic *borrowed-input, owned-`String` output* forward
/// projection on the [`Semantic`] closed 16-arm caixa-theme semantic-
/// style axis — the borrowed-input companion to the paired owned-
/// input [`From<Semantic> for String`] (5ea146c) immediately above,
/// the paired borrowed-input [`From<&Semantic> for &'static str`]
/// (ffc0f26), and the paired owned-input
/// [`From<Semantic> for &'static str`] siblings above. Routes byte-
/// for-byte through the substrate-primitive [`Semantic::as_str`]
/// `pub const fn` accessor via [`str::to_owned`] so every consumer
/// that binds a [`Semantic`] through the standard-library `.into()` /
/// [`From<&Self> for String`] axis reaches the same 16-arm
/// `"keyword"` / `"symbol"` / `"keyword-arg"` / `"string"` /
/// `"number"` / `"literal"` / `"comment"` / `"accent"` / `"muted"` /
/// `"error"` / `"warning"` / `"info"` / `"hint"` / `"added"` /
/// `"removed"` / `"unchanged"` canonical-lowercase kebab emit-set
/// the paired [`std::fmt::Display`], [`AsRef<str>`],
/// [`Semantic::as_str`], and the three other trait-idiomatic
/// forward-projection impls already return — no
/// `sem.as_str().to_owned()` / `String::from(*sem)` (with a spurious
/// [`Copy`] deref) / `sem.to_string()` (through
/// [`std::fmt::Display`]) detour whose type bounds have no compile-
/// time link to the substrate primitive.
///
/// Fills the *last* remaining corner of the substrate-wide
/// `{Self, &Self} × {&'static str, String}` 2×2 trait-idiomatic
/// projection family on the sole closed-set fieldless typed enum on
/// the caixa-theme surface — and, by construction, the *final*
/// corner on the *entire* substrate-wide closed-set fieldless typed-
/// enum roster on the caixa surface, closing the substrate-wide
/// 2×2-completion campaign that opened on
/// [`caixa_core::supervisor::RestartStrategy`] (579385f, first-mover
/// on the borrowed-input owned-[`String`] axis). Rust's standard
/// library carries no blanket
/// `impl<T: AsRef<str>> From<&T> for String` (nor an
/// `impl<T: fmt::Display> From<&T> for String`), so every borrowed-
/// input owned-string call site — a future
/// `serde_json::Value::String(String::from(&sem))` structured-payload
/// composer over a borrowed per-style row where the
/// [`serde_json::Value::String`] arm typing demands an owned
/// [`String`] and the sibling `&'static str`-returning axes force an
/// explicit `.to_owned()` / [`String::from`] restatement, a future
/// `Semantic::ALL.iter().map(String::from).collect::<Vec<_>>()` per-
/// arm accept-set materializer on a future `feira lint --list-styles`
/// operator-facing enumeration verb whose iterator yields `&Semantic`
/// by construction (so the borrowed-input owned-[`String`] axis is
/// what routes the pipe through the substrate-primitive
/// [`Semantic::as_str`] accessor without a spurious `.copied()` /
/// [`Copy`]-bound dereference), a future
/// `HashMap::<String, usize>::from_iter(Semantic::ALL.iter().map(|sem| (String::from(sem), 0)))`
/// per-Semantic-paint histogram seed a future `blackmatter-shell`
/// per-arm `data-semantic="<kebab>"` DOM-attribute emit path
/// composes off a borrowed `&Semantic` off the loaded theme-overlay
/// table, a future `caixa-lsp` per-`SemanticTokenType` registration
/// walk borrowing off a stored per-style row, a future `caixa.nvim`
/// per-highlight-group re-loader borrowing off the loaded theme-
/// overlay table where the runtime stores the owned kebab identifier
/// as [`String`] — otherwise resolves through the detour above.
///
/// Closing this corner locks the caixa-theme semantic-style enum's
/// whole 2×2 trait-idiomatic projection family onto a single
/// [`Semantic::as_str`]-routed emit-set — any future arm addition (a
/// `Namespace` tier between [`Self::Symbol`] and [`Self::KeywordArg`]
/// for the M4 tatara-lisp module system's qualified-name semantic-
/// token dispatch, a `Deleted` tier for a hard-delete-mark distinct
/// from [`Self::Removed`] the future 3-way diff surface grows — both
/// trajectory items the sibling [`Semantic::ALL`] doc block already
/// names) reaches every projection path through exactly one caixa-
/// theme edit on the [`Semantic::as_str`] `pub const fn` accessor,
/// and the partition pin trips at test time on the first detour
/// that drifts a corner off.
///
/// Sixteenth and *final* peer on the substrate-wide trait-idiomatic
/// *borrowed-input, owned-`String` output* forward-projection family,
/// closing the substrate-wide 2×2-completion campaign across every
/// closed-set fieldless typed enum on the caixa surface — opened on
/// [`caixa_core::supervisor::RestartStrategy`] (579385f), extended
/// through [`caixa_core::supervisor::RestartPolicy`] (8465740),
/// [`caixa_core::dep::DepList`] (e0cb617),
/// [`caixa_core::CaixaKind`] (e76436d),
/// [`caixa_core::CaixaDialeto`] (d3c0d1d),
/// [`caixa_core::aplicacao::PlacementStrategy`] (d3dc000),
/// [`caixa_core::aplicacao::WitShape`] (d638fd3),
/// [`caixa_core::aplicacao::RateLimitUnit`] (6424e45 — closing the
/// whole M3 mesh-primitive triple's 2×2 corner),
/// [`caixa_core::render::PathShapeViolation`] (b90e193 — first
/// outside-manifest-surface arm on this axis),
/// [`caixa_arch::invariants::InvariantKind`] (3c3f66f — first
/// outside-`caixa-core` arm),
/// [`caixa_arch::report::ArchVerdict`] (3cfb3b5 — second outside-
/// `caixa-core` arm), `caixa_lint::diagnostic::Severity` (9518ab9 —
/// third outside-`caixa-core` arm),
/// `caixa_lint::diagnostic::FixSafety` (807f67d — fourth outside-
/// `caixa-core` arm), and `caixa_provedor::FerriteRuntime` (0caedec
/// — fifth outside-`caixa-core` arm), and now this lift on the
/// sixth-and-last outside-`caixa-core` closed-set enum — the caixa-
/// theme semantic-style 16-arm axis every per-Semantic paint
/// dispatch, every future `caixa-lsp` per-`SemanticTokenType` wire-
/// up, every future `caixa.nvim` per-highlight-group re-loader, and
/// every future `blackmatter-shell` per-arm `data-semantic="<kebab>"`
/// DOM emission keys off. Every future closed-set fieldless typed
/// enum lifted onto the caixa surface picks up the same 2×2 trait-
/// idiomatic projection family by construction as the substrate
/// discipline.
///
/// Same three-path convergence discipline as the paired owned-input
/// impl (this borrowed-input axis, the paired owned-input
/// [`From<Semantic> for String`], and [`Semantic::as_str`] all
/// route through the same 16-arm inline canonical-lowercase kebab
/// byte-strings), so a future arm addition reaches every one of the
/// paired forward-projection paths through exactly one caixa-theme
/// edit on the [`Semantic::as_str`] `pub const fn` accessor.
///
/// The [`Semantic::as_str`] emit and [`Semantic::from_wire`] parse
/// share the same 16 inline canonical-lowercase kebab byte-strings
/// by construction — so the borrowed-input owned-[`String`] forward
/// axis and the reverse [`TryFrom<&str>`] axis compose directly (via
/// the owned-[`String`]'s [`String::as_str`] borrow) without an
/// intermediate wire-vocab hop. The round-trip witness pin below
/// locks this direct composition on the caixa-theme semantic-style
/// enum's borrowed-input owned-[`String`] axis pair.
///
/// Pinned load-bearing by
/// [`tests::semantic_from_borrowed_into_owned_string_routes_through_as_str_accessor`]
/// (byte-parity pin against [`Semantic::as_str`] across the 16-arm
/// emit-set through the borrowed-input surface, plus a blanket-
/// derived `Into<String>` shape witness) and
/// [`tests::semantic_from_borrowed_into_owned_string_agrees_with_paired_axes_on_every_arm`]
/// (cross-axis partition pin against every one of the four 2×2
/// corners — the paired owned-input owned-[`String`]
/// [`From<Semantic> for String`] impl (5ea146c), the paired
/// borrowed-input owned-[`&'static str`]
/// [`From<&Semantic> for &'static str`] impl (ffc0f26), and the
/// paired owned-input owned-[`&'static str`]
/// [`From<Semantic> for &'static str`] impl — plus a
/// [`ToString::to_string`]-through-[`std::fmt::Display`] byte-parity
/// witness, plus a `.iter().map(String::from)` pipe witness over
/// [`Semantic::ALL`] (whose iterator yields `&Semantic` by
/// construction, so the borrowed-input owned-[`String`] axis is
/// what routes the pipe through the substrate-primitive
/// [`Semantic::as_str`] accessor without a spurious [`Copy`] deref),
/// plus a direct round-trip witness through [`TryFrom<&str>`] on the
/// owned-[`String`]'s [`String::as_str`] borrow that closes the two-
/// way `&Self → String → Self` round-trip on the trait-idiomatic
/// borrowed-input owned-[`String`] forward + reverse axis pair).
impl From<&Semantic> for String {
    fn from(sem: &Semantic) -> String {
        sem.as_str().to_owned()
    }
}

/// Trait-idiomatic *owned-input* forward projection on the sixteen-arm
/// semantic-style [`Semantic`] closed-set fieldless typed enum onto the
/// [`std::borrow::Cow<'static, str>`] axis — the
/// [`std::borrow::Cow<'static, str>`] companion to the paired owned-
/// input [`From<Semantic> for &'static str`] and paired owned-input
/// [`From<Semantic> for String`] forward-projection corners already
/// lifted above. Routes through the substrate-primitive
/// [`Semantic::as_str`] `pub const fn` accessor via
/// [`std::borrow::Cow::Borrowed`] so every consumer that binds a
/// [`Semantic`] through the substrate's
/// [`std::borrow::Cow<'static, str>`] axis (a `let key:
/// std::borrow::Cow<'static, str> = sem.into();`-shaped downstream
/// call site; a future `feira lint --list-styles` operator-facing
/// enumeration verb whose per-style row typing binds through a
/// [`std::borrow::Cow<'static, str>`] boundary the sibling
/// `&'static str`-returning and owned-[`String`]-returning axes
/// force through a `std::borrow::Cow::Borrowed(sem.as_str())` /
/// `std::borrow::Cow::Owned(sem.to_string())` /
/// `String::from(sem).into()` composition; a future
/// `caixa-lsp`-side per-`SemanticTokenType` registration walk where
/// the LSP wire schema binds the kebab tag as
/// [`std::borrow::Cow<'static, str>`] so static semantic-style
/// strings avoid the runtime allocation the owned-[`String`] axis
/// would force; a future `caixa.nvim` per-highlight-group re-loader
/// whose per-Semantic kebab identifier is bound through a
/// [`std::borrow::Cow<'static, str>`] field so a theme-overlay row
/// can carry either a static kebab or a per-scheme override without
/// duplicating the enum-parameterized field type; a future
/// `blackmatter-shell` per-arm `data-semantic="<kebab>"` DOM
/// emission whose attribute value binds through a
/// [`std::borrow::Cow<'static, str>`] so the emitter can compose
/// static kebab strings with an occasional runtime-computed variant;
/// a future `HashMap::<std::borrow::Cow<'static, str>,
/// usize>::from_iter(Semantic::ALL.iter().copied().map(|sem|
///     (sem.into(), 0)))` per-Semantic-paint histogram seed on a
/// future per-file paint audit where the key type is
/// [`std::borrow::Cow<'static, str>`] rather than `&'static str` or
/// owned [`String`]) reaches the same 16-arm `"keyword"` /
/// `"symbol"` / `"keyword-arg"` / `"string"` / `"number"` /
/// `"literal"` / `"comment"` / `"accent"` / `"muted"` / `"error"` /
/// `"warning"` / `"info"` / `"hint"` / `"added"` / `"removed"` /
/// `"unchanged"` canonical-lowercase kebab emit-set the paired
/// [`std::fmt::Display`], [`AsRef<str>`], [`Semantic::as_str`], and
/// the four `{Self, &Self} × {&'static str, String}` 2×2 trait-
/// idiomatic forward-projection corners already return.
///
/// Deliberately returns [`std::borrow::Cow::Borrowed`] rather than
/// [`std::borrow::Cow::Owned`] — the substrate-primitive
/// [`Semantic::as_str`] accessor's return carries the `&'static str`
/// lifetime by construction (each `match` arm resolves to an inline
/// `&'static str` literal), so the zero-alloc borrowed arm is the
/// type-correct projection with no runtime allocation. Any future
/// silent detour that routes the impl through the
/// [`std::borrow::Cow::Owned`] arm (an accidental
/// `std::borrow::Cow::Owned(sem.to_string())` rewrite that would
/// allocate on every call site where the `&'static str` return of
/// [`Semantic::as_str`] makes the zero-alloc borrowed projection
/// type-correct) trips at caixa-theme test time under the
/// [`std::borrow::Cow::Borrowed`] discriminator witness rather than
/// at a downstream [`std::borrow::Cow<'static, str>`]-bound
/// consumer's silent allocation.
///
/// *Fifth outside-`caixa-core` peer* (and *sole peer on the caixa-
/// theme surface*) on the substrate-wide trait-idiomatic
/// [`std::borrow::Cow<'static, str>`] forward-projection family —
/// extends the outside-`caixa-core` tier of the campaign off the
/// paired caixa-lint fix-safety-tier axis on the sibling two-arm
/// closed-set enum ([`caixa_lint::diagnostic::FixSafety`], 79010c5 /
/// 9a6539f — fourth outside-`caixa-core` peer, closed the 2×3
/// corner) onto the semantic-style sixteen-arm axis every per-
/// Semantic paint dispatch, every future `caixa-lsp`
/// per-`SemanticTokenType` wire-up, every future `caixa.nvim`
/// per-highlight-group re-loader, and every future
/// `blackmatter-shell` per-arm `data-semantic="<kebab>"` DOM
/// emission dispatches through. Fourteenth peer on the axis; leaves
/// the remaining outside-`caixa-core` peer
/// (`caixa_provedor::FerriteRuntime`) as the future target. The
/// paired `{Self, &Self}` borrowed-input closer on `&Semantic` is
/// the next commit on this axis, matching the closure discipline
/// every prior peer landed one commit after its opener.
///
/// Rust's standard library does not carry a blanket
/// `impl<T: AsRef<str>> From<T> for std::borrow::Cow<'static, str>`
/// (nor an `impl<T: fmt::Display> From<T> for
/// std::borrow::Cow<'static, str>`), so every closed-set fieldless
/// typed enum peer 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
/// [`std::borrow::Cow<'static, str>`]-parameterized call site
/// through a `std::borrow::Cow::Borrowed(sem.as_str())` /
/// `std::borrow::Cow::Owned(sem.to_string())` /
/// `String::from(sem).into()` detour whose type bounds have no
/// compile-time link to the substrate primitive.
///
/// The [`Semantic::as_str`] emit and [`Semantic::from_wire`] parse
/// share the same 16 inline canonical-lowercase kebab byte-strings
/// by construction — so the [`std::borrow::Cow<'static, str>`]
/// projection this impl exposes composes directly with the paired
/// trait-idiomatic reverse [`TryFrom<&str>`] axis on the
/// projection's [`std::borrow::Cow::as_ref`] borrow, no intermediate
/// wire-vocab hop required (matching the sibling
/// [`caixa_lint::diagnostic::FixSafety`] and
/// [`caixa_lint::diagnostic::Severity`] pairs — round-trip-stable —
/// unlike the peer [`caixa_core::CaixaKind`] pair whose forward
/// emit and reverse parse land on distinct vocabularies).
///
/// Pinned load-bearing by
/// [`tests::semantic_from_into_static_cow_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`Semantic::as_str`] across the sixteen-
/// arm emit-set through the [`std::borrow::Cow<'static, str>`]
/// surface, 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`],
/// plus a blanket-derived [`Into<std::borrow::Cow<'static, str>>`]
/// shape witness that also lands on [`std::borrow::Cow::Borrowed`])
/// and
/// [`tests::semantic_from_into_static_cow_str_agrees_with_paired_axes_on_every_arm`]
/// (cross-axis partition pin against the paired owned-input
/// [`From<Semantic> for &'static str`] and
/// [`From<Semantic> for String`] forward-projection corners plus
/// the sibling [`ToString::to_string`]-through-[`std::fmt::Display`]
/// surface, plus a `.iter().copied().map(std::borrow::Cow::from)`
/// pipe witness over [`Semantic::ALL`] with zero-alloc
/// [`std::borrow::Cow::Borrowed`] discriminator on every element,
/// plus a direct round-trip witness through [`TryFrom<&str>`] on
/// the projection's [`std::borrow::Cow::as_ref`] borrow).
impl From<Semantic> for std::borrow::Cow<'static, str> {
    fn from(sem: Semantic) -> std::borrow::Cow<'static, str> {
        std::borrow::Cow::Borrowed(sem.as_str())
    }
}

/// Trait-idiomatic *borrowed-input* forward projection on the sixteen-
/// arm semantic-style [`Semantic`] closed-set fieldless typed enum onto
/// the [`std::borrow::Cow<'static, str>`] axis — the borrowed-input
/// companion to the paired owned-input
/// [`From<Semantic> for std::borrow::Cow<'static, str>`] impl (0253688)
/// immediately above, and the corner that closes the whole substrate-
/// wide `{Self, &Self} × {&'static str, String, Cow<'static, str>}`
/// 2×3 trait-idiomatic forward-projection family on the caixa-theme
/// semantic-style sixteen-arm closed-set fieldless typed enum. Routes
/// byte-for-byte through the substrate-primitive [`Semantic::as_str`]
/// `pub const fn` accessor via [`std::borrow::Cow::Borrowed`] so every
/// consumer that binds a `&Semantic` through the standard-library
/// `.into()` / [`From<&Self> for std::borrow::Cow<'static, str>`] axis
/// — the exact `Semantic::ALL.iter().map(std::borrow::Cow::from).collect()`
/// pipe shape a future `feira lint --list-styles` CLI enumeration
/// whose iterator yields `&Semantic` by construction, a future
/// `.iter().map(|tok| std::borrow::Cow::from(&tok.semantic)).collect()`
/// per-token fan-out over `&[SemanticToken]` in a future `caixa-lsp`-
/// side per-`SemanticTokenType` registration walk whose borrowed access
/// off `&SemanticToken.semantic` avoids a spurious [`Copy`]-bound
/// dereference on the semantic-style field, a future `caixa.nvim` per-
/// highlight-group re-loader whose per-`&Semantic` kebab identifier is
/// bound through a [`std::borrow::Cow<'static, str>`] field so a theme-
/// overlay row can carry either a static kebab or a per-scheme override
/// without duplicating the enum-parameterized field type, a future
/// `blackmatter-shell` per-arm `data-semantic="<kebab>"` DOM emission
/// composer over an iterator-yielded `&Semantic`, or a future
/// `axum::response::IntoResponse` per-semantic paint audit column over
/// an iterator-yielded `&Semantic` reaches — resolves to the same 16-arm
/// `"keyword"` / `"symbol"` / `"keyword-arg"` / `"string"` / `"number"` /
/// `"literal"` / `"comment"` / `"accent"` / `"muted"` / `"error"` /
/// `"warning"` / `"info"` / `"hint"` / `"added"` / `"removed"` /
/// `"unchanged"` canonical-lowercase kebab byte-strings the paired
/// [`std::fmt::Display`], [`AsRef<str>`], [`Semantic::as_str`], the
/// four `{Self, &Self} × {&'static str, String}` 2×2 trait-idiomatic
/// forward-projection corners, and the paired owned-input
/// [`From<Semantic> for std::borrow::Cow<'static, str>`] impl already
/// return.
///
/// Deliberately returns [`std::borrow::Cow::Borrowed`] rather than
/// [`std::borrow::Cow::Owned`] — the substrate-primitive
/// [`Semantic::as_str`] accessor's return carries the `&'static str`
/// lifetime by construction (each `match` arm resolves to an inline
/// `&'static str` literal), so the zero-alloc borrowed arm is the
/// type-correct projection with no runtime allocation on the borrowed-
/// input surface just as on the paired owned-input surface.
///
/// Closes the `{Self, &Self}` input-shape corner on the fifth outside-
/// `caixa-core` peer of the substrate-wide
/// [`std::borrow::Cow<'static, str>`] forward-projection campaign,
/// opened one commit prior (0253688) on the paired owned-input impl.
/// Rust's standard library does not carry a blanket
/// `impl<T: AsRef<str>> From<&T> for std::borrow::Cow<'static, str>`
/// (nor an `impl<T: fmt::Display> From<&T> for
/// std::borrow::Cow<'static, str>`, nor a [`Copy`]-based
/// `impl<T: Copy, U: From<T>> From<&T> for U`), so every closed-set
/// fieldless typed enum peer on the substrate that carries the paired
/// owned-input [`std::borrow::Cow<'static, str>`] axis but not the
/// borrowed-input axis forces every borrowed-input
/// [`std::borrow::Cow<'static, str>`]-parameterized call site through
/// a spurious [`Copy`] deref (`std::borrow::Cow::from(*sem)`) or a
/// `std::borrow::Cow::Borrowed(sem.as_str())` open-code whose type
/// bounds have no compile-time link to the substrate primitive.
///
/// Matches the closure discipline the sibling
/// [`caixa_lint::diagnostic::FixSafety`] (9a6539f) landed one commit
/// after (79010c5) closing the whole caixa-lint fix-safety-tier 2×3
/// corner on the fourth outside-`caixa-core` peer,
/// [`caixa_lint::diagnostic::Severity`] (1819087) one commit after
/// (700a95e) closing the whole caixa-lint diagnostic-severity 2×3
/// corner on the third outside-`caixa-core` peer,
/// [`caixa_arch::report::ArchVerdict`] (1adb287) one commit after
/// (b492d5f) closing the whole caixa-arch verdict-outcome 2×3 corner
/// on the second outside-`caixa-core` peer, d7f3039 on the sibling
/// caixa-arch [`caixa_arch::invariants::InvariantKind`] one commit
/// after (9361e96), f80fbd6 on the render-side
/// [`caixa_core::render::PathShapeViolation`] one commit after
/// (7342c32), ebeb9e0 on the outside-M3
/// [`caixa_core::CaixaDialeto`] one commit after 8322511, 702cdf4 on
/// the two-list dep-graph [`caixa_core::dep::DepList`] one commit
/// after 6858bac, afdf0f4 on the M3-mesh-shape
/// [`caixa_core::aplicacao::PlacementStrategy`] one commit after
/// eee504d, 25690ef on [`caixa_core::aplicacao::WitShape`] one commit
/// after 8634dec, 53346fb on
/// [`caixa_core::aplicacao::RateLimitUnit`] one commit after 1d59925
/// (closing the whole M3 mesh-shape tier), d45c409 on the top-level
/// [`caixa_core::CaixaKind`] one commit after 99c1735, and 9b3e4b3 /
/// ee577fd on the M2 OTP-shape
/// [`caixa_core::supervisor::RestartStrategy`] /
/// [`caixa_core::supervisor::RestartPolicy`] sibling peers one commit
/// after 7dd28b3 / 0612398. Closes the whole caixa-theme semantic-
/// style sixteen-arm 2×3 corner
/// (`{Self, &Self} × {&'static str, String, Cow<'static, str>}`); the
/// remaining outside-`caixa-core` peer (`caixa_provedor::FerriteRuntime`)
/// is the only future target left on the axis.
///
/// Like the sibling [`caixa_lint::diagnostic::FixSafety`] and
/// [`caixa_lint::diagnostic::Severity`] pairs (whose canonical-
/// lowercase byte-strings are round-trip-stable), and unlike the peer
/// [`caixa_core::CaixaKind`] pair (whose forward emit lands on the
/// lowercase Portuguese diagnostic vocabulary while the reverse parse
/// lands on the `PascalCase` wire vocabulary, forcing the round-trip
/// through an intermediate [`caixa_core::CaixaKind::wire_name`] hop),
/// [`Semantic`] is a caixa-theme semantic-style axis with no
/// wire/diagnostic vocabulary split — the [`Semantic::as_str`] emit
/// and [`Semantic::from_wire`] parse share the same sixteen inline
/// canonical-lowercase kebab byte-strings by construction, so the
/// borrowed-input [`std::borrow::Cow<'static, str>`] projection this
/// impl exposes composes directly with the paired trait-idiomatic
/// reverse [`TryFrom<&str>`] axis on the projection's
/// [`std::borrow::Cow::as_ref`] borrow — no intermediate wire-vocab
/// hop required.
///
/// Pinned load-bearing by
/// [`tests::semantic_from_borrowed_into_static_cow_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`Semantic::as_str`] across the sixteen-
/// arm emit-set through the borrowed-input
/// [`std::borrow::Cow<'static, str>`] surface, plus a
/// [`std::borrow::Cow::Borrowed`] discriminator witness that the
/// borrowed-input projection lands on the zero-alloc arm rather than
/// silently allocating through [`std::borrow::Cow::Owned`], plus a
/// blanket-derived [`Into<std::borrow::Cow<'static, str>>`] shape
/// witness on the borrowed-input surface that also lands on
/// [`std::borrow::Cow::Borrowed`]) and
/// [`tests::semantic_from_borrowed_into_static_cow_str_agrees_with_paired_axes_on_every_arm`]
/// (cross-axis partition pin against the paired owned-input
/// [`From<Semantic> for std::borrow::Cow<'static, str>`] impl
/// (0253688), the paired borrowed-input
/// [`From<&Semantic> for &'static str`], and
/// [`From<&Semantic> for String`] impls plus
/// [`ToString::to_string`]-through-[`std::fmt::Display`], plus a
/// `.iter().map(std::borrow::Cow::from)` pipe witness over
/// [`Semantic::ALL`] whose iterator yields `&Semantic` by construction
/// — so the borrowed-input axis is what routes the pipe without a
/// spurious [`Copy`] deref — pinning zero-alloc
/// [`std::borrow::Cow::Borrowed`] on every element, plus a direct
/// round-trip witness through [`TryFrom<&str>`] on the projection's
/// [`std::borrow::Cow::as_ref`] borrow that closes the two-way
/// `&Self → Cow<'static, str> → Self` round-trip on the borrowed-
/// input axis).
impl From<&Semantic> for std::borrow::Cow<'static, str> {
    fn from(sem: &Semantic) -> std::borrow::Cow<'static, str> {
        std::borrow::Cow::Borrowed(sem.as_str())
    }
}

/// Trait-idiomatic *owned-input, [`Box<str>`] output* forward projection
/// on the caixa-theme semantic-style sixteen-arm closed-set fieldless
/// typed enum [`Semantic`]. Routes byte-for-byte through the substrate-
/// primitive [`Semantic::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> = sem.into();`-shaped call site — a
/// per-semantic-style census-key materializer that stashes the
/// semantic-style discriminator in a [`Box<str>`]-typed heap-owned
/// scalar for cheap clone (a future per-semantic-style token-coloring
/// legend the LSP-side rich-diagnostics surface keys off), a future M4
/// admission-webhook rejection body whose per-arm [`Box<str>`] field
/// composes from an owned [`Semantic`] handle naming the accepted
/// semantic-style tier list, a future `feira lint --by-semantic`
/// histogram-column emitter that stashes each arm as an owned
/// [`Box<str>`] label — reaches the same sixteen canonical-lowercase
/// kebab byte-strings 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
/// `Semantic → Box<str>` `.into()` reaches through this impl and no
/// other — without a `Box::from(sem.as_str())` open-code whose type
/// bounds have no compile-time link back to the substrate primitive.
///
/// Extends the outside-`caixa-core` tier of the substrate-wide trait-
/// idiomatic [`Box<str>`] forward-projection campaign onto the fifth
/// peer — the caixa-theme semantic-style sixteen-arm closed-set
/// fieldless typed enum — following the first-mover
/// [`caixa_arch::invariants::InvariantKind`] pair (10613a7 owned +
/// 5901887 borrowed) that opened the tier, the second-peer
/// [`caixa_arch::report::ArchVerdict`] pair (3e08f5a owned + c4319a8
/// borrowed), the third-peer [`Severity`] pair (5116c95), and the
/// fourth-peer [`FixSafety`] pair (cf0174b) that landed one axis prior.
/// Same discipline as the paired
/// [`caixa_core::supervisor::RestartStrategy`] /
/// [`caixa_core::supervisor::RestartPolicy`] M2-OTP-shape and
/// [`caixa_core::aplicacao::PlacementStrategy`] /
/// [`caixa_core::aplicacao::WitShape`] /
/// [`caixa_core::aplicacao::RateLimitUnit`] M3-mesh-shape [`Box<str>`]
/// axes: forward emit (this impl, the sibling
/// `{&'static str, String, Cow<'static, str>}` forward-projection
/// corner, [`std::fmt::Display`], [`AsRef<str>`], [`Semantic::as_str`])
/// and reverse parse ([`Semantic::from_wire`], [`TryFrom<&str>`]) route
/// through the same sixteen inline canonical-lowercase kebab byte-
/// strings [`Semantic::as_str`] returns by construction, so the round-
/// trip composes directly without the wire-vocab intermediate hop the
/// peer [`caixa_core::CaixaKind`] axis pair requires.
///
/// Leaves the remaining outside-`caixa-core` peer
/// ([`caixa_provedor::FerriteRuntime`]) whose [`Box<str>`] axis closure
/// remains the last future target on this tier of the campaign, and
/// leaves the paired borrowed-input [`From<&Semantic> for Box<str>`]
/// `{Self, &Self}`-closer as the direct next target on this axis.
///
/// Pinned load-bearing by
/// [`tests::semantic_from_into_box_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`Semantic::as_str`] across the sixteen-
/// arm [`Semantic::ALL`] emit-set on the owned-input surface, plus a
/// blanket-derived [`Into`] shape witness).
impl From<Semantic> for Box<str> {
    fn from(sem: Semantic) -> Box<str> {
        Box::<str>::from(sem.as_str())
    }
}

/// Trait-idiomatic *borrowed-input, [`Box<str>`] output* forward
/// projection on the caixa-theme semantic-style sixteen-arm closed-set
/// fieldless typed enum [`Semantic`]. Routes byte-for-byte through the
/// substrate-primitive [`Semantic::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> = (&sem).into();`-shaped call site or
/// a `Semantic::ALL.iter().map(Box::<str>::from)`-shaped pipe (whose
/// iterator over `&'static [Semantic]` yields `&Semantic` by
/// construction) — a per-semantic-style census-key materializer that
/// stashes the semantic-style discriminator in a [`Box<str>`]-typed
/// heap-owned scalar for cheap clone off a borrowed handle, a future M4
/// admission-webhook rejection body whose per-arm [`Box<str>`] field
/// composes from a borrowed [`Semantic`] handle off a `&Semantic`
/// borrow, a future `feira lint --by-semantic` histogram-column emitter
/// that iterates [`Semantic::ALL`] into per-arm owned [`Box<str>`]
/// labels — reaches the same sixteen canonical-lowercase kebab byte-
/// strings the sibling `{Self, &Self} × {&'static str, String,
/// Cow<'static, str>}` forward-projection corner and the paired owned-
/// input [`From<Semantic> for Box<str>`] 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
/// [`Semantic::ALL`]`.iter().map(Box::<str>::from)` reaches through
/// this impl and no other — without it, the same pipe would force an
/// explicit `.copied()` restatement (`.iter().copied()
/// .map(Box::<str>::from)`) whose type bounds have no compile-time link
/// back to the substrate primitive, and a `let key: Box<str> =
/// (&sem).into();`-shaped call site would force an explicit `Copy`
/// deref (`Box::<str>::from(*sem)`) or a
/// `Box::<str>::from(sem.as_str())` open-code with the same defect.
///
/// Closes the `{Self, &Self}` input-shape corner on the fifth outside-
/// `caixa-core` closed-set fieldless typed enum peer of the substrate-
/// wide trait-idiomatic [`Box<str>`] forward-projection campaign,
/// exactly as 5901887 closed the paired first-mover `InvariantKind`
/// axis one commit after (10613a7) landed, c4319a8 closed the paired
/// second-peer `ArchVerdict` axis one commit after (3e08f5a) landed,
/// 5116c95 landed the paired third-peer `Severity` pair one axis prior,
/// cf0174b landed the paired fourth-peer `FixSafety` pair one axis
/// prior, cb1d068 closed the paired M2-OTP-shape `RestartPolicy` axis
/// one commit after (0a1b313) landed, and 3c971b2 closed the paired M3-
/// mesh-shape `PlacementStrategy` axis one commit after (6d73e84)
/// landed. The remaining outside-`caixa-core` peer
/// ([`caixa_provedor::FerriteRuntime`]) remains the last future target
/// on this tier of the axis.
///
/// Same discipline as the paired
/// [`caixa_core::supervisor::RestartStrategy`] /
/// [`caixa_core::supervisor::RestartPolicy`] M2-OTP-shape and
/// [`caixa_core::aplicacao::PlacementStrategy`] /
/// [`caixa_core::aplicacao::WitShape`] /
/// [`caixa_core::aplicacao::RateLimitUnit`] M3-mesh-shape [`Box<str>`]
/// `{Self, &Self}`-closers: forward emit (this impl, the paired owned-
/// input [`From<Semantic> for Box<str>`] impl, the sibling
/// `{&'static str, String, Cow<'static, str>}` forward-projection
/// corner, [`std::fmt::Display`], [`AsRef<str>`], [`Semantic::as_str`])
/// and reverse parse ([`Semantic::from_wire`], [`TryFrom<&str>`]) route
/// through the same sixteen inline canonical-lowercase kebab byte-
/// strings [`Semantic::as_str`] returns by construction, so the round-
/// trip composes directly without the wire-vocab intermediate hop the
/// peer [`caixa_core::CaixaKind`] axis pair requires.
///
/// Pinned load-bearing by
/// [`tests::semantic_from_borrowed_into_box_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`Semantic::as_str`] across the sixteen-
/// arm [`Semantic::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 [`Semantic::ALL`]
/// — whose iterator yields `&Semantic` by construction, so the
/// borrowed-input [`Box<str>`] axis is what routes the pipe through the
/// substrate-primitive [`Semantic::as_str`] accessor without a spurious
/// [`Copy`] deref).
impl From<&Semantic> for Box<str> {
    fn from(sem: &Semantic) -> Box<str> {
        Box::<str>::from(sem.as_str())
    }
}

/// Trait-idiomatic *owned-input, [`std::sync::Arc<str>`] output* forward
/// projection on the caixa-theme semantic-style sixteen-arm closed-set
/// fieldless typed enum [`Semantic`]. Opens the fifth peer of the
/// outside-`caixa-core` tier of the substrate-wide trait-idiomatic
/// [`std::sync::Arc<str>`] forward-projection campaign, following the
/// first-mover [`caixa_arch::invariants::InvariantKind`] pair (4e923c1
/// owned + 03c043f borrowed), the second-peer
/// [`caixa_arch::report::ArchVerdict`] pair (1682f8b owned + 92ddfb2
/// borrowed), the third-peer `caixa_lint::diagnostic::Severity` pair
/// (a7a9a6d owned + 4f041e1 borrowed), and the fourth-peer
/// `caixa_lint::diagnostic::FixSafety` pair (fb73edb owned + 822138e
/// borrowed) that landed the tier one axis prior. Routes byte-for-byte
/// through the substrate-primitive [`Semantic::as_str`] `pub const fn`
/// accessor via [`std::sync::Arc::<str>::from`] on the returned
/// `&'static str`.
///
/// Every consumer that binds a `let key: std::sync::Arc<str> =
/// sem.into();`-shaped call site — a future M4 admission-webhook
/// rejection body whose per-semantic-style [`std::sync::Arc<str>`] field
/// composes off an owned [`Semantic`] handle across an `.await` boundary
/// through a `<T: Into<std::sync::Arc<str>>>`-bound diagnostic-column
/// dispatch, a future `caixa-lsp`-side per-semantic-style materializer
/// stashing the semantic-style discriminator in a
/// [`std::sync::Arc<str>`]-typed shared-ownership scalar cloned across
/// concurrent tokio-scheduled `SemanticTokenType`-dispatch tasks through
/// [`std::sync::Arc::clone`] rather than a per-task allocation, a future
/// `<T: Into<std::sync::Arc<str>>>`-bound `tracing`-span attributes
/// collector recording an owned [`Semantic`] per-arm field onto the
/// parent span's shared-ownership context, a future
/// `feira lint --by-semantic` per-arm histogram-column emitter binding
/// an owned [`Semantic`] handle into a shared-ownership per-arm bucket
/// key across concurrent per-file lint tasks — reaches the substrate-
/// primitive [`Semantic::as_str`] accessor through this impl and no
/// other, without a `std::sync::Arc::<str>::from(sem.as_str())` open-
/// code whose type bounds have no compile-time link back to the
/// substrate primitive.
///
/// 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 — a two-step
/// `std::sync::Arc::<str>::from(String::from(sem))` 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 without a
/// `.clone()`-per-task materialization.
///
/// Leaves the remaining outside-`caixa-core` peer
/// ([`caixa_provedor::FerriteRuntime`]) as the last future target on
/// this tier of the campaign, and leaves the paired borrowed-input
/// [`From<&Semantic> for std::sync::Arc<str>`] `{Self, &Self}`-closer as
/// the direct next target on this same enum, mirroring the shape 03c043f
/// used to close the first-mover [`caixa_arch::invariants::InvariantKind`]
/// pair one commit after 4e923c1 opened its owned-input half, 92ddfb2
/// used to close the second-peer [`caixa_arch::report::ArchVerdict`]
/// pair one commit after 1682f8b, 4f041e1 used to close the third-peer
/// `caixa_lint::diagnostic::Severity` pair one commit after a7a9a6d, and
/// 822138e used to close the fourth-peer
/// `caixa_lint::diagnostic::FixSafety` pair one commit after fb73edb.
///
/// Same discipline as the paired [`From<Semantic> for Box<str>`] axis on
/// this same enum already opened the outside-`caixa-core` [`Box<str>`]
/// tier's fifth peer: forward emit (this impl, the paired sibling
/// `{&'static str, String, Cow<'static, str>, Box<str>}` forward-
/// projection corner, [`std::fmt::Display`], [`AsRef<str>`],
/// [`Semantic::as_str`]) and reverse parse ([`Semantic::from_wire`],
/// [`TryFrom<&str>`]) route through the same sixteen inline canonical-
/// lowercase kebab byte-strings [`Semantic::as_str`] returns by
/// construction, so the round-trip composes directly without the wire-
/// vocab intermediate hop the peer [`caixa_core::CaixaKind`] axis pair
/// requires.
///
/// Pinned load-bearing by
/// [`tests::semantic_from_into_arc_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`Semantic::as_str`] across the sixteen-arm
/// [`Semantic::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<Semantic> for std::sync::Arc<str> {
    fn from(sem: Semantic) -> std::sync::Arc<str> {
        std::sync::Arc::<str>::from(sem.as_str())
    }
}

/// Trait-idiomatic *borrowed-input, [`std::sync::Arc<str>`] output* forward
/// projection on the caixa-theme semantic-style sixteen-arm closed-set
/// fieldless typed enum [`Semantic`]. Closes the `{Self, &Self}` input-
/// shape corner on the fifth peer of the outside-`caixa-core` tier of the
/// substrate-wide trait-idiomatic [`std::sync::Arc<str>`] forward-
/// projection campaign, one commit after 65dbcff opened its owned-input
/// half on this same enum. Routes byte-for-byte through the substrate-
/// primitive [`Semantic::as_str`] `pub const fn` accessor via
/// [`std::sync::Arc::<str>::from`] on the returned `&'static str`.
///
/// Every consumer that holds a `&Semantic` and needs a
/// [`std::sync::Arc<str>`] — a
/// `Semantic::ALL.iter().map(std::sync::Arc::<str>::from).collect::<Vec<_>>()`
/// per-arm semantic-style census-key materializer (whose iterator over
/// `&'static [Semantic]` yields `&Semantic`, not `Semantic`, so the paired
/// owned-input [`From<Semantic> for std::sync::Arc<str>`] axis alone
/// forces every call site through an explicit [`Copy`] deref or a
/// `.copied()` restatement rather than the direct trait-idiomatic
/// projection), a future M4 admission-webhook whose per-semantic-style
/// rejection body composes from a borrowed `&Semantic` handle across an
/// `.await` boundary through a `<T: Into<std::sync::Arc<str>>>`-bound
/// diagnostic-column dispatch, a future `caixa-lsp`-side per-semantic-
/// style materializer holding a shared-ownership per-arm canonical tag
/// from a `&Semantic` borrow through a per-file lifetime and cloning the
/// shared-ownership label into concurrent tokio-scheduled
/// `SemanticTokenType`-dispatch tasks through [`std::sync::Arc::clone`]
/// rather than a per-task allocation, a future
/// `<T: Into<std::sync::Arc<str>>>`-bound `tracing`-span attributes
/// collector recording a borrowed [`Semantic`] per-arm field onto the
/// parent span's shared-ownership context, a future
/// `feira lint --by-semantic` per-arm histogram-column emitter binding a
/// borrowed [`Semantic`] handle into a shared-ownership per-arm bucket
/// key across concurrent per-file lint tasks — reaches the substrate-
/// primitive [`Semantic::as_str`] accessor through this impl and no
/// other, without a `std::sync::Arc::<str>::from(sem.as_str())` open-
/// code whose type bounds have no compile-time link back to the
/// substrate primitive.
///
/// 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
/// every closed-set fieldless typed enum peer on the substrate that
/// carries the paired owned-input [`std::sync::Arc<str>`] axis but not
/// the borrowed-input axis forces every borrowed-input
/// [`std::sync::Arc<str>`]-parameterized call site through a spurious
/// [`Copy`] deref (`std::sync::Arc::<str>::from((*sem).as_str())`) or a
/// `std::sync::Arc::<str>::from(sem.as_str())` open-code whose type
/// bounds have no compile-time link back to the substrate primitive. 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 from a borrowed-input axis without a
/// `.clone()`-per-task materialization.
///
/// Mirrors the exact shape 03c043f used to close the first-mover
/// [`caixa_arch::invariants::InvariantKind`] `{Self, &Self}` corner one
/// commit after 4e923c1 opened its owned-input half, 92ddfb2 used to
/// close the second-peer [`caixa_arch::report::ArchVerdict`] `{Self,
/// &Self}` corner one commit after 1682f8b, 4f041e1 used to close the
/// third-peer `caixa_lint::diagnostic::Severity` `{Self, &Self}` corner
/// one commit after a7a9a6d, and 822138e used to close the fourth-peer
/// `caixa_lint::diagnostic::FixSafety` `{Self, &Self}` corner one commit
/// after fb73edb. With this commit `Semantic` becomes the fifth outside-
/// `caixa-core` peer to carry the closed `{Self, &Self} × Arc<str>`
/// corner — the remaining outside-`caixa-core` closed-set fieldless typed
/// enum peer of this campaign ([`caixa_provedor::FerriteRuntime`]) now
/// has a five-peer `{Self, &Self}` corner template to converge onto on
/// the outside-`caixa-core` tier of the Arc<str> axis, hardening the
/// tier's shape uniformly across five peers ahead of the sixth-and-last
/// close.
///
/// Pinned load-bearing by
/// [`tests::semantic_from_borrowed_into_arc_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`Semantic::as_str`] across the sixteen-arm
/// [`Semantic::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<Semantic> 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 [`Semantic::ALL`] — whose iterator yields `&Semantic` by
/// construction, so the borrowed-input [`std::sync::Arc<str>`] axis is
/// what routes the pipe through the substrate-primitive
/// [`Semantic::as_str`] accessor without a spurious [`Copy`] deref).
impl From<&Semantic> for std::sync::Arc<str> {
    fn from(sem: &Semantic) -> std::sync::Arc<str> {
        std::sync::Arc::<str>::from(sem.as_str())
    }
}

/// Trait-idiomatic *owned-input, [`std::rc::Rc<str>`] output* forward
/// projection on the caixa-theme semantic-style sixteen-arm closed-set
/// fieldless typed enum [`Semantic`] — the single-threaded reference-
/// counted peer of the paired owned-input
/// [`From<Semantic> for std::sync::Arc<str>`] impl immediately above on
/// the sibling atomically-reference-counted [`std::sync::Arc<str>`] axis.
/// Routes byte-for-byte through the substrate-primitive
/// [`Semantic::as_str`] `pub const fn` accessor via
/// [`std::rc::Rc::<str>::from`] on the returned `&'static str`.
///
/// 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 a `From<&T>`
/// blanket), and the [`std::sync::Arc<str>`] and [`std::rc::Rc<str>`]
/// trait tables are disjoint, so this axis is a distinct trait-idiomatic
/// surface a `let key: std::rc::Rc<str> = sem.into();`-shaped call site
/// reaches through this impl and no other. A single-threaded caixa-theme
/// per-Semantic style-token renderer whose per-arm canonical-lowercase
/// kebab tag is cloned across intra-render tree nodes via
/// [`std::rc::Rc::clone`] (its cheaper non-atomic refcount bump the
/// [`std::sync::Arc<str>`] axis's atomically-reference-counted return-
/// shape cannot provide within a single-threaded theme-overlay pass), a
/// future `feira lint --by-semantic` single-threaded per-arm histogram-
/// column emitter keyed on a shared-ownership per-arm bucket key, a
/// future `caixa-lsp`-side per-Semantic `SemanticTokenType` panel
/// composer holding a shared per-arm canonical tag across intra-file
/// theme tree nodes without atomic contention — reaches the substrate-
/// primitive [`Semantic::as_str`] accessor through this impl and no
/// other.
///
/// Extends the outside-`caixa-core` tier of the trait-idiomatic
/// [`std::rc::Rc<str>`] forward-projection axis onto its fifth peer,
/// following the first-mover `caixa_arch::invariants::InvariantKind`
/// pair (c71818b `{Self, &Self}` corner) that opened the tier, second-
/// peer `caixa_arch::report::ArchVerdict` pair (cc759ef), third-peer
/// [`crate::style::Semantic`]'s caixa-lint sibling `Severity` pair
/// (d7c58b6), and fourth-peer `caixa_lint::diagnostic::FixSafety` pair
/// (046cc5f) — after the axis opened on the structurally most
/// fundamental caixa-core-internal [`caixa_core::CaixaKind`] pair
/// (e04aff0), widened onto the second caixa-core-internal peer
/// [`caixa_core::CaixaDialeto`] (c5595e5), extended onto the first M3-
/// mesh-primitive-defining slot enum
/// [`caixa_core::aplicacao::PlacementStrategy`] (91b4c92), and further
/// widened onto the render-side `PathShapeViolation` (31fc43e) and the
/// caixa-core-internal two-list dep-graph `DepList` (38f6a3a). Matches
/// the trajectory the sibling atomically-reference-counted
/// [`std::sync::Arc<str>`] axis walked before it onto this same enum
/// (the paired `impl From<Semantic> for std::sync::Arc<str>` /
/// `impl From<&Semantic> for std::sync::Arc<str>` pair immediately
/// above).
///
/// Pinned load-bearing by
/// [`tests::semantic_from_into_rc_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`Semantic::as_str`] across the sixteen-arm
/// [`Semantic::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<Semantic> for std::rc::Rc<str> {
    fn from(sem: Semantic) -> std::rc::Rc<str> {
        std::rc::Rc::<str>::from(sem.as_str())
    }
}

/// Trait-idiomatic *borrowed-input, [`std::rc::Rc<str>`] output* forward
/// projection on the caixa-theme semantic-style sixteen-arm closed-set
/// fieldless typed enum [`Semantic`] — the borrowed-input companion to
/// the paired owned-input [`From<Semantic> for std::rc::Rc<str>`] impl
/// immediately above, closing the `{Self, &Self}` input-shape corner of
/// the outside-`caixa-core` tier of the [`std::rc::Rc<str>`] axis on the
/// fifth peer. Routes byte-for-byte through the substrate-primitive
/// [`Semantic::as_str`] `pub const fn` accessor via
/// [`std::rc::Rc::<str>::from`] on the returned `&'static str`, so a
/// `Semantic::ALL.iter().map(std::rc::Rc::<str>::from)`-shaped pipe
/// (whose iterator over `&'static [Semantic]` yields `&Semantic` by
/// construction) reaches the same sixteen canonical-lowercase kebab
/// byte-strings 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
/// [`Semantic::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((*sem).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 fifth peer of
/// the outside-`caixa-core` tier of the substrate-wide trait-idiomatic
/// [`std::rc::Rc<str>`] forward-projection campaign, matching the
/// trajectory the paired [`caixa_core::CaixaKind`] (e04aff0),
/// [`caixa_core::CaixaDialeto`] (c5595e5),
/// [`caixa_core::aplicacao::PlacementStrategy`] (91b4c92),
/// `caixa_arch::invariants::InvariantKind` (c71818b),
/// `caixa_arch::report::ArchVerdict` (cc759ef),
/// `caixa_lint::diagnostic::Severity` (d7c58b6),
/// `caixa_lint::diagnostic::FixSafety` (046cc5f),
/// `caixa_core::render::PathShapeViolation` (31fc43e), and
/// `caixa_core::dep::DepList` (38f6a3a) pairs walked before it on the
/// caixa-core-internal, M3-mesh-primitive-defining, render-side, and
/// outside-`caixa-core` tiers of the same axis. Leaves the last outside-
/// `caixa-core` closed-set fieldless typed enum peer
/// ([`caixa_provedor::FerriteRuntime`]) with a nine-peer `{Self, &Self}`
/// corner template to converge onto, closing the outside-`caixa-core`
/// tier of the [`std::rc::Rc<str>`] axis on the next commit.
///
/// Pinned load-bearing by
/// [`tests::semantic_from_borrowed_into_rc_str_routes_through_as_str_accessor`]
/// (byte-parity pin against [`Semantic::as_str`] across the sixteen-arm
/// [`Semantic::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<Semantic> 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
/// [`Semantic::ALL`] that resolves through the borrowed-input axis
/// without a spurious [`Copy`] deref).
impl From<&Semantic> for std::rc::Rc<str> {
    fn from(sem: &Semantic) -> std::rc::Rc<str> {
        std::rc::Rc::<str>::from(sem.as_str())
    }
}

/// Trait-idiomatic *byte-view* projection on the [`Semantic`] closed-set
/// caixa-theme semantic-style typed enum — routes byte-for-byte through
/// the substrate-primitive [`Semantic::as_str`] `pub const fn` accessor's
/// `.as_bytes()` byte-tail so every consumer that binds a [`Semantic`]
/// through the standard-library `<T: AsRef<[u8]>>` trait bound (a future
/// [`std::io::Write::write_all`]-bound theme-preview per-token byte-sink;
/// a byte-keyed [`std::collections::HashMap`] `<K: AsRef<[u8]>, V>`
/// per-semantic-arm palette-dispatch table lookup whose entry-key trait
/// bound rules out the sibling [`AsRef<str>`] str-view projection; a
/// future `blake3::Hasher::update` / `ring::digest::Context::update` /
/// `sha2::Sha256::update` byte-input surface on any future per-theme
/// content-address digest folded into a `caixa-lsp` semantic-token
/// audit closure) reaches the substrate primitive through one trait
/// dispatch rather than open-coding the two-hop `sem.as_str().as_bytes()`
/// composition at every call site.
///
/// Rust's standard library carries `impl AsRef<[u8]> for str` and
/// `impl AsRef<[u8]> for String`, so the two-hop composition
/// `sem.as_str().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 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. 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
/// `Namespace` tier between [`Semantic::Symbol`] and
/// [`Semantic::KeywordArg`] for the M4 tatara-lisp module system's
/// qualified-name semantic-token dispatch, a `Deleted` tier for a
/// hard-delete-mark distinct from [`Semantic::Removed`] the future
/// 3-way diff surface grows — both trajectory items the sibling
/// [`Semantic::ALL`] doc block already names) grows the byte-view axis
/// through one edit on the substrate-primitive [`Semantic::as_str`]
/// accessor.
///
/// Extends the substrate-wide trait-idiomatic byte-view axis onto the
/// *fifth outside-caixa-core* closed-set fieldless typed enum on the
/// caixa surface — matching the trajectory the caixa-core-internal
/// [`caixa_core::CaixaKind`] first-mover impl (69d8d86),
/// [`caixa_core::CaixaDialeto`] second-mover impl (8151347),
/// [`caixa_core::dep::DepList`] third-mover impl (05ffaca), the
/// M3-mesh-primitive-defining
/// [`caixa_core::aplicacao::PlacementStrategy`] impl (daa8705),
/// [`caixa_core::aplicacao::RateLimitUnit`] impl (4867e0f), the first-
/// mover outside-caixa-core [`caixa_arch::invariants::InvariantKind`]
/// impl (b5baf7d), the second-mover outside-caixa-core
/// [`caixa_arch::report::ArchVerdict`] impl (0e0057a), the third-mover
/// outside-caixa-core `caixa_lint::Severity` impl (1e65136), and the
/// fourth-mover outside-caixa-core `caixa_lint::FixSafety` impl
/// (1da1afc) walked before it, plus the M2-OTP-shape
/// [`caixa_core::supervisor::RestartStrategy`] (cd4c4e0) +
/// [`caixa_core::supervisor::RestartPolicy`] (98b08fa), the
/// M3-mesh-contratos [`caixa_core::aplicacao::WitShape`] (0e2d0f2), and
/// the render-side [`caixa_core::render::PathShapeViolation`] (2c58220)
/// peers. The paired [`Semantic::as_str`] accessor returns the canonical
/// lowercase-kebab wire byte-string (`"keyword"` / `"symbol"` /
/// `"keyword-arg"` / `"string"` / `"number"` / `"literal"` / `"comment"`
/// / `"accent"` / `"muted"` / `"error"` / `"warning"` / `"info"` /
/// `"hint"` / `"added"` / `"removed"` / `"unchanged"`) every
/// `blackmatter-shell` `data-semantic="<kebab>"` DOM emit site, every
/// `caixa-lsp`-side per-`SemanticTokenType` registration, every
/// `feira lint --list-styles` per-arm enumeration, and every future M4
/// theme-overlay re-loader keys off. Leaves the last outside-`caixa-core`
/// closed-set fieldless typed-enum peer ([`caixa_provedor::FerriteRuntime`])
/// as the campaign's next mechanical one-impl extension against the
/// substrate-primitive `as_str` accessor it already carries.
///
/// Pinned load-bearing by
/// [`tests::semantic_as_ref_bytes_routes_through_as_str_accessor`]
/// (fail-before-pass-after byte-parity pin against [`Semantic::as_str`]
/// `.as_bytes()` across the sixteen-arm [`Semantic::ALL`] emit-set,
/// cross-axis witness against the paired str-view [`AsRef<str>`] /
/// [`std::fmt::Display`] / [`Semantic::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
/// on both owned and borrowed input surfaces, 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).
impl AsRef<[u8]> for Semantic {
    fn as_ref(&self) -> &[u8] {
        self.as_str().as_bytes()
    }
}

/// Trait-idiomatic *owned-input, owned-`Vec<u8>` output* byte-owned reverse
/// projection on the [`Semantic`] closed-set caixa-theme semantic-style typed
/// enum — routes byte-for-byte through the substrate-primitive
/// [`Semantic::as_str`] `pub const fn` accessor via [`str::as_bytes`] +
/// [`slice::to_vec`] so every consumer that binds a [`Semantic`] through the
/// standard-library `<T: Into<Vec<u8>>>` trait bound (a future
/// [`std::io::Write::write_all`]-shape per-theme audit-log byte-sink whose
/// input parameter is an owned [`Vec<u8>`] payload, a future
/// `bytes::Bytes::from(Vec::<u8>::from(semantic))` composer folding the
/// per-arm byte-tag into the [`bytes::Bytes`] framing surface, a future
/// `hasher.update(&Vec::<u8>::from(semantic))`-shape BLAKE3 per-theme
/// content-address closure that needs the owned byte-tail buffered before
/// folding into the [`caixa_lacre::Lacre`] closure body) reaches the same
/// sixteen-arm canonical-lowercase kebab byte-string emit-set the paired
/// [`AsRef<[u8]>`] borrowed byte-view axis (2c58220) and the six str-owned
/// reverse-projection corners already return, rather than an open-coded
/// per-call-site `semantic.as_str().as_bytes().to_vec()` composition whose
/// type bounds have no compile-time link back to the substrate primitive.
///
/// Extends the substrate-wide trait-idiomatic byte-owned reverse-projection
/// axis onto the *fifth outside-`caixa-core`* closed-set fieldless typed-enum
/// peer — matching the trajectory the caixa-core-internal
/// [`caixa_core::CaixaKind`] first-mover (b245fd6),
/// [`caixa_core::CaixaDialeto`] (4cceaf5),
/// [`caixa_core::dep::DepList`] (e974ca2), the M2-OTP-shape
/// [`caixa_core::supervisor::RestartStrategy`] (63e5dd0) /
/// [`caixa_core::supervisor::RestartPolicy`] (96a522a),
/// the M3-mesh-primitive-defining
/// [`caixa_core::aplicacao::PlacementStrategy`] (008a35b) /
/// [`caixa_core::aplicacao::RateLimitUnit`] (602ae0b) /
/// [`caixa_core::aplicacao::WitShape`] (7b4b278), the outside-`caixa-core`
/// first-mover `caixa_arch::invariants::InvariantKind` (ed29f5a), the
/// second-mover `caixa_arch::report::ArchVerdict` (5268ed1), the third-mover
/// `caixa_lint::Severity` (3aa6644), the fourth-mover `caixa_lint::FixSafety`
/// (38060a4), and the render-side [`caixa_core::render::PathShapeViolation`]
/// (c98fb87) peers walked before it. Leaves the last outside-`caixa-core`
/// closed-set fieldless typed-enum peer ([`caixa_provedor::FerriteRuntime`])
/// as the campaign's next mechanical one-lift extension against the
/// substrate-primitive `as_str` accessor it already carries — tracking the
/// paired byte-view axis's outside-`caixa-core` sweep verbatim.
///
/// Pinned load-bearing by
/// [`tests::semantic_from_into_owned_vec_bytes_routes_through_as_str_accessor`]
/// (byte-parity pin against [`Semantic::as_str`] across the sixteen-arm
/// [`Semantic::ALL`] emit-set binding the byte-owned reverse-projection axis
/// against the paired [`AsRef<[u8]>`] borrowed byte-view axis and the
/// str-owned reverse-projection family's `.into_bytes()` /
/// `.as_bytes().to_vec()` byte-tails, plus a `<T: Into<Vec<u8>>>`-bound
/// generic-consumer witness on both owned and borrowed input shapes).
impl From<Semantic> for Vec<u8> {
    fn from(semantic: Semantic) -> Vec<u8> {
        semantic.as_str().as_bytes().to_vec()
    }
}

/// Trait-idiomatic *borrowed-input, owned-`Vec<u8>` output* byte-owned reverse
/// projection on [`Semantic`] — the borrowed-input peer of
/// [`From<Semantic> 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 [`Semantic::as_str`] `pub const fn`
/// accessor so every consumer that holds a borrowed [`&Semantic`] and needs
/// an owned [`Vec<u8>`] — a future `.iter().map(Vec::<u8>::from).collect()`
/// pipe over `&[Semantic]` (whose iterator yields `&Semantic`, not
/// `Semantic`, so the owned-input axis alone forces every call site through
/// an explicit `.copied()` restatement rather than the direct
/// trait-idiomatic projection), a future `feira lint --list-styles` byte
/// emitter walking [`Semantic::ALL`] through an `Into<Vec<u8>>`-bound
/// per-arm byte-writer to surface the accepted semantic-style tag set —
/// reaches the same sixteen-arm canonical-lowercase kebab byte-string
/// emit-set the paired owned-input peer already returns.
impl From<&Semantic> for Vec<u8> {
    fn from(semantic: &Semantic) -> Vec<u8> {
        semantic.as_str().as_bytes().to_vec()
    }
}

/// Trait-idiomatic *borrowed byte-slice* reverse projection on the
/// [`Semantic`] closed-set caixa-theme semantic-style typed enum —
/// routes byte-for-byte through [`std::str::from_utf8`] +
/// the substrate-primitive [`Semantic::from_wire`] `Option<Self>`
/// accessor, so `<Semantic as TryFrom<&[u8]>>::try_from(bytes)`
/// reaches the same sixteen-arm canonical-lowercase-kebab wire-form
/// accept-set the sibling method-named [`Semantic::from_wire`]
/// resolver and the paired [`TryFrom<&str>`] impl already resolve
/// against. Both rejection paths (invalid UTF-8 and valid-UTF-8-but-
/// unknown-wire) collapse onto the single unit-error `Err(())`
/// return, matching the trait-idiomatic-`()`-error shape the
/// substrate-wide sibling `TryFrom<&[u8]>` impls carry.
///
/// Extends the substrate-wide trait-idiomatic byte-view reverse-
/// projection axis onto the *fifth* outside-`caixa-core` closed-set
/// fieldless typed-enum peer (and the first inside `caixa-theme`):
/// the sixteen-arm caixa-theme semantic-style accept-set every
/// per-`Semantic` paint dispatch, every future `caixa-lsp`-side
/// per-`SemanticTokenType` wire-up, every future `caixa.nvim` per-
/// highlight-group re-loader, and every future `blackmatter-shell`
/// per-arm `data-semantic="<kebab>"` DOM-attribute re-loader
/// dispatches through — matching the trajectory the first-mover
/// outside-`caixa-core` [`caixa_arch::invariants::InvariantKind`]
/// `TryFrom<&[u8]>` impl (40b7417), second-mover outside-`caixa-core`
/// [`caixa_arch::report::ArchVerdict`] `TryFrom<&[u8]>` impl
/// (4dbca85), third-mover outside-`caixa-core`
/// `caixa_lint::diagnostic::Severity` `TryFrom<&[u8]>` impl (f11dc96),
/// and fourth-mover outside-`caixa-core`
/// `caixa_lint::diagnostic::FixSafety` `TryFrom<&[u8]>` impl
/// (46a3e3e) walked before it. Leaves the last outside-`caixa-core`
/// closed-set fieldless typed-enum peer
/// ([`caixa_provedor::FerriteRuntime`]) as the campaign's next
/// mechanical one-lift extension — tracking the paired byte-owned
/// axis's outside-`caixa-core` sweep verbatim.
///
/// Pinned load-bearing by
/// [`tests::semantic_try_from_bytes_routes_through_from_wire_accessor`]
/// (byte-parity pin against [`Semantic::from_wire`] across the
/// sixteen-arm [`Semantic::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 a forward/reverse
/// byte-view cross-axis witness that feeding the paired
/// [`AsRef<[u8]>`] byte-tail and the paired
/// [`From<Semantic> for Vec<u8>`] and [`From<&Semantic> for Vec<u8>`]
/// owned byte-tails back through the new impl round-trips to the
/// originating arm) and
/// [`tests::semantic_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 — the latter mirrors the corpus the
/// paired [`TryFrom<&str>`] rejection witness already pins, including
/// the trajectory-item candidates `b"namespace"` / `b"deleted"` the
/// sibling [`Semantic::ALL`] doc block already names and sibling
/// closed-set canonical tags on other axes so a byte-level cross-
/// axis leak trips at caixa-theme test time rather than at a
/// downstream consumer's silent misclassification).
impl TryFrom<&[u8]> for Semantic {
    type Error = ();

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

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

    #[test]
    fn semantic_all_enumerates_every_variant_in_declaration_order() {
        // Fail-before-pass-after pin on the [`Semantic::ALL`] slice:
        // the slice must list every one of the 15 variants in
        // declaration order (Keyword → Symbol → KeywordArg → String →
        // Number → Literal → Comment → Accent → Muted → Error →
        // Warning → Info → Hint → Added → Removed → Unchanged). Peer
        // of the sibling ALL slices on the closed-set typed-enum
        // discriminator axes ([`caixa_core::CaixaKind::ALL`],
        // [`caixa_core::supervisor::RestartStrategy::ALL`],
        // [`caixa_core::supervisor::RestartPolicy::ALL`],
        // [`caixa_core::aplicacao::PlacementStrategy::ALL`],
        // [`caixa_core::upgrade::UpgradeInstruction::ALL`]). A future
        // arm addition (a `Namespace` tier between `Symbol` and
        // `KeywordArg` for the M4 tatara-lisp module system's
        // qualified-name semantic-token dispatch, a `Deleted` tier
        // for a hard-delete-mark distinct from `Removed` the future
        // 3-way diff surface grows) that lands the arm on the enum
        // but forgets to extend `ALL` must trip this pin rather than
        // surface as a downstream consumer's silently-partial
        // iteration.
        assert_eq!(
            Semantic::ALL,
            &[
                Semantic::Keyword,
                Semantic::Symbol,
                Semantic::KeywordArg,
                Semantic::String,
                Semantic::Number,
                Semantic::Literal,
                Semantic::Comment,
                Semantic::Accent,
                Semantic::Muted,
                Semantic::Error,
                Semantic::Warning,
                Semantic::Info,
                Semantic::Hint,
                Semantic::Added,
                Semantic::Removed,
                Semantic::Unchanged,
            ],
        );
        // Also pin the per-arm `IsVariant`-derived partition: every
        // arm in `ALL` must satisfy exactly one of the 15 generated
        // arm-discriminator predicates.
        for variant in Semantic::ALL {
            let row = [
                variant.is_keyword(),
                variant.is_symbol(),
                variant.is_keyword_arg(),
                variant.is_string(),
                variant.is_number(),
                variant.is_literal(),
                variant.is_comment(),
                variant.is_accent(),
                variant.is_muted(),
                variant.is_error(),
                variant.is_warning(),
                variant.is_info(),
                variant.is_hint(),
                variant.is_added(),
                variant.is_removed(),
                variant.is_unchanged(),
            ];
            let hits = row.iter().filter(|b| **b).count();
            assert_eq!(
                hits, 1,
                "Semantic::{variant:?} must satisfy exactly one of the \
                 15 is_* arm-discriminator predicates; got {row:?}",
            );
        }
    }

    #[test]
    fn semantic_is_variant_predicates_partition_the_arm_set() {
        // Fail-before-pass-after pin on the [`gen_platform::IsVariant`]
        // derive: for each of the 15 variants, exactly one of the
        // generated is_* predicates returns `true` and the other 14
        // return `false`. Pre-derive the closed 15-arm partition
        // lived only inside the two theme overlays' 15-arm match
        // resolvers; a future rebrand (a `#[is_variant(name = "…")]`
        // drift, a manual hand-rolled `impl` that shadows the
        // derive-generated method, an arm rename) trips this pin at
        // caixa-theme build time rather than surfacing far from the
        // derive declaration. Peer of the sibling
        // [`caixa_core::CaixaKind`] `IsVariant` partition pin.
        // A copy-paste flip that reroutes one arm through the wrong
        // predicate lane trips at the identity-diagonal assertion,
        // since each variant's row is generated live from `ALL`'s
        // declaration order rather than transcribed by hand.
        for (idx, variant) in Semantic::ALL.iter().enumerate() {
            let observed: [bool; 16] = [
                variant.is_keyword(),
                variant.is_symbol(),
                variant.is_keyword_arg(),
                variant.is_string(),
                variant.is_number(),
                variant.is_literal(),
                variant.is_comment(),
                variant.is_accent(),
                variant.is_muted(),
                variant.is_error(),
                variant.is_warning(),
                variant.is_info(),
                variant.is_hint(),
                variant.is_added(),
                variant.is_removed(),
                variant.is_unchanged(),
            ];
            let mut expected = [false; 16];
            expected[idx] = true;
            assert_eq!(
                observed, expected,
                "Semantic::{variant:?} at ALL[{idx}] is_* predicates \
                 must fire only on their own arm lane (identity \
                 diagonal); got {observed:?}",
            );
        }
    }

    #[test]
    fn semantic_as_str_returns_canonical_kebab_case_per_arm() {
        // Fail-before-pass-after per-arm byte-string pin on
        // [`Semantic::as_str`] — the substrate-canonical `&'static str`
        // projection every downstream consumer of the closed 16-arm
        // partition reaches through. A future arm rename (a `Symbol` →
        // `Identifier` rebrand tracking a hypothetical LSP-side
        // `SemanticTokenType` reshuffle, an `Accent` → `Highlight`
        // rebrand tracking a `blackmatter-shell` classname rework) that
        // touches the enum arm but forgets to update the paired
        // `as_str` arm — or vice versa — trips this pin at caixa-theme
        // build time rather than surfacing as a downstream
        // `feira lint --list-styles` operator-facing enumeration verb's
        // silently-renamed row far from the two-declaration site.
        //
        // Kebab-case matches the peer [`gen_platform::IsVariant`]-
        // derived kebab discriminant convention the sibling closed-set
        // typed enums already emit on their canonical byte-string
        // projection axis.
        assert_eq!(Semantic::Keyword.as_str(), "keyword");
        assert_eq!(Semantic::Symbol.as_str(), "symbol");
        assert_eq!(Semantic::KeywordArg.as_str(), "keyword-arg");
        assert_eq!(Semantic::String.as_str(), "string");
        assert_eq!(Semantic::Number.as_str(), "number");
        assert_eq!(Semantic::Literal.as_str(), "literal");
        assert_eq!(Semantic::Comment.as_str(), "comment");
        assert_eq!(Semantic::Accent.as_str(), "accent");
        assert_eq!(Semantic::Muted.as_str(), "muted");
        assert_eq!(Semantic::Error.as_str(), "error");
        assert_eq!(Semantic::Warning.as_str(), "warning");
        assert_eq!(Semantic::Info.as_str(), "info");
        assert_eq!(Semantic::Hint.as_str(), "hint");
        assert_eq!(Semantic::Added.as_str(), "added");
        assert_eq!(Semantic::Removed.as_str(), "removed");
        assert_eq!(Semantic::Unchanged.as_str(), "unchanged");
    }

    #[test]
    fn semantic_as_str_projections_are_all_distinct_across_arms() {
        // Fail-before-pass-after pin on the injectivity of
        // [`Semantic::as_str`]'s projection — no two arms may share
        // their canonical kebab byte-string, since a future consumer
        // that keys a per-arm dispatch table off the projection (a
        // `HashMap::<&str, _>::from_iter(Semantic::ALL.iter().map(|s|
        // (s.as_str(), …)))` style-lookup, a future `caixa-lsp`
        // `SemanticTokenType::new(sem.as_ref())` registration table
        // keyed by kebab identifier, a future `feira lint --list-styles`
        // one-row-per-arm enumeration table) would silently collapse
        // the two colliding arms onto one entry, dropping the second
        // insertion. A future arm addition (a `Namespace` tier between
        // `Symbol` and `KeywordArg` for the M4 tatara-lisp module
        // system's qualified-name semantic-token dispatch, a `Deleted`
        // tier for a hard-delete-mark distinct from `Removed` a future
        // 3-way diff surface grows) that lands the arm on the enum and
        // reuses a peer arm's kebab identifier (a copy-paste-derived
        // `"removed"` on the new `Deleted` arm) trips this pin rather
        // than surfacing far from the arm addition site.
        let mut projections: Vec<&'static str> = Semantic::ALL.iter().map(|s| s.as_str()).collect();
        let before = projections.len();
        projections.sort_unstable();
        projections.dedup();
        assert_eq!(
            projections.len(),
            before,
            "Semantic::as_str must be injective across ALL — collisions: \
             {projections:?}",
        );
    }

    #[test]
    fn semantic_display_and_as_ref_str_route_through_as_str_accessor() {
        // Fail-before-pass-after three-path convergence pin on the
        // substrate-wide `(as_str, AsRef<str>, Display)` canonical-
        // projection triple for the caixa-theme [`Semantic`] closed-set
        // fieldless typed enum. For every arm in [`Semantic::ALL`], the
        // paired [`std::fmt::Display`] impl + [`AsRef<str>`] impl + the
        // substrate-canonical [`Semantic::as_str`] `pub const fn`
        // scalar accessor must resolve to the same `&'static str`
        // per arm. Peer of the sibling three-path-convergence pins the
        // substrate carries on the closed-set typed enums the prior
        // lifts converged onto
        // (`restart_strategy_display_routes_through_as_str_helper` /
        // `restart_strategy_as_ref_str_routes_through_as_str_accessor`
        // on [`caixa_core::supervisor::RestartStrategy`],
        // `ferrite_runtime_display_and_as_ref_str_route_through_variant_slug_accessor`
        // on `caixa_provedor::FerriteRuntime`, and the analogous pins
        // on `caixa_lint::Severity` / `caixa_lint::FixSafety` /
        // `caixa_arch::InvariantKind` / `caixa_arch::ArchVerdict`).
        //
        // A future accidental split (a hand-rolled `impl fmt::Display`
        // that shadows this route through a divergent per-arm match, an
        // `impl AsRef<str>` that returns the compiler-derived `Debug`
        // string via `format!("{:?}", self)` — allocating and diverging
        // on every arm — or a `#[serde(rename_all = "…")]` attribute
        // drift that quietly forks the projection) trips this pin at
        // caixa-theme build time rather than surfacing as a downstream
        // consumer's silently-forked per-Semantic dispatch far from the
        // trait-impl declaration site.
        for &sem in Semantic::ALL {
            let via_as_str: &str = sem.as_str();
            let via_display: String = format!("{sem}");
            let via_as_ref: &str = <Semantic as AsRef<str>>::as_ref(&sem);
            assert_eq!(
                via_display, via_as_str,
                "Semantic::{sem:?} — Display routes off `as_str`; got \
                 Display={via_display:?} vs as_str={via_as_str:?}",
            );
            assert_eq!(
                via_as_ref, via_as_str,
                "Semantic::{sem:?} — AsRef<str> routes off `as_str`; got \
                 AsRef={via_as_ref:?} vs as_str={via_as_str:?}",
            );
        }
    }

    #[test]
    fn semantic_as_str_is_usable_in_const_context() {
        // The [`Semantic::as_str`] accessor is declared `pub const fn`,
        // matching the peer closed-set typed enums' canonical
        // `&'static str` projection accessors
        // ([`caixa_core::CaixaKind::as_str`],
        // [`caixa_core::supervisor::RestartStrategy::as_str`],
        // [`caixa_core::aplicacao::PlacementStrategy::as_str`],
        // `caixa_provedor::FerriteRuntime::variant_slug`). Pin the
        // same posture with a `const {}` assertion block so a future
        // accidental downgrade to non-`const` (an added runtime helper
        // reachable only from a non-`const` context) trips at
        // caixa-theme build time rather than surfacing as a downstream
        // `const`-context regression far from the accessor
        // declaration.
        const KEYWORD: &str = Semantic::Keyword.as_str();
        const ERROR: &str = Semantic::Error.as_str();
        const UNCHANGED: &str = Semantic::Unchanged.as_str();
        const { assert!(KEYWORD.as_bytes()[0] == b'k') };
        const { assert!(ERROR.as_bytes()[0] == b'e') };
        const { assert!(UNCHANGED.as_bytes()[0] == b'u') };
    }

    #[test]
    fn semantic_from_wire_accepts_every_as_str_output() {
        // Fail-before-pass-after per-arm accept pin on the newly lifted
        // [`Semantic::from_wire`] reverse projection: every arm in
        // [`Semantic::ALL`] must parse back through `from_wire` when fed
        // its own [`Semantic::as_str`] output, landing on
        // `Some(same_variant)`. A regression that hand-rolled either
        // side's per-arm match without threading through the shared
        // 16-string closed set would silently disagree on any future
        // arm rename (a `Symbol` → `Identifier` rebrand tracking a
        // hypothetical LSP-side `SemanticTokenType` reshuffle, an
        // `Accent` → `Highlight` rebrand tracking a `blackmatter-shell`
        // classname rework) or new arm the theme grows (a `Namespace`
        // tier between `Symbol` and `KeywordArg` for the M4 tatara-lisp
        // module system's qualified-name semantic-token dispatch, a
        // `Deleted` tier for a hard-delete-mark distinct from `Removed`
        // the future 3-way diff surface grows) and this pin flags it at
        // caixa-theme build time rather than at a downstream
        // `feira lint --list-styles` operator-facing enumeration verb's
        // silent tag misclassification.
        //
        // Peer of the sibling
        // `caixa_lint::diagnostic::tests::severity_from_wire_accepts_every_as_str_output`
        // (5afff0e) /
        // `caixa_lint::diagnostic::tests::fix_safety_from_wire_accepts_every_as_str_output`
        // (bd505a1) /
        // `caixa_arch::report::tests::arch_verdict_from_wire_accepts_every_as_str_output`
        // (6afe564) /
        // `caixa_arch::invariants::tests::invariant_kind_from_wire_accepts_every_as_str_output`
        // (b9e4e61) round-trip pins on the peer caixa-lint / caixa-arch
        // closed-set-enum reverse-projection axes, and of the sibling
        // `caixa_core::kind::tests::caixa_kind_wire_round_trips_through_from_wire`
        // (2aa6d23) /
        // `caixa_core::dialeto::tests::caixa_dialeto_from_wire_accepts_every_as_str_output`
        // (d0e65ea) /
        // `caixa_core::aplicacao::tests::placement_strategy_from_wire_accepts_every_lifted_constant`
        // (18c7342) /
        // `caixa_core::dep::tests::dep_list_round_trips_through_as_str_and_from_wire`
        // (45ee563) /
        // `caixa_core::render::tests::path_shape_violation_from_wire_accepts_every_as_str_output`
        // (aebd9c6) round-trip pins on the sibling caixa-core closed-
        // set typed-enum reverse-projection axes.
        for &variant in Semantic::ALL {
            let wire = variant.as_str();
            let parsed = Semantic::from_wire(wire).unwrap_or_else(|| {
                panic!(
                    "Semantic::from_wire({wire:?}) must accept every \
                     Semantic::as_str output — got None for the wire \
                     byte-string of {variant:?}"
                )
            });
            assert_eq!(
                parsed, variant,
                "Semantic::from_wire(Semantic::{variant:?}.as_str()) \
                 must return Semantic::{variant:?} — the (as_str, \
                 from_wire) pair must form a total round-trip on the \
                 closed 16-arm Semantic arm-set",
            );
        }
    }

    #[test]
    fn semantic_from_wire_rejects_unknown_byte_strings() {
        // Rejection pin on the [`Semantic::from_wire`] parser's accept-
        // set: any string outside the 16-arm [`Semantic::as_str`] output
        // set must return `None`. A future accidental widening of the
        // accept-set (a case-insensitive match that accepts `"KEYWORD"`
        // / `"Keyword"`, a silent acceptance of the pre-lift PascalCase
        // Debug-derived shapes `"Keyword"` / `"KeywordArg"` /
        // `"Unchanged"` on the wire axis, a snake_case drift accepting
        // `"keyword_arg"` beside the canonical kebab-case
        // `"keyword-arg"`, a Levenshtein-forgiving arm-lookup that
        // admits `"kewyord"` typos, a silent absorption of a hypothetical
        // future `Namespace` / `Deleted` arm before it lands on the enum
        // and its paired [`Semantic::as_str`] emitter arm) would
        // silently drift the parser's accept-set from the emitter's — a
        // downstream style-report re-loader that bound a prior report's
        // [`Self::as_str`] output back to the typed enum through this
        // parser would then bind a malformed byte-string to a plausibly-
        // wrong typed arm the caller does not route through any
        // fallback, silently misclassifying the reloaded row.
        //
        // Peer of the sibling
        // `caixa_lint::diagnostic::tests::severity_from_wire_rejects_unknown_byte_strings`
        // (5afff0e) /
        // `caixa_lint::diagnostic::tests::fix_safety_from_wire_rejects_unknown_byte_strings`
        // (bd505a1) /
        // `caixa_arch::report::tests::arch_verdict_from_wire_rejects_unknown_byte_strings`
        // (6afe564) /
        // `caixa_arch::invariants::tests::invariant_kind_from_wire_rejects_unknown_byte_strings`
        // (b9e4e61) rejection pins on the peer caixa-lint / caixa-arch
        // axes, and of the sibling
        // `caixa_kind_from_wire_rejects_unknown_byte_strings` (2aa6d23),
        // `caixa_dialeto_from_wire_rejects_unknown_byte_strings`
        // (d0e65ea),
        // `placement_strategy_from_wire_rejects_unknown_byte_strings`
        // (18c7342),
        // `dep_list_from_wire_returns_none_on_unknown_wire_scalar`
        // (45ee563), and
        // `path_shape_violation_from_wire_rejects_unknown_byte_strings`
        // (aebd9c6) rejection pins on the sibling caixa-core axes.
        //
        // The rejection set also covers overlapping-byte-string tags
        // from peer axes: caixa-lint `Severity::as_str` outputs
        // `"error"`/`"warning"`/`"info"`/`"hint"` and caixa-arch
        // `InvariantKind::as_str` outputs `"safety"`/`"compliance"`
        // share zero canonical byte-strings with the widened 16-arm
        // Semantic set here — a widened parser that admitted the peer's
        // arm on the sibling axis would still not admit an arm foreign
        // to the caixa-theme semantic-style discriminator's own accept-
        // set. Yet four peer-axis strings DO overlap with the
        // caixa-theme set here (`Severity`'s
        // `"error"`/`"warning"`/`"info"`/`"hint"` map identically onto
        // the caixa-theme diagnostic-severity sub-region
        // `Semantic::Error`/`Warning`/`Info`/`Hint`) — a widened parser
        // that admitted them under a different arm would collapse the
        // two axes and silently mislabel; the pin excludes those four
        // from the rejection set precisely because they must accept.
        for bad in [
            "",
            " ",
            "Keyword",
            "KEYWORD",
            "Symbol",
            "SYMBOL",
            "KeywordArg",
            "keyword_arg",
            "keywordarg",
            "String",
            "STRING",
            "Number",
            "Literal",
            "Comment",
            "Accent",
            "Muted",
            "Error",
            "ERROR",
            "Warning",
            "WARNING",
            "Info",
            "INFO",
            "Hint",
            "HINT",
            "Added",
            "ADDED",
            "Removed",
            "REMOVED",
            "Unchanged",
            "UNCHANGED",
            "kewyord",
            "sym",
            "kw",
            "str",
            "num",
            "lit",
            "cmt",
            "safe",
            "unsafe",
            "safety",
            "compliance",
            "proven",
            "rejected",
            "namespace",
            "deleted",
            "highlight",
            "identifier",
            "keyword ",
            " keyword",
            "keyword\n",
            "keyword\t",
            "keyword-arg ",
            " keyword-arg",
            "added ",
            " added",
            "unchanged ",
            " unchanged",
        ] {
            assert!(
                Semantic::from_wire(bad).is_none(),
                "Semantic::from_wire({bad:?}) must return None — the \
                 parser's accept-set is exactly the 16 Semantic::as_str \
                 outputs; a widening would silently split the parser's \
                 accept-set from the emitter's arm-set",
            );
        }
    }

    #[test]
    fn semantic_is_variant_predicates_are_const_fn() {
        // The [`gen_platform::IsVariant`] derive emits `const fn`
        // predicates on the peer [`caixa_core::CaixaKind`] /
        // [`caixa_core::upgrade::UpgradeInstruction`] /
        // [`caixa_core::supervisor::RestartStrategy`] /
        // [`caixa_core::supervisor::RestartPolicy`] closed-set typed
        // enums — pin the same posture on [`Semantic`] 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-theme build time rather than surfacing as a
        // downstream `const`-context regression far from the derive
        // declaration.
        const { assert!(Semantic::Keyword.is_keyword()) };
        const { assert!(Semantic::Error.is_error()) };
        const { assert!(Semantic::Added.is_added()) };
        const { assert!(Semantic::Unchanged.is_unchanged()) };
    }

    #[test]
    fn semantic_try_from_str_routes_through_from_wire_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl TryFrom<&str> for Semantic` — asserts the standard-
        // library trait impl and the substrate-primitive
        // [`super::Semantic::from_wire`] `Option<Self>` accessor
        // resolve to the same 16-arm accept-set across every arm the
        // exhaustive [`super::Semantic::ALL`] slice enumerates. Any
        // future silent detour that routes the trait impl through a
        // divergent projection (a per-arm inline `match s { "keyword"
        // => Ok(Self::Keyword), … }` re-inlining that opens a
        // compile-time link to the un-lifted arm-literal, a silent
        // case-fold that admits `"Keyword"` / `"KEYWORD"` and would
        // collide the canonical-lowercase accept-set the emitter
        // dispatches on) trips at caixa-theme test time under
        // `assert_eq!` rather than at a downstream
        // `impl TryFrom<&str>`-bound consumer's silent split. Sweeps
        // every one of the 16 arms [`super::Semantic::ALL`] carries so
        // no arm's projection is covered only by the sibling method-
        // named `from_wire` path.
        //
        // Peer of the sibling
        // [`caixa_core::kind::tests::caixa_kind_try_from_str_routes_through_from_wire_accessor`]
        // (3c83606),
        // [`caixa_core::dialeto::tests::caixa_dialeto_try_from_str_routes_through_from_wire_accessor`]
        // (bf33136),
        // `placement_strategy_try_from_str_routes_through_from_wire_accessor`
        // (6fd00cd),
        // `rate_limit_unit_try_from_str_routes_through_from_suffix_accessor`
        // (bf78400),
        // `path_shape_violation_try_from_str_routes_through_from_wire_accessor`
        // (e67e48a),
        // `caixa_arch::invariants::tests::invariant_kind_try_from_str_routes_through_from_wire_accessor`
        // (e21a857),
        // `caixa_arch::report::tests::arch_verdict_try_from_str_routes_through_from_wire_accessor`
        // (0a4cc45),
        // `caixa_lint::diagnostic::tests::severity_try_from_str_routes_through_from_wire_accessor`
        // (a7bf74c), and
        // `caixa_lint::diagnostic::tests::fix_safety_try_from_str_routes_through_from_wire_accessor`
        // (df86c94) — extends the trait-idiomatic reverse-projection
        // axis onto the first closed-set fieldless typed enum on the
        // caixa-theme surface (the semantic-style axis).
        for &variant in Semantic::ALL {
            let wire = variant.as_str();
            assert_eq!(
                <Semantic as TryFrom<&str>>::try_from(wire),
                Ok(variant),
                "TryFrom<&str> impl on Semantic must round-trip \
                 Semantic::{variant:?}.as_str() = {wire:?} back to \
                 Ok(Semantic::{variant:?}) — divergence from \
                 Semantic::from_wire signals a silent detour off the \
                 substrate-primitive accessor",
            );
            assert_eq!(
                <Semantic as TryFrom<&str>>::try_from(wire).ok(),
                Semantic::from_wire(wire),
                "TryFrom<&str> ok()-projection on {wire:?} must \
                 byte-equal Semantic::from_wire on the same input",
            );
        }
    }

    #[test]
    fn semantic_try_from_str_rejects_unknown_byte_strings() {
        // Rejection witness on the `impl TryFrom<&str> for Semantic` —
        // sweeps a candidate set of byte-strings outside the 16-arm
        // canonical-lowercase kebab wire accept-set the sibling
        // [`super::Semantic::as_str`] 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("keyword") => Ok(…)` case-fold
        // path, a silent acceptance of the pre-lift PascalCase Debug-
        // derived shapes `"Keyword"` / `"Symbol"` / `"KeywordArg"` on
        // the wire axis, a Levenshtein-forgiving arm-lookup that
        // admits `"kwd"` / `"sym"` / `"kw"` typos — the exact form a
        // `format!("{:?}", …).to_lowercase()` round-trip on the paired
        // [`std::fmt::Debug`] derive would otherwise land on) trips at
        // caixa-theme test time. The candidate set includes the empty
        // string, whitespace-only padding, uppercase / PascalCase
        // rebrand candidates, Levenshtein-neighbor typos, sibling
        // closed-set-enum canonical tags not shared with this axis
        // (peer `caixa_lint::diagnostic::FixSafety::as_str` two-arm
        // `"safe"` / `"unsafe"`, peer `caixa_arch::InvariantKind::as_str`
        // three-arm `"safety"` / `"compliance"`, peer
        // `caixa_arch::ArchVerdict::as_str` two-arm `"proven"` /
        // `"rejected"`), the trajectory-item candidates
        // (`"namespace"`, `"deleted"`) the sibling [`Semantic::ALL`]
        // doc block already names, whitespace-padded canonical tags,
        // and CamelCase spellings of the multi-word `KeywordArg`
        // variant (`"KeywordArg"`, `"keywordarg"`, `"keyword_arg"`,
        // `"keyword.arg"`) that would silently admit
        // if the accept-set widened to a case-fold or separator-
        // normalization rule.
        //
        // Peer of the sibling
        // `caixa_kind_try_from_str_rejects_unknown_byte_strings`
        // (3c83606),
        // `caixa_dialeto_try_from_str_rejects_unknown_byte_strings`
        // (bf33136),
        // `rate_limit_unit_try_from_str_rejects_unknown_byte_strings`
        // (bf78400),
        // `path_shape_violation_try_from_str_rejects_unknown_byte_strings`
        // (e67e48a),
        // `invariant_kind_try_from_str_rejects_unknown_byte_strings`
        // (e21a857),
        // `arch_verdict_try_from_str_rejects_unknown_byte_strings`
        // (0a4cc45),
        // `severity_try_from_str_rejects_unknown_byte_strings`
        // (a7bf74c), and
        // `fix_safety_try_from_str_rejects_unknown_byte_strings`
        // (df86c94) rejection pins on the sibling closed-set typed-
        // enum trait-idiomatic reverse-projection axes.
        for bad in [
            "",
            " ",
            "Keyword",
            "KEYWORD",
            "Symbol",
            "KeywordArg",
            "keywordarg",
            "keyword_arg",
            "keyword.arg",
            "String",
            "Number",
            "Literal",
            "Comment",
            "Accent",
            "Muted",
            "Error",
            "ERROR",
            "Warning",
            "Info",
            "Hint",
            "Added",
            "Removed",
            "Unchanged",
            "kwd",
            "sym",
            "kw",
            "str",
            "num",
            "lit",
            "cmt",
            "safe",
            "unsafe",
            "safety",
            "compliance",
            "proven",
            "rejected",
            "namespace",
            "deleted",
            "highlight",
            "identifier",
            "keyword ",
            " keyword",
            "keyword\n",
            "keyword\t",
            "keyword-arg ",
            " keyword-arg",
            "added ",
            " added",
            "unchanged ",
            " unchanged",
        ] {
            assert_eq!(
                <Semantic as TryFrom<&str>>::try_from(bad),
                Err(()),
                "TryFrom<&str> for Semantic({bad:?}) must return \
                 Err(()) — the trait impl's accept-set is exactly the \
                 16 Semantic::as_str outputs; a widening would \
                 silently split the trait impl's accept-set from the \
                 emitter's arm-set",
            );
        }
    }

    #[test]
    fn semantic_try_from_str_and_from_wire_partition_the_accept_set() {
        // Cross-axis partition pin: the trait-idiomatic
        // [`TryFrom<&str>`] and the method-named
        // [`super::Semantic::from_wire`] projections must return
        // equivalent decisions on every input — the trait impl's
        // `.ok()` project-out from `Result<Self, ()>` and the method's
        // `Option<Self>` return must byte-equal each other on both
        // accepts and rejects. A future silent bifurcation (the trait
        // impl gaining a case-fold path the method does not carry, the
        // method gaining a synonym alias the trait impl does not
        // honor) trips at caixa-theme test time under a single pin
        // rather than at a downstream generic-bound consumer that
        // dispatches through one axis while a peer dispatches through
        // the other. Sweeps both the 16-arm accept-set (via
        // [`super::Semantic::ALL`] threaded through
        // [`super::Semantic::as_str`]) and a canonical rejection
        // sample so both halves of the partition are covered. Peer of
        // the sibling
        // `severity_try_from_str_and_from_wire_partition_the_accept_set`
        // (a7bf74c) and
        // `fix_safety_try_from_str_and_from_wire_partition_the_accept_set`
        // (df86c94) partition pins.
        for &variant in Semantic::ALL {
            let wire = variant.as_str();
            assert_eq!(
                <Semantic as TryFrom<&str>>::try_from(wire).ok(),
                Semantic::from_wire(wire),
                "TryFrom<&str>::ok() and from_wire must agree on \
                 Semantic::{variant:?}.as_str() = {wire:?}",
            );
        }
        for bad in [
            "",
            "Keyword",
            "unknown",
            "safety",
            "safe",
            "proven",
            "namespace",
            "keywordarg",
        ] {
            assert_eq!(
                <Semantic as TryFrom<&str>>::try_from(bad).ok(),
                Semantic::from_wire(bad),
                "TryFrom<&str>::ok() and from_wire must agree on the \
                 rejection outcome for {bad:?}",
            );
        }
    }

    #[test]
    fn semantic_from_str_routes_through_try_from_str_impl() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl std::str::FromStr for Semantic` — asserts the standard-
        // library `.parse()` parse-axis entry point and the paired
        // [`super::Semantic::try_from`] `TryFrom<&str>` impl (which in
        // turn routes through the substrate-primitive
        // [`super::Semantic::from_wire`] `Option<Self>` accessor)
        // resolve to the same 16-arm canonical-lowercase-kebab accept-
        // set across every arm the exhaustive [`super::Semantic::ALL`]
        // slice enumerates. Extends the substrate-wide `FromStr`
        // parse-axis campaign — opened on
        // [`caixa_core::dep::DepList`] via 6167092, then
        // [`caixa_core::CaixaKind`] (9867432),
        // [`caixa_core::aplicacao::PlacementStrategy`] (62ef49a),
        // [`caixa_core::CaixaDialeto`] (ff01b2f),
        // [`caixa_arch::invariants::InvariantKind`] (fb16072),
        // [`caixa_arch::report::ArchVerdict`] (40e9dfd),
        // `caixa_lint::diagnostic::Severity` (6b0a08c),
        // `caixa_lint::diagnostic::FixSafety` (eb6942b), and
        // [`caixa_core::render::PathShapeViolation`] (b0b578c) — onto
        // the *first* closed-set fieldless typed enum on the caixa-
        // theme surface: the 16-arm semantic-style accept-set every
        // per-`Semantic` paint dispatch, every future `caixa-lsp`-side
        // per-`SemanticTokenType` wire-up, every future `caixa.nvim`
        // per-highlight-group re-loader, and every future `blackmatter-
        // shell` per-arm `data-semantic="<kebab>"` DOM-attribute
        // emission dispatches through. The peer method-named
        // `from_wire` accessor and the paired `TryFrom<&str>` trait
        // impl fix the 16-arm canonical-lowercase-kebab 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 outside the paired
        // [`super::CAIXA_THEME_SEMANTIC_WIRE_*`] consts, a swap onto a
        // hand-rolled parser that widens the accept-set past those 16
        // wire constants) trips at caixa-theme test time. Also covers
        // the stdlib `.parse()` short-form witness:
        // `.parse::<Semantic>()` is the `T: FromStr`-bounded generic
        // every clap-style arg-parser, `serde` string-tagged
        // deserializer, and generic `<T: FromStr>`-bound loader reaches
        // for — the pin asserts both `<T as FromStr>::from_str` and
        // `.parse::<T>()` resolve to the same 16-arm accept-set.
        use std::str::FromStr;
        for &variant in Semantic::ALL {
            let wire = variant.as_str();
            assert_eq!(
                <Semantic as FromStr>::from_str(wire),
                Ok(variant),
                "FromStr impl on Semantic must round-trip \
                 Semantic::{variant:?}.as_str() = {wire:?} back to \
                 Ok(Semantic::{variant:?}) — divergence from the paired \
                 TryFrom<&str> impl / Semantic::from_wire signals a \
                 silent detour off the substrate-primitive accessor",
            );
            assert_eq!(
                wire.parse::<Semantic>(),
                Ok(variant),
                "stdlib .parse::<Semantic>() short-form on \
                 Semantic::{variant:?}.as_str() = {wire:?} must route \
                 through the lifted FromStr impl and reach \
                 Ok(Semantic::{variant:?})",
            );
            assert_eq!(
                <Semantic as FromStr>::from_str(wire).ok(),
                Semantic::from_wire(wire),
                "FromStr::from_str ok()-projection on {wire:?} must \
                 byte-equal Semantic::from_wire on the same input — \
                 the two reverse-projection axes must resolve to the \
                 same 16-arm canonical-lowercase-kebab accept-set",
            );
            assert_eq!(
                <Semantic as FromStr>::from_str(wire),
                <Semantic as TryFrom<&str>>::try_from(wire),
                "FromStr::from_str and TryFrom<&str>::try_from must \
                 byte-equal on every arm — FromStr delegates to \
                 TryFrom<&str> by construction; divergence signals a \
                 stray reroute onto a hand-rolled parser",
            );
        }
    }

    #[test]
    fn semantic_from_str_rejects_unknown_byte_strings() {
        // Rejection witness on the `impl std::str::FromStr for
        // Semantic` — sweeps a candidate set of byte-strings outside
        // the 16-arm canonical-lowercase-kebab wire accept-set the
        // sibling [`super::Semantic::as_str`] emits and asserts every
        // one lands on `Err(())`, so a future accidental widening of
        // the trait impl's accept-set (a stray case-fold that admits
        // the pre-lift PascalCase Debug-derived shapes `"Keyword"` /
        // `"KeywordArg"` / … on the wire axis, an underscore-tolerant
        // arm-lookup that admits `"keyword_arg"` — the exact drift
        // form a `format!("{:?}", …).to_lowercase()` round-trip on the
        // paired [`std::fmt::Debug`] derive or a
        // `#[serde(rename_all = "snake_case")]` drift would land on,
        // the drift footgun the emitter's documentation explicitly
        // names as the reason the substrate-canonical
        // lowercase-kebab tag set exists) trips at caixa-theme test
        // time. The candidate set spans the empty string, whitespace-
        // only padding, uppercase / PascalCase rebrand candidates,
        // Levenshtein-neighbor typos, snake_case rebrand candidates,
        // sibling closed-set-enum canonical tags that do *not* overlap
        // the Semantic accept-set (the `"error"` / `"warning"` /
        // `"info"` / `"hint"` peer
        // `caixa_lint::diagnostic::Severity::as_str` four-arm set is
        // deliberately excluded from the rejection sweep because those
        // four tags coincide byte-for-byte with the Semantic axis'
        // diagnostic-severity paint arms and therefore *must* be
        // accepted by construction — the accepted-set witness above
        // covers them), the peer
        // `caixa_lint::diagnostic::FixSafety::as_str` two-arm set
        // (`"safe"` / `"unsafe"`), the peer
        // `caixa_arch::invariants::InvariantKind::as_str` three-arm
        // set (`"safety"` / `"compliance"` / `"performance"`), the
        // peer arch-verdict two-arm accept-set (`"proven"` /
        // `"rejected"`), cross-crate kind / strategy tags, and
        // trailing/leading-whitespace-padded canonical tags. Pairs the
        // `<T as FromStr>::from_str` and stdlib `.parse()` short-form
        // witnesses so a future divergence between the two parse-axis
        // entry points (a hand-rolled `.parse` override that bypasses
        // the delegated `FromStr` impl) trips here.
        use std::str::FromStr;
        for bad in [
            "",
            " ",
            "\t",
            "\n",
            "Keyword",
            "KEYWORD",
            "KeywordArg",
            "keyword_arg",
            "keyword arg",
            "keywordarg",
            "keywor",
            "Symbol",
            "SYMBOL",
            "Comment",
            "unknown",
            "biblioteca",
            "servico",
            "safety",
            "compliance",
            "performance",
            "proven",
            "rejected",
            "safe",
            "unsafe",
            "one-for-one",
            "empty",
            "absolute",
            "parent-escape",
            "keyword ",
            " keyword",
            "keyword\n",
            "keyword\t",
            "\"keyword\"",
        ] {
            assert_eq!(
                <Semantic as FromStr>::from_str(bad),
                Err(()),
                "FromStr for Semantic({bad:?}) must return Err(()) — \
                 the trait impl's accept-set is exactly the 16 \
                 Semantic::as_str outputs; a widening would silently \
                 split the FromStr impl's accept-set from the \
                 emitter's arm-set",
            );
            assert_eq!(
                bad.parse::<Semantic>(),
                Err(()),
                "stdlib .parse::<Semantic>() short-form on {bad:?} \
                 must route through the lifted FromStr impl and \
                 reject with Err(())",
            );
        }
    }

    #[test]
    fn semantic_from_into_static_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<Semantic> for &'static str` — asserts the standard-
        // library trait impl and the substrate-primitive
        // [`super::Semantic::as_str`] `pub const fn` accessor resolve to
        // the same 16-arm canonical-lowercase kebab emit-set across every
        // arm the exhaustive [`super::Semantic::ALL`] slice enumerates.
        // Any future silent detour that routes the trait impl through a
        // divergent projection (a per-arm inline `match sem { Keyword =>
        // "keyword", … }` re-inlining that opens a compile-time link to
        // the un-lifted arm-literal outside the paired
        // [`super::Semantic::as_str`] dispatch, a swap onto a
        // `format!("{:?}", …).to_lowercase()` round-trip through the
        // `#[derive(Debug)]` output whose stability is *not* guaranteed
        // and would silently reroute the semantic-style tag through a
        // stale byte-string with no downstream signal until an operator
        // scrolled the theme-paint terminal, a `#[serde(rename_all = "…")]`
        // attribute drift that quietly forks one axis) trips at
        // caixa-theme test time under `assert_eq!` rather than at a
        // downstream `impl Into<&'static str>`-bound consumer's silent
        // split. Sweeps every one of the 16 arms
        // [`super::Semantic::ALL`] carries so no arm's projection is
        // covered only by the sibling method-named `as_str` /
        // [`std::fmt::Display`] / [`AsRef<str>`] paths. Materializes
        // three `<&'static str as From<Semantic>>::from` outputs in
        // `const`-shape bindings against the paired
        // [`super::Semantic::as_str`] `pub const fn` accessor to make
        // the `'static` lifetime promise a build-time invariant — a
        // future accidental downgrade of any arm's inline canonical-
        // lowercase kebab byte-string to a non-`&'static str` (a
        // `String::leak()`-produced return, a `Box::leak`-cast, an
        // intermediate lifetime-erasing helper) trips at caixa-theme
        // build time rather than at a downstream `'static`-bound
        // consumer.
        //
        // Peer of the sibling
        // [`caixa_core::supervisor::tests::restart_strategy_from_into_static_str_routes_through_as_str_accessor`]
        // (523157d),
        // [`caixa_core::supervisor::tests::restart_policy_from_into_static_str_routes_through_as_str_accessor`]
        // (9fb37d0),
        // [`caixa_core::kind::tests::caixa_kind_from_into_static_str_routes_through_as_str_accessor`]
        // (edb827b),
        // [`caixa_core::dialeto::tests::caixa_dialeto_from_into_static_str_routes_through_as_str_accessor`]
        // (c189a6f),
        // [`caixa_core::aplicacao::tests::placement_strategy_from_into_static_str_routes_through_as_str_accessor`]
        // (afa3562),
        // [`caixa_core::aplicacao::tests::wit_shape_from_into_static_str_routes_through_as_str_accessor`]
        // (56998ec),
        // [`caixa_core::aplicacao::tests::rate_limit_unit_from_into_static_str_routes_through_as_suffix_accessor`]
        // (7fdfbf4),
        // [`caixa_core::render::tests::path_shape_violation_from_into_static_str_routes_through_as_str_accessor`]
        // (070a6de),
        // `caixa_arch::invariants::tests::invariant_kind_from_into_static_str_routes_through_as_str_accessor`
        // (f2ca7bc),
        // `caixa_arch::report::tests::arch_verdict_from_into_static_str_routes_through_as_str_accessor`
        // (d4559cb),
        // `caixa_lint::diagnostic::tests::severity_from_into_static_str_routes_through_as_str_accessor`
        // (5cc3b8b), and
        // `caixa_lint::diagnostic::tests::fix_safety_from_into_static_str_routes_through_as_str_accessor`
        // (2a56127) pins on the sibling closed-set typed-enum forward-
        // projection axes — extends the trait-idiomatic forward-
        // projection axis onto the first closed-set fieldless typed
        // enum on the caixa-theme surface (the semantic-style axis),
        // leaving `caixa_provedor::FerriteRuntime` as the last outside-
        // caixa-core closed-set fieldless typed enum whose trait-
        // idiomatic forward axis is still open.
        const KEYWORD: &str = Semantic::Keyword.as_str();
        const KEYWORD_ARG: &str = Semantic::KeywordArg.as_str();
        const UNCHANGED: &str = Semantic::Unchanged.as_str();
        for &variant in Semantic::ALL {
            let via_trait: &'static str = <&'static str as From<Semantic>>::from(variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait, via_method,
                "From<Semantic> for &'static str impl must round-trip \
                 Semantic::{variant:?} to the same canonical-lowercase \
                 kebab byte-string Semantic::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 Semantic::{variant:?} must \
                 byte-equal Semantic::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!(
            [KEYWORD, KEYWORD_ARG, UNCHANGED],
            ["keyword", "keyword-arg", "unchanged"],
            "const-context Semantic::as_str must resolve to the \
             canonical-lowercase kebab byte-strings — 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<Semantic> for &'static str impl \
             carries by construction"
        );
    }

    #[test]
    fn semantic_from_into_static_str_and_as_str_partition_the_emit_set() {
        // Cross-axis partition pin: the paired trait-idiomatic
        // `From<Semantic> for &'static str` forward projection and the
        // method-named [`super::Semantic::as_str`] forward projection
        // must resolve identically on *every* arm, not just the ones
        // named in the primary byte-parity pin above. Sweeps every
        // [`super::Semantic::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-theme test time.
        //
        // Peer of the sibling forward-projection partition pins
        // [`caixa_core::supervisor::tests::restart_strategy_from_into_static_str_and_as_str_partition_the_emit_set`]
        // (523157d),
        // [`caixa_core::supervisor::tests::restart_policy_from_into_static_str_and_as_str_partition_the_emit_set`]
        // (9fb37d0),
        // [`caixa_core::kind::tests::caixa_kind_from_into_static_str_and_as_str_partition_the_emit_set`]
        // (edb827b),
        // [`caixa_core::dialeto::tests::caixa_dialeto_from_into_static_str_and_as_str_partition_the_emit_set`]
        // (c189a6f),
        // [`caixa_core::aplicacao::tests::placement_strategy_from_into_static_str_and_as_str_partition_the_emit_set`]
        // (afa3562),
        // [`caixa_core::aplicacao::tests::wit_shape_from_into_static_str_and_as_str_partition_the_emit_set`]
        // (56998ec),
        // [`caixa_core::aplicacao::tests::rate_limit_unit_from_into_static_str_and_as_suffix_partition_the_emit_set`]
        // (7fdfbf4),
        // [`caixa_core::render::tests::path_shape_violation_from_into_static_str_and_as_str_partition_the_emit_set`]
        // (070a6de),
        // `caixa_arch::invariants::tests::invariant_kind_from_into_static_str_and_as_str_partition_the_emit_set`
        // (f2ca7bc),
        // `caixa_arch::report::tests::arch_verdict_from_into_static_str_and_as_str_partition_the_emit_set`
        // (d4559cb),
        // `caixa_lint::diagnostic::tests::severity_from_into_static_str_and_as_str_partition_the_emit_set`
        // (5cc3b8b), and
        // `caixa_lint::diagnostic::tests::fix_safety_from_into_static_str_and_as_str_partition_the_emit_set`
        // (2a56127) — extends the round-trip discipline onto the first
        // closed-set fieldless typed enum on the caixa-theme surface,
        // closing the two-way `Self ↔ &'static str` round-trip on the
        // trait-idiomatic pair (`From<Self> for &'static str` +
        // `TryFrom<&str> for Self`) as well as the pre-existing method-
        // named pair (`as_str` + `from_wire`).
        for &variant in Semantic::ALL {
            let via_trait: &'static str = <&'static str as From<Semantic>>::from(variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait, via_method,
                "From<Semantic> for &'static str and Semantic::as_str \
                 must resolve identically on Semantic::{variant:?} — \
                 divergence signals the two forward-projection paths \
                 have drifted onto different emit-sets"
            );
        }
        // Round-trip witness: every arm's forward `From` output re-parses
        // through the paired trait-idiomatic `TryFrom<&str>` back to the
        // original variant. Closes the two-way `Semantic ↔ &'static str`
        // round-trip on the trait-idiomatic axis pair directly (no wire-
        // vocab intermediate — the emit-side [`super::Semantic::as_str`]
        // and the parse-side [`super::Semantic::from_wire`] dispatch on
        // the same 16 inline canonical-lowercase kebab byte-strings by
        // construction, so round-tripping through the paired
        // `From<Self> for &'static str` + `TryFrom<&str> for Self` trait
        // impls composes to the identity on `Semantic::ALL`).
        for &variant in Semantic::ALL {
            let emitted: &'static str = <&'static str as From<Semantic>>::from(variant);
            let reparsed = <Semantic as TryFrom<&str>>::try_from(emitted).unwrap_or_else(|()| {
                panic!(
                    "TryFrom<&str> for Semantic must accept every \
                     From<Semantic> for &'static str output — got \
                     Err(()) for Semantic::{variant:?}'s emit \
                     byte-string {emitted:?}"
                )
            });
            assert_eq!(
                reparsed, variant,
                "trait-idiomatic Semantic ↔ &'static str round-trip \
                 must be the identity on Semantic::{variant:?} — the \
                 From<Self> for &'static str + TryFrom<&str> for Self \
                 pair must compose to the identity on the closed 16-arm \
                 accept-set"
            );
        }
    }

    #[test]
    fn semantic_from_borrowed_into_static_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<&Semantic> for &'static str` — asserts the
        // borrowed-input standard-library trait impl and the substrate-
        // primitive [`super::Semantic::as_str`] `pub const fn` accessor
        // resolve to the same 16-arm canonical-lowercase kebab emit-set
        // across every arm the exhaustive [`super::Semantic::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 [`super::Semantic::ALL`] (whose iterator yields
        // `&Semantic`, not `Semantic`) reaches through this impl and
        // no other — the paired owned-input [`From<Semantic>`] impl
        // requires an explicit `.copied()` / dereference before the
        // trait fires. Materializes three
        // `<&'static str as From<&Semantic>>::from` outputs in
        // `const`-shape bindings against the paired
        // [`super::Semantic::as_str`] `pub const fn` accessor to make
        // the `'static` lifetime promise a build-time invariant — a
        // future accidental downgrade of any arm's inline canonical-
        // lowercase kebab byte-string to a non-`&'static str` (a
        // `String::leak()`-produced return, a `Box::leak`-cast, an
        // intermediate lifetime-erasing helper) trips at caixa-theme
        // build time rather than at a downstream `'static`-bound
        // consumer.
        //
        // Peer of the sibling
        // `caixa_provedor::ferrite::tests::ferrite_runtime_from_borrowed_into_static_str_routes_through_variant_slug_accessor`
        // (676d693) pin on the outside-`caixa-core` closed-set-enum
        // borrowed-input axis — extends the trait-idiomatic borrowed-
        // input forward-projection axis onto the last remaining
        // closed-set fieldless typed enum on the substrate surface
        // (the caixa-theme semantic-style 16-arm axis), closing the
        // substrate-wide 2×2-completion campaign's borrowed-input
        // `&'static str`-returning corner.
        const KEYWORD: &str = Semantic::Keyword.as_str();
        const KEYWORD_ARG: &str = Semantic::KeywordArg.as_str();
        const UNCHANGED: &str = Semantic::Unchanged.as_str();
        for variant in Semantic::ALL {
            let via_trait: &'static str = <&'static str as From<&Semantic>>::from(variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait, via_method,
                "From<&Semantic> for &'static str impl must round-trip \
                 &Semantic::{variant:?} to the same canonical-lowercase \
                 kebab byte-string Semantic::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 &Semantic::{variant:?} must \
                 byte-equal Semantic::as_str on the same input — the \
                 blanket-derived Into shape on the borrowed-input axis \
                 must resolve to the same as_str dispatch as the \
                 explicit From impl"
            );
        }
        assert_eq!(
            [KEYWORD, KEYWORD_ARG, UNCHANGED],
            ["keyword", "keyword-arg", "unchanged"],
            "const-context Semantic::as_str must resolve to the \
             canonical-lowercase kebab byte-strings — 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<&Semantic> for &'static str impl \
             carries by construction"
        );
    }

    #[test]
    fn semantic_from_owned_and_borrowed_into_static_str_agree_on_every_arm() {
        // Cross-axis partition pin: the paired trait-idiomatic
        // `From<Semantic> for &'static str` owned-input forward
        // projection and the newly lifted
        // `From<&Semantic> for &'static str` borrowed-input forward
        // projection must resolve identically on *every* arm the
        // exhaustive [`super::Semantic::ALL`] slice enumerates. Locks
        // the two trait-idiomatic forward-projection paths together by
        // construction so any future detour (a stray borrowed-input
        // `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-theme
        // test time under `assert_eq!` rather than at a downstream
        // consumer split. Witnesses the borrowed-input axis with a
        // `.iter().map(Into::into)` pipe over `Semantic::ALL` (whose
        // iterator yields `&Semantic`, not `Semantic`, so the pipe
        // fires through the borrowed-input axis alone).
        //
        // Peer of the sibling
        // `caixa_provedor::ferrite::tests::ferrite_runtime_from_owned_and_borrowed_into_static_str_agree_on_every_arm`
        // (676d693) — extends the owned/borrowed-cross-axis partition
        // discipline onto the last remaining substrate-wide closed-set
        // fieldless typed enum whose borrowed-input axis was still
        // open.
        for &variant in Semantic::ALL {
            let via_owned: &'static str = <&'static str as From<Semantic>>::from(variant);
            let via_borrowed: &'static str = <&'static str as From<&Semantic>>::from(&variant);
            assert_eq!(
                via_owned, via_borrowed,
                "From<Semantic> for &'static str and From<&Semantic> \
                 for &'static str must agree on Semantic::{variant:?} \
                 — divergence signals the owned-input and borrowed-\
                 input forward-projection paths have drifted onto \
                 different emit-sets"
            );
        }
        let via_pipe: Vec<&'static str> = Semantic::ALL.iter().map(Into::into).collect();
        let via_method: Vec<&'static str> = Semantic::ALL.iter().map(|s| s.as_str()).collect();
        assert_eq!(
            via_pipe, via_method,
            "Semantic::ALL.iter().map(Into::into) must resolve to the \
             same per-arm canonical-lowercase kebab byte-string \
             sequence Semantic::as_str returns across every arm — the \
             iterator yields &Semantic, so this pipe fires through the \
             borrowed-input From<&Semantic> for &'static str axis and \
             witnesses the newly lifted impl's arm-set matches the \
             substrate-primitive accessor without a spurious Copy deref"
        );
    }

    #[test]
    fn semantic_from_into_owned_string_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<Semantic> for String` — asserts the owned-
        // `String`-returning standard-library trait impl and the
        // substrate-primitive [`super::Semantic::as_str`] `pub const
        // fn` accessor resolve to the same 16-arm canonical-lowercase
        // kebab emit-set across every arm the exhaustive
        // [`super::Semantic::ALL`] slice enumerates. Rust's standard
        // library does not carry a blanket
        // `impl<T: AsRef<str>> From<T> for String`, so the owned-
        // `String` axis is a distinct trait-idiomatic surface that a
        // `let key: String = sem.into();`-shaped downstream call site
        // reaches through this impl and no other — the sibling
        // `&'static str`-returning axes force an explicit
        // `.to_owned()` / [`String::from`] restatement whose type
        // bounds have no compile-time link to the substrate primitive.
        // Sweeps every one of the 16 arms
        // [`super::Semantic::ALL`] carries so no arm's projection is
        // covered only by the sibling method-named `as_str` /
        // [`std::fmt::Display`] / [`AsRef<str>`] / owned-input
        // `&'static str`-returning paths.
        //
        // Peer of the sibling
        // `caixa_provedor::ferrite::tests::ferrite_runtime_from_into_owned_string_routes_through_variant_slug_accessor`
        // (1e14fde) and
        // `caixa_arch::report::tests::arch_verdict_from_into_owned_string_routes_through_as_str_accessor`
        // (cc80a53) pins on the peer outside-`caixa-core` closed-set-
        // enum owned-`String`-returning axes — extends the trait-
        // idiomatic owned-`String`-returning forward-projection family
        // onto the sole closed-set fieldless typed enum on the caixa-
        // theme surface (the semantic-style 16-arm axis), extending
        // the substrate-wide 2×2-completion campaign onto the sixth
        // outside-`caixa-core` closed-set fieldless typed enum on the
        // caixa surface.
        for &variant in Semantic::ALL {
            let via_trait: String = <String as From<Semantic>>::from(variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_str(),
                via_method,
                "From<Semantic> for String impl must round-trip \
                 Semantic::{variant:?} to the same canonical-lowercase \
                 kebab byte-string Semantic::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 Semantic::{variant:?} must \
                 byte-equal Semantic::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 semantic_from_into_owned_string_and_static_str_agree_on_every_arm() {
        // Cross-axis partition pin: the paired trait-idiomatic
        // owned-input `&'static str`-returning
        // `From<Semantic> for &'static str` and owned-`String`-
        // returning `From<Semantic> for String` (this lift) forward
        // projections must resolve identically on every arm, locking
        // the two output-shape paths together so any future detour (a
        // stray owned-`String` 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, a
        // silent swap onto a hand-rolled per-arm literal that shadows
        // the paired [`super::Semantic::as_str`] dispatch) trips at
        // caixa-theme test time. Then a witness that the
        // `ToString::to_string`-through-[`std::fmt::Display`] surface
        // (`variant.to_string()`) byte-equals the trait-idiomatic
        // owned-`String` axis (`String::from(variant)`) on every arm,
        // so a future consumer that reaches for `.to_string()` and
        // one that reaches for `.into::<String>()` land on the same
        // substrate-primitive vocabulary. Plus a
        // `.iter().copied().map(String::from)` pipe witness over
        // [`super::Semantic::ALL`] — the exact shape a future per-
        // Semantic histogram key materializer or `caixa-lsp` per-
        // `SemanticTokenType` registration walk reaches through —
        // materializes the 16-arm accept-set through the owned-
        // `String` axis alone. Plus a direct `Self → String → Self`
        // round-trip witness through the paired [`TryFrom<&str>`]
        // axis on the owned-`String`'s [`String::as_str`] borrow,
        // closing the two-way round-trip on the owned-`String` axis
        // directly (no wire-vocab intermediate — the emit-side
        // [`super::Semantic::as_str`] and the parse-side
        // [`super::Semantic::from_wire`] dispatch on the same 16
        // inline canonical-lowercase kebab byte-strings by
        // construction).
        //
        // Peer of the sibling
        // `caixa_provedor::ferrite::tests::ferrite_runtime_from_into_owned_string_and_static_str_agree_on_every_arm`
        // (1e14fde) partition pin on the peer outside-`caixa-core`
        // closed-set-enum owned-`String`-returning axis.
        for &variant in Semantic::ALL {
            let owned_string: String = <String as From<Semantic>>::from(variant);
            let owned_static: &'static str = <&'static str as From<Semantic>>::from(variant);
            assert_eq!(
                owned_string.as_str(),
                owned_static,
                "From<Semantic> for String and From<Semantic> for \
                 &'static str must resolve identically on \
                 Semantic::{variant:?} — divergence signals the two \
                 output-shape forward-projection paths have drifted \
                 onto different emit-sets"
            );
            let via_display: String = variant.to_string();
            assert_eq!(
                owned_string, via_display,
                "From<Semantic> for String and ToString::to_string \
                 via Display must resolve identically on \
                 Semantic::{variant:?} — divergence signals the \
                 trait-idiomatic owned-`String` axis and the Display-\
                 routed ToString axis have drifted onto different \
                 vocabularies"
            );
        }
        let via_iter: Vec<String> = Semantic::ALL.iter().copied().map(String::from).collect();
        let via_method: Vec<String> = Semantic::ALL
            .iter()
            .map(|s| s.as_str().to_owned())
            .collect();
        assert_eq!(
            via_iter, via_method,
            "`.iter().copied().map(String::from)` over Semantic::ALL \
             must byte-equal `.iter().map(|s| s.as_str().to_owned())` \
             on every arm — the owned-`String` `From<Semantic> for \
             String` axis is what makes the `.map(String::from)` \
             shape route through the substrate-primitive \
             Semantic::as_str accessor rather than through a per-\
             call-site `.to_owned()` / `String::from(sem.as_str())` \
             detour"
        );
        for &variant in Semantic::ALL {
            let emitted: String = variant.into();
            let re_parsed: Result<Semantic, ()> =
                <Semantic as TryFrom<&str>>::try_from(emitted.as_str());
            assert_eq!(
                re_parsed,
                Ok(variant),
                "trait-idiomatic owned-`String` axis pair must round-\
                 trip Semantic::{variant:?} through \
                 `.into::<String>()` and back through `TryFrom<&str>` \
                 on the owned-`String`'s `String::as_str` borrow — a \
                 break signals the forward-emit owned-`String` axis \
                 and the reverse-parse `TryFrom<&str>` axis have \
                 drifted onto different vocabularies"
            );
        }
    }

    #[test]
    fn semantic_from_borrowed_into_owned_string_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<&Semantic> for String` — asserts the borrowed-
        // input owned-`String`-returning standard-library trait impl
        // and the substrate-primitive [`super::Semantic::as_str`]
        // `pub const fn` accessor resolve to the same 16-arm
        // canonical-lowercase kebab emit-set across every arm the
        // exhaustive [`super::Semantic::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 = (&sem).into();`-shaped call site
        // reaches through this impl and no other — the paired
        // sibling `From<Semantic> for String` impl (5ea146c) forces
        // every borrowed-input call site through an explicit `Copy`
        // deref (`String::from(*sem)`) or a `.as_str().to_owned()` /
        // `.to_string()` detour whose type bounds have no compile-
        // time link to the substrate primitive. Sweeps every one of
        // the 16 arms [`super::Semantic::ALL`] carries so no arm's
        // borrowed-input owned-`String` projection is covered only
        // by the sibling method-named `as_str` / [`std::fmt::Display`]
        // / [`AsRef<str>`] / owned-input `&'static str`-returning /
        // owned-input owned-`String`-returning paths.
        //
        // Peer of the sibling
        // `caixa_provedor::ferrite::tests::ferrite_runtime_from_borrowed_into_owned_string_routes_through_variant_slug_accessor`
        // (0caedec — fifth outside-`caixa-core` arm on this axis,
        // the paired ferrite-runtime two-arm axis on the sole caixa-
        // provedor closed-set enum) and
        // `caixa_lint::diagnostic::tests::fix_safety_from_borrowed_into_owned_string_routes_through_as_str_accessor`
        // (807f67d — fourth outside-`caixa-core` arm on this axis)
        // pins on the peer outside-`caixa-core` closed-set-enum
        // borrowed-input owned-`String`-returning axes — closes the
        // whole `{Self, &Self} × {&'static str, String}` 2×2 trait-
        // idiomatic projection corner on the sixth-and-last outside-
        // `caixa-core` closed-set fieldless typed enum on the caixa
        // surface (the caixa-theme semantic-style 16-arm axis every
        // per-Semantic paint dispatch, every future `caixa-lsp` per-
        // `SemanticTokenType` wire-up, every future `caixa.nvim`
        // per-highlight-group re-loader, and every future
        // `blackmatter-shell` per-arm `data-semantic="<kebab>"` DOM
        // emission keys off), and closes the substrate-wide 2×2-
        // completion campaign across every closed-set fieldless
        // typed enum on the caixa surface.
        for &variant in Semantic::ALL {
            let via_trait: String = <String as From<&Semantic>>::from(&variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_str(),
                via_method,
                "From<&Semantic> for String impl must round-trip \
                 &Semantic::{variant:?} to the same canonical-\
                 lowercase kebab byte-string Semantic::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 &Semantic::{variant:?} must \
                 byte-equal Semantic::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 semantic_from_borrowed_into_owned_string_agrees_with_paired_axes_on_every_arm() {
        // Cross-axis partition pin: the newly lifted trait-
        // idiomatic borrowed-input owned-`String`
        // `From<&Semantic> for String` (this lift), the paired
        // owned-input owned-`String` `From<Semantic> for String`
        // (5ea146c), the paired borrowed-input owned-`&'static str`
        // `From<&Semantic> for &'static str` (ffc0f26), and the
        // paired owned-input owned-`&'static str`
        // `From<Semantic> for &'static str` — 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-theme
        // test time. Also byte-parity witness against the sibling
        // [`ToString::to_string`] surface routed through
        // [`std::fmt::Display`] and a direct round-trip witness
        // through the paired trait-idiomatic reverse
        // [`TryFrom<&str>`] axis on the owned-`String`'s
        // [`String::as_str`] borrow that closes the two-way
        // `&Self → String → Self` round-trip on the trait-idiomatic
        // borrowed-input owned-`String` forward + reverse axis pair.
        //
        // The `.iter().map(String::from)` pipe witness over
        // [`super::Semantic::ALL`] materializes the exact shape a
        // future per-Semantic histogram key materializer or
        // `caixa-lsp` per-`SemanticTokenType` registration walk
        // reaches through — [`super::Semantic::ALL`]'s iterator
        // yields `&Semantic` by construction, so the borrowed-input
        // owned-`String` axis is what routes the pipe through the
        // substrate-primitive [`super::Semantic::as_str`] accessor
        // without a spurious `.copied()` / `Copy` deref (the paired
        // owned-input pipe witness on the sibling
        // `semantic_from_into_owned_string_and_static_str_agree_on_every_arm`
        // uses `.iter().copied().map(String::from)` for exactly this
        // reason — the owned-input axis alone cannot route the pipe
        // through the substrate primitive without the extra deref).
        //
        // Peer of the sibling
        // `caixa_provedor::ferrite::tests::ferrite_runtime_from_borrowed_into_owned_string_agrees_with_paired_axes_on_every_arm`
        // (0caedec — fifth outside-`caixa-core` arm on this axis)
        // partition pin on the peer outside-`caixa-core` closed-
        // set-enum borrowed-input owned-`String` axis — closes the
        // substrate-wide 2×2-completion campaign on the sixth-and-
        // last outside-`caixa-core` closed-set fieldless typed enum
        // on the caixa surface.
        for &variant in Semantic::ALL {
            let borrowed_string: String = <String as From<&Semantic>>::from(&variant);
            let owned_string: String = <String as From<Semantic>>::from(variant);
            let borrowed_static: &'static str = <&'static str as From<&Semantic>>::from(&variant);
            let owned_static: &'static str = <&'static str as From<Semantic>>::from(variant);
            assert_eq!(
                borrowed_string, owned_string,
                "From<&Semantic> for String and From<Semantic> for \
                 String must resolve identically on \
                 Semantic::{variant:?} — divergence signals the \
                 owned-`String` axis pair's borrowed-input and \
                 owned-input arms have drifted onto different emit-\
                 sets"
            );
            assert_eq!(
                borrowed_string.as_str(),
                borrowed_static,
                "From<&Semantic> for String and From<&Semantic> for \
                 &'static str must resolve identically on \
                 Semantic::{variant:?} — divergence signals the \
                 borrowed-input axis pair's owned-`String`-returning \
                 and `&'static str`-returning arms have drifted \
                 onto different emit-sets"
            );
            assert_eq!(
                borrowed_string.as_str(),
                owned_static,
                "From<&Semantic> for String and From<Semantic> for \
                 &'static str must resolve identically on \
                 Semantic::{variant:?} — the cross-diagonal corner \
                 of the 2×2 must agree, or the four projections \
                 have split into two vocabularies"
            );
            let via_display: String = variant.to_string();
            assert_eq!(
                borrowed_string, via_display,
                "From<&Semantic> for String and ToString::to_string \
                 via Display must resolve identically on \
                 Semantic::{variant:?} — divergence signals the \
                 trait-idiomatic borrowed-input owned-`String` axis \
                 and the Display-routed ToString axis have drifted \
                 onto different vocabularies"
            );
        }
        let via_iter: Vec<String> = Semantic::ALL.iter().map(String::from).collect();
        let via_method: Vec<String> = Semantic::ALL
            .iter()
            .map(|sem| sem.as_str().to_owned())
            .collect();
        assert_eq!(
            via_iter, via_method,
            "`.iter().map(String::from)` over Semantic::ALL must \
             byte-equal `.iter().map(|sem| sem.as_str().to_owned())` \
             on every arm — the borrowed-input owned-`String` \
             `From<&Semantic> for String` axis is what makes the \
             `.map(String::from)` shape route through the substrate-\
             primitive Semantic::as_str accessor without a spurious \
             `.copied()` / `Copy` deref"
        );
        for &variant in Semantic::ALL {
            let emitted: String = (&variant).into();
            let re_parsed: Result<Semantic, ()> =
                <Semantic as TryFrom<&str>>::try_from(emitted.as_str());
            assert_eq!(
                re_parsed,
                Ok(variant),
                "trait-idiomatic borrowed-input owned-`String` axis \
                 pair must round-trip Semantic::{variant:?} through \
                 `(&variant).into::<String>()` and back through \
                 `TryFrom<&str>` on the owned-`String`'s \
                 `String::as_str` borrow — a break signals the \
                 borrowed-input forward-emit owned-`String` axis \
                 and the reverse-parse `TryFrom<&str>` axis have \
                 drifted onto different vocabularies"
            );
        }
    }

    #[test]
    fn semantic_from_into_static_cow_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<Semantic> for std::borrow::Cow<'static, str>` —
        // asserts the standard-library trait impl and the substrate-
        // primitive [`super::Semantic::as_str`] `pub const fn`
        // accessor resolve to the same sixteen-arm canonical-
        // lowercase kebab emit-set (`"keyword"` / `"symbol"` /
        // `"keyword-arg"` / `"string"` / `"number"` / `"literal"` /
        // `"comment"` / `"accent"` / `"muted"` / `"error"` /
        // `"warning"` / `"info"` / `"hint"` / `"added"` /
        // `"removed"` / `"unchanged"`) across every arm the
        // exhaustive [`super::Semantic::ALL`] slice enumerates.
        // Rust's standard library does not carry a blanket
        // `impl<T: AsRef<str>> From<T> for std::borrow::Cow<'static, str>`
        // (nor an `impl<T: fmt::Display> From<T> for std::borrow::Cow<'static, str>`),
        // so the [`std::borrow::Cow<'static, str>`] forward-projection
        // axis is a distinct trait-idiomatic surface that a
        // `let key: std::borrow::Cow<'static, str> = sem.into();`-
        // shaped call site reaches through this impl and no other —
        // the paired sibling `From<Semantic> for &'static str` and
        // `From<Semantic> for String` impls force every
        // [`std::borrow::Cow<'static, str>`]-parameterized call site
        // through a `std::borrow::Cow::Borrowed(sem.as_str())` /
        // `std::borrow::Cow::Owned(sem.to_string())` /
        // `String::from(sem).into()` 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::Semantic::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
        // `std::borrow::Cow::Owned(sem.to_string())` rewrite that
        // would allocate on every call site where the `&'static str`
        // return of [`super::Semantic::as_str`] makes the zero-alloc
        // borrowed projection type-correct) trips at caixa-theme
        // test time under the [`std::borrow::Cow::Borrowed`]
        // discriminator witness rather than at a downstream
        // [`std::borrow::Cow<'static, str>`]-bound consumer's silent
        // allocation.
        //
        // Fifth outside-`caixa-core` peer (and sole peer on the
        // caixa-theme surface) on the substrate-wide trait-idiomatic
        // [`std::borrow::Cow<'static, str>`] forward-projection
        // family — extends the axis off the paired caixa-lint fix-
        // safety-tier axis on the sibling two-arm closed-set enum
        // ([`caixa_lint::diagnostic::FixSafety`], 79010c5 / 9a6539f
        // — fourth outside-`caixa-core` peer, closed the 2×3 corner)
        // onto the semantic-style sixteen-arm axis, continuing the
        // outside-`caixa-core` tier of the campaign.
        for &variant in Semantic::ALL {
            let via_trait: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<Semantic>>::from(variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<Semantic> for Cow<'static, str> impl must round-\
                 trip Semantic::{variant:?} to the same canonical-\
                 lowercase kebab byte-string Semantic::as_str returns \
                 — divergence signals a silent detour off the \
                 substrate-primitive accessor"
            );
            assert!(
                matches!(via_trait, std::borrow::Cow::Borrowed(_)),
                "From<Semantic> for Cow<'static, str> impl must land \
                 on the zero-alloc Cow::Borrowed arm on \
                 Semantic::{variant:?} — a Cow::Owned outcome \
                 signals the projection has silently allocated where \
                 the substrate-primitive Semantic::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 \
                 Semantic::{variant:?} must byte-equal \
                 Semantic::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 \
                 Semantic::{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 semantic_from_into_static_cow_str_agrees_with_paired_axes_on_every_arm() {
        // Cross-axis partition pin: the newly lifted trait-idiomatic
        // `From<Semantic> for std::borrow::Cow<'static, str>` (this
        // lift), the paired owned-input
        // `From<Semantic> for &'static str`, and the paired owned-
        // input `From<Semantic> for String` forward projections must
        // resolve identically on every arm, locking the three return-
        // shape paths together by construction so any future detour
        // trips at caixa-theme test time. Also byte-parity witness
        // against the sibling [`ToString::to_string`] surface routed
        // through [`std::fmt::Display`] — every owned-heap-string
        // path (the [`std::borrow::Cow::Owned`] promotion of this
        // axis's `.into_owned()`, `From<Semantic> for String`, and
        // `.to_string()`) resolves to the same canonical-lowercase
        // kebab byte-string per arm.
        //
        // Then a `.iter().copied().map(std::borrow::Cow::from)` pipe
        // witness over [`super::Semantic::ALL`] that materializes
        // the sixteen-arm accept-set through the
        // [`std::borrow::Cow<'static, str>`] axis alone — the exact
        // shape a future `feira lint --list-styles` operator-facing
        // enumeration, a future `caixa-lsp`-side per-
        // `SemanticTokenType` registration table whose typing rules
        // out the sibling [`AsRef<str>`] borrowed return, or a
        // future `caixa.nvim` per-highlight-group re-loader table
        // reaches through — closing the composable-projection axis
        // on the caixa-theme semantic-style sixteen-arm closed-set
        // fieldless typed enum peer. 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-theme-
        // test-time failure.
        //
        // Then a direct round-trip witness through [`TryFrom<&str>`]
        // on the projection's [`std::borrow::Cow::as_ref`] borrow —
        // like the sibling [`caixa_lint::diagnostic::FixSafety`]
        // and [`caixa_lint::diagnostic::Severity`] pairs (whose
        // canonical-lowercase byte-strings are round-trip-stable),
        // and unlike the peer [`caixa_core::CaixaKind`] pair (whose
        // forward emit lands on the lowercase Portuguese diagnostic
        // vocabulary while the reverse parse lands on the
        // `PascalCase` wire vocabulary), [`super::Semantic`]'s
        // forward emit and reverse parse share the same sixteen
        // inline canonical-lowercase kebab byte-strings by
        // construction, so the [`std::borrow::Cow<'static, str>`]
        // projection composes directly with the trait-idiomatic
        // reverse [`TryFrom<&str>`] axis without the wire-vocab
        // intermediate hop.
        for &variant in Semantic::ALL {
            let via_cow: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<Semantic>>::from(variant);
            let via_static: &'static str = <&'static str as From<Semantic>>::from(variant);
            let via_string: String = <String as From<Semantic>>::from(variant);
            assert_eq!(
                via_cow.as_ref(),
                via_static,
                "From<Semantic> for Cow<'static, str> and \
                 From<Semantic> for &'static str must resolve \
                 identically on Semantic::{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<Semantic> for Cow<'static, str> and \
                 From<Semantic> for String must resolve identically \
                 on Semantic::{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<Semantic> for Cow<'static, str> must byte-\
                 equal Semantic::to_string on Semantic::{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>> = Semantic::ALL
            .iter()
            .copied()
            .map(std::borrow::Cow::from)
            .collect();
        let via_method: Vec<std::borrow::Cow<'static, str>> = Semantic::ALL
            .iter()
            .map(|sem| std::borrow::Cow::Borrowed(sem.as_str()))
            .collect();
        assert_eq!(
            via_iter, via_method,
            "`.iter().copied().map(Cow::from)` over Semantic::ALL \
             must byte-equal `.iter().map(|sem| \
             Cow::Borrowed(sem.as_str()))` on every arm — the trait-\
             idiomatic `From<Semantic> for Cow<'static, str>` axis \
             is what makes the `Cow::from` composition route through \
             the substrate-primitive Semantic::as_str accessor \
             rather than a per-call-site open-code"
        );
        for cow in &via_iter {
            assert!(
                matches!(cow, std::borrow::Cow::Borrowed(_)),
                "`.iter().copied().map(Cow::from)` over \
                 Semantic::ALL must land on the zero-alloc \
                 Cow::Borrowed arm on every element — a Cow::Owned \
                 outcome signals the pipe has silently allocated \
                 where the substrate-primitive Semantic::as_str \
                 `&'static str` return makes the borrowed arm the \
                 type-correct projection"
            );
        }
        for &variant in Semantic::ALL {
            let via_cow: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<Semantic>>::from(variant);
            let re_parsed: Result<Semantic, ()> =
                <Semantic as TryFrom<&str>>::try_from(via_cow.as_ref());
            assert_eq!(
                re_parsed,
                Ok(variant),
                "trait-idiomatic Cow<'static, str> forward-projection \
                 + reverse-projection axis pair must round-trip \
                 Semantic::{variant:?} through \
                 `.into::<Cow<'static, str>>()` on the owned-input \
                 surface and back through `TryFrom<&str>` on the \
                 projection's Cow::as_ref borrow — a break signals \
                 the Cow<'static, str> forward-emit and reverse-\
                 parse axes have drifted onto different vocabularies \
                 (like the sibling FixSafety and Severity pairs, \
                 Semantic's forward emit and reverse parse share \
                 the same sixteen inline canonical-lowercase kebab \
                 byte-strings by construction, so the round-trip \
                 composes directly)"
            );
        }
    }

    #[test]
    fn semantic_from_borrowed_into_static_cow_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<&Semantic> for std::borrow::Cow<'static, str>` —
        // asserts the borrowed-input standard-library trait impl and
        // the substrate-primitive [`super::Semantic::as_str`]
        // `pub const fn` accessor resolve to the same sixteen-arm
        // canonical-lowercase kebab emit-set (`"keyword"` / `"symbol"` /
        // `"keyword-arg"` / `"string"` / `"number"` / `"literal"` /
        // `"comment"` / `"accent"` / `"muted"` / `"error"` /
        // `"warning"` / `"info"` / `"hint"` / `"added"` / `"removed"` /
        // `"unchanged"`) across every arm the exhaustive
        // [`super::Semantic::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> = (&sem).into();`-shaped call
        // site or a `Semantic::ALL.iter().map(Cow::from)`-shaped pipe
        // reaches through this impl and no other — the paired owned-
        // input `From<Semantic> for Cow<'static, str>` impl (0253688)
        // forces every borrowed-input call site through an explicit
        // `Copy` deref (`Cow::from(*sem)`) or a
        // `Cow::Borrowed(sem.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::Semantic::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.
        //
        // Closes the `{Self, &Self}` input-shape corner on the fifth
        // outside-`caixa-core` closed-set fieldless typed enum peer
        // of the substrate-wide [`std::borrow::Cow<'static, str>`]
        // forward-projection campaign, exactly as
        // `fix_safety_from_borrowed_into_static_cow_str_routes_through_as_str_accessor`
        // (9a6539f) closed it on the sibling caixa-lint
        // [`caixa_lint::diagnostic::FixSafety`] one commit after
        // (79010c5) closing the whole 2×3 corner,
        // `severity_from_borrowed_into_static_cow_str_routes_through_as_str_accessor`
        // (1819087) on [`caixa_lint::diagnostic::Severity`] one commit
        // after (700a95e) closing the whole 2×3 corner, and every
        // peer closer that preceded it on the campaign.
        for &variant in Semantic::ALL {
            let via_trait: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<&Semantic>>::from(&variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<&Semantic> for Cow<'static, str> impl must \
                 round-trip &Semantic::{variant:?} to the same \
                 canonical-lowercase kebab byte-string \
                 Semantic::as_str returns — divergence signals a \
                 silent detour off the substrate-primitive accessor"
            );
            assert!(
                matches!(via_trait, std::borrow::Cow::Borrowed(_)),
                "From<&Semantic> for Cow<'static, str> impl must \
                 land on the zero-alloc Cow::Borrowed arm on \
                 &Semantic::{variant:?} — a Cow::Owned outcome \
                 signals the projection has silently allocated where \
                 the substrate-primitive Semantic::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 \
                 &Semantic::{variant:?} must byte-equal \
                 Semantic::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"
            );
            assert!(
                matches!(via_into, std::borrow::Cow::Borrowed(_)),
                "Into<Cow<'static, str>>::into on \
                 &Semantic::{variant:?} must land on the zero-alloc \
                 Cow::Borrowed arm — the blanket-derived Into shape \
                 on the borrowed-input surface must resolve to the \
                 same Cow::Borrowed dispatch as the explicit From \
                 impl"
            );
        }
    }

    #[test]
    #[allow(
        clippy::too_many_lines,
        reason = "cross-axis partition pin folds four return-shape paths \
                  (borrowed-input Cow<'static, str>, owned-input Cow<'static, str>, \
                  borrowed-input &'static str, borrowed-input String) plus the \
                  ToString-through-Display witness plus a `.iter().map(Cow::from)` \
                  pipe witness with zero-alloc discriminator plus a direct \
                  round-trip witness through TryFrom<&str> over sixteen typed \
                  variants; the linear per-axis repetition is exactly what the \
                  fold is pinning — a helper would hide the shape it locks"
    )]
    fn semantic_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<&Semantic> for
        // std::borrow::Cow<'static, str>` (this lift), the paired
        // owned-input `From<Semantic> for
        // std::borrow::Cow<'static, str>` (0253688), the paired
        // borrowed-input `From<&Semantic> for &'static str`, and the
        // paired borrowed-input `From<&Semantic> for String` forward
        // projections must resolve identically on every arm, locking
        // the four return-shape paths together by construction so any
        // future detour trips at caixa-theme test time. Also byte-
        // parity witness against the sibling [`ToString::to_string`]
        // surface routed through [`std::fmt::Display`].
        //
        // Then a `.iter().map(std::borrow::Cow::from)` pipe witness
        // over [`super::Semantic::ALL`] — whose iterator yields
        // `&Semantic` by construction, so the borrowed-input
        // [`std::borrow::Cow<'static, str>`] axis is what routes the
        // pipe through the substrate-primitive
        // [`super::Semantic::as_str`] accessor with the zero-alloc
        // [`std::borrow::Cow::Borrowed`] arm and without a spurious
        // [`Copy`] deref. Every collected element satisfies the
        // [`std::borrow::Cow::Borrowed`]-arm predicate so a future
        // accidental silent-allocation regression on the pipe's
        // iteration axis is a caixa-theme-test-time failure.
        //
        // Then a direct round-trip witness through [`TryFrom<&str>`]
        // on the projection's [`std::borrow::Cow::as_ref`] borrow —
        // unlike the peer [`caixa_core::CaixaKind`] axis pair (whose
        // forward emit lands on the lowercase Portuguese diagnostic
        // vocabulary while the reverse parse lands on the
        // `PascalCase` wire vocabulary, forcing the round-trip
        // through an intermediate [`caixa_core::CaixaKind::wire_name`]
        // hop), [`super::Semantic`]'s forward emit and reverse parse
        // share the same sixteen inline canonical-lowercase kebab
        // byte-strings by construction, so the borrowed-input
        // [`std::borrow::Cow<'static, str>`] projection composes
        // directly with the trait-idiomatic reverse [`TryFrom<&str>`]
        // axis without the wire-vocab intermediate hop.
        for &variant in Semantic::ALL {
            let via_borrowed_cow: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<&Semantic>>::from(&variant);
            let via_owned_cow: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<Semantic>>::from(variant);
            let via_borrowed_static: &'static str =
                <&'static str as From<&Semantic>>::from(&variant);
            let via_borrowed_string: String = <String as From<&Semantic>>::from(&variant);
            assert_eq!(
                via_borrowed_cow.as_ref(),
                via_owned_cow.as_ref(),
                "From<&Semantic> for Cow<'static, str> and \
                 From<Semantic> for Cow<'static, str> must resolve \
                 identically on Semantic::{variant:?} — divergence \
                 signals the borrowed-input and owned-input \
                 Cow<'static, str> forward-projection input-shape \
                 paths have drifted onto different emit-sets"
            );
            assert_eq!(
                via_borrowed_cow.as_ref(),
                via_borrowed_static,
                "From<&Semantic> for Cow<'static, str> and \
                 From<&Semantic> for &'static str must resolve \
                 identically on Semantic::{variant:?} — divergence \
                 signals the borrowed-input Cow<'static, str> and \
                 borrowed-input `&'static str` return-shape paths \
                 have drifted onto different emit-sets"
            );
            assert_eq!(
                via_borrowed_cow.as_ref(),
                via_borrowed_string.as_str(),
                "From<&Semantic> for Cow<'static, str> and \
                 From<&Semantic> for String must resolve identically \
                 on Semantic::{variant:?} — divergence signals the \
                 borrowed-input Cow<'static, str> and borrowed-input \
                 owned-`String` return-shape paths have drifted onto \
                 different emit-sets"
            );
            let via_to_string: String = variant.to_string();
            assert_eq!(
                via_borrowed_cow.as_ref(),
                via_to_string.as_str(),
                "From<&Semantic> for Cow<'static, str> must byte-\
                 equal Semantic::to_string on Semantic::{variant:?} \
                 — 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"
            );
            assert!(
                matches!(via_borrowed_cow, std::borrow::Cow::Borrowed(_)),
                "From<&Semantic> for Cow<'static, str> must land on \
                 the zero-alloc Cow::Borrowed arm on \
                 &Semantic::{variant:?} — a Cow::Owned outcome \
                 signals the borrowed-input surface has silently \
                 allocated where the substrate-primitive \
                 Semantic::as_str `&'static str` return makes the \
                 borrowed arm the type-correct projection"
            );
        }
        let via_iter: Vec<std::borrow::Cow<'static, str>> =
            Semantic::ALL.iter().map(std::borrow::Cow::from).collect();
        let via_method: Vec<std::borrow::Cow<'static, str>> = Semantic::ALL
            .iter()
            .map(|sem| std::borrow::Cow::Borrowed(sem.as_str()))
            .collect();
        assert_eq!(
            via_iter, via_method,
            "`.iter().map(Cow::from)` over Semantic::ALL — a call \
             site whose iteration axis holds `&Semantic` by \
             construction — must byte-equal `.iter().map(|sem| \
             Cow::Borrowed(sem.as_str()))` on every arm — the \
             borrowed-input `From<&Semantic> for Cow<'static, str>` \
             axis is what makes the `Cow::from` composition route \
             through the substrate-primitive `Semantic::as_str` \
             accessor without a spurious `Copy` deref (which would \
             only be reachable through the owned-input \
             `From<Semantic> for Cow<'static, str>` axis by first \
             calling `.copied()` on the iterator)"
        );
        for cow in &via_iter {
            assert!(
                matches!(cow, std::borrow::Cow::Borrowed(_)),
                "`.iter().map(Cow::from)` over Semantic::ALL must \
                 land on the zero-alloc Cow::Borrowed arm on every \
                 element — a Cow::Owned outcome signals the pipe has \
                 silently allocated through the borrowed-input axis \
                 where the substrate-primitive Semantic::as_str \
                 `&'static str` return makes the borrowed arm the \
                 type-correct projection"
            );
        }
        for &variant in Semantic::ALL {
            let via_cow: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<&Semantic>>::from(&variant);
            let re_parsed: Result<Semantic, ()> =
                <Semantic as TryFrom<&str>>::try_from(via_cow.as_ref());
            assert_eq!(
                re_parsed,
                Ok(variant),
                "trait-idiomatic borrowed-input Cow<'static, str> \
                 forward-projection + reverse-projection axis pair \
                 must round-trip &Semantic::{variant:?} through \
                 `(&variant).into::<Cow<'static, str>>()` on the \
                 borrowed-input surface and back through \
                 `TryFrom<&str>` on the projection's Cow::as_ref \
                 borrow — a break signals the borrowed-input \
                 Cow<'static, str> forward-emit and reverse-parse \
                 axes have drifted onto different vocabularies \
                 (unlike the peer CaixaKind axis pair, Semantic's \
                 forward emit and reverse parse share the same \
                 sixteen inline canonical-lowercase kebab byte-\
                 strings by construction, so the round-trip composes \
                 directly)"
            );
        }
    }

    #[test]
    fn semantic_from_into_box_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<Semantic> for Box<str>` — asserts the owned-input
        // standard-library trait impl and the substrate-primitive
        // [`super::Semantic::as_str`] `pub const fn` accessor resolve
        // to the same sixteen-arm canonical-lowercase kebab emit-set
        // across every arm the exhaustive [`super::Semantic::ALL`]
        // slice enumerates. Extends the outside-`caixa-core` tier of
        // the substrate-wide [`Box<str>`] forward-projection campaign
        // onto the fifth peer — the caixa-theme semantic-style
        // sixteen-arm closed-set fieldless typed enum — following the
        // first-mover [`caixa_arch::invariants::InvariantKind`] pair
        // (10613a7 owned + 5901887 borrowed), second-peer
        // [`caixa_arch::report::ArchVerdict`] pair (3e08f5a owned +
        // c4319a8 borrowed), third-peer [`super::Severity`] pair
        // (5116c95), and fourth-peer [`super::FixSafety`] pair
        // (cf0174b) that landed the tier one axis prior. 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> = sem.into();`-shaped call site reaches
        // through this impl and no other — a paired
        // `Box::from(sem.as_str())` open-code has no compile-time link
        // back to the substrate primitive.
        for &variant in Semantic::ALL {
            let via_trait: Box<str> = <Box<str> as From<Semantic>>::from(variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<Semantic> for Box<str> impl must round-trip \
                 Semantic::{variant:?} to the same canonical-lowercase \
                 kebab byte-string Semantic::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 Semantic::{variant:?} must \
                 byte-equal Semantic::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 semantic_from_borrowed_into_box_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<&Semantic> for Box<str>` — asserts the borrowed-
        // input standard-library trait impl and the substrate-
        // primitive [`super::Semantic::as_str`] `pub const fn`
        // accessor resolve to the same sixteen-arm canonical-lowercase
        // kebab emit-set across every arm the exhaustive
        // [`super::Semantic::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
        // `Semantic::ALL.iter().map(Box::<str>::from)`-shaped pipe
        // (whose iterator over `&'static [Semantic]` yields
        // `&Semantic` by construction) or a `let key: Box<str> =
        // (&sem).into();`-shaped call site reaches through this impl
        // and no other — the paired owned-input
        // `From<Semantic> for Box<str>` impl alone would force every
        // borrowed-input call site through an explicit `Copy` deref
        // (`Box::<str>::from(*sem)`) or a
        // `Box::<str>::from(sem.as_str())` open-code whose type bounds
        // have no compile-time link back to the substrate primitive.
        //
        // Closes the `{Self, &Self}` input-shape corner on the fifth
        // outside-`caixa-core` closed-set fieldless typed enum peer of
        // the substrate-wide [`Box<str>`] forward-projection campaign,
        // exactly as 5901887 closed the paired first-mover
        // `InvariantKind` axis one commit after (10613a7) landed,
        // c4319a8 closed the paired second-peer `ArchVerdict` axis one
        // commit after (3e08f5a) landed, 5116c95 landed the paired
        // third-peer `Severity` pair one axis prior, cf0174b landed
        // the paired fourth-peer `FixSafety` pair one axis prior,
        // cb1d068 closed the paired M2-OTP-shape `RestartPolicy` axis
        // one commit after (0a1b313) landed, and 3c971b2 closed the
        // paired M3-mesh-shape `PlacementStrategy` axis one commit
        // after (6d73e84) landed.
        for &variant in Semantic::ALL {
            let via_trait: Box<str> = <Box<str> as From<&Semantic>>::from(&variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<&Semantic> for Box<str> impl must round-trip \
                 &Semantic::{variant:?} to the same canonical-\
                 lowercase kebab byte-string Semantic::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 &Semantic::{variant:?} must \
                 byte-equal Semantic::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. `Semantic::ALL.iter()` yields `&Semantic` by
        // construction, so `.map(Box::<str>::from)` resolves through
        // the borrowed-input `From<&Semantic> 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>> = Semantic::ALL.iter().map(Box::<str>::from).collect();
        let via_accessor: Vec<&'static str> = Semantic::ALL.iter().map(|s| s.as_str()).collect();
        assert_eq!(
            via_pipe.len(),
            via_accessor.len(),
            "Semantic::ALL.iter().map(Box::<str>::from) pipe must \
             preserve arity against the paired Semantic::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,
                "Semantic::ALL.iter().map(Box::<str>::from) pipe must \
                 byte-equal the paired Semantic::ALL.iter().map(|s| \
                 s.as_str()) pipe on every arm — divergence signals \
                 the borrowed-input `From<&Semantic> for Box<str>` \
                 axis has silently detoured off the substrate-\
                 primitive accessor"
            );
        }
    }

    #[test]
    fn semantic_from_into_arc_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<Semantic> for std::sync::Arc<str>` — asserts the
        // owned-input standard-library trait impl and the substrate-
        // primitive [`super::Semantic::as_str`] `pub const fn` accessor
        // resolve to the same sixteen-arm canonical-lowercase kebab
        // emit-set across every arm the exhaustive
        // [`super::Semantic::ALL`] slice enumerates. Extends the
        // outside-`caixa-core` tier of the substrate-wide
        // [`std::sync::Arc<str>`] forward-projection campaign onto the
        // fifth peer — the caixa-theme semantic-style sixteen-arm
        // closed-set fieldless typed enum — following the first-mover
        // [`caixa_arch::invariants::InvariantKind`] pair (4e923c1 owned
        // + 03c043f borrowed), second-peer
        // [`caixa_arch::report::ArchVerdict`] pair (1682f8b owned +
        // 92ddfb2 borrowed), third-peer `caixa_lint::diagnostic::Severity`
        // pair (a7a9a6d owned + 4f041e1 borrowed), and fourth-peer
        // `caixa_lint::diagnostic::FixSafety` pair (fb73edb owned +
        // 822138e borrowed) that landed the tier one axis prior.
        //
        // 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> = sem.into();`-shaped call
        // site reaches through this impl and no other — a paired
        // `std::sync::Arc::<str>::from(sem.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(sem))`
        // 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::Semantic::as_str`] accessor trips at caixa-theme
        // test time.
        for &variant in Semantic::ALL {
            let via_trait: std::sync::Arc<str> =
                <std::sync::Arc<str> as From<Semantic>>::from(variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<Semantic> for std::sync::Arc<str> impl must \
                 round-trip Semantic::{variant:?} to the same \
                 canonical-lowercase kebab byte-string Semantic::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 Semantic::\
                 {variant:?} must byte-equal Semantic::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<Semantic>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_static,
                "From<Semantic> for std::sync::Arc<str> and \
                 From<Semantic> for &'static str must resolve \
                 identically on Semantic::{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<Semantic>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_string.as_str(),
                "From<Semantic> for std::sync::Arc<str> and \
                 From<Semantic> for String must resolve identically \
                 on Semantic::{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<Semantic>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_cow.as_ref(),
                "From<Semantic> for std::sync::Arc<str> and \
                 From<Semantic> for Cow<'static, str> must resolve \
                 identically on Semantic::{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<Semantic>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_box.as_ref(),
                "From<Semantic> for std::sync::Arc<str> and \
                 From<Semantic> for Box<str> must resolve identically \
                 on Semantic::{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 return-shape paths \
                  (borrowed-input &'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 \
                  Semantic::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 semantic_from_borrowed_into_arc_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<&Semantic> for std::sync::Arc<str>` — asserts the
        // borrowed-input standard-library trait impl and the substrate-
        // primitive [`super::Semantic::as_str`] `pub const fn` accessor
        // resolve to the same sixteen-arm canonical-lowercase kebab
        // emit-set across every arm the exhaustive
        // [`super::Semantic::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> = (&sem).into();`-shaped call
        // site or a
        // `Semantic::ALL.iter().map(std::sync::Arc::<str>::from)`-shaped
        // pipe reaches through this impl and no other — the paired
        // owned-input `From<Semantic> for std::sync::Arc<str>` impl
        // (65dbcff) forces every borrowed-input call site through an
        // explicit `Copy` deref
        // (`std::sync::Arc::<str>::from((*sem).as_str())`) or a
        // `std::sync::Arc::<str>::from(sem.as_str())` open-code whose
        // type bounds have no compile-time link back to the substrate
        // primitive.
        //
        // Closes the `{Self, &Self}` input-shape corner on the fifth
        // peer of the outside-`caixa-core` tier of the substrate-wide
        // trait-idiomatic [`std::sync::Arc<str>`] forward-projection
        // campaign, exactly as 03c043f closed the paired first-mover
        // [`caixa_arch::invariants::InvariantKind`] `{Self, &Self}`
        // corner (4e923c1 owned + 03c043f borrowed) on this tier,
        // 92ddfb2 closed the paired second-peer
        // [`caixa_arch::report::ArchVerdict`] `{Self, &Self}` corner
        // (1682f8b owned + 92ddfb2 borrowed) on this tier, 4f041e1
        // closed the paired third-peer `caixa_lint::diagnostic::Severity`
        // `{Self, &Self}` corner (a7a9a6d owned + 4f041e1 borrowed) on
        // this tier, and 822138e closed the paired fourth-peer
        // `caixa_lint::diagnostic::FixSafety` `{Self, &Self}` corner
        // (fb73edb owned + 822138e borrowed) on this tier.
        //
        // Also byte-parity witness against the paired owned-input
        // [`From<Semantic> for std::sync::Arc<str>`] and the sibling
        // borrowed-input [`From<&Semantic> for &'static str`],
        // [`From<&Semantic> for String`],
        // [`From<&Semantic> for Cow<'static, str>`], and
        // [`From<&Semantic> for Box<str>`] return-shape axes — locking
        // the five return-shape × input-shape paths together by
        // construction so any future detour off the substrate-primitive
        // accessor trips at caixa-theme test time. Then a
        // `.iter().map(std::sync::Arc::<str>::from)` pipe witness over
        // [`super::Semantic::ALL`] — whose iterator yields `&Semantic`
        // by construction, so the borrowed-input
        // [`std::sync::Arc<str>`] axis is what routes the pipe through
        // the substrate-primitive [`super::Semantic::as_str`] accessor
        // without a spurious [`Copy`] deref (which would only be
        // reachable through the owned-input
        // [`From<Semantic> for std::sync::Arc<str>`] axis by first
        // calling `.copied()` on the iterator).
        for &variant in Semantic::ALL {
            let via_trait: std::sync::Arc<str> =
                <std::sync::Arc<str> as From<&Semantic>>::from(&variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<&Semantic> for std::sync::Arc<str> impl must \
                 round-trip &Semantic::{variant:?} to the same \
                 canonical-lowercase kebab byte-string Semantic::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 &Semantic::\
                 {variant:?} must byte-equal Semantic::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_arc: std::sync::Arc<str> =
                <std::sync::Arc<str> as From<Semantic>>::from(variant);
            assert_eq!(
                via_trait, owned_arc,
                "From<&Semantic> for std::sync::Arc<str> and \
                 From<Semantic> for std::sync::Arc<str> must resolve \
                 identically on Semantic::{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<&Semantic>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_static,
                "From<&Semantic> for std::sync::Arc<str> and \
                 From<&Semantic> for &'static str must resolve \
                 identically on Semantic::{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<&Semantic>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_string.as_str(),
                "From<&Semantic> for std::sync::Arc<str> and \
                 From<&Semantic> for String must resolve identically \
                 on Semantic::{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<&Semantic>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_cow.as_ref(),
                "From<&Semantic> for std::sync::Arc<str> and \
                 From<&Semantic> for Cow<'static, str> must resolve \
                 identically on Semantic::{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<&Semantic>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_box.as_ref(),
                "From<&Semantic> for std::sync::Arc<str> and \
                 From<&Semantic> for Box<str> must resolve identically \
                 on Semantic::{variant:?} — divergence signals the \
                 borrowed-input std::sync::Arc<str> and Box<str> \
                 return-shape paths have drifted onto different \
                 emit-sets"
            );
        }
        // Pipe witness — the distinguishing shape that forces the
        // borrowed-input axis to be independent of the owned-input
        // peer. `Semantic::ALL.iter()` yields `&Semantic` by
        // construction, so `.map(std::sync::Arc::<str>::from)` resolves
        // through the borrowed-input
        // `From<&Semantic> for std::sync::Arc<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<std::sync::Arc<str>> = Semantic::ALL
            .iter()
            .map(std::sync::Arc::<str>::from)
            .collect();
        let via_accessor: Vec<&'static str> = Semantic::ALL.iter().map(|s| s.as_str()).collect();
        assert_eq!(
            via_pipe.len(),
            via_accessor.len(),
            "Semantic::ALL.iter().map(std::sync::Arc::<str>::from) pipe \
             must preserve arity against the paired \
             Semantic::ALL.iter().map(|s| s.as_str()) accessor pipe — \
             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,
                "Semantic::ALL.iter().map(std::sync::Arc::<str>::from) \
                 pipe must byte-equal the paired \
                 Semantic::ALL.iter().map(|s| s.as_str()) pipe on every \
                 arm — divergence signals the borrowed-input \
                 `From<&Semantic> for std::sync::Arc<str>` axis has \
                 silently detoured off the substrate-primitive accessor"
            );
        }
    }

    #[test]
    fn semantic_from_into_rc_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<Semantic> for std::rc::Rc<str>` — asserts the
        // owned-input standard-library trait impl and the substrate-
        // primitive [`super::Semantic::as_str`] `pub const fn`
        // accessor resolve to the same sixteen-arm canonical-lowercase
        // kebab emit-set across every arm the exhaustive
        // [`super::Semantic::ALL`] slice enumerates. Extends the
        // outside-`caixa-core` tier of the substrate-wide
        // [`std::rc::Rc<str>`] forward-projection campaign onto its
        // fifth peer — the caixa-theme semantic-style sixteen-arm
        // closed-set fieldless typed enum — following the first-mover
        // `caixa_arch::invariants::InvariantKind` pair (c71818b),
        // second-peer `caixa_arch::report::ArchVerdict` pair (cc759ef),
        // third-peer `caixa_lint::diagnostic::Severity` pair (d7c58b6),
        // and fourth-peer `caixa_lint::diagnostic::FixSafety` pair
        // (046cc5f) that landed the tier one axis prior.
        //
        // 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 the [`std::sync::Arc<str>`] and
        // [`std::rc::Rc<str>`] trait tables are disjoint, so this axis
        // is a distinct trait-idiomatic surface that a
        // `let key: std::rc::Rc<str> = sem.into();`-shaped call site
        // reaches through this impl and no other — a paired
        // `std::rc::Rc::<str>::from(sem.as_str())` open-code has no
        // compile-time link back to the substrate primitive.
        //
        // 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::Semantic::as_str`] accessor trips at
        // caixa-theme test time.
        for &variant in Semantic::ALL {
            let via_trait: std::rc::Rc<str> = <std::rc::Rc<str> as From<Semantic>>::from(variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<Semantic> for std::rc::Rc<str> impl must \
                 round-trip Semantic::{variant:?} to the same \
                 canonical-lowercase kebab byte-string Semantic::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 Semantic::{variant:?} \
                 must byte-equal Semantic::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<Semantic>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_static,
                "From<Semantic> for std::rc::Rc<str> and From<Semantic> \
                 for &'static str must resolve identically on \
                 Semantic::{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<Semantic>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_string.as_str(),
                "From<Semantic> for std::rc::Rc<str> and From<Semantic> \
                 for String must resolve identically on \
                 Semantic::{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<Semantic>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_cow.as_ref(),
                "From<Semantic> for std::rc::Rc<str> and From<Semantic> \
                 for Cow<'static, str> must resolve identically on \
                 Semantic::{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<Semantic>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_box.as_ref(),
                "From<Semantic> for std::rc::Rc<str> and From<Semantic> \
                 for Box<str> must resolve identically on \
                 Semantic::{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<Semantic>>::from(variant);
            assert_eq!(
                via_trait.as_ref(),
                owned_arc.as_ref(),
                "From<Semantic> for std::rc::Rc<str> and From<Semantic> \
                 for std::sync::Arc<str> must resolve identically on \
                 Semantic::{variant:?} — divergence signals the owned-\
                 input std::rc::Rc<str> and std::sync::Arc<str> return-\
                 shape paths have drifted onto different emit-sets (the \
                 two disjoint reference-counted trait tables have \
                 desynchronized on the caixa-theme semantic-style axis)"
            );
        }
    }

    #[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 Semantic::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 semantic_from_borrowed_into_rc_str_routes_through_as_str_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl From<&Semantic> for std::rc::Rc<str>` — asserts the
        // borrowed-input standard-library trait impl and the substrate-
        // primitive [`super::Semantic::as_str`] `pub const fn`
        // accessor resolve to the same sixteen-arm canonical-lowercase
        // kebab emit-set across every arm the exhaustive
        // [`super::Semantic::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> = (&sem).into();`-shaped call site
        // or a
        // `Semantic::ALL.iter().map(std::rc::Rc::<str>::from)`-shaped
        // pipe reaches through this impl and no other — the paired
        // owned-input `From<Semantic> for std::rc::Rc<str>` impl forces
        // every borrowed-input call site through an explicit `Copy`
        // deref (`std::rc::Rc::<str>::from((*sem).as_str())`) or a
        // `std::rc::Rc::<str>::from(sem.as_str())` open-code whose type
        // bounds have no compile-time link back to the substrate
        // primitive.
        //
        // Closes the `{Self, &Self}` input-shape corner on the fifth
        // peer of the outside-`caixa-core` tier of the substrate-wide
        // trait-idiomatic [`std::rc::Rc<str>`] forward-projection
        // campaign, matching the trajectory the paired
        // [`caixa_core::CaixaKind`] (e04aff0),
        // [`caixa_core::CaixaDialeto`] (c5595e5),
        // [`caixa_core::aplicacao::PlacementStrategy`] (91b4c92),
        // `caixa_arch::invariants::InvariantKind` (c71818b),
        // `caixa_arch::report::ArchVerdict` (cc759ef),
        // `caixa_lint::diagnostic::Severity` (d7c58b6),
        // `caixa_lint::diagnostic::FixSafety` (046cc5f),
        // `caixa_core::render::PathShapeViolation` (31fc43e), and
        // `caixa_core::dep::DepList` (38f6a3a) pairs walked before it
        // on the caixa-core-internal, M3-mesh-primitive-defining,
        // render-side, and outside-`caixa-core` tiers of the same axis.
        //
        // Also byte-parity witness against the paired owned-input
        // [`From<Semantic> for std::rc::Rc<str>`] and the sibling
        // borrowed-input [`From<&Semantic> for &'static str`],
        // [`From<&Semantic> for String`],
        // [`From<&Semantic> for Cow<'static, str>`],
        // [`From<&Semantic> for Box<str>`], and
        // [`From<&Semantic> for std::sync::Arc<str>`] return-shape
        // axes — locking the six return-shape × input-shape paths
        // together by construction so any future detour off the
        // substrate-primitive accessor trips at caixa-theme test time.
        // Then a `.iter().map(std::rc::Rc::<str>::from)` pipe witness
        // over [`super::Semantic::ALL`] — whose iterator yields
        // `&Semantic` by construction, so the borrowed-input
        // [`std::rc::Rc<str>`] axis is what routes the pipe through
        // the substrate-primitive [`super::Semantic::as_str`] accessor
        // without a spurious [`Copy`] deref.
        for &variant in Semantic::ALL {
            let via_trait: std::rc::Rc<str> = <std::rc::Rc<str> as From<&Semantic>>::from(&variant);
            let via_method: &'static str = variant.as_str();
            assert_eq!(
                via_trait.as_ref(),
                via_method,
                "From<&Semantic> for std::rc::Rc<str> impl must \
                 round-trip &Semantic::{variant:?} to the same \
                 canonical-lowercase kebab byte-string Semantic::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 &Semantic::{variant:?} \
                 must byte-equal Semantic::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_rc: std::rc::Rc<str> = <std::rc::Rc<str> as From<Semantic>>::from(variant);
            assert_eq!(
                via_trait, owned_rc,
                "From<&Semantic> for std::rc::Rc<str> and From<Semantic> \
                 for std::rc::Rc<str> must resolve identically on \
                 Semantic::{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<&Semantic>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_static,
                "From<&Semantic> for std::rc::Rc<str> and From<&Semantic> \
                 for &'static str must resolve identically on \
                 Semantic::{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<&Semantic>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_string.as_str(),
                "From<&Semantic> for std::rc::Rc<str> and From<&Semantic> \
                 for String must resolve identically on \
                 Semantic::{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<&Semantic>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_cow.as_ref(),
                "From<&Semantic> for std::rc::Rc<str> and From<&Semantic> \
                 for Cow<'static, str> must resolve identically on \
                 Semantic::{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<&Semantic>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_box.as_ref(),
                "From<&Semantic> for std::rc::Rc<str> and From<&Semantic> \
                 for Box<str> must resolve identically on \
                 Semantic::{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<&Semantic>>::from(&variant);
            assert_eq!(
                via_trait.as_ref(),
                borrowed_arc.as_ref(),
                "From<&Semantic> for std::rc::Rc<str> and From<&Semantic> \
                 for std::sync::Arc<str> must resolve identically on \
                 Semantic::{variant:?} — divergence signals the \
                 borrowed-input std::rc::Rc<str> and std::sync::Arc<str> \
                 return-shape paths have drifted onto different emit-\
                 sets (the two disjoint reference-counted trait tables \
                 have desynchronized on the caixa-theme semantic-style \
                 axis under the borrowed-input corner)"
            );
        }
        // Pipe witness — the distinguishing shape that forces the
        // borrowed-input axis to be independent of the owned-input
        // peer. `Semantic::ALL.iter()` yields `&Semantic` by
        // construction, so `.map(std::rc::Rc::<str>::from)` resolves
        // through the borrowed-input
        // `From<&Semantic> for std::rc::Rc<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<std::rc::Rc<str>> =
            Semantic::ALL.iter().map(std::rc::Rc::<str>::from).collect();
        let via_accessor: Vec<&'static str> = Semantic::ALL.iter().map(|s| s.as_str()).collect();
        assert_eq!(
            via_pipe.len(),
            via_accessor.len(),
            "Semantic::ALL.iter().map(std::rc::Rc::<str>::from) pipe \
             must preserve arity against the paired \
             Semantic::ALL.iter().map(|s| s.as_str()) accessor pipe — 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,
                "Semantic::ALL.iter().map(std::rc::Rc::<str>::from) pipe \
                 must byte-equal the paired \
                 Semantic::ALL.iter().map(|s| s.as_str()) pipe on every \
                 arm — divergence signals the borrowed-input \
                 `From<&Semantic> for std::rc::Rc<str>` axis has \
                 silently detoured off the substrate-primitive accessor"
            );
        }
    }

    #[test]
    fn semantic_wire_names_covers_every_arm() {
        // Load-bearing pin on the substrate-canonical
        // [`super::Semantic::WIRE_NAMES`] exhaustive accept-set roster
        // on the caixa-theme semantic-style lowercase-kebab wire-form
        // axis: every variant of the sibling [`super::Semantic::ALL`]
        // exhaustive-iteration surface must project through
        // [`super::Semantic::as_str`] onto an entry the
        // [`super::Semantic::WIRE_NAMES`] roster carries, and the
        // roster's length must byte-equal `super::Semantic::ALL.len()`
        // so a silent skew between the [`super::Semantic::as_str`]
        // match's arm-set and the roster's arm-set trips here at
        // caixa-theme test time rather than at a downstream
        // `feira lint --list-styles` per-arm listing / `caixa-lsp`
        // per-`SemanticTokenType` registration walk / `caixa.nvim`
        // per-highlight-group re-loader / `blackmatter-shell` per-arm
        // `data-semantic="<kebab>"` DOM-attribute emit drift.
        //
        // A future arm addition (a `Namespace` tier between
        // [`super::Semantic::Symbol`] and [`super::Semantic::KeywordArg`]
        // for the M4 tatara-lisp module system's qualified-name
        // semantic-token dispatch, a `Deleted` tier for a hard-delete-
        // mark distinct from [`super::Semantic::Removed`] the future
        // 3-way diff surface grows — both trajectory items the sibling
        // [`super::Semantic::ALL`] doc block already names) extends
        // [`super::Semantic::ALL`] as a single edit and this pin sweeps
        // the new arm by iteration; the paired
        // [`super::Semantic::WIRE_NAMES`] roster must grow in lockstep
        // or this assertion trips. Every entry is further pinned to
        // open with a lowercase ASCII byte (matching the substrate-wide
        // lowercase-tag convention every peer closed-set enum whose
        // canonical projection is a lowercase-tag byte-string carries),
        // so a silent collapse of the caixa-theme semantic-style axis
        // with any hypothetical PascalCase peer wire-form axis (an
        // entry byte-identical to the Debug-derived
        // `"Keyword"` / `"Symbol"` / `"KeywordArg"` / … shapes that
        // would let a wire-axis consumer accept the source-side variant
        // identifier) trips here rather than at a downstream theme-
        // overlay round-trip miss.
        //
        // Peer of the sibling
        // [`caixa_core::kind::tests::caixa_kind_wire_names_covers_every_arm`]
        // (bd708bd),
        // [`caixa_core::supervisor::tests::restart_strategy_wire_names_covers_every_arm`]
        // (3033f45),
        // [`caixa_core::supervisor::tests::restart_policy_wire_names_covers_every_arm`]
        // (ce9412b),
        // [`caixa_core::aplicacao::tests::placement_strategy_wire_names_covers_every_arm`]
        // (3e5b194),
        // [`caixa_core::render::tests::path_shape_violation_wire_names_covers_every_arm`]
        // (0330bd3),
        // [`caixa_core::dialeto::tests::caixa_dialeto_wire_names_covers_every_arm`]
        // (0402726),
        // `caixa_arch::invariants::tests::invariant_kind_wire_names_covers_every_arm`
        // (78f5522),
        // `caixa_arch::report::tests::arch_verdict_wire_names_covers_every_arm`
        // (ebddef0),
        // `caixa_lint::diagnostic::tests::severity_wire_names_covers_every_arm`
        // (a199462), and
        // `caixa_lint::diagnostic::tests::fix_safety_wire_names_covers_every_arm`
        // (5837236) pins — the same closed-set exhaustive-roster
        // coverage discipline extended here onto the *fifth outside*-
        // caixa-core closed-set fieldless typed enum on the caixa
        // surface (the caixa-theme semantic-style axis, and the first
        // inside `caixa-theme`).
        //
        // Fail-before-pass-after locally verified by mutating one arm
        // of the paired `CAIXA_THEME_SEMANTIC_WIRE_*` const family
        // (e.g. rebranding `CAIXA_THEME_SEMANTIC_WIRE_KEYWORD` from
        // `"keyword"` to `"kw"`) — the length pin still passes but the
        // `contains` check fires on the mutated arm; and by shortening
        // the roster to one entry — the length pin fires first.
        assert_eq!(
            super::Semantic::WIRE_NAMES.len(),
            super::Semantic::ALL.len(),
            "Semantic::WIRE_NAMES.len() must byte-equal \
             Semantic::ALL.len() — a mismatch means the roster and \
             the enum's arm-set have drifted; downstream consumers \
             that fan through both will silently disagree on the \
             accepted arm-set"
        );
        for &variant in super::Semantic::ALL {
            let wire = variant.as_str();
            assert!(
                super::Semantic::WIRE_NAMES.contains(&wire),
                "Semantic::{variant:?}.as_str() = {wire:?} must be a \
                 member of Semantic::WIRE_NAMES — the emitter and the \
                 roster have drifted out of lockstep"
            );
        }
        for tag in super::Semantic::WIRE_NAMES {
            let first = tag.chars().next().unwrap_or_else(|| {
                panic!(
                    "Semantic::WIRE_NAMES entry {tag:?} must be a \
                     non-empty lowercase-tag byte-string"
                )
            });
            assert!(
                first.is_ascii_lowercase(),
                "Semantic::WIRE_NAMES entry {tag:?} must open with a \
                 lowercase ASCII byte (matching the substrate-wide \
                 lowercase-tag convention every peer closed-set enum \
                 whose canonical projection is a lowercase-tag byte-\
                 string carries) — an entry opening with an uppercase \
                 byte would collide the roster with any hypothetical \
                 peer PascalCase wire-form axis a downstream consumer \
                 might disambiguate against (the Debug-derived \
                 `\"Keyword\"` / `\"Symbol\"` / `\"KeywordArg\"` / … \
                 shapes)"
            );
        }
        // Pin the exact sixteen-arm roster in declaration order so a
        // future arm-swap on either the roster or the paired
        // `CAIXA_THEME_SEMANTIC_WIRE_*` constants (a rebrand of the
        // arm-tag mapping that leaves both the length pin and the
        // membership pin passing on their own) trips at caixa-theme
        // test time under `assert_eq!`. Order matches variant
        // declaration order verbatim (`Keyword` → `Symbol` →
        // `KeywordArg` → `String` → `Number` → `Literal` → `Comment` →
        // `Accent` → `Muted` → `Error` → `Warning` → `Info` → `Hint` →
        // `Added` → `Removed` → `Unchanged`) so the roster is the
        // canonical semantic-style ordering every listing / rendering
        // consumer defers to.
        assert_eq!(
            super::Semantic::WIRE_NAMES,
            &[
                super::CAIXA_THEME_SEMANTIC_WIRE_KEYWORD,
                super::CAIXA_THEME_SEMANTIC_WIRE_SYMBOL,
                super::CAIXA_THEME_SEMANTIC_WIRE_KEYWORD_ARG,
                super::CAIXA_THEME_SEMANTIC_WIRE_STRING,
                super::CAIXA_THEME_SEMANTIC_WIRE_NUMBER,
                super::CAIXA_THEME_SEMANTIC_WIRE_LITERAL,
                super::CAIXA_THEME_SEMANTIC_WIRE_COMMENT,
                super::CAIXA_THEME_SEMANTIC_WIRE_ACCENT,
                super::CAIXA_THEME_SEMANTIC_WIRE_MUTED,
                super::CAIXA_THEME_SEMANTIC_WIRE_ERROR,
                super::CAIXA_THEME_SEMANTIC_WIRE_WARNING,
                super::CAIXA_THEME_SEMANTIC_WIRE_INFO,
                super::CAIXA_THEME_SEMANTIC_WIRE_HINT,
                super::CAIXA_THEME_SEMANTIC_WIRE_ADDED,
                super::CAIXA_THEME_SEMANTIC_WIRE_REMOVED,
                super::CAIXA_THEME_SEMANTIC_WIRE_UNCHANGED,
            ],
            "Semantic::WIRE_NAMES must enumerate every arm's wire-form \
             tag exactly once, in variant declaration order (Keyword → \
             Symbol → KeywordArg → String → Number → Literal → Comment \
             → Accent → Muted → Error → Warning → Info → Hint → Added \
             → Removed → Unchanged)"
        );
        // Byte-parity pin on the paired reverse projection: every
        // entry in the roster must round-trip cleanly through
        // [`super::Semantic::from_wire`] back to the same arm the
        // [`super::Semantic::as_str`] emitter returned it for.
        // Refuses any future de-lift that swaps the sixteen consts
        // through the reverse projection out of lockstep with the
        // forward emitter (a mid-arm rebrand touching only `as_str`
        // but not `from_wire`, an argument-ordering swap on one of
        // the match arms, a stray `to_lowercase` normalization on
        // either side that would silently pass the identity round-trip
        // on the already-lowercase corpus but split the two
        // projections on any future non-lowercase input).
        for (&variant, tag) in super::Semantic::ALL.iter().zip(super::Semantic::WIRE_NAMES) {
            assert_eq!(
                super::Semantic::from_wire(tag),
                Some(variant),
                "Semantic::from_wire({tag:?}) must round-trip back to \
                 Semantic::{variant:?} — emitter and parser have \
                 drifted off the paired CAIXA_THEME_SEMANTIC_WIRE_* \
                 const family"
            );
        }
    }

    #[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 Semantic::ALL — \
                  the accepted line-count cost of extending 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 semantic_as_ref_bytes_routes_through_as_str_accessor() {
        // `<T: AsRef<[u8]>>`-bound-consumer witness helper: a generic
        // byte-input function accepts a [`super::Semantic`] directly
        // through the trait bound, without the caller open-coding the
        // two-hop `sem.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 future per-theme BLAKE3 content-address closure
        // that composes `hasher.update(sem)` on the audit-log closure
        // builder reaches the substrate-primitive `as_str` accessor
        // through the [`super::Semantic`] `AsRef<[u8]>` axis and no
        // other.
        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
            }
        }

        for &variant in super::Semantic::ALL {
            let via_trait: &[u8] = <super::Semantic 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 Semantic impl must byte-equal \
                 Semantic::as_str().as_bytes() on \
                 Semantic::{variant:?} — divergence signals a silent \
                 detour off the substrate-primitive accessor"
            );
            // Cross-axis witness against the paired str-view axes'
            // `.as_bytes()` byte-tails.
            let via_as_ref_str: &str = <super::Semantic as AsRef<str>>::as_ref(&variant);
            assert_eq!(
                via_trait,
                via_as_ref_str.as_bytes(),
                "AsRef<[u8]> for Semantic and AsRef<str> for Semantic \
                 `.as_bytes()` must byte-equal on Semantic::{variant:?}"
            );
            let via_display: String = format!("{variant}");
            assert_eq!(
                via_trait,
                via_display.as_bytes(),
                "AsRef<[u8]> for Semantic and \
                 std::fmt::Display::fmt::<Semantic> `.as_bytes()` must \
                 byte-equal on Semantic::{variant:?}"
            );
            let via_as_str: &'static str = variant.as_str();
            assert_eq!(
                via_trait,
                via_as_str.as_bytes(),
                "AsRef<[u8]> for Semantic and Semantic::as_str \
                 `.as_bytes()` must byte-equal on Semantic::{variant:?}"
            );
            // Cross-axis witness against the paired reverse-projection
            // axes' `.as_bytes()` byte-tails.
            let via_static: &'static str = <&'static str>::from(variant);
            assert_eq!(
                via_trait,
                via_static.as_bytes(),
                "AsRef<[u8]> for Semantic and From<Semantic> for \
                 &'static str `.as_bytes()` must byte-equal on \
                 Semantic::{variant:?}"
            );
            let via_string: String = String::from(variant);
            assert_eq!(
                via_trait,
                via_string.as_bytes(),
                "AsRef<[u8]> for Semantic and From<Semantic> for \
                 String `.as_bytes()` must byte-equal on \
                 Semantic::{variant:?}"
            );
            let via_cow: std::borrow::Cow<'static, str> =
                std::borrow::Cow::<'static, str>::from(variant);
            assert_eq!(
                via_trait,
                via_cow.as_bytes(),
                "AsRef<[u8]> for Semantic and From<Semantic> for \
                 Cow<'static, str> `.as_bytes()` must byte-equal on \
                 Semantic::{variant:?}"
            );
            let via_box: Box<str> = Box::<str>::from(variant);
            assert_eq!(
                via_trait,
                via_box.as_bytes(),
                "AsRef<[u8]> for Semantic and From<Semantic> for \
                 Box<str> `.as_bytes()` must byte-equal on \
                 Semantic::{variant:?}"
            );
            let atomic_shared: std::sync::Arc<str> = std::sync::Arc::<str>::from(variant);
            assert_eq!(
                via_trait,
                atomic_shared.as_bytes(),
                "AsRef<[u8]> for Semantic and From<Semantic> for \
                 std::sync::Arc<str> `.as_bytes()` must byte-equal on \
                 Semantic::{variant:?}"
            );
            let single_thread_shared: std::rc::Rc<str> = std::rc::Rc::<str>::from(variant);
            assert_eq!(
                via_trait,
                single_thread_shared.as_bytes(),
                "AsRef<[u8]> for Semantic and From<Semantic> for \
                 std::rc::Rc<str> `.as_bytes()` must byte-equal on \
                 Semantic::{variant:?}"
            );
            // `<T: AsRef<[u8]>>`-bound-consumer witness on both owned
            // and borrowed input surfaces.
            let via_generic_owned = generic_bytes_sink(variant);
            assert_eq!(
                via_trait, via_generic_owned,
                "generic `<T: AsRef<[u8]>>`-bound consumer on the \
                 owned-input surface must byte-equal the substrate-\
                 primitive as_str accessor's byte-tail on \
                 Semantic::{variant:?}"
            );
            let via_generic_borrowed = generic_bytes_sink(&variant);
            assert_eq!(
                via_trait, via_generic_borrowed,
                "generic `<T: AsRef<[u8]>>`-bound consumer on the \
                 borrowed-input surface must byte-equal the substrate-\
                 primitive as_str accessor's byte-tail on \
                 Semantic::{variant:?}"
            );
            // `blake3::Hasher::update`-shape byte-input surface witness
            // on both owned and borrowed input surfaces — the primary
            // compounding target on the byte-view axis is the caixa-
            // lacre BLAKE3 content-address closure, which binds its
            // input through exactly this trait bound.
            let mut hasher_owned_input = MockHasher::new();
            hasher_owned_input.update(variant);
            let owned_digest = hasher_owned_input.finalize();
            assert_eq!(
                owned_digest.as_slice(),
                via_trait,
                "blake3::Hasher::update-shape byte-input surface on the \
                 owned-input surface must byte-equal the substrate-\
                 primitive as_str accessor's byte-tail on \
                 Semantic::{variant:?}"
            );
            let mut hasher_borrowed_input = MockHasher::new();
            hasher_borrowed_input.update(&variant);
            let borrowed_digest = hasher_borrowed_input.finalize();
            assert_eq!(
                borrowed_digest.as_slice(),
                via_trait,
                "blake3::Hasher::update-shape byte-input surface on the \
                 borrowed-input surface must byte-equal the substrate-\
                 primitive as_str accessor's byte-tail on \
                 Semantic::{variant:?}"
            );
        }
    }

    #[test]
    #[allow(
        clippy::too_many_lines,
        reason = "cross-axis partition pin folds the substrate-primitive \
                  as_str accessor's `.as_bytes().to_vec()` byte-tail plus \
                  the paired AsRef<[u8]> borrowed byte-view axis and the \
                  str-owned reverse-projection family's `.into_bytes()` / \
                  `.as_bytes().to_vec()` byte-tails plus a \
                  <T: Into<Vec<u8>>>-bound-consumer witness plus a \
                  std::io::Write::write_all-shape owned-byte-sink surface \
                  witness plus a Debug-derive rejection witness into one \
                  exhaustive round-trip over Semantic::ALL — the accepted \
                  line-count cost of extending the byte-owned reverse-\
                  projection axis keyed to the substrate-primitive as_str \
                  accessor at the same test-site"
    )]
    fn semantic_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::Semantic`] directly
        // through the trait bound, without the caller open-coding the
        // three-hop `semantic.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-theme audit-log
        // byte-sink that consumes a `Vec<u8>` payload via
        // `Into<Vec<u8>>`, so a future per-theme 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
            }
        }

        for &variant in super::Semantic::ALL {
            let via_owned_from: Vec<u8> = <Vec<u8> as From<super::Semantic>>::from(variant);
            let via_borrowed_from: Vec<u8> = <Vec<u8> as From<&super::Semantic>>::from(&variant);
            let via_method_bytes: Vec<u8> = variant.as_str().as_bytes().to_vec();
            assert_eq!(
                via_owned_from, via_method_bytes,
                "From<Semantic> for Vec<u8> impl must byte-equal \
                 Semantic::as_str().as_bytes().to_vec() on \
                 Semantic::{variant:?} — divergence signals a silent \
                 detour off the substrate-primitive accessor"
            );
            assert_eq!(
                via_borrowed_from, via_method_bytes,
                "From<&Semantic> for Vec<u8> impl must byte-equal \
                 Semantic::as_str().as_bytes().to_vec() on \
                 Semantic::{variant:?} — divergence signals a silent \
                 detour off the substrate-primitive accessor"
            );
            assert_eq!(
                via_owned_from, via_borrowed_from,
                "From<Semantic> for Vec<u8> and From<&Semantic> for \
                 Vec<u8> must byte-equal each other on \
                 Semantic::{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 (2c58220): 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] = <super::Semantic as AsRef<[u8]>>::as_ref(&variant);
            assert_eq!(
                via_owned_from,
                borrowed_bytes.to_vec(),
                "From<Semantic> for Vec<u8> and AsRef<[u8]> for Semantic \
                 must resolve to byte-equal byte-tails on \
                 Semantic::{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 sixteen-arm canonical-lowercase
            // kebab 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<super::Semantic>>::from(variant);
            assert_eq!(
                via_owned_from,
                owned_string.into_bytes(),
                "From<Semantic> for Vec<u8> and \
                 String::from(semantic).into_bytes() must resolve to \
                 byte-equal byte-tails on Semantic::{variant:?}"
            );
            let owned_cow: std::borrow::Cow<'static, str> =
                <std::borrow::Cow<'static, str> as From<super::Semantic>>::from(variant);
            assert_eq!(
                via_owned_from,
                owned_cow.as_bytes().to_vec(),
                "From<Semantic> for Vec<u8> and From<Semantic> for \
                 Cow<'static, str> must resolve to byte-equal byte-\
                 tails on Semantic::{variant:?}"
            );
            let owned_box: Box<str> = <Box<str> as From<super::Semantic>>::from(variant);
            assert_eq!(
                via_owned_from,
                owned_box.as_bytes().to_vec(),
                "From<Semantic> for Vec<u8> and From<Semantic> for \
                 Box<str> must resolve to byte-equal byte-tails on \
                 Semantic::{variant:?}"
            );
            let owned_arc: std::sync::Arc<str> =
                <std::sync::Arc<str> as From<super::Semantic>>::from(variant);
            assert_eq!(
                via_owned_from,
                owned_arc.as_bytes().to_vec(),
                "From<Semantic> for Vec<u8> and From<Semantic> for \
                 std::sync::Arc<str> must resolve to byte-equal byte-\
                 tails on Semantic::{variant:?}"
            );
            let owned_rc_str: std::rc::Rc<str> =
                <std::rc::Rc<str> as From<super::Semantic>>::from(variant);
            assert_eq!(
                via_owned_from,
                owned_rc_str.as_bytes().to_vec(),
                "From<Semantic> for Vec<u8> and From<Semantic> for \
                 std::rc::Rc<str> must resolve to byte-equal byte-tails \
                 on Semantic::{variant:?}"
            );
            // Reject the `format!("{:?}", variant)` PascalCase byte-
            // string any future per-theme render site would otherwise
            // reach without the substrate-primitive
            // [`super::Semantic::as_str`] accessor: the byte-owned
            // reverse-projection axis must not silently collapse back
            // onto the derived [`std::fmt::Debug`] output, whose bytes
            // differ on every arm (`"Keyword"` vs. `"keyword"`,
            // `"KeywordArg"` vs. `"keyword-arg"`). A future
            // `#[derive(Debug)]` swap for a hand-rolled `impl Debug` or
            // a silent re-route of the byte-owned axis onto the sibling
            // `Debug` output trips here rather than at a downstream
            // operator's terminal-scroll.
            let debug_bytes = format!("{variant:?}").into_bytes();
            assert_ne!(
                via_owned_from, debug_bytes,
                "From<Semantic> for Vec<u8> must land on the canonical-\
                 lowercase kebab byte-string (Semantic::as_str), not the \
                 PascalCase byte-string `format!(\"{{:?}}\", variant)`; \
                 if this fails on Semantic::{variant:?}, the byte-owned \
                 axis has silently collapsed back onto the Debug-derive \
                 output"
            );
        }
        // `<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::Semantic`] and a `&Semantic` directly through the
        // trait bound, without the caller open-coding the three-hop
        // `semantic.as_str().as_bytes().to_vec()` composition.
        for &variant in super::Semantic::ALL {
            let via_generic_owned = generic_owned_bytes_sink(variant);
            // Bind the borrowed-input path through an explicit
            // `&Semantic` local so the generic-consumer witness routes
            // through `From<&Semantic> for Vec<u8>` (T binds to
            // `&Semantic`) rather than clippy-collapsing the borrow
            // onto the owned-input `From<Semantic> for Vec<u8>` peer.
            let variant_ref: &super::Semantic = &variant;
            let via_generic_borrowed = generic_owned_bytes_sink(variant_ref);
            let via_method_bytes: Vec<u8> = variant.as_str().as_bytes().to_vec();
            assert_eq!(
                via_generic_owned, via_method_bytes,
                "generic `<T: Into<Vec<u8>>>`-bound consumer on the \
                 owned-input surface must byte-equal the substrate-\
                 primitive as_str accessor's byte-tail on \
                 Semantic::{variant:?}"
            );
            assert_eq!(
                via_generic_borrowed, via_method_bytes,
                "generic `<T: Into<Vec<u8>>>`-bound consumer on the \
                 borrowed-input surface must byte-equal the substrate-\
                 primitive as_str accessor's byte-tail on \
                 Semantic::{variant:?}"
            );
        }
        // `std::io::Write::write_all`-shape owned-byte-sink surface
        // witness on both owned and borrowed input shapes — the primary
        // compounding target on the byte-owned reverse-projection axis
        // is a future per-theme audit-log payload composer that binds
        // its byte-tag input through exactly this trait bound.
        for &variant in super::Semantic::ALL {
            let via_method_bytes: Vec<u8> = variant.as_str().as_bytes().to_vec();
            let mut sink_owned = MockOwnedByteSink::new();
            sink_owned.write_all(variant);
            let owned_written = sink_owned.finalize();
            assert_eq!(
                owned_written, via_method_bytes,
                "std::io::Write::write_all-shape owned-byte-sink \
                 surface on the owned-input surface must byte-equal the \
                 substrate-primitive as_str accessor's byte-tail on \
                 Semantic::{variant:?}"
            );
            let mut sink_borrowed = MockOwnedByteSink::new();
            let variant_ref: &super::Semantic = &variant;
            sink_borrowed.write_all(variant_ref);
            let borrowed_written = sink_borrowed.finalize();
            assert_eq!(
                borrowed_written, via_method_bytes,
                "std::io::Write::write_all-shape owned-byte-sink \
                 surface on the borrowed-input surface must byte-equal \
                 the substrate-primitive as_str accessor's byte-tail on \
                 Semantic::{variant:?}"
            );
        }
    }

    #[test]
    fn semantic_try_from_bytes_routes_through_from_wire_accessor() {
        // Fail-before-pass-after byte-parity pin on the newly lifted
        // `impl TryFrom<&[u8]> for Semantic` — asserts the trait-
        // idiomatic byte-view reverse-projection standard-library impl
        // and the substrate-primitive [`super::Semantic::from_wire`]
        // `Option<Self>` accessor resolve to the same sixteen-arm
        // canonical-lowercase-kebab semantic-style accept-set across
        // every arm the exhaustive [`super::Semantic::ALL`] slice
        // enumerates. Extends the substrate-wide trait-idiomatic byte-
        // view reverse-projection axis onto the *fifth outside-
        // `caixa-core`* closed-set fieldless typed-enum peer (and the
        // first inside `caixa-theme`) — matching the paired
        // [`super::Semantic`] byte-view forward triple ([`AsRef<[u8]>`],
        // [`From<Semantic> for Vec<u8>`],
        // [`From<&Semantic> for Vec<u8>`]) and the paired str-view
        // reverse-projection axis ([`TryFrom<&str> for Semantic`])
        // already walked on this enum, and matching the trajectory the
        // first-mover outside-`caixa-core`
        // `caixa_arch::invariants::InvariantKind` `TryFrom<&[u8]>` impl
        // (40b7417), second-mover outside-`caixa-core`
        // `caixa_arch::report::ArchVerdict` `TryFrom<&[u8]>` impl
        // (4dbca85), third-mover outside-`caixa-core`
        // `caixa_lint::diagnostic::Severity` `TryFrom<&[u8]>` impl
        // (f11dc96), and fourth-mover outside-`caixa-core`
        // `caixa_lint::diagnostic::FixSafety` `TryFrom<&[u8]>` impl
        // (46a3e3e) walked before it.
        //
        // 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::Semantic::from_wire`] accessor so every future
        // `<T: for<'a> TryFrom<&'a [u8]>>`-bound consumer reaches the
        // same sixteen-arm semantic-style accept-set through one trait
        // dispatch.
        for &variant in super::Semantic::ALL {
            let wire_bytes: &[u8] = variant.as_str().as_bytes();
            assert_eq!(
                <super::Semantic as TryFrom<&[u8]>>::try_from(wire_bytes),
                Ok(variant),
                "TryFrom<&[u8]> impl on Semantic must round-trip \
                 Semantic::{variant:?}.as_str().as_bytes() back to \
                 Ok(Semantic::{variant:?}) — divergence from \
                 Semantic::from_wire signals a silent detour off the \
                 substrate-primitive accessor"
            );
            assert_eq!(
                <super::Semantic as TryFrom<&[u8]>>::try_from(wire_bytes).ok(),
                super::Semantic::from_wire(variant.as_str()),
                "TryFrom<&[u8]> ok()-projection on \
                 Semantic::{variant:?}.as_str().as_bytes() must byte-\
                 equal Semantic::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 semantic-style
            // accept-set through the substrate-primitive `from_wire`
            // accessor.
            let via_str: Result<super::Semantic, ()> =
                <super::Semantic as TryFrom<&str>>::try_from(variant.as_str());
            let via_bytes: Result<super::Semantic, ()> =
                <super::Semantic as TryFrom<&[u8]>>::try_from(wire_bytes);
            assert_eq!(
                via_bytes, via_str,
                "TryFrom<&[u8]> and TryFrom<&str> reverse-projection \
                 axes on Semantic must agree on \
                 Semantic::{variant:?} — divergence signals the byte-\
                 view and str-view reverse paths have drifted off the \
                 same substrate-primitive from_wire accessor"
            );
            // Forward/reverse byte-view cross-axis witness: feed the
            // paired [`AsRef<[u8]>`] byte-tail back through the new
            // impl and assert it round-trips to the originating arm.
            let via_asref: &[u8] = <super::Semantic as AsRef<[u8]>>::as_ref(&variant);
            assert_eq!(
                <super::Semantic as TryFrom<&[u8]>>::try_from(via_asref),
                Ok(variant),
                "TryFrom<&[u8]> ∘ AsRef<[u8]> must round-trip \
                 Semantic::{variant:?} — divergence signals the \
                 forward and reverse byte-view axes have drifted off \
                 the same substrate-primitive as_str/from_wire pair"
            );
            // Byte-owned round-trip witness: feed the paired
            // [`From<Semantic> for Vec<u8>`] owned byte-tail back
            // through the byte-view reverse impl as a borrowed slice
            // and assert the round-trip lands on the originating arm
            // — locks the owned and borrowed byte projections
            // together at the substrate-primitive accessor.
            let owned_bytes: Vec<u8> = <Vec<u8> as From<super::Semantic>>::from(variant);
            assert_eq!(
                <super::Semantic as TryFrom<&[u8]>>::try_from(owned_bytes.as_slice()),
                Ok(variant),
                "TryFrom<&[u8]> ∘ From<Semantic> for Vec<u8> must \
                 round-trip Semantic::{variant:?} — divergence \
                 signals the byte-owned reverse-projection axis has \
                 drifted off the paired byte-view reverse axis"
            );
            // Borrowed-input byte-owned round-trip witness: same
            // discipline on the paired [`From<&Semantic> for Vec<u8>`]
            // owned byte-tail — closes the four-corner {owned-input,
            // borrowed-input} × {owned-output byte-vec, borrowed-
            // output byte-slice} projection square through the new
            // byte-view reverse impl.
            let borrowed_owned_bytes: Vec<u8> = <Vec<u8> as From<&super::Semantic>>::from(&variant);
            assert_eq!(
                <super::Semantic as TryFrom<&[u8]>>::try_from(borrowed_owned_bytes.as_slice()),
                Ok(variant),
                "TryFrom<&[u8]> ∘ From<&Semantic> for Vec<u8> must \
                 round-trip Semantic::{variant:?} — divergence \
                 signals the borrowed-input byte-owned axis has \
                 drifted off the paired byte-view reverse axis"
            );
        }
    }

    #[test]
    fn semantic_try_from_bytes_rejects_unknown_and_non_utf8_bytes() {
        // Rejection witness on the `impl TryFrom<&[u8]> for Semantic`
        // — 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::Semantic::from_wire`] runs) and the valid-UTF-8-
        // but-unknown-wire rejection path
        // ([`super::Semantic::from_wire`] returns `None` on a byte-
        // string outside the sixteen-arm semantic-style 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 pre-lift PascalCase Debug-derived shapes
        // like `"Keyword"` / `"KeywordArg"` on the wire axis, a
        // silent overlap with sibling closed-set canonical tags on
        // other axes, a stray fallback that maps invalid UTF-8 onto
        // a default arm rather than the trait-idiomatic
        // `Err(())`) trips at caixa-theme 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
        //     continuation)
        //   - a UTF-16 BOM-style byte pair the UTF-8 validator
        //     rejects
        //   - a UTF-16 surrogate half rejected by UTF-8
        let non_utf8_rejected: &[&[u8]] = &[
            &[0xFF],
            &[0x80],
            &[0xC3],
            &[0xFF, 0xFE],
            &[0xED, 0xA0, 0x80],
        ];
        for &input in non_utf8_rejected {
            assert_eq!(
                <super::Semantic as TryFrom<&[u8]>>::try_from(input),
                Err(()),
                "TryFrom<&[u8]> impl on Semantic 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 mirror the corpus
        // the sibling `semantic_try_from_str_rejects_unknown_byte_strings`
        // str-view rejection witness already pins on the paired
        // [`TryFrom<&str>`] axis: the empty byte-string, whitespace-
        // only padding, PascalCase / uppercase rebrand candidates,
        // Levenshtein-neighbor typos, the trajectory-item candidates
        // `b"namespace"` / `b"deleted"` the sibling
        // [`super::Semantic::ALL`] doc block names, sibling closed-
        // set canonical tags on other axes (`b"safe"`, `b"unsafe"`,
        // `b"proven"`, `b"rejected"`, `b"biblioteca"`, `b"servico"`,
        // `b"one-for-one"`, `b"empty"`, `b"safety"`, `b"compliance"`),
        // and trailing/leading-whitespace-padded canonical tags.
        let unknown_wire_rejected: &[&[u8]] = &[
            b"",
            b" ",
            b"\n",
            b"\t",
            b"Keyword",
            b"KEYWORD",
            b"KeywordArg",
            b"keyword_arg",
            b"keyword arg",
            b"keywordarg",
            b"keywords",
            b"keywor",
            b"namespace",
            b"deleted",
            b"safe",
            b"unsafe",
            b"proven",
            b"rejected",
            b"biblioteca",
            b"servico",
            b"one-for-one",
            b"empty",
            b"safety",
            b"compliance",
            b"keyword ",
            b" keyword",
            b"keyword\n",
            b"keyword\t",
            b"?",
            b"\"keyword\"",
        ];
        for &input in unknown_wire_rejected {
            assert_eq!(
                <super::Semantic as TryFrom<&[u8]>>::try_from(input),
                Err(()),
                "TryFrom<&[u8]> impl on Semantic must reject the \
                 valid-UTF-8-but-unknown-wire byte-string {input:?} \
                 with Err(()) — silent acceptance signals an accept-\
                 set widening off the paired Semantic::from_wire \
                 resolver, or a cross-axis leak from a sibling \
                 closed-set typed-enum axis's non-shared arm-set"
            );
        }
    }
}