chatcops test: calls-tool and no-tool-call assertions
Les mainteneurs répondent en général sous 1 jour
Évaluation
Cette issue n'a pas encore été évaluée.
Description
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
- Langage dominant
- TypeScript
- Étoiles
- 13
- Forks
- 7
- Merge moyen
- 3 h 28 min
- PR mergées (30 j)
- 296
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
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 codercops/chatcops
-
Core README lists old default modelsPeut-être pris @prakashNalla l’a pris il y a 1 jour. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
codercops/chatcops#503 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Widget: theme.tokens to set any color or size token, and the full token table in the docsPeut-être pris @Sreehita-here l’a pris il y a 1 jour. Ouvertehacktoberfest
codercops/chatcops#500 · 2 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Widget: a header menu with New conversation, Download transcript and a privacy linkPeut-être pris @anurag2787 l’a pris il y a 1 jour. Ouvertehacktoberfest
codercops/chatcops#496 · 4 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Widget: keep a message sent while offline, and send it when the connection is backPeut-être pris @Saifjafri212213 l’a pris il y a 1 jour. Ouvertehacktoberfest
codercops/chatcops#495 · 3 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Widget: copy a completed assistant replyPeut-être pris @piyusshhjangid l’a pris il y a 1 jour. Ouvertehacktoberfest
codercops/chatcops#477 · 2 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de codercops/chatcops
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Slaymish/HealthAgent#7 ·
-
area: engine topic: math type: bug
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Get-Concord-AI/concord-mcp#310 ·
Les mainteneurs répondent en général sous 1 jour
-
Correct install_claude: 'marketplace add' over a different source is refused, not replaced in placeOuvertetype:bug
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
nightgauge/nightgauge#2804 ·
Les mainteneurs répondent en général sous 1 jour