[BUG] aimdb-mcp: get_buffer_metrics cannot find a record by its key
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
Línea de trabajo
Empieza por tools/aimdb-mcp/src/tools/buffer_metrics.rs, en el filtro cerca de la línea 41, y compáralo con la lógica correspondiente en tools/aimdb-mcp/src/tools/profiling.rs, cerca de la línea 45. Añade o localiza una prueba para un registro cuya clave sea distinta de su nombre de tipo de Rust. La tarea está terminada cuando get_buffer_metrics encuentra ese registro al buscarlo por su clave y la prueba pasa.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
get_buffer_metrics takes a record_key, but it only matches that value against the record's Rust type name. When a record's key differs from its type name, querying by the real key returns found: false, even though the record exists.
The filter is in buffer_metrics.rs:41:
.filter(|r| r.name.contains(¶ms.record_key))
get_stage_profiling takes the same parameter and already matches both fields (profiling.rs:45).
To Reproduce
- Run an instance with a record whose key differs from its type name, for example key
motion.policywith typecontracts::Policy. - Call the MCP tool
get_buffer_metricswith{"record_key": "motion.policy"}. - The tool replies:
{
"found": false,
"message": "No records matching this key were found in the running instance.",
"record_key": "motion.policy"
}
Expected behavior
The tool finds the record by its key, as get_stage_profiling does. The fix is to match r.record_key as well as r.name, with a test where the two differ.
Environment
- OS: macOS 13 (Darwin 22.6)
- Rust Version: rustc 1.98.0
- AimDB Version: main at d9c7be0
Additional context
Seen against a host gateway over a Unix socket. The target instance may also be built without the metrics feature, but the lookup fails before that matters.
- Lenguaje dominante
- Rust
- Estrellas
- 101
- Forks
- 20
- Merge medio
- 2 h 33 min
- PR fusionados (30 d)
- 90
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aimdb-dev/aimdb
-
🏷️ good first issue enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
dependencies
Dificultad 4/5 3-5 días Aptitud para principiantes 44/100
Los mantenedores suelen responder en 1 día
Todos los issues de aimdb-dev/aimdb
Issues similares
-
Panic on live viewport resize when unstyled elements exist in display: none subtreePosiblemente ocupada @GoCoder7 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
DioxusLabs/blitz#1488 ·
Los mantenedores suelen responder en 1 día
-
S-Needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
vectordotdev/vrl#2042 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día