Skip to content

Increase coverage of the JOSE module - #3127

Merged
jviotti merged 4 commits into
mainfrom
jose-coverage
Nov 27, 2026
Merged

jviotti merged 4 commits into
mainfrom
jose-coverage

Conversation

@jviotti

@jviotti jviotti commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

View guided diff

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Benchmark linux/llvm

Measured against main at fb30ca8.

7 slower, 0 faster, 143 within 5%.

Benchmark main This branch Change
JSON_String_Key_Hash_10 1.05 ns 1.31 ns +24.7%
JSON_Object_Defines_Miss_Same_Length_32 10.59 ns 12.67 ns +19.7%
JSON_String_Key_Hash_100 1.57 ns 1.83 ns +16.5%
Pointer_Position_Tracker_Get_Deeply_Nested 528.42 ns 607.51 ns +15.0%
JSON_Object_Iterate_128 43.80 ns 47.33 ns +8.1%
JSON_Number_To_Double 9.76 ns 10.53 ns +7.8%
JSON_Parse_Integer 2.46 us 2.60 us +5.5%
All 150 benchmarks
Benchmark main This branch Change
MCP_Validate_Headers_64 13.54 us 13.48 us -0.4%
MCP_Intersect_Disjoint_512 376.11 us 375.42 us -0.2%
Regex_Lower_S_Or_Upper_S_Asterisk 1.22 ns 1.22 ns +0.1%
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.22 ns 1.22 ns +0.3%
Regex_Period_Asterisk 1.22 ns 1.22 ns -0.3%
Regex_Group_Period_Asterisk_Group 1.20 ns 1.20 ns -0.1%
Regex_Period_Plus 1.31 ns 1.30 ns -1.0%
Regex_Period 1.31 ns 1.30 ns -0.8%
Regex_Caret_Period_Plus_Dollar 1.31 ns 1.30 ns -0.5%
Regex_Caret_Group_Period_Plus_Group_Dollar 1.31 ns 1.30 ns -0.3%
Regex_Caret_Period_Asterisk_Dollar 1.22 ns 1.22 ns -0.3%
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.22 ns 1.22 ns -0.5%
Regex_Caret_X_Hyphen 2.40 ns 2.40 ns -0.2%
Regex_Period_Md_Dollar 17.50 ns 17.29 ns -1.2%
Regex_Caret_Slash_Period_Asterisk 2.35 ns 2.34 ns -0.7%
Regex_Caret_Period_Range_Dollar 1.71 ns 1.70 ns -0.7%
Regex_Nested_Backtrack 26.08 ns 25.69 ns -1.5%
JSON_Array_Of_Objects_Unique 276.10 ns 279.03 ns +1.1%
JSON_Array_Of_Integers_Unique_256 3.31 us 3.28 us -0.7%
JSON_Array_Of_Strings_Unique_Colliding_256 97.35 us 96.94 us -0.4%
JSON_Parse_1 3.28 us 3.24 us -1.2%
JSON_Parse_Real 3.00 us 3.05 us +1.7%
JSON_Parse_Real_Inexact 2.88 us 2.91 us +0.9%
JSON_Parse_Decimal 5.64 us 5.65 us +0.1%
JSON_Parse_Schema_ISO_Language 2.42 ms 2.41 ms -0.4%
JSON_Parse_KrakenD 893.14 us 885.88 us -0.8%
JSON_Stringify_ISO_Language 1.42 ms 1.42 ms +0.2%
JSON_Prettify_KrakenD 1.27 ms 1.27 ms -0.3%
JSON_Parse_Integer 2.46 us 2.60 us +5.5%
JSON_Parse_String_NonSSO_Plain 2.15 us 2.14 us -0.3%
JSON_Parse_String_SSO_Plain 1.80 us 1.79 us -0.3%
JSON_Parse_String_Escape_Heavy 10.89 us 10.87 us -0.2%
JSON_Parse_Object_Short_Keys 5.09 us 5.12 us +0.6%
JSON_Parse_Object_Scalar_Properties 2.64 us 2.64 us +0.2%
JSON_Parse_Object_Array_Properties 3.36 us 3.39 us +1.1%
JSON_Parse_Object_Object_Properties 3.57 us 3.63 us +1.6%
JSON_Parse_Nested_Containers 23.59 us 23.87 us +1.2%
JSON_Fast_Hash_Helm_Chart_Lock 40.66 ns 40.80 ns +0.3%
JSON_Equality_Helm_Chart_Lock 94.29 ns 94.24 ns -0.0%
JSON_String_Equal_10 2.34 ns 2.36 ns +0.5%
JSON_String_Equal_100 3.13 ns 3.14 ns +0.4%
JSON_String_Equal_Small_By_Perfect_Hash_10 0.70 ns 0.70 ns +0.3%
JSON_String_Equal_Small_By_Runtime_Perfect_Hash_10 8.75 ns 8.91 ns +1.8%
JSON_String_Fast_Hash_10 1.15 ns 1.15 ns +0.3%
JSON_String_Fast_Hash_100 1.15 ns 1.15 ns +0.1%
JSON_String_Key_Hash_10 1.05 ns 1.31 ns +24.7%
JSON_String_Key_Hash_100 1.57 ns 1.83 ns +16.5%
JSON_Object_Defines_Miss_Same_Length 1.60 ns 1.57 ns -2.3%
JSON_Object_Defines_Miss_Same_Length_32 10.59 ns 12.67 ns +19.7%
JSON_Object_Defines_Miss_Same_Length_128 50.44 ns 50.41 ns -0.1%
JSON_Object_Defines_Miss_Too_Small 1.44 ns 1.44 ns -0.2%
JSON_Object_Defines_Miss_Too_Large 1.44 ns 1.44 ns +0.2%
JSON_From_String_Copy 7.55 ns 7.53 ns -0.4%
JSON_From_String_Temporary 6.19 ns 6.15 ns -0.6%
JSON_Number_To_Double 9.76 ns 10.53 ns +7.8%
JSON_Object_At_Last_Key_8 2.58 ns 2.58 ns -0.0%
JSON_Object_At_Last_Key_32 9.68 ns 9.66 ns -0.2%
JSON_Object_At_Last_Key_128 43.61 ns 43.50 ns -0.3%
JSON_Object_At_Last_Key_512 150.07 ns 149.55 ns -0.3%
JSON_Object_At_Only_Key_1 0.80 ns 0.79 ns -0.6%
JSON_Object_At_Key_3 1.25 ns 1.25 ns +0.0%
JSON_Object_At_First_Key_8 0.80 ns 0.79 ns -0.8%
JSON_Object_At_First_Key_32 0.80 ns 0.79 ns -0.4%
JSON_Object_At_First_Key_128 0.80 ns 0.79 ns -0.4%
JSON_Object_At_First_Key_512 0.80 ns 0.79 ns -0.7%
JSON_Object_Iterate_32 9.41 ns 9.41 ns -0.0%
JSON_Object_Iterate_128 43.80 ns 47.33 ns +8.1%
JSON_Object_Defines_All_Present_K2_W8 6.51 ns 6.56 ns +0.8%
JSON_Object_Defines_All_Present_K8_W32 45.55 ns 44.95 ns -1.3%
JSON_Object_Defines_All_Present_K8_W128 225.87 ns 227.26 ns +0.6%
JSON_Object_Defines_All_Present_K32_W128 910.38 ns 907.23 ns -0.3%
JSON_Object_Try_At_Sequential_NoHint_32 361.77 ns 361.13 ns -0.2%
JSON_Object_Try_At_Sequential_Hint_32 53.98 ns 53.95 ns -0.1%
JSON_Object_At_Key_Sorted_Order_32 178.23 ns 177.33 ns -0.5%
JSON_Object_Try_At_Sorted_Order_Hint_32 506.20 ns 504.63 ns -0.3%
JSON_Divisible_By_Decimal 215.38 ns 212.16 ns -1.5%
JSON_PropertySet_Contains 45.74 ns 45.31 ns -0.9%
JSON_PropertySet_Filter_Object_Properties 36.43 ns 36.50 ns +0.2%
JSON_PropertySet_Insert 376.88 ns 377.19 ns +0.1%
JSON_Stringify_Schema_Web_Of_Things 32.67 us 33.08 us +1.3%
JSON_Prettify_Schema_Web_Of_Things 103.45 us 102.93 us -0.5%
JSON_Object_At_Perfect_Hash 7.32 ns 7.26 ns -0.9%
JSON_Object_Defines_Perfect_Hash 7.29 ns 7.29 ns -0.0%
JSON_Object_Defines_Missing_Perfect_Hash 7.26 ns 7.24 ns -0.2%
JSON_Object_At_Long_Keys 22.07 ns 21.45 ns -2.8%
Pointer_Object_Traverse 11.80 ns 11.68 ns -1.0%
Pointer_Object_Try_Traverse 27.27 ns 27.49 ns +0.8%
Pointer_Object_Traverse_Single_Property 3.14 ns 3.13 ns -0.3%
Pointer_Object_Try_Traverse_Single_Property 5.63 ns 5.60 ns -0.6%
Pointer_Push_Back_Pointer_To_Weak_Pointer 76.00 ns 75.93 ns -0.1%
Pointer_Walker_Schema_ISO_Language 1.41 ms 1.41 ms -0.1%
Pointer_Untracked_Deeply_Nested 968.64 us 965.12 us -0.4%
Pointer_Tracked_Deeply_Nested 1.29 ms 1.29 ms +0.3%
Pointer_Position_Tracker_Get_Deeply_Nested 528.42 ns 607.51 ns +15.0%
Schema_Tracker_ISO_Language 3.32 ms 3.27 ms -1.4%
Schema_Tracker_ISO_Language_To_JSON 11.41 ms 11.38 ms -0.3%
Schema_Frame_WoT_References 1.14 ms 1.17 ms +2.8%
Schema_Frame_OMC_References 4.86 ms 4.87 ms +0.2%
Schema_Frame_OMC_Pointers 12.54 ms 12.61 ms +0.5%
Schema_Frame_OMC_Locations 3.89 ms 3.88 ms -0.2%
Schema_Frame_ISO_Language_Locations 10.17 ms 10.11 ms -0.5%
Schema_Frame_ISO_Language_Root 168.17 ns 168.26 ns +0.1%
Schema_Frame_KrakenD_References 6.48 ms 6.50 ms +0.4%
Schema_Frame_KrakenD_Reachable 99.17 ms 94.83 ms -4.4%
Schema_Frame_ISO_Language_Locations_To_JSON 21.98 ms 22.07 ms +0.4%
Schema_Frame_Many_Resources_References 65.10 ms 63.86 ms -1.9%
Schema_Frame_Deeply_Nested_References 6.49 ms 6.43 ms -1.0%
Schema_Format_ISO_Language 13.39 ms 13.28 ms -0.8%
Schema_Bundle_Meta_2020_12 351.86 us 359.59 us +2.2%
Schema_Bundle_Many_Remotes_With_Fragments 3.57 ms 3.63 ms +1.7%
OpenAPI_Frame_GSMTasks_3_0 134.20 ms 136.09 ms +1.4%
OpenAPI_Format_Synthetic_3_1 42.19 ms 43.20 ms +2.4%
OpenAPI_Bundle_Split_3_1 9.52 ms 9.89 ms +3.9%
JSONPath_Descendant_Filter_Nested 1.10 us 1.08 us -1.9%
URITemplateRouter_Create 14.23 us 14.22 us -0.1%
URITemplateRouter_Match 123.29 ns 123.41 ns +0.1%
URITemplateRouterView_Restore 2.21 us 2.17 us -1.7%
URITemplateRouterView_Match 82.64 ns 82.05 ns -0.7%
URITemplateRouterView_Arguments 351.05 ns 351.02 ns -0.0%
URITemplateRouter_Match_BasePath 139.24 ns 137.21 ns -1.5%
URITemplateRouterView_Match_BasePath 94.28 ns 93.24 ns -1.1%
JSONL_Parse_Large 6.76 ms 6.46 ms -4.3%
JSONL_Parse_Large_GZIP 7.01 ms 6.68 ms -4.7%
JSONLD_Catalog_Annotation_List_Populate 502.08 us 489.97 us -2.4%
JSONLD_Catalog_Materialize 2.69 ms 2.60 ms -3.3%
JSONLD_Catalog_Expand 8.14 ms 8.10 ms -0.5%
JSONLD_Member_Expand 41.47 us 41.28 us -0.5%
JSONLD_Catalog_Compact 60.74 ms 59.93 ms -1.3%
HTML_Build_Table_100000 33.33 ms 32.82 ms -1.5%
HTML_Render_Table_100000 2.97 ms 2.90 ms -2.3%
Markdown_To_HTML_Realistic_Document 2.93 ms 2.92 ms -0.3%
Markdown_To_HTML_Pathological 10.33 ms 10.34 ms +0.1%
Markdown_To_HTML_Short_Descriptions 337.02 ns 334.22 ns -0.8%
YAML_Parse_Records 883.07 us 880.31 us -0.3%
YAML_Parse_Block_Scalars 300.14 us 299.72 us -0.1%
GZIP_Compress_ISO_Language_Set_3_Locations 27.18 ms 26.99 ms -0.7%
GZIP_Decompress_ISO_Language_Set_3_Locations 3.41 ms 3.42 ms +0.1%
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations 4.74 ms 4.75 ms +0.3%
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations 6.70 ms 6.74 ms +0.5%
GZIP_Compress_ISO_Language_Set_3_Schema 1.66 ms 1.65 ms -0.7%
GZIP_Decompress_ISO_Language_Set_3_Schema 341.29 us 336.73 us -1.3%
JOSE_VerifySignature_RS256 34.32 us 34.71 us +1.1%
JOSE_VerifySignature_ES512 1.15 ms 1.14 ms -1.0%
Crypto_CRC32_Large_JSONL 42.36 us 42.30 us -0.1%
Crypto_AES_GCM_Encrypt_128_1KB 20.48 us 20.44 us -0.2%
Crypto_AES_GCM_Decrypt_128_1KB 20.37 us 20.35 us -0.1%
Crypto_AES_GCM_Encrypt_256_1KB 24.40 us 24.32 us -0.3%
Metapack_Parse_OMC_JSON_V2 3.17 ns 3.13 ns -1.3%
Metapack_Read_OMC_JSON_V2 274.22 us 272.45 us -0.6%
Metapack_Write_OMC_JSON_V2 705.44 us 688.98 us -2.3%

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Benchmark windows/msvc

