iot__find_assets_by_sensors: unreachable error guard returns an opaque schema failure
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
- 76/100
Línea de trabajo
Lee src/servers/iot/main.py en torno a find_assets_by_sensors en las líneas 502 y 535; después, compara su firma con history() en la línea 729. Comprueba cómo gestionan el esquema MCP y la validación existente un valor de sensors omitido. La tarea está completada cuando la llamada devuelve el error específico “provide at least one sensor name” en lugar del error genérico del esquema, mientras el docstring sigue indicando que sensors es obligatorio.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happens
A model that calls iot__find_assets_by_sensors without the sensors argument
gets back:
╭─ ✗ ToolResult │ assetops │ iot__find_assets_by_sensors ──╮
│ Tool arguments are not valid │
╰──────────────────────────────────────────────────────────╯
No field name, no hint at what was wrong. With nothing to act on, the model
retries the same call.
Why
src/servers/iot/main.py:502 declares sensors as required:
def find_assets_by_sensors(
site_name: str,
sensors: List[str], # no default, so required
match: str = "all",
...
Thirty-three lines below, at :535, the function already contains the right
response for an omitted value:
if not sensors:
return ErrorResult(error="provide at least one sensor name")
That line can never run. Because sensors is required, pydantic rejects the
call during schema validation, before the function body executes, so the
framework's generic message is returned instead of the specific one the author
wrote.
Evidence
From a 315-trial TSFM sweep (7 models, 2 independently built runtime images,
15 scenarios, k=3): 155 calls to this tool supplied sensors and 5 omitted it.
Those 5 omissions produced 16 hard failures, because a model that receives
no usable message retries. Across all nine runs on the aa_v1 and TSFM
leaderboards this tool accounts for 17 of 48 occurrences of
Tool arguments are not valid, the largest single share of any tool.
No other tool on any server hard-failed in that sweep apart from two
iot__assets calls, which have a different and still undiagnosed cause.
Proposed fix
Two lines. Give sensors a default so the call reaches the body and the
existing guard fires:
sensors: Optional[List[str]] = None,
and mark it required in the docstring, since the JSON schema loses that signal:
sensors: Required. Sensor names, or fragments when `substring` is true.
Optional is already imported at :4, and history() at :729 in the same
file already uses exactly sensors: Optional[List[str]] = None, so this matches
local precedent.
Tradeoff
sensors leaves the schema's required array, so a well-behaved model loses
that cue and the docstring word carries it instead. The alternative, leaving the
signature alone and having the MCP layer append pydantic's validation detail to
its own message, is a wider change in the agent harness rather than two lines in
one server.
- Lenguaje dominante
- Python
- Estrellas
- 2.4k
- Forks
- 351
- Merge medio
- 8 h 7 min
- PR fusionados (30 d)
- 34
Preparar el entorno
- 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 IBM/AssetOpsBench
-
Refresh the main branch with aafeedback branchPosiblemente ocupada @ShuxinLin la tomó hace 7 días. Abierto
IBM/AssetOpsBench#644 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
ci: discuss a lightweight Python smoke check for pull requestsPosiblemente ocupada @yousseffaouzi la tomó hace 9 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
IBM/AssetOpsBench#632 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Add few scenarios in lite configuration for meaPosiblemente ocupada @ShuxinLin la tomó hace 24 días. Abierto
IBM/AssetOpsBench#582 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
security
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
IBM/AssetOpsBench#580 · 13 comentarios ·
Los mantenedores suelen responder en 1 día
-
experiment harbour design for AssetOpsBenchPosiblemente ocupada @ShuxinLin la tomó hace 27 días. Abierto
IBM/AssetOpsBench#557 · 2 asignados ·
Los mantenedores suelen responder en 1 día
Todos los issues de IBM/AssetOpsBench
Issues similares
-
[Resource]: LoreAbiertoresource-submission validation-passed
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
hesreallyhim/awesome-claude-code#3234 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
openminion/openminion#376 ·
Los mantenedores suelen responder en 1 día
-
Type: ☹︎ Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
posit-dev/great-tables#1028 ·
Los mantenedores suelen responder en 1 día
-
integration: apple_tv
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
home-assistant/core#188282 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
A "since" range is worded as a career: "the past two seasons" says "regular season career (2025 on)"AbiertoP4: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
jeffknupp/association#538 ·