chatcops test: calls-tool and no-tool-call assertions
Los mantenedores suelen responder en 1 día
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Lets an eval check that the bot called the right tool with the right input, or that it called none.
How assertions work
chatcops test (#394, with replays from #395 and the judge from #400) checks each turn's reply with the assertions in the eval file. They're registered by name in ASSERTIONS (packages/cli/src/test/assertions/index.ts:11). Each one is an AssertionCheck (packages/cli/src/test/types.ts): it gets the value from the YAML, the turn's TurnResult (text, toolCalls, sources, leads, usage, costUsd, latencyMs), the conversation so far, and a context with the eval file's path, and returns { pass, reason }. Throw for a bad value (see asStrings in assertions/values.ts), and the runner turns it into a failure with your message. The not- prefix works for every name without extra code.
contains in assertions/text.ts is the reference: one file per kind of assertion, added to the map. Write reasons a person can act on, such as the reply doesn't contain "$19".
What to add (new assertions/tools.ts)
calls-tool: a tool name (calls-tool: lookup_order), or{ name, args }.argsis a partial deep match against the call'sinput: every key inargshas to be there with an equal value, and extra keys in the input are fine. Nested objects match the same way, and arrays have to be equal.no-tool-call:truemeans the turn called no tool at all. A tool name means it didn't call that one.
The calls are in turn.toolCalls as { name, input }. The reason for a failure should list the calls that did happen, so people see what went wrong.
Acceptance criteria
- Unit tests: name only, partial args, nested args, a mismatch that lists the actual calls,
no-tool-callboth ways, bad values - An end to end test with a tool mock (see "answers tools from mocks" in
test-command.test.ts) - Documented in
website/src/content/docs/core/testing.mdx, with a changeset for@chatcops/cli(minor) -
pnpm test:coverageandpnpm lintpass
- Lenguaje dominante
- TypeScript
- Estrellas
- 13
- Forks
- 7
- Merge medio
- 3 h 28 min
- PR fusionados (30 d)
- 296
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 codercops/chatcops
-
Core README lists old default modelsPosiblemente ocupada @prakashNalla la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
codercops/chatcops#503 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Widget: theme.tokens to set any color or size token, and the full token table in the docsPosiblemente ocupada @Sreehita-here la tomó hoy. Abiertohacktoberfest
codercops/chatcops#500 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Widget: a header menu with New conversation, Download transcript and a privacy linkPosiblemente ocupada @anurag2787 la tomó hoy. Abiertohacktoberfest
codercops/chatcops#496 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Widget: keep a message sent while offline, and send it when the connection is backPosiblemente ocupada @Saifjafri212213 la tomó hoy. Abiertohacktoberfest
codercops/chatcops#495 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Widget: copy a completed assistant replyPosiblemente ocupada @piyusshhjangid la tomó hoy. Abiertohacktoberfest
codercops/chatcops#477 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de codercops/chatcops
Issues similares
-
Replace discontinued crypto-js in the themePosiblemente ocupada @aelmanaa la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
PaloAltoNetworks/docusaurus-openapi-docs#1689 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
solana-foundation/solana-web3.js#4015 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
formatSearchQuery drops the :present modifier, so `email:present=true` is sent as `email=true`Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 1-3 horas Aptitud para principiantes 90/100
ivopogace/opencode-courier#422 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
chapel-lang/chapel-vscode#158 ·
Los mantenedores suelen responder en 1 día