fuzz: fix stale comments in http_request #36379

pull frankomosh wants to merge 1 commits into bitcoin:master from frankomosh:2026-09-fuzz-http-comment-fix changing 1 files +4 −4
  1. frankomosh commented at 8:56 AM on September 29, 2026: contributor

    Follow-up to #36135 (review), fixing a false comment flagged in review.

    The comment says a completed request is always handed back to a worker. Since #36174 it stays in m_req when the send buffer is over MAX_BODY_SIZE.

  2. DrahtBot added the label Fuzzing on Sep 29, 2026
  3. DrahtBot commented at 8:56 AM on September 29, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK pinheadmz, hodlinator

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. in src/test/fuzz/http_request.cpp:129 in 2de494ee5c
     125 | @@ -126,7 +126,8 @@ void Drain(const std::shared_ptr<FuzzClient>& client, RunResult& out)
     126 |  
     127 |          if (!req) {
     128 |              if (const HTTPRequest* cur{client->GetRequest()}) {
     129 | -                // Complete is always handed back, never left behind.
     130 | +                // Complete is handed back unless the send buffer is over MAX_BODY_SIZE (see #36174),
    


    maflcko commented at 9:06 AM on September 29, 2026:

    Not sure about all the raw #id in code comments. Either the pull request context is important, and it should be a full URL, so that it is easily navigable, or it should just be removed or refer to the (other) code itself.

    Same above: How is it relevant that ReadBody returned an empty string before 35182? The comments should explain the current code and context and not some irrelevant context or irrelevant history.


    frankomosh commented at 9:29 AM on September 29, 2026:

    dropping both

  5. frankomosh force-pushed on Sep 29, 2026
  6. DrahtBot added the label CI failed on Sep 29, 2026
  7. frankomosh renamed this:
    fuzz: correct stale comment about completed requests
    fuzz: fix stale comments in http_request
    on Sep 29, 2026
  8. frankomosh force-pushed on Sep 29, 2026
  9. DrahtBot removed the label CI failed on Sep 29, 2026
  10. frankomosh commented at 6:46 PM on October 10, 2026: contributor
  11. in src/test/fuzz/http_request.cpp:127 in c8bdd7f192
     122 | @@ -126,7 +123,8 @@ void Drain(const std::shared_ptr<FuzzClient>& client, RunResult& out)
     123 |  
     124 |          if (!req) {
     125 |              if (const HTTPRequest* cur{client->GetRequest()}) {
     126 | -                // Complete is always handed back, never left behind.
     127 | +                // A completed request is handed back to a worker unless the send buffer
     128 | +                // is full. Replies here are empty, so that cannot happen.
    


    pinheadmz commented at 5:41 AM on October 14, 2026:

    A bit more explicit:

    • We don't hand anything back to a worker, it'd be the first time we hand it to a worker
    • There's no workers in the test anyway
                    // TryReadRequest() returns empty if the HTTPRemoteClient is still
                    // holding on to the request. In this test the request is guaranteed
                    // to be incomplete although in production it may a result of
                    // a busy worker or a full send buffer.
    

    frankomosh commented at 5:47 PM on October 14, 2026:

    Thanks. Taken


    frankomosh commented at 5:48 PM on October 14, 2026:

    Said “incomplete or failed” since this branch could also be reached on a parse error.

  12. fuzz: fix stale comments in http_request
    A completed request is no longer always handed back to a worker; it stays
    in m_req when the send buffer is full.
    
    Also drop the pre-existing comment/note about what ReadBody() returned before the libevent
    replacement.
    
    Co-authored-by: Matthew Zipkin <pinheadmz@pm.me>
    3f7f845cf5
  13. frankomosh force-pushed on Oct 14, 2026
  14. pinheadmz approved
  15. pinheadmz commented at 9:38 PM on October 14, 2026: member

    ACK 3f7f845cf51c1060ee577f0df8869a4efd5ea033

    <details><summary>Show Signature</summary>

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA256
    
    ACK 3f7f845cf51c1060ee577f0df8869a4efd5ea033
    -----BEGIN PGP SIGNATURE-----
    
    iQJPBAEBCAA5FiEE5hdzzW4BBA4vG9eM5+KYS2KJyToFAmrP9jUbFIAAAAAABAAO
    bWFudTIsMi41KzEuMTIsMCwzAAoJEOfimEtiick6KgMP/AwP7aX7ndh6OUIYrls2
    jcFc9BgNz5JbRcF4qHZM3L4Gl5qZyp5z3gux+zIw8Ja7ZLNNAI1Iztsul7gQXTLf
    zyz0R3knY1ThOaWDn0GwS1InJwVt6mRVXyMVDy28f8YBU92GBRrKaKDXbUOpazMO
    70mFCb871buXZ3vsQThrOagOn247xhIoDLYvjYG0ClfwGbpe6MyHyBDG0WKu4GKC
    JYgb+WnAqJx5izp7dTymVFrIlinMecR4yyI66xvUX5vweZWRV/qpnnR9UmQy5Q7R
    Xa1S5VbOdX0pXT6/ZgozwHG/XbBYN6TlxJaerjV3DLqsj0bmLmm8VVDLG+HqW9YP
    numQkg+FCms50lHgyn09WeuLFNZf+LpnBiH1TkgqDY01UdaMRTtKmVNSLNClbW92
    ggwggVxpulljzKQUIIg9pihT7R96ny4Z/CFlzpxcNCSbx6gOMy8zV7H4Lr38oXnz
    PgarKef5BLsmKbVkv5JZQbzMNzsgAiv8ZU0XW+lI6ZDmVg1uA3HqnAnMugM/rusk
    KhZF8EfHEDXH8bgPTlV4x6yTP/+JDgWgsONhUH6FzoWr/TtYEjhpSTdn8eXbk69b
    pRDkzRmcTW3b0YbwMrn/DFOvlhzBjTGcAz0wPh+9rq2F1u8AmLds2OxDanLVl6i/
    fmHq+rZODNhqSVLk7CYbs8Th
    =Y14d
    -----END PGP SIGNATURE-----
    

    pinheadmz's public key is on openpgp.org

    </details>

  16. hodlinator approved
  17. hodlinator commented at 8:00 AM on October 15, 2026: contributor

    ACK 3f7f845cf51c1060ee577f0df8869a4efd5ea033

  18. fanquake merged this on Oct 15, 2026
  19. fanquake closed this on Oct 15, 2026

  20. frankomosh deleted the branch on Oct 15, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-10-21 19:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me