Feature: HANDLES edges and per-registration data for generic router.add(method, path, handler) registrations (TypeScript)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- typescript
- Domaine
- backend-api-design
Piste de recherche
Start by tracing TypeScript route extraction and the framework-specific registration patterns that create Route nodes and HANDLES edges; the issue does not name source files or tests. Reproduce the reported generic router.add(method, path, handler) case and inspect how call-site arguments are stored on CALLS edges. Done means each method and path produces a route with its registration location and a HANDLES edge to the relevant handler target.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Feature request: HANDLES edges for generic router.add(method, path, handler) registrations
Version: codebase-memory-mcp v0.12.1 (linux-amd64-portable), TypeScript project.
What happens
A hand-written router registers routes with a plain method call. The indexer creates the Route nodes
(path parameters normalised to {}), but no HANDLES edge from the route to the handler function, and the
Route node carries no method, file or line. Only framework-specific registrations (Express, Fastify, ...)
get HANDLES.
Minimal example
// router.ts
export class Router {
add(method: string, path: string, handler: (req: Request, ctx: { params: Record<string, string> }) => Promise<Response>) { /* ... */ }
}
// routes.ts
import { Router } from './router'
export async function replaceCredential(providerId: string, req: Request): Promise<Response> { /* ... */ }
export async function clearCredential(providerId: string, req: Request): Promise<Response> { /* ... */ }
export function registerRoutes(router: Router) {
router.add('PUT', '/v1/connections/:providerId/credential', async (req, ctx) => {
if (!authorize(req)) return unauthorized()
return replaceCredential(ctx.params.providerId, req)
})
router.add('DELETE', '/v1/connections/:providerId/credential', (req, ctx) => clearCredential(ctx.params.providerId, req))
}
Observed after index_repository(mode=full):
MATCH (r:Route) RETURN r.name, r.method→/v1/connections/{}/credential, method""(one node for PUT and DELETE)MATCH (r:Route)-[:HANDLES]->(f) RETURN f.name→ 0 rowsMATCH (f)-[r:CALLS]->(g) WHERE f.name='registerRoutes' AND g.name='add' RETURN r.args, r.line→ one edge
(one CALLS edge per caller/callee pair), carrying theargsof a single registration although the function
registers two routes (in the real project: 81 registrations in one function, one edge).
Expected
Routenodes per (method, path) withmethod,file_path,start_lineset.HANDLESedge from the route to the call target(s) in return position of the inline handler (here
replaceCredential/clearCredential), or to the referenced function when the handler argument is an
identifier.- Optionally the guard calls inside
ifconditions that lead to an early return (authorize) as a separate
edge/property, since they are the authorisation preconditions of the route.
Suggestion
A generic registration pattern in service_patterns keyed by callee name and argument positions
(callee: "router.add", method: 0, path: 1, handler: 2), configurable per project, would cover hand-written
routers without framework detection. The call-site arguments are already captured on the CALLS edge, so the data
exists; only the per-call-site linking is missing.
- Langage dominant
- C
- Étoiles
- 45.8k
- Forks
- 3.8k
- Merge moyen
- 2 j 18 h
- PR mergées (30 j)
- 108
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de DeusData/codebase-memory-mcp
-
bug ux/behavior
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
DeusData/codebase-memory-mcp#3191 ·
Les mainteneurs répondent en général sous 1 jour
-
documentation enhancement parsing/quality ux/behavior
Difficulté 1/5 1-3 heures Accessibilité débutants 82/100
DeusData/codebase-memory-mcp#3131 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
hook-augment: the five-row cap keeps the first five search_graph rows, so variables and modules displace function definitions (v0.12.1)Peut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouvertebug editor/integration parsing/quality ux/behavior
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
DeusData/codebase-memory-mcp#3062 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Generated client files (AGENTS.md block, SKILL.md) teach a call syntax no harness can executeOuvertebug documentation editor/integration parsing/quality
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
DeusData/codebase-memory-mcp#3050 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
editor/integration parsing/quality
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
DeusData/codebase-memory-mcp#2286 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de DeusData/codebase-memory-mcp
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
NVIDIA/open-gpu-kernel-modules#1635 ·
Les mainteneurs répondent en général sous 1 jour
-
iOS: the "Edit controls" button never hides, even with a controller connected, and covers the gameOuvertegame: 010065A014024000 ios
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
seedds/nxnative#3714 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours