What problem does this solve?
Cross-repo HTTP linking can silently produce zero CROSS_HTTP_CALLS edges for a healthy client/server pair, with no hint of why. Bisecting a fixture pair (JS client + Express server) surfaced two sharp edges, each of which alone zeroes the result:
-
method: inside fetch's options object is not extracted. fetch(url, {method: 'POST'}) yields __route__ANY__…, and the matcher's ANY-tolerance is one-directional — a route may be ANY but a caller may not (src/pipeline/pass_cross_repo.c:476-480,627). So the most common vanilla fetch pattern can never match a method-specific route. (axios.post(...) extracts perfectly — the client side produced byte-identical canonical Route QNs on both sides.)
-
Express inline arrow handlers produce no HANDLES edge. app.post('/api/orders', (req, res) => {...}) yields only module -CALLS-> Route; the cross-repo matcher requires HANDLES, so cross edges appear only when the handler is a named function.
Rewriting the same fixture with axios.post AND named handlers immediately produced 2 verified CROSS_HTTP_CALLS edges — the machinery works; the requirements are just undiscoverable. The three simultaneous requirements (extractable method+path at the call site, identical canonical Route QN, named server handler yielding HANDLES) are documented nowhere, and discovering them cost a full one-variable-at-a-time bisection.
Proposed solution
In order of value:
- Document the three requirements for cross-repo HTTP edges (README or the cross-repo section) — this alone saves users the bisection.
- Extract
method: from fetch options objects, so fetch(url, {method: 'POST'}) produces __route__POST__… like axios.post does.
- Emit
HANDLES for inline arrow handlers (anonymous handler → synthesize a handler node or attach HANDLES from the registering module), so the idiomatic Express style works as-is.
Alternatives considered
- Making the matcher's ANY-tolerance bidirectional (ANY caller matches specific routes) would create the edges, but at the cost of spurious method-crossed matches — extraction of the real method (proposal 2) is strictly better.
- Status quo with documentation only (proposal 1 alone) is acceptable — the current behavior is at least explainable once the rules are written down.
Confirmations
What problem does this solve?
Cross-repo HTTP linking can silently produce zero
CROSS_HTTP_CALLSedges for a healthy client/server pair, with no hint of why. Bisecting a fixture pair (JS client + Express server) surfaced two sharp edges, each of which alone zeroes the result:method:inside fetch's options object is not extracted.fetch(url, {method: 'POST'})yields__route__ANY__…, and the matcher's ANY-tolerance is one-directional — a route may be ANY but a caller may not (src/pipeline/pass_cross_repo.c:476-480,627). So the most common vanilla fetch pattern can never match a method-specific route. (axios.post(...)extracts perfectly — the client side produced byte-identical canonical Route QNs on both sides.)Express inline arrow handlers produce no
HANDLESedge.app.post('/api/orders', (req, res) => {...})yields onlymodule -CALLS-> Route; the cross-repo matcher requiresHANDLES, so cross edges appear only when the handler is a named function.Rewriting the same fixture with
axios.postAND named handlers immediately produced 2 verifiedCROSS_HTTP_CALLSedges — the machinery works; the requirements are just undiscoverable. The three simultaneous requirements (extractable method+path at the call site, identical canonical Route QN, named server handler yieldingHANDLES) are documented nowhere, and discovering them cost a full one-variable-at-a-time bisection.Proposed solution
In order of value:
method:from fetch options objects, sofetch(url, {method: 'POST'})produces__route__POST__…likeaxios.postdoes.HANDLESfor inline arrow handlers (anonymous handler → synthesize a handler node or attachHANDLESfrom the registering module), so the idiomatic Express style works as-is.Alternatives considered
Confirmations