Measured against main at fb30ca8.

3 slower, 8 faster, 139 within 5%.

Benchmark main This branch Change
JSON_Object_Defines_Perfect_Hash 13.80 ns 16.35 ns +18.5%
JSON_Object_Defines_Missing_Perfect_Hash 14.73 ns 16.91 ns +14.8%
Schema_Frame_Deeply_Nested_References 19.38 ms 21.60 ms +11.5%
Schema_Format_ISO_Language 43.09 ms 40.37 ms -6.3%
JSON_From_String_Copy 69.62 ns 64.39 ns -7.5%
JSON_Fast_Hash_Helm_Chart_Lock 110.58 ns 102.27 ns -7.5%
JSON_Parse_KrakenD 2.38 ms 2.19 ms -7.9%
JSON_Object_Try_At_Sequential_Hint_32 69.66 ns 64.05 ns -8.0%
JSON_Object_Defines_Miss_Too_Small 4.23 ns 3.77 ns -11.0%
Markdown_To_HTML_Short_Descriptions 815.26 ns 687.87 ns -15.6%
JSON_Object_Defines_Miss_Too_Large 5.88 ns 4.71 ns -19.9%
All 150 benchmarks
Benchmark main This branch Change
MCP_Validate_Headers_64 36.45 us 35.90 us -1.5%
MCP_Intersect_Disjoint_512 883.85 us 887.20 us +0.4%
Regex_Lower_S_Or_Upper_S_Asterisk 4.70 ns 4.71 ns +0.2%
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 4.70 ns 4.70 ns -0.1%
Regex_Period_Asterisk 4.70 ns 4.72 ns +0.3%
Regex_Group_Period_Asterisk_Group 4.70 ns 4.70 ns +0.1%
Regex_Period_Plus 4.63 ns 4.59 ns -1.0%
Regex_Period 4.64 ns 4.59 ns -0.9%
Regex_Caret_Period_Plus_Dollar 4.63 ns 4.58 ns -1.0%
Regex_Caret_Group_Period_Plus_Group_Dollar 4.62 ns 4.58 ns -1.0%
Regex_Caret_Period_Asterisk_Dollar 4.70 ns 4.70 ns +0.1%
Regex_Caret_Group_Period_Asterisk_Group_Dollar 4.70 ns 4.69 ns -0.2%
Regex_Caret_X_Hyphen 8.46 ns 8.46 ns -0.0%
Regex_Period_Md_Dollar 46.22 ns 46.13 ns -0.2%
Regex_Caret_Slash_Period_Asterisk 7.88 ns 7.85 ns -0.3%
Regex_Caret_Period_Range_Dollar 5.65 ns 5.65 ns +0.1%
Regex_Nested_Backtrack 57.26 ns 57.66 ns +0.7%
JSON_Array_Of_Objects_Unique 570.65 ns 553.15 ns -3.1%
JSON_Array_Of_Integers_Unique_256 4.94 us 4.95 us +0.2%
JSON_Array_Of_Strings_Unique_Colliding_256 281.67 us 280.39 us -0.5%
JSON_Parse_1 8.32 us 8.43 us +1.3%
JSON_Parse_Real 7.10 us 7.08 us -0.3%
JSON_Parse_Real_Inexact 6.83 us 6.79 us -0.6%
JSON_Parse_Decimal 11.57 us 11.48 us -0.8%
JSON_Parse_Schema_ISO_Language 7.50 ms 7.49 ms -0.1%
JSON_Parse_KrakenD 2.38 ms 2.19 ms -7.9%
JSON_Stringify_ISO_Language 6.62 ms 6.43 ms -2.8%
JSON_Prettify_KrakenD 7.55 ms 7.54 ms -0.1%
JSON_Parse_Integer 5.86 us 5.86 us -0.0%
JSON_Parse_String_NonSSO_Plain 8.09 us 8.09 us +0.1%
JSON_Parse_String_SSO_Plain 4.10 us 4.10 us -0.0%
JSON_Parse_String_Escape_Heavy 22.79 us 22.94 us +0.7%
JSON_Parse_Object_Short_Keys 12.96 us 12.94 us -0.2%
JSON_Parse_Object_Scalar_Properties 6.67 us 6.65 us -0.2%
JSON_Parse_Object_Array_Properties 11.26 us 11.36 us +0.9%
JSON_Parse_Object_Object_Properties 11.29 us 11.38 us +0.8%
JSON_Parse_Nested_Containers 76.50 us 75.72 us -1.0%
JSON_Fast_Hash_Helm_Chart_Lock 110.58 ns 102.27 ns -7.5%
JSON_Equality_Helm_Chart_Lock 218.76 ns 218.80 ns +0.0%
JSON_String_Equal_10 10.35 ns 10.45 ns +1.0%
JSON_String_Equal_100 11.67 ns 11.66 ns -0.0%
JSON_String_Equal_Small_By_Perfect_Hash_10 2.51 ns 2.51 ns -0.0%
JSON_String_Equal_Small_By_Runtime_Perfect_Hash_10 14.17 ns 14.71 ns +3.8%
JSON_String_Fast_Hash_10 6.51 ns 6.50 ns -0.3%
JSON_String_Fast_Hash_100 6.51 ns 6.50 ns -0.2%
JSON_String_Key_Hash_10 4.72 ns 4.71 ns -0.2%
JSON_String_Key_Hash_100 5.64 ns 5.66 ns +0.4%
JSON_Object_Defines_Miss_Same_Length 3.76 ns 3.76 ns -0.0%
JSON_Object_Defines_Miss_Same_Length_32 22.92 ns 22.99 ns +0.3%
JSON_Object_Defines_Miss_Same_Length_128 88.22 ns 88.75 ns +0.6%
JSON_Object_Defines_Miss_Too_Small 4.23 ns 3.77 ns -11.0%
JSON_Object_Defines_Miss_Too_Large 5.88 ns 4.71 ns -19.9%
JSON_From_String_Copy 69.62 ns 64.39 ns -7.5%
JSON_From_String_Temporary 58.72 ns 57.89 ns -1.4%
JSON_Number_To_Double 40.03 ns 41.02 ns +2.5%
JSON_Object_At_Last_Key_8 6.99 ns 7.18 ns +2.7%
JSON_Object_At_Last_Key_32 23.01 ns 22.95 ns -0.3%
JSON_Object_At_Last_Key_128 88.47 ns 88.20 ns -0.3%
JSON_Object_At_Last_Key_512 421.38 ns 421.90 ns +0.1%
JSON_Object_At_Only_Key_1 2.54 ns 2.54 ns -0.0%
JSON_Object_At_Key_3 3.17 ns 3.14 ns -1.0%
JSON_Object_At_First_Key_8 2.51 ns 2.51 ns -0.2%
JSON_Object_At_First_Key_32 2.51 ns 2.51 ns -0.0%
JSON_Object_At_First_Key_128 2.37 ns 2.37 ns +0.0%
JSON_Object_At_First_Key_512 2.37 ns 2.37 ns +0.2%
JSON_Object_Iterate_32 22.63 ns 22.29 ns -1.5%
JSON_Object_Iterate_128 66.88 ns 66.91 ns +0.0%
JSON_Object_Defines_All_Present_K2_W8 8.27 ns 8.19 ns -1.0%
JSON_Object_Defines_All_Present_K8_W32 91.84 ns 91.65 ns -0.2%
JSON_Object_Defines_All_Present_K8_W128 340.82 ns 335.70 ns -1.5%
JSON_Object_Defines_All_Present_K32_W128 1.47 us 1.48 us +0.2%
JSON_Object_Try_At_Sequential_NoHint_32 577.96 ns 596.63 ns +3.2%
JSON_Object_Try_At_Sequential_Hint_32 69.66 ns 64.05 ns -8.0%
JSON_Object_At_Key_Sorted_Order_32 395.79 ns 397.24 ns +0.4%
JSON_Object_Try_At_Sorted_Order_Hint_32 921.76 ns 912.78 ns -1.0%
JSON_Divisible_By_Decimal 385.81 ns 381.77 ns -1.0%
JSON_PropertySet_Contains 68.97 ns 68.34 ns -0.9%
JSON_PropertySet_Filter_Object_Properties 47.23 ns 47.42 ns +0.4%
JSON_PropertySet_Insert 1.32 us 1.32 us +0.3%
JSON_Stringify_Schema_Web_Of_Things 158.24 us 158.30 us +0.0%
JSON_Prettify_Schema_Web_Of_Things 719.79 us 728.20 us +1.2%
JSON_Object_At_Perfect_Hash 12.46 ns 12.74 ns +2.3%
JSON_Object_Defines_Perfect_Hash 13.80 ns 16.35 ns +18.5%
JSON_Object_Defines_Missing_Perfect_Hash 14.73 ns 16.91 ns +14.8%
JSON_Object_At_Long_Keys 46.58 ns 46.53 ns -0.1%
Pointer_Object_Traverse 45.79 ns 45.79 ns +0.0%
Pointer_Object_Try_Traverse 67.91 ns 67.77 ns -0.2%
Pointer_Object_Traverse_Single_Property 8.47 ns 8.50 ns +0.3%
Pointer_Object_Try_Traverse_Single_Property 10.67 ns 10.68 ns +0.2%
Pointer_Push_Back_Pointer_To_Weak_Pointer 155.59 ns 156.92 ns +0.9%
Pointer_Walker_Schema_ISO_Language 8.08 ms 8.17 ms +1.1%
Pointer_Untracked_Deeply_Nested 2.21 ms 2.18 ms -1.4%
Pointer_Tracked_Deeply_Nested 3.41 ms 3.42 ms +0.4%
Pointer_Position_Tracker_Get_Deeply_Nested 614.13 ns 588.18 ns -4.2%
Schema_Tracker_ISO_Language 10.64 ms 10.65 ms +0.1%
Schema_Tracker_ISO_Language_To_JSON 61.83 ms 61.71 ms -0.2%
Schema_Frame_WoT_References 3.97 ms 3.96 ms -0.1%
Schema_Frame_OMC_References 15.17 ms 15.12 ms -0.4%
Schema_Frame_OMC_Pointers 42.46 ms 40.72 ms -4.1%
Schema_Frame_OMC_Locations 12.33 ms 12.31 ms -0.2%
Schema_Frame_ISO_Language_Locations 34.48 ms 34.09 ms -1.1%
Schema_Frame_ISO_Language_Root 2.27 us 2.29 us +0.7%
Schema_Frame_KrakenD_References 22.84 ms 22.76 ms -0.3%
Schema_Frame_KrakenD_Reachable 263.94 ms 264.10 ms +0.1%
Schema_Frame_ISO_Language_Locations_To_JSON 158.89 ms 157.02 ms -1.2%
Schema_Frame_Many_Resources_References 286.52 ms 281.03 ms -1.9%
Schema_Frame_Deeply_Nested_References 19.38 ms 21.60 ms +11.5%
Schema_Format_ISO_Language 43.09 ms 40.37 ms -6.3%
Schema_Bundle_Meta_2020_12 1.32 ms 1.32 ms -0.5%
Schema_Bundle_Many_Remotes_With_Fragments 17.27 ms 16.85 ms -2.4%
OpenAPI_Frame_GSMTasks_3_0 423.45 ms 420.90 ms -0.6%
OpenAPI_Format_Synthetic_3_1 135.34 ms 135.48 ms +0.1%
OpenAPI_Bundle_Split_3_1 31.79 ms 31.65 ms -0.4%
JSONPath_Descendant_Filter_Nested 3.00 us 3.01 us +0.1%
URITemplateRouter_Create 39.51 us 39.47 us -0.1%
URITemplateRouter_Match 234.30 ns 233.29 ns -0.4%
URITemplateRouterView_Restore 34.68 us 35.21 us +1.5%
URITemplateRouterView_Match 207.65 ns 208.05 ns +0.2%
URITemplateRouterView_Arguments 541.57 ns 540.59 ns -0.2%
URITemplateRouter_Match_BasePath 266.03 ns 266.65 ns +0.2%
URITemplateRouterView_Match_BasePath 238.50 ns 238.53 ns +0.0%
JSONL_Parse_Large 32.47 ms 32.38 ms -0.3%
JSONL_Parse_Large_GZIP 31.34 ms 31.21 ms -0.4%
JSONLD_Catalog_Annotation_List_Populate 2.89 ms 2.93 ms +1.4%
JSONLD_Catalog_Materialize 7.82 ms 7.67 ms -1.9%
JSONLD_Catalog_Expand 27.11 ms 26.66 ms -1.7%
JSONLD_Member_Expand 135.53 us 134.35 us -0.9%
JSONLD_Catalog_Compact 201.24 ms 202.65 ms +0.7%
HTML_Build_Table_100000 81.84 ms 82.44 ms +0.7%
HTML_Render_Table_100000 17.73 ms 17.98 ms +1.4%
Markdown_To_HTML_Realistic_Document 5.23 ms 5.25 ms +0.5%
Markdown_To_HTML_Pathological 16.18 ms 16.04 ms -0.8%
Markdown_To_HTML_Short_Descriptions 815.26 ns 687.87 ns -15.6%
YAML_Parse_Records 2.05 ms 1.99 ms -3.0%
YAML_Parse_Block_Scalars 597.51 us 591.72 us -1.0%
GZIP_Compress_ISO_Language_Set_3_Locations 37.33 ms 37.47 ms +0.4%
GZIP_Decompress_ISO_Language_Set_3_Locations 9.56 ms 9.49 ms -0.7%
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations 11.62 ms 11.84 ms +1.9%
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations 14.17 ms 14.24 ms +0.4%
GZIP_Compress_ISO_Language_Set_3_Schema 2.32 ms 2.32 ms +0.1%
GZIP_Decompress_ISO_Language_Set_3_Schema 646.98 us 629.31 us -2.7%
JOSE_VerifySignature_RS256 21.25 us 21.30 us +0.2%
JOSE_VerifySignature_ES512 1.53 ms 1.53 ms +0.4%
Crypto_CRC32_Large_JSONL 103.27 us 103.02 us -0.2%
Crypto_AES_GCM_Encrypt_128_1KB 2.35 us 2.32 us -1.4%
Crypto_AES_GCM_Decrypt_128_1KB 2.35 us 2.33 us -0.9%
Crypto_AES_GCM_Encrypt_256_1KB 2.42 us 2.39 us -1.2%
Metapack_Parse_OMC_JSON_V2 12.21 ns 12.22 ns +0.0%
Metapack_Read_OMC_JSON_V2 649.12 us 648.79 us -0.0%
Metapack_Write_OMC_JSON_V2 1.92 ms 1.91 ms -0.5%

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Benchmark linux/gcc

