Skip to content

Go api: the handler-signature arm has no word boundary on http.ResponseWriter / gin.Context / echo.Context #9430

Backlog

Description

@squid-protocol

Found by the SOP-002 gap-cell decoy work (protocol SOP-002-v1, epic #8863), batch c (Req B, all-branch boundary).

First arm of go.py api: ^func\s+(?:\([^)]*\)[ \t]+)?\w+[ \t]*\([^)\n]*(?:http\.ResponseWriter|gin\.Context|echo\.Context). The type names have no leading \b and no trailing \b, so a type from another package whose name merely contains one of them counts as a registered HTTP handler.

Snippets (unexported function names, so only this arm can fire):

func h(w myhttp.ResponseWriter) {
func h(w mygin.Context) {
func h(c myecho.Context) {
func h(w http.ResponseWriterFoo) {

Expected: api 0 (not the net/http, gin or echo type). Actual: 1 each. func helper(x int) is correctly 0.

Activity

  1. added
    bug
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions