Skip to content

claude code不添加skill和插件生成的代码#4636

Open
machicao2013 wants to merge 2 commits into
gin-gonic:masterfrom
machicao2013:claude-origin-branch
Open

claude code不添加skill和插件生成的代码#4636
machicao2013 wants to merge 2 commits into
gin-gonic:masterfrom
machicao2013:claude-origin-branch

Conversation

@machicao2013
Copy link
Copy Markdown

Pull Request Checklist

Please ensure your pull request meets the following requirements:

  • Open your pull request against the master branch.
  • All tests pass in available continuous integration systems (e.g., GitHub Actions).
  • Tests are added or modified as needed to cover code changes.
  • If the pull request introduces a new feature, the feature is documented in the docs/doc.md.

Thank you for contributing!

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

❌ Patch coverage is 69.04762% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.98%. Comparing base (3dc1cd6) to head (2075a1b).
⚠️ Report is 275 commits behind head on master.

Files with missing lines Patch % Lines
listener.go 0.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4636      +/-   ##
==========================================
- Coverage   99.21%   97.98%   -1.23%     
==========================================
  Files          42       50       +8     
  Lines        3182     3176       -6     
==========================================
- Hits         3157     3112      -45     
- Misses         17       55      +38     
- Partials        8        9       +1     
Flag Coverage Δ
?
--ldflags="-checklinkname=0" -tags sonic 97.96% <69.04%> (?)
-tags go_json 97.90% <69.04%> (?)
-tags nomsgpack 97.95% <69.04%> (?)
go-1.18 ?
go-1.19 ?
go-1.20 ?
go-1.21 ?
go-1.25 97.98% <69.04%> (?)
go-1.26 97.98% <69.04%> (?)
macos-latest 97.98% <69.04%> (-1.23%) ⬇️
ubuntu-latest 97.98% <69.04%> (-1.23%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Qodo-Free-For-OSS
Copy link
Copy Markdown

Hi, limitedListener.Accept returns (nil, nil) when the limit is reached, violating net.Listener’s contract and potentially crashing http.Server.Serve/ServeTLS when it receives a nil net.Conn.

Severity: action required | Category: correctness

How to fix: Return error on limit

Agent prompt to fix - you can give this to your LLM of choice:

Issue description

limitedListener.Accept() returns (nil, nil) when the connection limit is reached. This violates net.Listener expectations and can break http.Server.Serve* which assumes a non-nil net.Conn when err == nil.

Issue Context

The limiter is now used by Engine.Run, RunTLS, RunUnix, and RunListener via engine.wrapListener(...).

Fix Focus Areas

  • listener.go[19-34]
  • gin.go[541-599]

Suggested approach

  • When the limit is reached, close the accepted connection and return a non-nil error (e.g., errTooManyConns).
  • Consider whether you want to treat that error as temporary (implement Temporary() bool via a custom error type) so http.Server backs off appropriately.

We noticed a couple of other issues in this PR as well - happy to share if helpful.


Found by Qodo code review

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.

2 participants