Skip to content

Support HTTP/2#748

Draft
qicosmos wants to merge 15 commits into
masterfrom
support_http2
Draft

Support HTTP/2#748
qicosmos wants to merge 15 commits into
masterfrom
support_http2

Conversation

@qicosmos

@qicosmos qicosmos commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add HTTP/2 frame, HPACK, server connection, request context, and client support.
  • Wire HTTP/2 handling into existing Cinatra request, response, router, client, and server APIs.
  • Add HTTP/2 examples, h2spec/regression helper scripts, tests, and documentation updates.

Conflict resolution

  • Merged latest master into support_http2.
  • Kept the new master error handler hook in coro_http_router while preserving HTTP/2 dispatch support.
  • Kept both the HTTP/2 and rate limiter test targets in tests/CMakeLists.txt.
  • Updated test_http2.cpp to use asio::ip::make_address with the newer vendored Asio.

Validation

  • git diff --check
  • cmake --build build_no_ssl_check --target test_http2 --config Debug
  • cmake --build build_no_ssl_check --target test_rlimiter --config Debug
  • ctest --test-dir build_no_ssl_check -C Debug -R "test_http2|test_rlimiter" --output-on-failure

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

以下为基于可见 diff 的审查意见:

  1. 不应提交本地配置

    • .claude/settings.local.json 新增文件:这是本地 AI/工具配置,不应进入仓库。建议加入 .gitignore 并从 PR 移除。
  2. CMake OpenSSL 兼容性风险

    • cmake/find_openssl.cmake:14 改为 find_package(OpenSSL QUIET) 后,原先仅检测 ssl 库的逻辑被替换。若下游仍依赖 ${OPENSSL_LIBRARIES},可能破坏兼容。
    • 建议统一全项目使用 OpenSSL::SSL / OpenSSL::Crypto,或保留旧变量兼容。
  3. 平台链接问题

    • example/CMakeLists.txt:15-22 无条件链接 Threads::Threads,需确认顶层已 find_package(Threads REQUIRED),否则部分构建会失败。
    • 原先 Linux 下链接 pthread -ldl 被移除,若 OpenSSL/运行时仍需 dl,可能导致链接失败。
  4. 未启用 SSL 时仍构建 HTTP/2 示例

    • example/CMakeLists.txt:15-22 无条件构建 http2_example / http2_conformance_server,但源码在未启用 SSL 时仅打印错误退出。
    • 更合理做法是在 ENABLE_SSL 时才构建,避免产生不可用示例目标。
  5. 参数解析不严谨

    • http2_conformance_server.cpp:15-34 使用 strtoul/strtol 未检查 endptr 和溢出。输入如 "123abc" 会被接受。
    • 建议使用 std::from_chars 或完整校验。
  6. 潜在资源/异常处理问题

    • http2_conformance_server.cpp:88 init_sslasync_start 未检查失败或捕获异常,证书路径错误时可能直接崩溃。
    • 示例程序也建议输出明确错误。
  7. 示例存在竞态/脆弱等待

    • http2_example.cpp:35 使用 sleep_for(50ms) 等待服务启动不可靠。应依赖 async_start 返回状态或确认监听完成后再连接。
  8. 代码风格

    • http2_example.cpp 截断处可见空白行含多余空格,建议清理。
    • README 示例较长,建议确保与实际 API 完全同步。

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Code Coverage Report
for detail, goto summary download Artifacts

Filename                              Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                       4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                                   15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                        128                 0   100.00%        2110               236    88.82%         684               158    76.90%
coro_http_connection.hpp                     54                 3    94.44%         850                76    91.06%         234                33    85.90%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         965               104    89.22%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      6                 0   100.00%         107                 6    94.39%          50                10    80.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                15    83.52%          22                 5    77.27%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           4                 1    75.00%
session_manager.hpp                          10                 1    90.00%          66                 4    93.94%          10                 1    90.00%
sha1.hpp                                     12                 0   100.00%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         409                44    89.24%          32                 9    71.88%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1035                89    91.40%       11814              2246    80.99%        3476               974    71.98%

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