Measured against main at fb30ca8.

7 slower, 1 faster, 142 within 5%.

Benchmark main This branch Change
URITemplateRouter_Match_BasePath 184.17 ns 204.02 ns +10.8%
JSON_Parse_Nested_Containers 43.52 us 46.73 us +7.4%
JSON_Parse_Object_Object_Properties 6.44 us 6.90 us +7.3%
JSON_Parse_Object_Array_Properties 6.60 us 7.07 us +7.2%
JSON_Prettify_Schema_Web_Of_Things 170.80 us 181.57 us +6.3%
GZIP_Compress_ISO_Language_Set_3_Locations 29.93 ms 31.69 ms +5.9%
JSON_Prettify_KrakenD 2.09 ms 2.21 ms +5.8%
Metapack_Parse_OMC_JSON_V2 2.79 ns 2.35 ns -15.8%
All 150 benchmarks
Benchmark main This branch Change
Metapack_Parse_OMC_JSON_V2 2.79 ns 2.35 ns -15.8%
Metapack_Read_OMC_JSON_V2 452.60 us 454.27 us +0.4%
Metapack_Write_OMC_JSON_V2 713.26 us 725.36 us +1.7%
Crypto_CRC32_Large_JSONL 101.78 us 101.81 us +0.0%
Crypto_AES_GCM_Encrypt_128_1KB 1.02 us 1.02 us +0.4%
Crypto_AES_GCM_Decrypt_128_1KB 1.01 us 1.03 us +2.1%
Crypto_AES_GCM_Encrypt_256_1KB 1.05 us 1.06 us +1.1%
JOSE_VerifySignature_RS256 21.02 us 21.04 us +0.1%
JOSE_VerifySignature_ES512 597.15 us 597.56 us +0.1%
GZIP_Compress_ISO_Language_Set_3_Locations 29.93 ms 31.69 ms +5.9%
GZIP_Decompress_ISO_Language_Set_3_Locations 5.02 ms 5.06 ms +0.9%
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations 6.97 ms 6.99 ms +0.4%
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations 8.85 ms 9.07 ms +2.5%
GZIP_Compress_ISO_Language_Set_3_Schema 2.04 ms 2.04 ms +0.2%
GZIP_Decompress_ISO_Language_Set_3_Schema 416.82 us 416.68 us -0.0%
YAML_Parse_Records 1.38 ms 1.40 ms +1.4%
YAML_Parse_Block_Scalars 389.77 us 390.15 us +0.1%
Markdown_To_HTML_Realistic_Document 4.10 ms 4.11 ms +0.2%
Markdown_To_HTML_Pathological 13.55 ms 13.65 ms +0.7%
Markdown_To_HTML_Short_Descriptions 575.66 ns 592.38 ns +2.9%
HTML_Build_Table_100000 45.10 ms 46.61 ms +3.3%
HTML_Render_Table_100000 1.92 ms 1.92 ms -0.1%
JSONLD_Catalog_Annotation_List_Populate 665.99 us 695.47 us +4.4%
JSONLD_Catalog_Materialize 3.60 ms 3.56 ms -1.1%
JSONLD_Catalog_Expand 10.94 ms 11.11 ms +1.5%
JSONLD_Member_Expand 61.24 us 61.26 us +0.0%
JSONLD_Catalog_Compact 88.74 ms 88.88 ms +0.2%
JSONL_Parse_Large 10.50 ms 10.52 ms +0.2%
JSONL_Parse_Large_GZIP 10.77 ms 10.72 ms -0.4%
URITemplateRouter_Create 23.92 us 22.77 us -4.8%
URITemplateRouter_Match 167.89 ns 167.67 ns -0.1%
URITemplateRouterView_Restore 8.16 us 8.12 us -0.6%
URITemplateRouterView_Match 134.17 ns 133.89 ns -0.2%
URITemplateRouterView_Arguments 839.08 ns 839.15 ns +0.0%
URITemplateRouter_Match_BasePath 184.17 ns 204.02 ns +10.8%
URITemplateRouterView_Match_BasePath 153.19 ns 153.75 ns +0.4%
JSONPath_Descendant_Filter_Nested 1.74 us 1.75 us +0.4%
OpenAPI_Frame_GSMTasks_3_0 171.77 ms 178.42 ms +3.9%
OpenAPI_Format_Synthetic_3_1 59.08 ms 61.00 ms +3.3%
OpenAPI_Bundle_Split_3_1 15.60 ms 15.85 ms +1.6%
Schema_Frame_WoT_References 1.68 ms 1.70 ms +1.2%
Schema_Frame_OMC_References 6.38 ms 6.49 ms +1.7%
Schema_Frame_OMC_Pointers 16.87 ms 17.14 ms +1.6%
Schema_Frame_OMC_Locations 5.12 ms 5.20 ms +1.6%
Schema_Frame_ISO_Language_Locations 12.63 ms 12.87 ms +2.0%
Schema_Frame_ISO_Language_Root 319.50 ns 316.78 ns -0.9%
Schema_Frame_KrakenD_References 8.46 ms 8.53 ms +0.9%
Schema_Frame_KrakenD_Reachable 148.71 ms 149.58 ms +0.6%
Schema_Frame_ISO_Language_Locations_To_JSON 30.68 ms 31.54 ms +2.8%
Schema_Frame_Many_Resources_References 86.69 ms 90.86 ms +4.8%
Schema_Frame_Deeply_Nested_References 8.68 ms 9.05 ms +4.2%
Schema_Format_ISO_Language 16.99 ms 17.54 ms +3.2%
Schema_Bundle_Meta_2020_12 587.75 us 592.37 us +0.8%
Schema_Bundle_Many_Remotes_With_Fragments 5.27 ms 5.41 ms +2.5%
Pointer_Object_Traverse 14.86 ns 14.83 ns -0.2%
Pointer_Object_Try_Traverse 24.42 ns 24.37 ns -0.2%
Pointer_Object_Traverse_Single_Property 5.38 ns 5.38 ns -0.1%
Pointer_Object_Try_Traverse_Single_Property 6.92 ns 6.93 ns +0.0%
Pointer_Push_Back_Pointer_To_Weak_Pointer 84.96 ns 85.09 ns +0.1%
Pointer_Walker_Schema_ISO_Language 1.35 ms 1.40 ms +3.7%
Pointer_Untracked_Deeply_Nested 1.58 ms 1.60 ms +1.2%
Pointer_Tracked_Deeply_Nested 2.46 ms 2.45 ms -0.3%
Pointer_Position_Tracker_Get_Deeply_Nested 628.02 ns 638.16 ns +1.6%
Schema_Tracker_ISO_Language 5.39 ms 5.35 ms -0.8%
Schema_Tracker_ISO_Language_To_JSON 17.00 ms 16.50 ms -2.9%
JSON_Array_Of_Objects_Unique 431.99 ns 434.97 ns +0.7%
JSON_Array_Of_Integers_Unique_256 4.11 us 4.01 us -2.3%
JSON_Array_Of_Strings_Unique_Colliding_256 200.21 us 199.63 us -0.3%
JSON_Parse_1 5.81 us 5.74 us -1.2%
JSON_Parse_Real 5.26 us 5.34 us +1.4%
JSON_Parse_Real_Inexact 6.00 us 5.98 us -0.4%
JSON_Parse_Decimal 10.46 us 10.47 us +0.2%
JSON_Parse_Schema_ISO_Language 3.77 ms 3.80 ms +0.8%
JSON_Parse_KrakenD 1.45 ms 1.50 ms +3.0%
JSON_Stringify_ISO_Language 1.98 ms 1.90 ms -4.0%
JSON_Prettify_KrakenD 2.09 ms 2.21 ms +5.8%
JSON_Parse_Integer 4.65 us 4.63 us -0.4%
JSON_Parse_String_NonSSO_Plain 3.95 us 3.97 us +0.5%
JSON_Parse_String_SSO_Plain 3.22 us 3.25 us +0.9%
JSON_Parse_String_Escape_Heavy 19.66 us 19.63 us -0.1%
JSON_Parse_Object_Short_Keys 11.31 us 11.35 us +0.4%
JSON_Parse_Object_Scalar_Properties 5.71 us 5.72 us +0.2%
JSON_Parse_Object_Array_Properties 6.60 us 7.07 us +7.2%
JSON_Parse_Object_Object_Properties 6.44 us 6.90 us +7.3%
JSON_Parse_Nested_Containers 43.52 us 46.73 us +7.4%
JSON_Fast_Hash_Helm_Chart_Lock 64.75 ns 63.85 ns -1.4%
JSON_Equality_Helm_Chart_Lock 155.76 ns 157.14 ns +0.9%
JSON_String_Equal_10 5.68 ns 5.68 ns +0.0%
JSON_String_Equal_100 6.34 ns 6.36 ns +0.2%
JSON_String_Equal_Small_By_Perfect_Hash_10 0.62 ns 0.62 ns +0.1%
JSON_String_Equal_Small_By_Runtime_Perfect_Hash_10 14.61 ns 14.61 ns +0.0%
JSON_String_Fast_Hash_10 2.25 ns 2.26 ns +0.0%
JSON_String_Fast_Hash_100 2.25 ns 2.25 ns -0.0%
JSON_String_Key_Hash_10 1.98 ns 1.98 ns +0.0%
JSON_String_Key_Hash_100 2.30 ns 2.30 ns -0.1%
JSON_Object_Defines_Miss_Same_Length 3.12 ns 3.12 ns +0.0%
JSON_Object_Defines_Miss_Same_Length_32 14.57 ns 14.57 ns +0.0%
JSON_Object_Defines_Miss_Same_Length_128 46.71 ns 46.76 ns +0.1%
JSON_Object_Defines_Miss_Too_Small 3.11 ns 3.12 ns +0.1%
JSON_Object_Defines_Miss_Too_Large 3.12 ns 3.11 ns -0.0%
JSON_From_String_Copy 10.95 ns 11.10 ns +1.4%
JSON_From_String_Temporary 9.74 ns 9.94 ns +2.0%
JSON_Number_To_Double 28.30 ns 28.30 ns -0.0%
JSON_Object_At_Last_Key_8 3.11 ns 3.12 ns +0.0%
JSON_Object_At_Last_Key_32 11.21 ns 11.21 ns +0.0%
JSON_Object_At_Last_Key_128 57.09 ns 57.07 ns -0.0%
JSON_Object_At_Last_Key_512 264.82 ns 265.58 ns +0.3%
JSON_Object_At_Only_Key_1 1.25 ns 1.24 ns -0.1%
JSON_Object_At_Key_3 1.68 ns 1.68 ns -0.0%
JSON_Object_At_First_Key_8 1.24 ns 1.24 ns +0.0%
JSON_Object_At_First_Key_32 1.25 ns 1.25 ns -0.0%
JSON_Object_At_First_Key_128 1.25 ns 1.24 ns -0.1%
JSON_Object_At_First_Key_512 1.25 ns 1.24 ns -0.2%
JSON_Object_Iterate_32 9.98 ns 9.99 ns +0.1%
JSON_Object_Iterate_128 59.36 ns 59.41 ns +0.1%
JSON_Object_Defines_All_Present_K2_W8 5.95 ns 5.98 ns +0.4%
JSON_Object_Defines_All_Present_K8_W32 66.47 ns 66.60 ns +0.2%
JSON_Object_Defines_All_Present_K8_W128 228.19 ns 228.45 ns +0.1%
JSON_Object_Defines_All_Present_K32_W128 1.07 us 1.07 us +0.3%
JSON_Object_Try_At_Sequential_NoHint_32 279.58 ns 280.31 ns +0.3%
JSON_Object_Try_At_Sequential_Hint_32 112.37 ns 112.33 ns -0.0%
JSON_Object_At_Key_Sorted_Order_32 364.38 ns 364.42 ns +0.0%
JSON_Object_Try_At_Sorted_Order_Hint_32 661.99 ns 663.68 ns +0.3%
JSON_Divisible_By_Decimal 347.18 ns 350.46 ns +0.9%
JSON_PropertySet_Contains 40.48 ns 40.48 ns -0.0%
JSON_PropertySet_Filter_Object_Properties 32.12 ns 32.27 ns +0.5%
JSON_PropertySet_Insert 427.28 ns 434.52 ns +1.7%
JSON_Stringify_Schema_Web_Of_Things 45.99 us 44.97 us -2.2%
JSON_Prettify_Schema_Web_Of_Things 170.80 us 181.57 us +6.3%
JSON_Object_At_Perfect_Hash 12.71 ns 12.72 ns +0.0%
JSON_Object_Defines_Perfect_Hash 12.77 ns 12.78 ns +0.0%
JSON_Object_Defines_Missing_Perfect_Hash 11.02 ns 11.01 ns -0.1%
JSON_Object_At_Long_Keys 39.24 ns 39.23 ns -0.0%
Regex_Lower_S_Or_Upper_S_Asterisk 2.10 ns 2.10 ns -0.0%
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.18 ns 2.18 ns +0.1%
Regex_Period_Asterisk 2.10 ns 2.10 ns +0.0%
Regex_Group_Period_Asterisk_Group 2.18 ns 2.18 ns -0.1%
Regex_Period_Plus 2.10 ns 2.10 ns -0.0%
Regex_Period 2.18 ns 2.18 ns +0.0%
Regex_Caret_Period_Plus_Dollar 2.10 ns 2.10 ns +0.1%
Regex_Caret_Group_Period_Plus_Group_Dollar 2.19 ns 2.18 ns -0.5%
Regex_Caret_Period_Asterisk_Dollar 2.11 ns 2.10 ns -0.6%
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.18 ns 2.18 ns +0.1%
Regex_Caret_X_Hyphen 5.22 ns 5.21 ns -0.1%
Regex_Period_Md_Dollar 29.07 ns 28.85 ns -0.7%
Regex_Caret_Slash_Period_Asterisk 6.77 ns 6.76 ns -0.1%
Regex_Caret_Period_Range_Dollar 4.04 ns 4.05 ns +0.1%
Regex_Nested_Backtrack 39.61 ns 39.33 ns -0.7%
MCP_Validate_Headers_64 17.33 us 17.39 us +0.3%
MCP_Intersect_Disjoint_512 788.35 us 787.95 us -0.0%

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Benchmark macos/llvm

