`iris_doc mode=list` fails with HTTP 400 for `category` MAC/INT/INC and for the default `ALL`: Atelier `docnames/:cat` only accepts `*`, `CLS`, `RTN`, `CSP`, `OTH`

Abierto
#140 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust

Línea de trabajo

Comienza en crates/iris-agentic-dev-core/src/tools/doc.rs, especialmente en fetch_docnames_for_cat, el mapeo de categorías y el bucle ALL. Compara esas requests con las rutas de docnames de Atelier documentadas y, después, ejecuta una prueba de regresión Live IRIS para las categorías predeterminadas ALL y MAC/INT/INC. Se considera terminado cuando las requests válidas de tipo rutina tienen éxito y ALL conserva o informa claramente de los resultados de las categorías cuando una request falla.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Environment

  • iris-agentic-dev v1.3.0 (same code in v1.4.2 and on master at 5f38c46)
  • Windows 11, IRIS for Health 2026.1 (Build 235U), Atelier REST through the web server on port 80
  • MCP mode, connection from .iris-agentic-dev.toml

Symptom

iris_doc with mode="list" works only when category="CLS" is passed explicitly:

Call Result
{"mode":"list","pattern":"MyPkg.*","namespace":"<NS>"} (default category ALL) {"error":"failed to fetch MAC docnames: HTTP 400 Bad Request","error_code":"SERVER_ERROR","success":false}
same with "category":"MAC" / "INT" / "INC" failed to fetch MAC/INT/INC docnames: HTTP 400 Bad Request
same with "category":"CLS" OK, lists the matching classes

Because ALL is the default, any list call without an explicit category fails, and MAC/INT/INC can never work.

Root cause

fetch_docnames_for_cat builds /docnames/{cat} with cat in CLS, MAC, INT, INC
(doc.rs#L1704-L1726, and the category mapping at
#L1744-L1766).

In the Atelier API, MAC, INT and INC are types inside the RTN category, not categories. The route
is GET /api/atelier/v1/:namespace/docnames/:cat/:type, and %Api.Atelier.v1:GetDocNames (identical in v2 and
v8 on 2026.1) rejects any other :cat with 400:

Set pCat=$zcvt(pCat,"U")
If ",*,CLS,RTN,CSP,OTH,"'[(","_pCat_",") {
    Set %response.Status=..#HTTP400BADREQUEST

In addition, the ALL loop returns on the first failing category
(#L1780-L1791),
so the CLS results already fetched are discarded.

Reproduction without the tool

Plain GET with Basic auth against the same instance and namespace:

Request HTTP documents
/api/atelier/v1/<NS>/docnames/CLS 200 13610
/api/atelier/v1/<NS>/docnames/MAC 400
/api/atelier/v1/<NS>/docnames/INT 400
/api/atelier/v1/<NS>/docnames/INC 400
/api/atelier/v1/<NS>/docnames/XYZ (invalid on purpose) 400
/api/atelier/v1/<NS>/docnames/RTN/MAC 200 6
/api/atelier/v1/<NS>/docnames/RTN/INT 200 20
/api/atelier/v1/<NS>/docnames/RTN/INC 200 364
/api/atelier/v1/<NS>/docnames/RTN/MAC,INT,INC 200 390 (= 6 + 20 + 364)

Suggested fix

  1. Map MAC → /docnames/RTN/MAC, INT → /docnames/RTN/INT, INC → /docnames/RTN/INC. For ALL, one call to
    /docnames/CLS plus one to /docnames/RTN/MAC,INT,INC is enough.
  2. Do not throw away the successful categories when one fails in ALL: return what was fetched and report the
    failing category, or fail with a message that says which request was rejected.
  3. A regression test for list without category (and with MAC/INT/INC) against a live IRIS would catch it.

Workaround

Always pass "category":"CLS" for classes. For routines and include files there is currently no working list
mode.

Lenguaje dominante
Rust
Estrellas
45
Forks
17
Merge medio
2 d 11 h
PR fusionados (30 d)
15

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de intersystems-community/iris-agentic-dev

Todos los issues de intersystems-community/iris-agentic-dev

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.