代码审查意见:

  1. .claude/settings.local.json(新文件 1-8):不应提交本地 AI 工具配置,属于个人环境文件,建议加入 .gitignore

  2. cmake/find_openssl.cmake(约 14 行):从 check_library_exists 改为 find_package(OpenSSL QUIET) 后,需确认顶层 CMake 已正确使用 OpenSSL::SSL/Crypto,否则旧变量 OPENSSL_LIBRARIES 依赖处可能失效。

  3. example/CMakeLists.txt(约 15-24 行):无条件构建 http2_example / http2_conformance_server,但源码依赖 SSL。未启用 SSL 时虽然运行时报错,但仍可能因头文件/宏依赖导致编译失败。建议放入 if(ENABLE_SSL)

  4. http2_conformance_server.cpp

    • 14/22/30 行:strtoul/strtol 未检查 endptrerrno,如 "123abc" 会被接受,建议严格校验。
    • 30 行:线程数未限制上界,极大值可能导致资源耗尽。
    • 70 行:set_enable_http2_connect_protocol(true) 默认开启 CONNECT,测试用途可以,但示例服务端需明确安全风险。
    • 91 行:证书路径硬编码,工作目录变化会失败,建议参数化。
  5. http2_example.cpp

    • 35 行:sleep_for(50ms) 等待服务启动不可靠,存在竞态;应使用启动完成回调或检查端口监听状态。
    • 多处错误退出路径手动 stop/join,异常时可能泄漏线程,建议用 RAII/scope_guard。
  6. README:声明“服务端统一支持 HTTP/2”需明确仅 TLS+ALPN,否则容易误导用户。

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

代码审查要点:

  1. 不应提交本地配置
    .claude/settings.local.json:1 是个人/工具本地配置,建议移除并加入 .gitignore,避免污染仓库。

  2. OpenSSL 检测行为变化风险
    cmake/find_openssl.cmake:14 改为 find_package(OpenSSL QUIET),但未处理旧变量兼容。其他地方若仍依赖 OPENSSL_LIBRARIES 可能失效。建议统一改为 OpenSSL::SSL/OpenSSL::Crypto,或保留兼容变量。

  3. CMake 链接平台兼容性
    example/CMakeLists.txt:14-22 新增目标始终构建,但 HTTP/2 示例依赖 SSL。即使源码里运行时返回,编译/链接仍可能因头文件或 SSL 符号失败。建议在 ENABLE_SSL 时才添加 http2_example / http2_conformance_server,或明确保证无 SSL 可编译。

  4. 缺少 dl / pthread 兼容处理
    example/CMakeLists.txt:31 删除了 pthread -ldl,只链接 OpenSSL target。Linux 下部分 OpenSSL/静态链接场景可能仍需 dl。建议使用 Threads::Threads 并按平台链接 ${CMAKE_DL_LIBS}

  5. 参数解析不严谨
    example/http2_conformance_server.cpp:15:25:34 使用 strtoul/strtol 未检查 endptr"123abc" 会被接受。建议校验完整字符串并检查溢出。

  6. 线程数未限制
    http2_conformance_server.cpp:34 只检查非 0,极大值会导致资源耗尽。建议设置合理上限。

  7. 示例存在竞态/不稳定等待
    example/http2_example.cpp:35 使用 sleep_for(50ms) 等待服务启动不可靠。既然已调用 server.port(),应依赖明确的启动完成机制或错误检查。

  8. 安全性说明不足
    README 示例中客户端连接 HTTPS 未体现证书校验策略,若默认跳过校验,应明确说明;否则用户可能误用到生产环境。

整体建议:移除本地配置文件,完善 CMake 条件构建与平台链接,修正参数解析和示例启动同步。

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Code Coverage Report
for detail, goto summary download Artifacts