Measured against main at fb30ca8.

52 slower, 73 faster, 25 within 5%.

Benchmark main This branch Change
Schema_Frame_ISO_Language_Locations_To_JSON 24.97 ms 40.63 ms +62.7%
Schema_Format_ISO_Language 14.83 ms 23.19 ms +56.3%
Schema_Frame_KrakenD_Reachable 237.84 ms 340.77 ms +43.3%
Schema_Bundle_Meta_2020_12 449.95 us 634.31 us +41.0%
Schema_Frame_OMC_Locations 6.55 ms 9.10 ms +38.9%
Schema_Frame_Many_Resources_References 86.63 ms 119.95 ms +38.5%
JSON_Prettify_Schema_Web_Of_Things 186.58 us 256.63 us +37.5%
MCP_Intersect_Disjoint_512 484.82 us 663.35 us +36.8%
YAML_Parse_Block_Scalars 484.07 us 653.19 us +34.9%
Schema_Frame_KrakenD_References 10.51 ms 13.84 ms +31.6%
Pointer_Object_Traverse_Single_Property 6.35 ns 8.32 ns +31.0%
JSONL_Parse_Large 7.11 ms 9.12 ms +28.3%
JSON_Parse_Nested_Containers 31.31 us 40.02 us +27.8%
Schema_Frame_ISO_Language_Root 173.62 ns 209.92 ns +20.9%
Schema_Frame_OMC_Pointers 22.75 ms 27.29 ms +19.9%
MCP_Validate_Headers_64 26.13 us 31.24 us +19.6%
Schema_Frame_ISO_Language_Locations 13.47 ms 16.01 ms +18.8%
Schema_Bundle_Many_Remotes_With_Fragments 5.04 ms 5.96 ms +18.1%
JSON_Parse_Real_Inexact 4.06 us 4.79 us +18.0%
Regex_Lower_S_Or_Upper_S_Asterisk 2.65 ns 3.12 ns +17.6%
JSON_Object_Try_At_Sorted_Order_Hint_32 667.40 ns 783.76 ns +17.4%
Schema_Frame_Deeply_Nested_References 13.62 ms 15.72 ms +15.4%
JSON_Parse_Real 4.09 us 4.71 us +15.0%
OpenAPI_Frame_GSMTasks_3_0 203.06 ms 233.33 ms +14.9%
JSON_PropertySet_Contains 60.90 ns 69.93 ns +14.8%
Schema_Frame_OMC_References 8.29 ms 9.49 ms +14.5%
Pointer_Position_Tracker_Get_Deeply_Nested 494.87 ns 557.04 ns +12.6%
JSON_PropertySet_Filter_Object_Properties 43.37 ns 48.80 ns +12.5%
YAML_Parse_Records 1.00 ms 1.13 ms +12.5%
Pointer_Tracked_Deeply_Nested 1.38 ms 1.55 ms +12.4%
JSON_Object_Defines_All_Present_K2_W8 7.85 ns 8.82 ns +12.4%
JSON_String_Equal_10 8.67 ns 9.70 ns +11.9%
JSON_Stringify_Schema_Web_Of_Things 77.78 us 86.67 us +11.4%
URITemplateRouterView_Restore 13.12 us 14.60 us +11.3%
JSON_Object_Defines_All_Present_K8_W32 85.29 ns 93.77 ns +9.9%
Pointer_Untracked_Deeply_Nested 1.24 ms 1.36 ms +9.9%
URITemplateRouter_Create 25.02 us 27.40 us +9.5%
JSON_String_Fast_Hash_100 2.14 ns 2.34 ns +9.3%
JSON_Fast_Hash_Helm_Chart_Lock 71.85 ns 78.49 ns +9.2%
JSON_Array_Of_Strings_Unique_Colliding_256 214.35 us 233.08 us +8.7%
JSON_Object_At_Key_3 2.90 ns 3.15 ns +8.5%
Pointer_Walker_Schema_ISO_Language 1.73 ms 1.87 ms +8.1%
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.48 ns 2.69 ns +8.1%
JSON_Object_At_Last_Key_512 256.95 ns 277.69 ns +8.1%
JSON_Parse_String_SSO_Plain 2.62 us 2.82 us +7.6%
JSON_Equality_Helm_Chart_Lock 195.38 ns 210.13 ns +7.5%
HTML_Build_Table_100000 32.78 ms 35.19 ms +7.3%
GZIP_Decompress_ISO_Language_Set_3_Locations 3.66 ms 3.93 ms +7.2%
URITemplateRouter_Match_BasePath 244.07 ns 260.84 ns +6.9%
Schema_Tracker_ISO_Language 4.31 ms 4.60 ms +6.6%
JSON_Object_Defines_Perfect_Hash 5.70 ns 6.03 ns +5.7%
JSON_Stringify_ISO_Language 2.74 ms 2.88 ms +5.3%
Pointer_Object_Try_Traverse 25.59 ns 24.29 ns -5.1%
URITemplateRouterView_Arguments 686.23 ns 649.65 ns -5.3%
JSON_Object_At_Key_Sorted_Order_32 333.38 ns 314.19 ns -5.8%
JSON_Object_At_Perfect_Hash 5.26 ns 4.90 ns -6.8%
JSONLD_Member_Expand 59.51 us 55.37 us -7.0%
URITemplateRouterView_Match_BasePath 192.26 ns 178.79 ns -7.0%
Schema_Frame_WoT_References 2.08 ms 1.93 ms -7.1%
JSON_Object_Defines_All_Present_K8_W128 369.92 ns 342.08 ns -7.5%
Markdown_To_HTML_Pathological 11.44 ms 10.57 ms -7.6%
JSON_PropertySet_Insert 403.23 ns 372.34 ns -7.7%
JSON_Object_At_Only_Key_1 1.48 ns 1.36 ns -7.7%
GZIP_Decompress_ISO_Language_Set_3_Schema 394.92 us 363.78 us -7.9%
JSON_Object_Defines_Miss_Too_Large 3.38 ns 3.11 ns -8.0%
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations 6.07 ms 5.57 ms -8.2%
JSON_Parse_KrakenD 1.23 ms 1.13 ms -8.3%
Pointer_Object_Traverse 17.89 ns 16.35 ns -8.6%
Regex_Period_Plus 2.53 ns 2.31 ns -8.6%
JSON_From_String_Temporary 7.99 ns 7.29 ns -8.7%
JSON_Object_Defines_Miss_Same_Length_128 84.33 ns 76.62 ns -9.1%
Pointer_Object_Try_Traverse_Single_Property 8.70 ns 7.89 ns -9.4%
HTML_Render_Table_100000 2.45 ms 2.22 ms -9.4%
JSON_Parse_Object_Object_Properties 5.21 us 4.71 us -9.6%
JSON_Object_At_First_Key_128 1.62 ns 1.46 ns -9.7%
Regex_Caret_Period_Asterisk_Dollar 2.45 ns 2.21 ns -9.8%
Regex_Caret_Group_Period_Plus_Group_Dollar 2.54 ns 2.28 ns -10.1%
Crypto_AES_GCM_Encrypt_128_1KB 4.37 us 3.91 us -10.4%
Regex_Group_Period_Asterisk_Group 2.40 ns 2.15 ns -10.5%
JSON_Parse_1 4.32 us 3.84 us -11.0%
JSONLD_Catalog_Materialize 3.63 ms 3.22 ms -11.3%
JSON_Array_Of_Objects_Unique 523.51 ns 460.14 ns -12.1%
JSON_Object_Iterate_32 19.96 ns 17.49 ns -12.3%
URITemplateRouter_Match 236.87 ns 207.53 ns -12.4%
JSON_Parse_Object_Short_Keys 7.72 us 6.74 us -12.6%
JOSE_VerifySignature_RS256 28.80 us 25.17 us -12.6%
Regex_Caret_Period_Plus_Dollar 2.58 ns 2.25 ns -12.7%
JOSE_VerifySignature_ES512 1.24 ms 1.08 ms -12.7%
JSON_String_Equal_100 11.38 ns 9.90 ns -12.9%
Markdown_To_HTML_Realistic_Document 4.25 ms 3.70 ms -13.0%
JSON_Object_At_First_Key_32 1.60 ns 1.39 ns -13.3%
Markdown_To_HTML_Short_Descriptions 407.36 ns 352.71 ns -13.4%
JSON_Object_At_First_Key_8 1.48 ns 1.27 ns -14.5%
Regex_Nested_Backtrack 39.43 ns 33.63 ns -14.7%
Metapack_Write_OMC_JSON_V2 783.40 us 667.35 us -14.8%
Metapack_Parse_OMC_JSON_V2 1.81 ns 1.54 ns -15.2%
JSON_Object_At_Long_Keys 39.81 ns 33.69 ns -15.4%
Metapack_Read_OMC_JSON_V2 343.57 us 290.58 us -15.4%
JSON_Prettify_KrakenD 2.47 ms 2.09 ms -15.7%
Regex_Period 2.48 ns 2.07 ns -16.3%
JSONLD_Catalog_Expand 11.78 ms 9.85 ms -16.3%
Regex_Caret_X_Hyphen 8.89 ns 7.31 ns -17.8%
JSON_Object_Defines_All_Present_K32_W128 1.73 us 1.41 us -18.6%
GZIP_Compress_ISO_Language_Set_3_Schema 2.59 ms 2.07 ms -19.8%
JSON_Object_At_First_Key_512 1.65 ns 1.32 ns -19.8%
JSON_Object_Defines_Miss_Same_Length 3.73 ns 2.97 ns -20.4%
Regex_Period_Md_Dollar 24.11 ns 19.19 ns -20.4%
JSON_From_String_Copy 15.05 ns 11.95 ns -20.6%
JSON_Parse_Object_Array_Properties 5.08 us 3.99 us -21.5%
JSON_String_Key_Hash_100 2.88 ns 2.21 ns -23.4%
Crypto_CRC32_Large_JSONL 32.88 us 24.81 us -24.5%
JSON_Object_Defines_Miss_Same_Length_32 25.19 ns 18.94 ns -24.8%
Crypto_AES_GCM_Decrypt_128_1KB 5.09 us 3.82 us -25.1%
JSON_Object_At_Last_Key_8 5.24 ns 3.92 ns -25.2%
JSON_String_Fast_Hash_10 3.12 ns 2.33 ns -25.3%
Regex_Caret_Period_Range_Dollar 3.61 ns 2.68 ns -25.8%
JSON_Parse_Schema_ISO_Language 3.74 ms 2.77 ms -25.8%
Regex_Caret_Slash_Period_Asterisk 7.24 ns 5.23 ns -27.7%
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.10 ns 2.20 ns -29.0%
JSON_String_Equal_Small_By_Runtime_Perfect_Hash_10 5.27 ns 3.73 ns -29.2%
JSON_Object_At_Last_Key_32 17.52 ns 12.35 ns -29.5%
JSON_String_Equal_Small_By_Perfect_Hash_10 1.32 ns 0.90 ns -32.2%
JSON_Number_To_Double 14.64 ns 9.89 ns -32.5%
JSON_Object_At_Last_Key_128 87.31 ns 56.45 ns -35.3%
JSON_String_Key_Hash_10 2.47 ns 1.57 ns -36.7%
All 150 benchmarks
Benchmark main This branch Change
MCP_Validate_Headers_64 26.13 us 31.24 us +19.6%
MCP_Intersect_Disjoint_512 484.82 us 663.35 us +36.8%
Regex_Lower_S_Or_Upper_S_Asterisk 2.65 ns 3.12 ns +17.6%
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.48 ns 2.69 ns +8.1%
Regex_Period_Asterisk 2.29 ns 2.39 ns +4.5%
Regex_Group_Period_Asterisk_Group 2.40 ns 2.15 ns -10.5%
Regex_Period_Plus 2.53 ns 2.31 ns -8.6%
Regex_Period 2.48 ns 2.07 ns -16.3%
Regex_Caret_Period_Plus_Dollar 2.58 ns 2.25 ns -12.7%
Regex_Caret_Group_Period_Plus_Group_Dollar 2.54 ns 2.28 ns -10.1%
Regex_Caret_Period_Asterisk_Dollar 2.45 ns 2.21 ns -9.8%
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.10 ns 2.20 ns -29.0%
Regex_Caret_X_Hyphen 8.89 ns 7.31 ns -17.8%
Regex_Period_Md_Dollar 24.11 ns 19.19 ns -20.4%
Regex_Caret_Slash_Period_Asterisk 7.24 ns 5.23 ns -27.7%
Regex_Caret_Period_Range_Dollar 3.61 ns 2.68 ns -25.8%
Regex_Nested_Backtrack 39.43 ns 33.63 ns -14.7%
JSON_Array_Of_Objects_Unique 523.51 ns 460.14 ns -12.1%
JSON_Array_Of_Integers_Unique_256 5.43 us 5.35 us -1.5%
JSON_Array_Of_Strings_Unique_Colliding_256 214.35 us 233.08 us +8.7%
JSON_Parse_1 4.32 us 3.84 us -11.0%
JSON_Parse_Real 4.09 us 4.71 us +15.0%
JSON_Parse_Real_Inexact 4.06 us 4.79 us +18.0%
JSON_Parse_Decimal 6.86 us 6.53 us -4.7%
JSON_Parse_Schema_ISO_Language 3.74 ms 2.77 ms -25.8%
JSON_Parse_KrakenD 1.23 ms 1.13 ms -8.3%
JSON_Stringify_ISO_Language 2.74 ms 2.88 ms +5.3%
JSON_Prettify_KrakenD 2.47 ms 2.09 ms -15.7%
JSON_Parse_Integer 3.40 us 3.47 us +2.0%
JSON_Parse_String_NonSSO_Plain 3.63 us 3.48 us -4.1%
JSON_Parse_String_SSO_Plain 2.62 us 2.82 us +7.6%
JSON_Parse_String_Escape_Heavy 24.25 us 23.07 us -4.9%
JSON_Parse_Object_Short_Keys 7.72 us 6.74 us -12.6%
JSON_Parse_Object_Scalar_Properties 3.39 us 3.43 us +1.0%
JSON_Parse_Object_Array_Properties 5.08 us 3.99 us -21.5%
JSON_Parse_Object_Object_Properties 5.21 us 4.71 us -9.6%
JSON_Parse_Nested_Containers 31.31 us 40.02 us +27.8%
JSON_Fast_Hash_Helm_Chart_Lock 71.85 ns 78.49 ns +9.2%
JSON_Equality_Helm_Chart_Lock 195.38 ns 210.13 ns +7.5%
JSON_String_Equal_10 8.67 ns 9.70 ns +11.9%
JSON_String_Equal_100 11.38 ns 9.90 ns -12.9%
JSON_String_Equal_Small_By_Perfect_Hash_10 1.32 ns 0.90 ns -32.2%
JSON_String_Equal_Small_By_Runtime_Perfect_Hash_10 5.27 ns 3.73 ns -29.2%
JSON_String_Fast_Hash_10 3.12 ns 2.33 ns -25.3%
JSON_String_Fast_Hash_100 2.14 ns 2.34 ns +9.3%
JSON_String_Key_Hash_10 2.47 ns 1.57 ns -36.7%
JSON_String_Key_Hash_100 2.88 ns 2.21 ns -23.4%
JSON_Object_Defines_Miss_Same_Length 3.73 ns 2.97 ns -20.4%
JSON_Object_Defines_Miss_Same_Length_32 25.19 ns 18.94 ns -24.8%
JSON_Object_Defines_Miss_Same_Length_128 84.33 ns 76.62 ns -9.1%
JSON_Object_Defines_Miss_Too_Small 3.41 ns 3.24 ns -4.9%
JSON_Object_Defines_Miss_Too_Large 3.38 ns 3.11 ns -8.0%
JSON_From_String_Copy 15.05 ns 11.95 ns -20.6%
JSON_From_String_Temporary 7.99 ns 7.29 ns -8.7%
JSON_Number_To_Double 14.64 ns 9.89 ns -32.5%
JSON_Object_At_Last_Key_8 5.24 ns 3.92 ns -25.2%
JSON_Object_At_Last_Key_32 17.52 ns 12.35 ns -29.5%
JSON_Object_At_Last_Key_128 87.31 ns 56.45 ns -35.3%
JSON_Object_At_Last_Key_512 256.95 ns 277.69 ns +8.1%
JSON_Object_At_Only_Key_1 1.48 ns 1.36 ns -7.7%
JSON_Object_At_Key_3 2.90 ns 3.15 ns +8.5%
JSON_Object_At_First_Key_8 1.48 ns 1.27 ns -14.5%
JSON_Object_At_First_Key_32 1.60 ns 1.39 ns -13.3%
JSON_Object_At_First_Key_128 1.62 ns 1.46 ns -9.7%
JSON_Object_At_First_Key_512 1.65 ns 1.32 ns -19.8%
JSON_Object_Iterate_32 19.96 ns 17.49 ns -12.3%
JSON_Object_Iterate_128 92.32 ns 90.09 ns -2.4%
JSON_Object_Defines_All_Present_K2_W8 7.85 ns 8.82 ns +12.4%
JSON_Object_Defines_All_Present_K8_W32 85.29 ns 93.77 ns +9.9%
JSON_Object_Defines_All_Present_K8_W128 369.92 ns 342.08 ns -7.5%
JSON_Object_Defines_All_Present_K32_W128 1.73 us 1.41 us -18.6%
JSON_Object_Try_At_Sequential_NoHint_32 371.56 ns 373.30 ns +0.5%
JSON_Object_Try_At_Sequential_Hint_32 97.07 ns 93.33 ns -3.9%
JSON_Object_At_Key_Sorted_Order_32 333.38 ns 314.19 ns -5.8%
JSON_Object_Try_At_Sorted_Order_Hint_32 667.40 ns 783.76 ns +17.4%
JSON_Divisible_By_Decimal 322.17 ns 328.19 ns +1.9%
JSON_PropertySet_Contains 60.90 ns 69.93 ns +14.8%
JSON_PropertySet_Filter_Object_Properties 43.37 ns 48.80 ns +12.5%
JSON_PropertySet_Insert 403.23 ns 372.34 ns -7.7%
JSON_Stringify_Schema_Web_Of_Things 77.78 us 86.67 us +11.4%
JSON_Prettify_Schema_Web_Of_Things 186.58 us 256.63 us +37.5%
JSON_Object_At_Perfect_Hash 5.26 ns 4.90 ns -6.8%
JSON_Object_Defines_Perfect_Hash 5.70 ns 6.03 ns +5.7%
JSON_Object_Defines_Missing_Perfect_Hash 5.49 ns 5.49 ns +0.1%
JSON_Object_At_Long_Keys 39.81 ns 33.69 ns -15.4%
Pointer_Object_Traverse 17.89 ns 16.35 ns -8.6%
Pointer_Object_Try_Traverse 25.59 ns 24.29 ns -5.1%
Pointer_Object_Traverse_Single_Property 6.35 ns 8.32 ns +31.0%
Pointer_Object_Try_Traverse_Single_Property 8.70 ns 7.89 ns -9.4%
Pointer_Push_Back_Pointer_To_Weak_Pointer 108.26 ns 110.32 ns +1.9%
Pointer_Walker_Schema_ISO_Language 1.73 ms 1.87 ms +8.1%
Pointer_Untracked_Deeply_Nested 1.24 ms 1.36 ms +9.9%
Pointer_Tracked_Deeply_Nested 1.38 ms 1.55 ms +12.4%
Pointer_Position_Tracker_Get_Deeply_Nested 494.87 ns 557.04 ns +12.6%
Schema_Tracker_ISO_Language 4.31 ms 4.60 ms +6.6%
Schema_Tracker_ISO_Language_To_JSON 16.03 ms 15.55 ms -3.0%
Schema_Frame_WoT_References 2.08 ms 1.93 ms -7.1%
Schema_Frame_OMC_References 8.29 ms 9.49 ms +14.5%
Schema_Frame_OMC_Pointers 22.75 ms 27.29 ms +19.9%
Schema_Frame_OMC_Locations 6.55 ms 9.10 ms +38.9%
Schema_Frame_ISO_Language_Locations 13.47 ms 16.01 ms +18.8%
Schema_Frame_ISO_Language_Root 173.62 ns 209.92 ns +20.9%
Schema_Frame_KrakenD_References 10.51 ms 13.84 ms +31.6%
Schema_Frame_KrakenD_Reachable 237.84 ms 340.77 ms +43.3%
Schema_Frame_ISO_Language_Locations_To_JSON 24.97 ms 40.63 ms +62.7%
Schema_Frame_Many_Resources_References 86.63 ms 119.95 ms +38.5%
Schema_Frame_Deeply_Nested_References 13.62 ms 15.72 ms +15.4%
Schema_Format_ISO_Language 14.83 ms 23.19 ms +56.3%
Schema_Bundle_Meta_2020_12 449.95 us 634.31 us +41.0%
Schema_Bundle_Many_Remotes_With_Fragments 5.04 ms 5.96 ms +18.1%
OpenAPI_Frame_GSMTasks_3_0 203.06 ms 233.33 ms +14.9%
OpenAPI_Format_Synthetic_3_1 64.31 ms 66.45 ms +3.3%
OpenAPI_Bundle_Split_3_1 16.92 ms 17.18 ms +1.5%
JSONPath_Descendant_Filter_Nested 1.74 us 1.81 us +4.3%
URITemplateRouter_Create 25.02 us 27.40 us +9.5%
URITemplateRouter_Match 236.87 ns 207.53 ns -12.4%
URITemplateRouterView_Restore 13.12 us 14.60 us +11.3%
URITemplateRouterView_Match 153.99 ns 152.68 ns -0.9%
URITemplateRouterView_Arguments 686.23 ns 649.65 ns -5.3%
URITemplateRouter_Match_BasePath 244.07 ns 260.84 ns +6.9%
URITemplateRouterView_Match_BasePath 192.26 ns 178.79 ns -7.0%
JSONL_Parse_Large 7.11 ms 9.12 ms +28.3%
JSONL_Parse_Large_GZIP 8.34 ms 8.56 ms +2.7%
JSONLD_Catalog_Annotation_List_Populate 646.70 us 673.42 us +4.1%
JSONLD_Catalog_Materialize 3.63 ms 3.22 ms -11.3%
JSONLD_Catalog_Expand 11.78 ms 9.85 ms -16.3%
JSONLD_Member_Expand 59.51 us 55.37 us -7.0%
JSONLD_Catalog_Compact 74.47 ms 77.86 ms +4.6%
HTML_Build_Table_100000 32.78 ms 35.19 ms +7.3%
HTML_Render_Table_100000 2.45 ms 2.22 ms -9.4%
Markdown_To_HTML_Realistic_Document 4.25 ms 3.70 ms -13.0%
Markdown_To_HTML_Pathological 11.44 ms 10.57 ms -7.6%
Markdown_To_HTML_Short_Descriptions 407.36 ns 352.71 ns -13.4%
YAML_Parse_Records 1.00 ms 1.13 ms +12.5%
YAML_Parse_Block_Scalars 484.07 us 653.19 us +34.9%
GZIP_Compress_ISO_Language_Set_3_Locations 41.29 ms 42.12 ms +2.0%
GZIP_Decompress_ISO_Language_Set_3_Locations 3.66 ms 3.93 ms +7.2%
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations 6.07 ms 5.57 ms -8.2%
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations 7.14 ms 6.89 ms -3.4%
GZIP_Compress_ISO_Language_Set_3_Schema 2.59 ms 2.07 ms -19.8%
GZIP_Decompress_ISO_Language_Set_3_Schema 394.92 us 363.78 us -7.9%
JOSE_VerifySignature_RS256 28.80 us 25.17 us -12.6%
JOSE_VerifySignature_ES512 1.24 ms 1.08 ms -12.7%
Crypto_CRC32_Large_JSONL 32.88 us 24.81 us -24.5%
Crypto_AES_GCM_Encrypt_128_1KB 4.37 us 3.91 us -10.4%
Crypto_AES_GCM_Decrypt_128_1KB 5.09 us 3.82 us -25.1%
Crypto_AES_GCM_Encrypt_256_1KB 4.37 us 4.28 us -1.9%
Metapack_Parse_OMC_JSON_V2 1.81 ns 1.54 ns -15.2%
Metapack_Read_OMC_JSON_V2 343.57 us 290.58 us -15.4%
Metapack_Write_OMC_JSON_V2 783.40 us 667.35 us -14.8%

