#1857·codegraph

Go: a call to a local function parameter is bound to a same-named method in a package the file does not import (false caller edge)

Author: PCeltideCreated Sep 13, 2026Updated Sep 17, 2026

Go: a call to a local function parameter is bound to a same-named method in a package the file does not import

Version: 1.6.0 (npm @colbymchenry/codegraph), Linux x64, node 24.18.0. Go repo, 239 files / 5,936 nodes / 20,845 edges. Checked against main at 2026-09-14: the local-binding guards added for #1735/#1759/#1760 are JS/TS-only (isLocallyBoundJsName), and #1496 / #1545 are receiver-based collisions in TS/PHP, so this Go shape appears unfiled.

$ codegraph callers relogin
Callers of "relogin" (2):
  function RunReloginScheduler   internal/synapse/scheduler.go:36
  method   run                   internal/impulse/socketloop.go:297

The second edge is real. The first cannot exist. relogin is a method on *socketLoop in package impulse (internal/impulse/relogin.go:24); internal/synapse/scheduler.go imports only context, log/slog, time, calendar, clock, push — not impulse. Its relogin is a function parameter:

func RunReloginScheduler(ctx context.Context, clk clock.Clock, cal *calendar.Calendar,
    at calendar.TimeOfDay, owner *sharedpush.SessionOwner,
    relogin func(context.Context) error, log *slog.Logger) error {
    return calendar.RunDailySlot(ctx, clk, cal, at, func(ctx context.Context) error {
        owner.Down(reasonScheduled)
        return relogin(ctx)      // local parameter, not impulse's method
    }, log.With("slot", "re-login"))
}

A call to a local parameter was bound to a same-named method in a package not in scope. Two independent agents reported the edge as real before it was checked by hand — a false edge reads as confirmation, so it is more damaging than a missing one.

Positive controls (unique names, same repo): callers parseIndexEntry → 2/2 matching grep; callers releaseRenewInFlight → 1/1, correctly attributed to the enclosing method.

Suggested fix: for Go, do not resolve a callee name that is bound by a parameter or local declaration in the enclosing function, and require an import path or same-package scope before binding a call site across packages.