Filename                              Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                       4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                                   15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                        128                 0   100.00%        2110               225    89.34%         684               153    77.63%
coro_http_connection.hpp                     54                 3    94.44%         850                76    91.06%         234                34    85.47%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         965               104    89.22%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      6                 0   100.00%         107                 6    94.39%          50                10    80.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                15    83.52%          22                 5    77.27%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           4                 1    75.00%
session_manager.hpp                          10                 1    90.00%          66                 4    93.94%          10                 1    90.00%
sha1.hpp                                     12                 0   100.00%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         409                44    89.24%          32                 9    71.88%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1035                89    91.40%       11814              2235    81.08%        3476               970    72.09%

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

审查意见:

  1. .claude/settings.local.json:1
    本地 AI/工具配置不应提交到仓库,建议加入 .gitignore

  2. cmake/find_openssl.cmake:14
    改为 find_package(OpenSSL QUIET) 后,依赖方需统一使用 OpenSSL::SSL/Crypto。请确认全仓库没有仍依赖 ${OPENSSL_LIBRARIES} 的目标,否则会链接失败。

  3. example/CMakeLists.txt:15-23
    http2_examplehttp2_conformance_server 无条件构建,但代码依赖 HTTP/2/SSL 相关头和配置。若未启用 SSL,可能仍编译失败。建议放入 if(ENABLE_SSL) 或单独开关。

  4. example/http2_conformance_server.cpp:15-34
    strtoul/strtol 未检查 endptrerrno"123abc"、溢出等会被接受。建议使用 std::from_chars 或完整校验。

  5. example/http2_conformance_server.cpp:77-83
    std::any_cast<...>(&metadata) 很可能错误:metadataoptional/any 包装对象时,应对内部 any 做 cast,例如 std::any_cast<T>(&*metadata)。当前逻辑可能永远取不到 HTTP/2 metadata。

  6. example/http2_example.cpp:34-35
    async_start() 后用 sleep_for(50ms) 等待服务启动不可靠,CI 慢机可能偶发失败。建议提供启动完成同步机制或重试连接。

  7. 安全性
    示例固定使用仓库内证书和密码 "test" 可以接受,但 README 应明确仅用于示例,避免用户误用于生产。

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Code Coverage Report
for detail, goto summary download Artifacts

Filename                              Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                       4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                                   15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                        128                 0   100.00%        2110               236    88.82%         684               158    76.90%
coro_http_connection.hpp                     54                 3    94.44%         850                76    91.06%         234                33    85.90%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         965               104    89.22%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      6                 0   100.00%         107                 6    94.39%          50                10    80.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                19    79.12%          22                 6    72.73%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           4                 1    75.00%
session_manager.hpp                          10                 1    90.00%          66                 4    93.94%          10                 1    90.00%
sha1.hpp                                     12                 0   100.00%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         409                44    89.24%          32                 9    71.88%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1035                89    91.40%       11814              2250    80.95%        3476               975    71.95%

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Code Coverage Report
for detail, goto summary download Artifacts

Filename                              Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                       4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                                   15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                        128                 0   100.00%        2110               236    88.82%         684               159    76.75%
coro_http_connection.hpp                     54                 3    94.44%         850                76    91.06%         234                34    85.47%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         965               104    89.22%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      6                 0   100.00%         107                 6    94.39%          50                10    80.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                19    79.12%          22                 6    72.73%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           4                 1    75.00%
session_manager.hpp                          10                 1    90.00%          66                 4    93.94%          10                 1    90.00%
sha1.hpp                                     12                 0   100.00%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         409                44    89.24%          32                 9    71.88%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1035                89    91.40%       11814              2250    80.95%        3476               977    71.89%

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

主要问题:

  1. cmake/find_openssl.cmake 新增段落后出现单独一行 i(约第20行),这是明显的语法错误,会导致 CMake 配置失败,必须删除。

  2. .claude/settings.local.json 不应提交到仓库。这是本地工具配置,建议加入 .gitignore

  3. 多处 GitHub Actions 版本看起来不存在或风险较高:

    • actions/checkout@v6
    • actions/upload-artifact@v7
    • seanmiddleditch/gha-setup-ninja@v6
      请确认 marketplace 是否已有这些 tag,否则 CI 会直接失败。建议使用稳定已发布版本。
  4. cmake/find_openssl.cmakecheck_library_exists 改为 find_package(OpenSSL QUIET),需确认后续变量名是否同步改为 OpenSSL::SSL / OPENSSL_FOUND,否则可能破坏旧逻辑。

  5. PR 标题是 HTTP/2,但当前 diff 主要是 CI/文档/CMake,核心 HTTP/2 实现未展示,无法审查协议正确性、流控、HPACK、并发流、ALPN fallback 等关键逻辑。建议拆分 CI 升级与 HTTP/2 功能 PR。

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Code Coverage Report
for detail, goto summary download Artifacts

Filename                              Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                       4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                                   15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                        128                 0   100.00%        2110               236    88.82%         684               158    76.90%
coro_http_connection.hpp                     54                 3    94.44%         850                76    91.06%         234                34    85.47%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         965               104    89.22%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      6                 0   100.00%         107                 6    94.39%          50                10    80.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                19    79.12%          22                 6    72.73%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           4                 1    75.00%
session_manager.hpp                          10                 1    90.00%          66                 4    93.94%          10                 1    90.00%
sha1.hpp                                     12                 0   100.00%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         409                44    89.24%          32                 9    71.88%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1035                89    91.40%       11814              2250    80.95%        3476               976    71.92%

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Code Coverage Report
for detail, goto summary download Artifacts

Filename                              Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                       4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                                   15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                        128                 1    99.22%        2110               239    88.67%         684               159    76.75%
coro_http_connection.hpp                     54                 3    94.44%         850                76    91.06%         234                34    85.47%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         965               104    89.22%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      6                 0   100.00%         107                 6    94.39%          50                10    80.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                19    79.12%          22                 6    72.73%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           4                 1    75.00%
session_manager.hpp                          10                 1    90.00%          66                 4    93.94%          10                 1    90.00%
sha1.hpp                                     12                 0   100.00%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         409                44    89.24%          32                 9    71.88%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               713    42.31%         290               196    32.41%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1035                90    91.30%       11814              2249    80.96%        3476               975    71.95%

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Code Coverage Report
for detail, goto summary download Artifacts

Filename                              Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                       4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                                   15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                        128                 1    99.22%        2110               243    88.48%         684               162    76.32%
coro_http_connection.hpp                     54                 3    94.44%         850                80    90.59%         234                35    85.04%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         965               104    89.22%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      6                 0   100.00%         107                 6    94.39%          50                10    80.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                19    79.12%          22                 6    72.73%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           4                 1    75.00%
session_manager.hpp                          10                 1    90.00%          66                 4    93.94%          10                 1    90.00%
sha1.hpp                                     12                 0   100.00%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         409                44    89.24%          32                 9    71.88%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1035                90    91.30%       11814              2261    80.86%        3476               981    71.78%

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Code Coverage Report
for detail, goto summary download Artifacts

Filename                              Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                       4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                                   15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                        128                 1    99.22%        2110               239    88.67%         684               159    76.75%
coro_http_connection.hpp                     54                 3    94.44%         850                76    91.06%         234                34    85.47%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         965               104    89.22%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      6                 0   100.00%         107                 6    94.39%          50                10    80.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                15    83.52%          22                 5    77.27%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           4                 1    75.00%
session_manager.hpp                          10                 1    90.00%          66                 4    93.94%          10                 1    90.00%
sha1.hpp                                     12                 0   100.00%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                20                 7    65.00%         172                72    58.14%          28                 3    89.29%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         409                44    89.24%          32                 9    71.88%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               713    42.31%         290               196    32.41%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1035                90    91.30%       11814              2247    80.98%        3476               975    71.95%

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Code Coverage Report
for detail, goto summary download Artifacts