@jviotti
jviotti marked this pull request as ready for review November 27, 2026 16:46

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

17 issues found and verified against the latest diff

You’re at about 97% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="test/spec/jose/jose_jwk_private_test.cc">

<violation number="1" location="test/spec/jose/jose_jwk_private_test.cc:620">
P3: This comment describes only the probe-based check. On backends that bind the EC key pair at construction, the mismatch is caught earlier, so the comment is inaccurate there. Reword it to say the pair is checked by the backend, or by a signature probe where the backend does not bind it.</violation>
</file>

<file name="src/spec/jose/jose_jwe_encrypt.cc">

<violation number="1" location="src/spec/jose/jose_jwe_encrypt.cc:109">
P2: `rsa_oaep_encrypt` can return `nullopt` when backend setup or encryption fails; `.value()` now throws instead of letting `jwe_encrypt` return `nullopt`. Restore the result check.</violation>

<violation number="2" location="src/spec/jose/jose_jwe_encrypt.cc:126">
P2: `aes_key_wrap` returns `nullopt` when backend setup or wrapping fails, so these `.value()` calls can throw from `jwe_encrypt`; check both wrapping branches and propagate failure.</violation>

<violation number="3" location="src/spec/jose/jose_jwe_encrypt.cc:150">
P2: These EC and KDF APIs are fallible; unwrapping their results turns backend or size failures into exceptions instead of `jwe_encrypt` returning `nullopt`. Restore checks before each unwrap.</violation>

