Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Go: standard-library HTTP client calls (http.Get / http.Post / http.NewRequest) never produce HTTP_CALLS edges

Abierto
#2,538 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
c, go
Área
backend

Línea de trabajo

Start by reading src/pipeline/pass_calls.c around resolve_single_call and the external-client fallback, then inspect the net/http entry in internal/cbm/service_patterns.c. Run the attached repro.sh.txt against a build of the project to check the reported behavior. Done means the Go client calls produce the expected HTTP_CALLS edges and cross-repository matches.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug parsing/quality windows
Version

Version: 0.11.0 (release). Also reproduced on main @ 96c3f41c built from source.

Platform

Linux (x64)

Install channel

GitHub release archive / install.sh / install.ps1

Binary variant

standard

What happened, and what did you expect?

Outbound HTTP calls made with Go's net/http package produce no HTTP_CALLS edge,
even with a literal absolute URL. Not even a plain CALLS edge is recorded for them. In
consequence cross-repo-intelligence never links a Go caller to the service it calls.
Equivalent Python (requests.get(url)) and JS (fetch(url)) calls do produce
HTTP_CALLS.

Expected: one HTTP_CALLS edge per call (GET /v1/payments/42, POST /v1/payments),
and CROSS_HTTP_CALLS to a service that registers matching routes.

Reproduction
  1. Code (go.mod: module example.com/client, go 1.22):
package main

import "net/http"

func getPayment() {
	_, _ = http.Get("http://payments:8080/v1/payments/42")
}

func createPayment() {
	req, _ := http.NewRequest(http.MethodPost, "http://payments:8080/v1/payments", nil)
	_, _ = http.DefaultClient.Do(req)
}

func main() { getPayment(); createPayment() }
  1. Index it, plus a server repo that registers http.HandleFunc("/v1/payments", h) and
    http.HandleFunc("/v1/payments/{id}", h). Then:
codebase-memory-mcp cli get_graph_schema '{"project":"<client>"}'
codebase-memory-mcp cli index_repository '{"repo_path":"/path/to/client","name":"<client>","mode":"cross-repo-intelligence","target_projects":["<server>"]}'
  1. Output: HTTP_CALLS is absent from the edge types, and cross_http_calls: 0.
    http.Post(url, ...), http.Get(url) and (&http.Client{}).Get(url) behave the same.

Attached repro.sh, section "Issue 2".

What we observed while debugging (instrumented build of 96c3f41c, not a proposed patch)

  • Extraction is fine. For http.Get(...), first_string_arg is
    http://payments:8080/v1/payments/42, consistent with
    TEST(extract_go_binary_concat_url_issue1249).
  • In resolve_single_call (src/pipeline/pass_calls.c), registry resolution of
    http.Get is empty. The call then goes to the external-client fallback (comment at
    line 748, #523), which classifies on the raw callee_name.
  • callee_name is http.Get. The service table entry is "net/http"
    (internal/cbm/service_patterns.c:54), so it never matches, and the import map passed
    in at that point is empty for this file (imp_count == 0), so the alias http cannot be
    expanded to net/http. The imports array, which does contain net/http, is
    available in the same function. Python works because the module name appears in the
    callee text (requests.get).

Full self-contained script (creates throwaway repos in a temp dir, isolated cache): see attached repro.sh.txt, section "Issue N". Run with bash repro.sh.txt [path/to/codebase-memory-mcp].

repro.sh.txt

Logs
"== Issue 2: Go net/http client calls produce no HTTP_CALLS edge"
repo i2-client go.mod <<<'module example.com/client

go 1.22'
repo i2-client main.go <<'GO'
package main

import "net/http"

func getPayment() {
	_, _ = http.Get("http://payments:8080/v1/payments/42")
}

func createPayment() {
	req, _ := http.NewRequest(http.MethodPost, "http://payments:8080/v1/payments", nil)
	_, _ = http.DefaultClient.Do(req)
}

func main() { getPayment(); createPayment() }
GO
commit i2-client; index i2-client
check "HTTP_CALLS edges in Go client" "$(count i2-client HTTP_CALLS)" 2
check "CROSS_HTTP_CALLS client -> legacy server (issue 1 control repo)" "$(cross i2-client i1-legacy cross_http_calls)" 2
Diagnostics trajectory (memory / performance / leak issues)

Project scale (if relevant)

No response

Confirmations
  • I searched existing issues and this is not a duplicate.
  • My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.
Lenguaje dominante
C
Estrellas
45.8k
Forks
3.8k
Merge medio
3 d 4 h
PR fusionados (30 d)
208

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de DeusData/codebase-memory-mcp

Todos los issues de DeusData/codebase-memory-mcp

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.