Filename                              Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                       4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                                   15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                        128                 0   100.00%        2110               236    88.82%         684               158    76.90%
coro_http_connection.hpp                     54                 3    94.44%         850                80    90.59%         234                36    84.62%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         965               104    89.22%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      6                 0   100.00%         107                 6    94.39%          50                10    80.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                15    83.52%          22                 5    77.27%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           4                 1    75.00%
session_manager.hpp                          10                 1    90.00%          66                 4    93.94%          10                 1    90.00%
sha1.hpp                                     12                 0   100.00%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         409                44    89.24%          32                 9    71.88%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1035                89    91.40%       11814              2250    80.95%        3476               977    71.89%

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

审查意见(基于可见 diff,HTTP/2 核心代码被截断,无法完整评估协议正确性):

  1. CI 配置严重问题

    • 多处将 actions/checkout 升级为 @v6(如 .github/workflows/clang-format.yml:20linux_gcc.yml:25 等),目前 GitHub 官方常用版本为 v4v6 可能不存在,会直接导致 CI 失败。
    • actions/upload-artifact@v7linux_llvm_cov.yml:57mac.yml:46)同样疑似不存在,建议确认版本。
    • seanmiddleditch/gha-setup-ninja@v6linux_gcc.yml:64windows.yml:24)也需确认是否存在。不要盲目升级 action major 版本。
  2. 不应提交本地工具配置

    • .claude/settings.local.json:1 是本地 AI/开发环境配置,包含本地构建命令,不应进入仓库。建议删除并加入 .gitignore
  3. CI 并行度调整可能降低覆盖

    • 多处将 ctest -j \nproc`改为-j 2(如 linux_gcc.yml:38linux_clang.yml:50`),会显著拉长 CI 时间。若为稳定性考虑,应在 PR 描述中说明原因。
  4. macOS OpenSSL 修改较好

    • mac.yml:29-32 使用 openssl@3brew --prefix 比硬编码 /usr/local 更兼容 Apple Silicon,合理。
  5. CMake 变更需补充上下文

    • CMakeLists.txt 新增 ENABLE_SSLCINATRA_ENABLE_SSL 的兼容逻辑看起来合理,但需确认不会覆盖用户显式设置。
  6. PR 标题与可见改动不匹配

    • 标题是 “Support HTTP/2”,但可见部分主要是 CI 和杂项配置。HTTP/2 实现、测试、依赖、安全边界需完整 diff 才能审查。建议拆分 CI 升级与 HTTP/2 功能 PR。

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Code Coverage Report
for detail, goto summary download Artifacts

Filename                              Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                       4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                                   15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                        128                 0   100.00%        2110               240    88.63%         684               158    76.90%
coro_http_connection.hpp                     54                 3    94.44%         850                76    91.06%         234                34    85.47%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         965               104    89.22%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      6                 0   100.00%         107                 6    94.39%          50                10    80.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                15    83.52%          22                 5    77.27%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           4                 1    75.00%
session_manager.hpp                          10                 1    90.00%          66                 4    93.94%          10                 1    90.00%
sha1.hpp                                     12                 0   100.00%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         409                44    89.24%          32                 9    71.88%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1035                89    91.40%       11814              2250    80.95%        3476               975    71.95%

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

以下 diff 基本都是 CI/配置变更,未看到实际 HTTP/2 实现代码,PR 标题与内容不匹配,建议补充核心代码 diff 后再审。

主要问题:

  1. .claude/settings.local.json 行 1-8
    不应提交本地 AI 工具配置,且包含本地执行权限规则。建议加入 .gitignore 并从 PR 移除。

  2. 多处 uses: actions/checkout@v6upload-artifact@v7codecov-action@v6
    请确认这些版本真实存在。当前 GitHub Actions 常用稳定版本仍是 checkout@v4upload-artifact@v4;使用不存在版本会直接导致 CI 失败。

  3. .github/workflows/linux_clang.ymllinux_gcc.ymlseanmiddleditch/gha-setup-ninja@v6
    该 action 是否有 v6 tag 需确认。原先 @master 虽不推荐,但随意改成不存在 tag 风险更高。

  4. .github/workflows/code-coverage.yml 等多处将 -j \nproc`改为-j 2`
    会显著降低 CI 构建/测试性能。若为避免资源不足,建议加注释说明,或只在不稳定 job 上限制并使用矩阵/变量统一配置。

  5. .github/workflows/linux_gcc.yml 新增 Python heredoc 片段缩进疑似错误
    python3 - <<'PY' 后的 Python 代码应从行首开始,否则可能触发 IndentationError。建议实际验证 workflow。

  6. .github/workflows/linux_clang.yml / linux_gcc.yml 原命令 ctest ... -j 1 \nproc`被改为-j 2`
    原命令本身就可疑,但本次修改改变并发语义,需确认是否会影响依赖顺序或并发敏感测试。

总结:当前 PR 缺少 HTTP/2 功能代码,且 CI action 版本升级存在高概率不可用风险。建议先移除本地配置、确认所有 action tag 有效,并补充实际 HTTP/2 实现与测试。

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

审查意见:

  1. PR 内容不匹配
    标题为“Support HTTP/2”,但 diff 几乎全是 CI/workflow 修改,未看到 HTTP/2 相关代码。建议拆分:CI 更新单独 PR,HTTP/2 功能 PR 应包含实现与测试。

  2. .claude/settings.local.json 不应提交(新文件第 1-8 行)
    这是本地/个人工具配置,包含本地构建命令,建议加入 .gitignore 并从 PR 移除,避免污染仓库。

  3. GitHub Action 版本可能无效
    多处将 actions/checkout 升到 v6actions/upload-artifact@v7codecov/codecov-action@v6seanmiddleditch/gha-setup-ninja@v6 等。请确认这些 tag 实际存在;若不存在会直接导致 CI 失败。尤其第三方 action 不应盲目升主版本。

  4. 使用 master/main 分支存在可复现性风险
    Homebrew/actions/setup-homebrew@main(mac.yml)仍未固定版本/commit,存在供应链与不可复现风险。建议固定到稳定 tag 或 commit SHA。

  5. CI 并行度硬编码为 2
    多处将 -j \nproc`改为-j 2`。这会显著降低 CI 性能,尤其 Release/coverage 构建。若是为降低资源占用,建议加注释或用变量统一控制。

  6. linux_gcc.yml 中嵌入 Python 缩进需验证
    新增 Report CTest Failure 的 heredoc 内 Python 代码缩进看起来与 YAML 混排,建议确认实际解析无误,并用本地 act 或 CI 验证。

  7. mac.yml OpenSSL 处理更合理
    使用 brew --prefix openssl@3 替代硬编码路径是改进,值得保留。

总体:当前 PR 更像 CI 维护,不建议以 HTTP/2 功能合入;需确认 action 版本有效并移除本地配置文件。

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Code Coverage Report
for detail, goto summary download Artifacts

Filename                              Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                       4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                                   15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                        128                 1    99.22%        2110               239    88.67%         684               158    76.90%
coro_http_connection.hpp                     54                 3    94.44%         850                76    91.06%         234                35    85.04%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         965               104    89.22%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      6                 0   100.00%         107                 6    94.39%          50                10    80.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                15    83.52%          22                 5    77.27%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           4                 1    75.00%
session_manager.hpp                          10                 1    90.00%          66                 4    93.94%          10                 1    90.00%
sha1.hpp                                     12                 0   100.00%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         409                44    89.24%          32                 9    71.88%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1035                90    91.30%       11814              2249    80.96%        3476               976    71.92%

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Code Coverage Report
for detail, goto summary download Artifacts

Filename                              Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                       4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                                   15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                        128                 1    99.22%        2110               243    88.48%         684               161    76.46%
coro_http_connection.hpp                     54                 3    94.44%         850                80    90.59%         234                34    85.47%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         965               104    89.22%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      6                 0   100.00%         107                 6    94.39%          50                10    80.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                15    83.52%          22                 5    77.27%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           4                 1    75.00%
session_manager.hpp                          10                 1    90.00%          66                 4    93.94%          10                 1    90.00%
sha1.hpp                                     12                 0   100.00%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         409                44    89.24%          32                 9    71.88%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1035                90    91.30%       11814              2257    80.90%        3476               978    71.86%

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

以下 diff 基本只涉及 CI 配置,未看到 HTTP/2 相关 C++ 实现,无法审查协议正确性。

主要问题:

  1. 新增本地配置不应提交

    • .claude/settings.local.json:1-8
    • 这是本地 AI/工具权限配置,包含本地构建命令,建议加入 .gitignore 并从 PR 移除。
  2. GitHub Action 版本疑似不存在

    • 多处 actions/checkout@v6actions/upload-artifact@v7codecov/codecov-action@v6
    • 截至常见稳定版本,checkout 主流为 v4upload-artifactv4。使用不存在的版本会直接导致 CI 失败。请确认这些 tag 存在后再升级。
  3. 第三方 Action 使用不存在/不稳定 tag

    • .github/workflows/linux_clang.ymllinux_gcc.ymlwindows.yml
    • seanmiddleditch/gha-setup-ninja@v6 可能不存在;原先 master 改为 v6 需确认。
    • .github/workflows/mac.yml
      • Homebrew/actions/setup-homebrew@main 仍是浮动引用,建议 pin 到明确版本或 commit SHA,避免供应链风险。
  4. 并行度被固定为 2,可能显著降低 CI 性能

    • 多处 cmake --build ... --parallel 2ctest -j 2
    • 原先使用 nproc 或默认并行,改为 2 会拖慢构建/测试。若为避免资源问题,建议只对不稳定 job 限制,或使用 ${{ runner.cpu }}/nproc
  5. CTest 命令修正可疑

    • linux_clang.yml / linux_gcc.yml 原命令 ctest ... -j 1 \nproc`本身有误,本次改为-j 2` 是合理的,但需确认是否会引入并发测试竞态。
  6. macOS OpenSSL 路径修正合理

    • .github/workflows/mac.yml
    • 使用 brew --prefix openssl@3 比硬编码 /usr/local 更兼容 Apple Silicon,改动正确。

建议:先修正 Action 版本有效性,移除本地配置文件,再补充 HTTP/2 实现 diff 供审查。

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

审查意见(基于可见 diff):

  1. 阻塞:大量 GitHub Action 版本可能不存在

    • 多处改为 actions/checkout@v6actions/upload-artifact@v7codecov/codecov-action@v6seanmiddleditch/gha-setup-ninja@v6(如 .github/workflows/*.yml 多处)。
    • 这些版本需确认真实存在,否则 CI 会直接失败。建议使用已发布稳定版本并固定到 tag/SHA。
  2. 不应提交本地配置

    • .claude/settings.local.json 第 1-8 行是本地工具权限配置,包含本地构建/执行命令。
    • 建议加入 .gitignore,不要进入仓库,避免污染项目配置。
  3. CI 并行度被固定为 2,可能显著降低性能

    • 多处将 -j \nproc`/ 默认并行改为--parallel 2ctest -j 2`。
    • 这会拖慢 CI,尤其是 Linux runner。若为稳定性考虑,建议加注释说明原因,或用环境变量控制。
  4. workflow 变更与 PR 标题不匹配

    • PR 标题是 “Support HTTP/2”,但可见 diff 几乎全是 CI 配置调整,没有 HTTP/2 实现代码。
    • 建议拆分:HTTP/2 功能和 CI 维护分别提交,便于审查和回滚。
  5. YAML/脚本可维护性

    • linux_gcc.yml 新增的 Python heredoc 缩进较脆弱,建议确认实际 YAML 解析及 shell 执行无误。
    • Report CTest Failure 仅在 gcc workflow 添加,其他平台失败诊断不一致。
  6. 安全性

    • Homebrew/actions/setup-homebrew@main 使用浮动分支,不利于供应链安全。建议固定版本或 SHA。

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