<violation number="4" location="src/spec/jose/jose_jwe_encrypt.cc:161">
P2: The `.value()` calls on `derive_public_key`, `ecdh_derive` and similar calls turn a runtime backend failure into `std::bad_optional_access`, although `jwe_encrypt` reports failure with `std::nullopt`. The comments only cover import-time validation, which does not rule out backend errors such as OS key-derivation failures. Restore the `has_value()` checks, or keep the coverage goal with an explicit exclusion instead of unchecked `.value()`.</violation>
</file>

<file name="contrib/coverage-exceptions.txt">

<violation number="1" location="contrib/coverage-exceptions.txt:33">
P2: `excused()` compares this token with llvm-cov's function name, but `jose_jws_sign.cc:` is not part of that name, so neither exception matches. Remove the repeated filename prefix from both entries.</violation>
</file>

<file name="test/spec/jose/jose_jwe_decrypt_test.cc">

<violation number="1" location="test/spec/jose/jose_jwe_decrypt_test.cc:895">
P3: The comment says a wrong-width direct secret "fails at the tag rather than before it", but `jwe_decrypt` rejects it structurally in the DIR case before any tag check. The RFC 7516 11.5 random-CEK fallback does not apply to DIR. Rewrite the comment to describe the early refusal, or drop the RFC 11.5 reference.</violation>
</file>

<file name="test/spec/jose/jose_jwt_test.cc">

<violation number="1" location="test/spec/jose/jose_jwt_test.cc:392">
P3: The comment says the token's type is long enough to carry the prefix, but the token uses `typ: "JWT"`, which is shorter than `application/`. The long value `somethingelse/plain` is only a query argument, so this test would pass even if the prefix handling were wrong. Put a long non-prefixed type such as `somethingelse/plain` in the token's `typ` and assert the whole-string comparison against it.</violation>
</file>

<file name="src/spec/jose/jose_jwk_thumbprint.cc">

<violation number="1" location="src/spec/jose/jose_jwk_thumbprint.cc:78">
P2: `build_thumbprint` no longer returns `std::nullopt` for an empty secret, so `JWK::from_octets("")` and `JWKPrivate::from_octets("")` now yield a thumbprint of `{"k":"","kty":"oct"}` instead of no value. Restore the empty-secret check and return `std::nullopt` for it, or keep the optional return type and guard the Octet case.</violation>
</file>

<file name="test/spec/jose/jose_jwk_test.cc">

<violation number="1" location="test/spec/jose/jose_jwk_test.cc:863">
P2: This test does not isolate the base64url check, because a 13-character value is also the wrong width for Ed25519. Use a 43-character value containing `!` so the width matches and only the alphabet check can reject it. Also drop or reword the comment, since the test cannot show the ordering.</violation>
</file>

<file name="src/spec/jose/jose_jwe_internal.h">

<violation number="1" location="src/spec/jose/jose_jwe_internal.h:125">
P2: The `.value()` calls here throw `std::bad_optional_access` where the old code returned `nullopt`. The AEAD sealing still refuses oversized plaintext (over INT_MAX, or INT_MAX - 16 for CBC) and backend failures, and `jwe_encrypt` documents those as no value, not an exception. The comment's claim that the caller guarantees cover everything the sealing turns away is also wrong. Restore the `nullopt` propagation rather than asserting the failure away.</violation>
</file>

<file name="src/spec/jose/jose_jws_verify_signature.cc">

<violation number="1" location="src/spec/jose/jose_jws_verify_signature.cc:74">
P2: The EdDSA arm now dereferences `*public_key` with no null check, while every other asymmetric arm guards it. On the OpenSSL backend `make_eddsa_public_key` can return nullopt for a correctly sized key when `EVP_PKEY_new_raw_public_key` fails, so an OKP key can have a null public key and this becomes a null dereference instead of `false`. Restore the `public_key != nullptr` guard and drop the comment above it.</violation>
</file>

<file name="src/spec/jose/jose_jws_sign.cc">

<violation number="1" location="src/spec/jose/jose_jws_sign.cc:22">
P3: `ecdsa_signature_octets` exists only so the `nullopt` refusal lands in a function the coverage exceptions file excludes. The same logic is one line at the call site. Inline the check and drop the helper. The coverage exception should not be used to hide this branch.</violation>
</file>

<file name="src/spec/jose/jose_jwe_decrypt.cc">

<violation number="1" location="src/spec/jose/jose_jwe_decrypt.cc:82">
P2: The `.value()` on `kdf_concat` turns its overflow nullopt into an uncaught `std::bad_optional_access`. `apu`/`apv` come from the attacker-controlled header with no size cap, so an oversized header throws out of `jwe_decrypt`, which is documented to return no value on any failure. Restore the explicit `has_value()` check.</violation>
</file>

<file name="src/spec/jose/jose_jwk_private.cc">

<violation number="1" location="src/spec/jose/jose_jwk_private.cc:235">
P2: The EdDSA backend can return no signature, but `.value()` throws out of `JWKPrivate::from()` instead of rejecting the key cleanly. Check both optionals before verification.</violation>

<violation number="2" location="src/spec/jose/jose_jwk_private.cc:313">
P2: Public-key derivation and component extraction are fallible, but these `.value()` calls throw when recovery fails. Restore the guards so `from_pem()` can return the private key with unrecovered public fields left unset.</violation>
</file>

<file name="src/spec/jose/jose_switch.h">

<violation number="1" location="src/spec/jose/jose_switch.h:8">
P3: On Clang, this `default:` makes newly added enum values silently take the first case, and the project's `-Wswitch` warning will not flag the missing arm. Preserve an exhaustiveness check for these switches, such as enabling `-Wswitch-enum` for Clang.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

// The public half of a key just built follows from it, its components
// read back the same way the recipient's do, and the agreement pairs two
// keys of the one curve, which is the only thing it turns away
const auto ephemeral_public{derive_public_key(ephemeral.value()).value()};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The .value() calls on derive_public_key, ecdh_derive and similar calls turn a runtime backend failure into std::bad_optional_access, although jwe_encrypt reports failure with std::nullopt. The comments only cover import-time validation, which does not rule out backend errors such as OS key-derivation failures. Restore the has_value() checks, or keep the coverage goal with an explicit exclusion instead of unchecked .value().

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/spec/jose/jose_jwe_encrypt.cc, line 161:

<comment>The `.value()` calls on `derive_public_key`, `ecdh_derive` and similar calls turn a runtime backend failure into `std::bad_optional_access`, although `jwe_encrypt` reports failure with `std::nullopt`. The comments only cover import-time validation, which does not rule out backend errors such as OS key-derivation failures. Restore the `has_value()` checks, or keep the coverage goal with an explicit exclusion instead of unchecked `.value()`.</comment>

<file context>
@@ -140,33 +145,24 @@ auto jwe_encrypt(const JSON &header, const std::string_view plaintext,
+      // The public half of a key just built follows from it, its components
+      // read back the same way the recipient's do, and the agreement pairs two
+      // keys of the one curve, which is the only thing it turns away
+      const auto ephemeral_public{derive_public_key(ephemeral.value()).value()};
       const auto ephemeral_components{
-          ec_public_components(ephemeral_public.value())};
</file context>

Comment on lines +33 to +34
jose_jws_sign.cc jose_jws_sign.cc:_ZN12_GLOBAL__N_122ecdsa_signature_octetsERKNSt3__18optionalINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEEE
jose_jws_sign.cc jose_jws_sign.cc:_ZN12_GLOBAL__N_122ecdsa_signature_octetsERKSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: excused() compares this token with llvm-cov's function name, but jose_jws_sign.cc: is not part of that name, so neither exception matches. Remove the repeated filename prefix from both entries.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At contrib/coverage-exceptions.txt, line 33:

<comment>`excused()` compares this token with llvm-cov's function name, but `jose_jws_sign.cc:` is not part of that name, so neither exception matches. Remove the repeated filename prefix from both entries.</comment>

<file context>
@@ -13,3 +13,22 @@
+#
+# Named once per standard library, as the report gives the mangled name and the
+# two spell the parameter differently
+jose_jws_sign.cc jose_jws_sign.cc:_ZN12_GLOBAL__N_122ecdsa_signature_octetsERKNSt3__18optionalINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEEE
+jose_jws_sign.cc jose_jws_sign.cc:_ZN12_GLOBAL__N_122ecdsa_signature_octetsERKSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE
</file context>
Suggested change
jose_jws_sign.cc jose_jws_sign.cc:_ZN12_GLOBAL__N_122ecdsa_signature_octetsERKNSt3__18optionalINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEEE
jose_jws_sign.cc jose_jws_sign.cc:_ZN12_GLOBAL__N_122ecdsa_signature_octetsERKSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE
jose_jws_sign.cc _ZN12_GLOBAL__N_122ecdsa_signature_octetsERKNSt3__18optionalINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEEE
jose_jws_sign.cc _ZN12_GLOBAL__N_122ecdsa_signature_octetsERKSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE

}
// The key was held to its curve when it was built, so its components
// read back
const auto recipient{ec_public_components(*key.public_key()).value()};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: These EC and KDF APIs are fallible; unwrapping their results turns backend or size failures into exceptions instead of jwe_encrypt returning nullopt. Restore checks before each unwrap.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/spec/jose/jose_jwe_encrypt.cc, line 150:

<comment>These EC and KDF APIs are fallible; unwrapping their results turns backend or size failures into exceptions instead of `jwe_encrypt` returning `nullopt`. Restore checks before each unwrap.</comment>

<file context>
@@ -140,33 +145,24 @@ auto jwe_encrypt(const JSON &header, const std::string_view plaintext,
-      }
+      // The key was held to its curve when it was built, so its components
+      // read back
+      const auto recipient{ec_public_components(*key.public_key()).value()};
 
       // A fresh ephemeral key on the recipient curve (RFC 7518 Section 4.6.1)
</file context>

// The key-encryption key was held to an AES width just above and a
// content key is a whole number of semiblocks of at least two, which is
// everything RFC 3394 Section 2 asks of the pair
encrypted_key = aes_key_wrap(key.secret(), content_key).value();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: aes_key_wrap returns nullopt when backend setup or wrapping fails, so these .value() calls can throw from jwe_encrypt; check both wrapping branches and propagate failure.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/spec/jose/jose_jwe_encrypt.cc, line 126:

<comment>`aes_key_wrap` returns `nullopt` when backend setup or wrapping fails, so these `.value()` calls can throw from `jwe_encrypt`; check both wrapping branches and propagate failure.</comment>

<file context>
@@ -83,42 +84,46 @@ auto jwe_encrypt(const JSON &header, const std::string_view plaintext,
+      // The key-encryption key was held to an AES width just above and a
+      // content key is a whole number of semiblocks of at least two, which is
+      // everything RFC 3394 Section 2 asks of the pair
+      encrypted_key = aes_key_wrap(key.secret(), content_key).value();
       break;
     }
</file context>

// always has the room RFC 8017 Section 7.1.1 asks of it
encrypted_key =
rsa_oaep_encrypt(*key.public_key(), oaep_hash, content_key, generator)
.value();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: rsa_oaep_encrypt can return nullopt when backend setup or encryption fails; .value() now throws instead of letting jwe_encrypt return nullopt. Restore the result check.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/spec/jose/jose_jwe_encrypt.cc, line 109:

<comment>`rsa_oaep_encrypt` can return `nullopt` when backend setup or encryption fails; `.value()` now throws instead of letting `jwe_encrypt` return `nullopt`. Restore the result check.</comment>

<file context>
@@ -83,42 +84,46 @@ auto jwe_encrypt(const JSON &header, const std::string_view plaintext,
+      // always has the room RFC 8017 Section 7.1.1 asks of it
+      encrypted_key =
+          rsa_oaep_encrypt(*key.public_key(), oaep_hash, content_key, generator)
+              .value();
       break;
     }
</file context>

EXPECT_FALSE(key.has_value());
}

// The scalar and the point are checked against each other by signing a probe

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: This comment describes only the probe-based check. On backends that bind the EC key pair at construction, the mismatch is caught earlier, so the comment is inaccurate there. Reword it to say the pair is checked by the backend, or by a signature probe where the backend does not bind it.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At test/spec/jose/jose_jwk_private_test.cc, line 620:

<comment>This comment describes only the probe-based check. On backends that bind the EC key pair at construction, the mismatch is caught earlier, so the comment is inaccurate there. Reword it to say the pair is checked by the backend, or by a signature probe where the backend does not bind it.</comment>

<file context>
@@ -593,3 +593,51 @@ TEST(jwk_private_from_json_rejects_okp_with_a_short_seed) {
+  EXPECT_FALSE(key.has_value());
+}
+
+// The scalar and the point are checked against each other by signing a probe
+// and verifying it, so a pair that does not belong together is refused even
+// though each half parses on its own
</file context>

Comment on lines +895 to +898
// RFC 7518 Section 4.5 ties the secret of a direct encryption to the width the
// content encryption asks for, and RFC 7516 Section 11.5 has a recipient give
// nothing away about which part was wrong, so a secret of another width fails
// at the tag rather than before it

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The comment says a wrong-width direct secret "fails at the tag rather than before it", but jwe_decrypt rejects it structurally in the DIR case before any tag check. The RFC 7516 11.5 random-CEK fallback does not apply to DIR. Rewrite the comment to describe the early refusal, or drop the RFC 11.5 reference.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At test/spec/jose/jose_jwe_decrypt_test.cc, line 895:

<comment>The comment says a wrong-width direct secret "fails at the tag rather than before it", but `jwe_decrypt` rejects it structurally in the DIR case before any tag check. The RFC 7516 11.5 random-CEK fallback does not apply to DIR. Rewrite the comment to describe the early refusal, or drop the RFC 11.5 reference.</comment>

<file context>
@@ -821,3 +821,117 @@ TEST(decrypt_rejects_an_unknown_encryption_with_a_supported_key_algorithm) {
+          .has_value());
+}
+
+// RFC 7518 Section 4.5 ties the secret of a direct encryption to the width the
+// content encryption asks for, and RFC 7516 Section 11.5 has a recipient give
+// nothing away about which part was wrong, so a secret of another width fails
</file context>
Suggested change
// RFC 7518 Section 4.5 ties the secret of a direct encryption to the width the
// content encryption asks for, and RFC 7516 Section 11.5 has a recipient give
// nothing away about which part was wrong, so a secret of another width fails
// at the tag rather than before it
// RFC 7518 Section 4.5 ties the secret of a direct encryption to the width the
// content encryption asks for, so a secret of another width is refused before
// the ciphertext is touched

EXPECT_FALSE(token.value().has_type("foo/bar"));
}

// A type long enough to carry the prefix but not opening with it is compared

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The comment says the token's type is long enough to carry the prefix, but the token uses typ: "JWT", which is shorter than application/. The long value somethingelse/plain is only a query argument, so this test would pass even if the prefix handling were wrong. Put a long non-prefixed type such as somethingelse/plain in the token's typ and assert the whole-string comparison against it.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At test/spec/jose/jose_jwt_test.cc, line 392:

<comment>The comment says the token's type is long enough to carry the prefix, but the token uses `typ: "JWT"`, which is shorter than `application/`. The long value `somethingelse/plain` is only a query argument, so this test would pass even if the prefix handling were wrong. Put a long non-prefixed type such as `somethingelse/plain` in the token's `typ` and assert the whole-string comparison against it.</comment>

<file context>
@@ -376,3 +376,57 @@ TEST(owns_decoded_data) {
+  EXPECT_FALSE(token.value().has_type("foo/bar"));
+}
+
+// A type long enough to carry the prefix but not opening with it is compared
+// whole as well
+TEST(has_type_keeps_a_type_that_does_not_open_with_the_prefix) {
</file context>

// which is settled before the call, or where two hundred and fifty six
// successive derived nonces all fall outside the curve order, which no input
// can be built to arrange
auto ecdsa_signature_octets(const std::optional<std::string> &signature)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: ecdsa_signature_octets exists only so the nullopt refusal lands in a function the coverage exceptions file excludes. The same logic is one line at the call site. Inline the check and drop the helper. The coverage exception should not be used to hide this branch.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/spec/jose/jose_jws_sign.cc, line 22:

<comment>`ecdsa_signature_octets` exists only so the `nullopt` refusal lands in a function the coverage exceptions file excludes. The same logic is one line at the call site. Inline the check and drop the helper. The coverage exception should not be used to hide this branch.</comment>

<file context>
@@ -3,11 +3,33 @@
+// which is settled before the call, or where two hundred and fifty six
+// successive derived nonces all fall outside the curve order, which no input
+// can be built to arrange
+auto ecdsa_signature_octets(const std::optional<std::string> &signature)
+    -> std::string_view {
+  if (!signature.has_value()) {
</file context>

// arrives, which this fold closes there while the compilers that read case
// labels keep holding the switch to naming every one of them
#if defined(__clang__)
#define SOURCEMETA_CORE_JOSE_FIRST_CASE(value) default:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: On Clang, this default: makes newly added enum values silently take the first case, and the project's -Wswitch warning will not flag the missing arm. Preserve an exhaustiveness check for these switches, such as enabling -Wswitch-enum for Clang.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/spec/jose/jose_switch.h, line 8:

<comment>On Clang, this `default:` makes newly added enum values silently take the first case, and the project's `-Wswitch` warning will not flag the missing arm. Preserve an exhaustiveness check for these switches, such as enabling `-Wswitch-enum` for Clang.</comment>

<file context>
@@ -0,0 +1,22 @@
+// arrives, which this fold closes there while the compilers that read case
+// labels keep holding the switch to naming every one of them
+#if defined(__clang__)
+#define SOURCEMETA_CORE_JOSE_FIRST_CASE(value) default:
+#else
+#define SOURCEMETA_CORE_JOSE_FIRST_CASE(value) case value:
</file context>

@augmentcode

augmentcode Bot commented Nov 27, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Expands JOSE test coverage and refactors dispatch around backend guarantees.

  • Adds JWE rejection tests for incompatible keys, invalid material, wrong secret widths, and RNG failures.
  • Extends JWK tests for malformed parameters, key-pair consistency, and advisory algorithm hints.
  • Adds JWS verification tests for unusable keys, incompatible secrets, and invalid signatures.
  • Extends JWT tests for malformed segments, media-type matching, and audience shapes.
  • Shares key-kind, hash, and curve mappings and dispatches thumbprint serialization by key type.
  • Adds backend capability macros to skip redundant EC consistency probes and gate injected-RNG tests.
  • Introduces Clang-specific switch macros to eliminate unreachable coverage branches.
  • Simplifies encryption result handling and isolates ECDSA refusal handling for targeted coverage exclusions.
  • Adds OAuth random-header dependencies and explicitly selects the system RNG in UUID tests.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 5 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

return public_key != nullptr && key.type() == JWK::Type::OctetKeyPair &&
// A point of the width the curve fixes always forms a key, so an octet
// key pair always carries one
return key.type() == JWK::Type::OctetKeyPair &&

@augmentcode augmentcode Bot Nov 27, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you check the OpenSSL failure path at src/spec/jose/jose_jws_verify_signature.cc:74? make_eddsa_public_key can return nullopt when no EdDSA-capable provider is available, but JWK::parse still succeeds as OctetKeyPair, so this branch now dereferences a null public_key instead of rejecting the key.

Severity: high

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.


// The key is the width the scheme names and the initialization vector
// the twelve octets it asks for, which is all the sealing turns away
auto result{aes_gcm_encrypt(key, iv, associated_data, plaintext).value()};

@augmentcode augmentcode Bot Nov 27, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At src/spec/jose/jose_jwe_internal.h:125, valid key/IV widths do not guarantee success: aes_gcm_encrypt also rejects plaintext/AAD above INT_MAX, and CBC-HMAC rejects plaintext above INT_MAX - 16. Since jwe_encrypt does not enforce those bounds, these inputs now throw std::bad_optional_access instead of returning nullopt.

Other locations where this applies: src/spec/jose/jose_jwe_internal.h:138

Severity: medium

Other Locations
  • src/spec/jose/jose_jwe_internal.h:138

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

// always has the room RFC 8017 Section 7.1.1 asks of it
encrypted_key =
rsa_oaep_encrypt(*key.public_key(), oaep_hash, content_key, generator)
.value();

@augmentcode augmentcode Bot Nov 27, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At src/spec/jose/jose_jwe_encrypt.cc:109, OAEP can still return nullopt with a valid key and short CEK: the fallback backend catches generator exceptions while drawing the OAEP seed. A generator that succeeds for the CEK and fails on that next draw now triggers std::bad_optional_access instead of the previous empty result.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

R"({"kty":"EC","crv":"P-256",)"
R"("x":"2TARGSWq8F97iq3Ng48wCEN26cxzy8OCzbFa-6ZfnaI",)"
R"("y":"5lkzZqhWOkc2m2zJOotl6K3_x6-TSs9OnzQKwb35DxQ",)"
R"("d":"ttepxcp-OwXCj4-v4sGcxRxQRXA8D5Svu02yhcHvbd1"})"))};

@augmentcode augmentcode Bot Nov 27, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In test/spec/jose/jose_jwk_private_test.cc:629, the 43-character scalar ends with 1 (base64url sextet 53), whose low two padding bits are nonzero. base64url_decode rejects it before key construction, so this test passes even if mismatched scalar/public-point pairs are accepted.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

// A coordinate whose companion cannot be recovered names no point of the
// Edwards curve (RFC 8032 Section 5.1.3), which the primitive turns down
TEST(eddsa_rejects_a_coordinate_that_names_no_point) {
const auto signature{sourcemeta::core::base64url_decode(RSA_SIGNATURE)};

@augmentcode augmentcode Bot Nov 27, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In test/spec/jose/jose_jws_verify_signature_test.cc:568, RSA_SIGNATURE decodes to 256 bytes, but Ed25519 requires exactly 64. The verifier returns false at its signature-length check before decoding the public point, so this test does not exercise the invalid-point rejection it claims to cover.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10 existing issues remain and 5 new issues found across 20 files

You’re at about 98% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="contrib/coverage-exceptions.txt">

<violation number="1" location="contrib/coverage-exceptions.txt:17">
P3: This rationale is now duplicated in `jose_jws_sign.cc` above `ecdsa_signature_octets`, and the two copies already differ. Keep the full explanation in one place and point to it from the other, so the two cannot drift apart.</violation>
</file>

<file name="test/spec/jose/jose_jws_verify_signature_test.cc">

<violation number="1" location="test/spec/jose/jose_jws_verify_signature_test.cc:67">
P3: The existing `// A P-384 public key...` comment is now separated from `EC_P384_JWK` by the new RSA/OKP/EC constants, so it reads as if it describes the new RSA key. Move the P-384 comment back directly above `EC_P384_JWK`, and keep the new block's comment above `RSA_EVEN_EXPONENT_JWK`.</violation>

<violation number="2" location="test/spec/jose/jose_jws_verify_signature_test.cc:453">
P3: Use a 64-byte Ed25519-sized signature here; `RSA_SIGNATURE` decodes to 256 bytes, so verification returns at its length check without exercising the invalid-point path.</violation>
</file>

<file name="test/spec/jose/jose_jwe_decrypt_test.cc">

<violation number="1" location="test/spec/jose/jose_jwe_decrypt_test.cc:872">
P3: This test cannot tell whether off-curve points are rejected: the tampered header breaks the tag too, so it passes for the wrong reason. Re-encrypt with a valid ephemeral key and swap only the `epk` member, or assert on the specific rejection path, so the off-curve refusal is what fails.</violation>
</file>

<file name="test/spec/jose/jose_jwk_private_test.cc">

<violation number="1" location="test/spec/jose/jose_jwk_private_test.cc:629">
P3: Use a canonical base64url scalar that differs from the public point; this 43-character value ends in `1` (sextet 53), whose nonzero pad bits make decoding fail before the consistency check.</violation>
</file>

Requires human review: Auto-approval blocked because this review re-detected 10 unresolved issues already reported by Cubic.

View guided diff | Re-trigger cubic

# before reaching for this file, because an entry here is a measurement this
# project no longer takes.

# The octets of an elliptic curve signature, with none where the backend

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: This rationale is now duplicated in jose_jws_sign.cc above ecdsa_signature_octets, and the two copies already differ. Keep the full explanation in one place and point to it from the other, so the two cannot drift apart.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At contrib/coverage-exceptions.txt, line 17:

<comment>This rationale is now duplicated in `jose_jws_sign.cc` above `ecdsa_signature_octets`, and the two copies already differ. Keep the full explanation in one place and point to it from the other, so the two cannot drift apart.</comment>

<file context>
@@ -13,3 +13,22 @@
 # before reaching for this file, because an entry here is a measurement this
 # project no longer takes.
+
+# The octets of an elliptic curve signature, with none where the backend
+# declined to make one. Every call runs, and the refusal it answers for is one
+# this suite cannot bring about. A backend with no system provider derives its
</file context>

// no prime curve, and a coordinate at or above the field prime is not a point
// at all (RFC 8032 Section 5.1.3). Every backend refuses each of them, so the
// key is built with nothing behind it and simply fails to verify
constexpr std::string_view RSA_EVEN_EXPONENT_JWK{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The existing // A P-384 public key... comment is now separated from EC_P384_JWK by the new RSA/OKP/EC constants, so it reads as if it describes the new RSA key. Move the P-384 comment back directly above EC_P384_JWK, and keep the new block's comment above RSA_EVEN_EXPONENT_JWK.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At test/spec/jose/jose_jws_verify_signature_test.cc, line 67:

<comment>The existing `// A P-384 public key...` comment is now separated from `EC_P384_JWK` by the new RSA/OKP/EC constants, so it reads as if it describes the new RSA key. Move the P-384 comment back directly above `EC_P384_JWK`, and keep the new block's comment above `RSA_EVEN_EXPONENT_JWK`.</comment>

<file context>
@@ -59,6 +59,23 @@ constexpr std::string_view RSA_JWK_MATCHING_ALGORITHM{
+// no prime curve, and a coordinate at or above the field prime is not a point
+// at all (RFC 8032 Section 5.1.3). Every backend refuses each of them, so the
+// key is built with nothing behind it and simply fails to verify
+constexpr std::string_view RSA_EVEN_EXPONENT_JWK{
+    R"JSON({ "kty": "RSA", "n": "qp63b87vkztqtUnT7TvIhst4O0QraUSHOPKep5EjRM5EVGOcu56-24usR2wz7_d6UVOgjzcXNQbgzTtcN_mNQRzi3WC_pGT2N5Z1eYUyUCmHMxANntSMmgpAxoKw2jfpt6P0Fc5L4B08JKaXeS8vnpeKjOeX3UkzR9ub66Mp3EGnFRL15D1h9l4ohFmHDm4GPX5NwV5XMw_0ha_BZihp6wtsUBwIcrM1ipGbiOQtHB1sXsUc_pPKLNeR-HzC8PmVtWDOqGSJFsiF6SvxBsgqKpNyov8sYTj_AM3JB57BUrHSZFoNYAcRmWu__EwU1awt9oXbcHyAbJLI85rlxtP6hw", "e": "Ag" })JSON"};
+constexpr std::string_view OKP_NO_SUCH_POINT_JWK{
</file context>

// The ephemeral key travels in the header and is built through the same key
// machinery, so a point that lies on no curve forms nothing to agree with. The
// replaced header breaks the tag as well, so this asserts only the refusal
TEST(ecdh_es_decrypt_rejects_an_ephemeral_point_off_the_curve) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: This test cannot tell whether off-curve points are rejected: the tampered header breaks the tag too, so it passes for the wrong reason. Re-encrypt with a valid ephemeral key and swap only the epk member, or assert on the specific rejection path, so the off-curve refusal is what fails.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At test/spec/jose/jose_jwe_decrypt_test.cc, line 872:

<comment>This test cannot tell whether off-curve points are rejected: the tampered header breaks the tag too, so it passes for the wrong reason. Re-encrypt with a valid ephemeral key and swap only the `epk` member, or assert on the specific rejection path, so the off-curve refusal is what fails.</comment>

<file context>
@@ -821,3 +821,117 @@ TEST(decrypt_rejects_an_unknown_encryption_with_a_supported_key_algorithm) {
+// The ephemeral key travels in the header and is built through the same key
+// machinery, so a point that lies on no curve forms nothing to agree with. The
+// replaced header breaks the tag as well, so this asserts only the refusal
+TEST(ecdh_es_decrypt_rejects_an_ephemeral_point_off_the_curve) {
+  const auto public_key{sourcemeta::core::JWK::from(
+      sourcemeta::core::parse_json(std::string{JWE_EC_PUBLIC_JWK}))};
</file context>

R"({"kty":"EC","crv":"P-256",)"
R"("x":"2TARGSWq8F97iq3Ng48wCEN26cxzy8OCzbFa-6ZfnaI",)"
R"("y":"5lkzZqhWOkc2m2zJOotl6K3_x6-TSs9OnzQKwb35DxQ",)"
R"("d":"ttepxcp-OwXCj4-v4sGcxRxQRXA8D5Svu02yhcHvbd1"})"))};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Use a canonical base64url scalar that differs from the public point; this 43-character value ends in 1 (sextet 53), whose nonzero pad bits make decoding fail before the consistency check.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At test/spec/jose/jose_jwk_private_test.cc, line 629:

<comment>Use a canonical base64url scalar that differs from the public point; this 43-character value ends in `1` (sextet 53), whose nonzero pad bits make decoding fail before the consistency check.</comment>

<file context>
@@ -593,3 +593,51 @@ TEST(jwk_private_from_json_rejects_okp_with_a_short_seed) {
+          R"({"kty":"EC","crv":"P-256",)"
+          R"("x":"2TARGSWq8F97iq3Ng48wCEN26cxzy8OCzbFa-6ZfnaI",)"
+          R"("y":"5lkzZqhWOkc2m2zJOotl6K3_x6-TSs9OnzQKwb35DxQ",)"
+          R"("d":"ttepxcp-OwXCj4-v4sGcxRxQRXA8D5Svu02yhcHvbd1"})"))};
+  EXPECT_FALSE(key.has_value());
+}
</file context>

// A key with nothing behind it refuses before the primitive is reached, for
// every family that carries platform key material
TEST(rs256_rejects_a_key_that_formed_no_platform_key) {
const auto signature{sourcemeta::core::base64url_decode(RSA_SIGNATURE)};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Use a 64-byte Ed25519-sized signature here; RSA_SIGNATURE decodes to 256 bytes, so verification returns at its length check without exercising the invalid-point path.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At test/spec/jose/jose_jws_verify_signature_test.cc, line 453:

<comment>Use a 64-byte Ed25519-sized signature here; `RSA_SIGNATURE` decodes to 256 bytes, so verification returns at its length check without exercising the invalid-point path.</comment>

<file context>
@@ -429,3 +446,131 @@ TEST(rs256_accepts_a_key_whose_algorithm_hint_matches) {
+// A key with nothing behind it refuses before the primitive is reached, for
+// every family that carries platform key material
+TEST(rs256_rejects_a_key_that_formed_no_platform_key) {
+  const auto signature{sourcemeta::core::base64url_decode(RSA_SIGNATURE)};
+  EXPECT_TRUE(signature.has_value());
+  const auto key{sourcemeta::core::JWK::from(
</file context>
Suggested change
const auto signature{sourcemeta::core::base64url_decode(RSA_SIGNATURE)};
const auto signature{sourcemeta::core::base64url_decode(std::string(86, 'A'))};

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti
jviotti merged commit 246c0e4 into main Nov 27, 2026
15 checks passed
@jviotti
jviotti deleted the jose-coverage branch November 27, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant