Docs: "Test your bot before launch" guide

Fermée
#555 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
72/100
Type d'issue
Documentation
Clarté
Clairement spécifiée
Activité
Active
Stack technique
github-actions, typescript, yaml
Domaine
documentation

Piste de recherche

Read website/src/content/docs/core/testing.mdx for the documented eval assertions and GitHub Actions workflow, then check the eval schema in packages/cli/src/test/load.ts. Add the specified guide at website/src/content/docs/getting-started/test-before-launch.mdx, update website/astro.config.mjs and link to it near the top of testing.mdx. Done means the examples and recorded replay are verified, and the docs check and website build pass.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

documentation

F-07 task 19. chatcops test is documented as a reference in website/src/content/docs/core/testing.mdx: eval files at line 35, the judge at 124, costs at 177, recorded replays at 221, and a GitHub Actions example at 256. What's missing is a guide someone can follow before launch: from no tests to a suite that runs on every pull request for free.

What to do

A new page, website/src/content/docs/getting-started/test-before-launch.mdx, added to the Getting Started sidebar in website/astro.config.mjs after "Index Your Site". It has these steps:

  1. Write the first eval file: three to five questions your bot has to get right, such as pricing, a lead being captured, and an off-topic question it should decline. Use contains, calls-tool, lead-captured and one judge assertion. testing.mdx lists them all.
  2. Run it live with npx chatcops test, and read the pretty output and a failure.
  3. Record it with --record, commit evals/__cassettes__/, and explain why replay is free and the same every time.
  4. Run it in CI: the workflow from testing.mdx:256, replaying on every PR with no API keys. When a prompt change breaks replay, re-record.
  5. Add a simulated visitor (simulate, #512) for one multi-turn case.

End with a short "What to test" list for a typical site bot.

Acceptance criteria

  • The page is in the sidebar. Every TypeScript block passes pnpm docs:check, and every YAML example matches the eval file schema (packages/cli/src/test/load.ts).
  • You ran the example eval file yourself against a bot (any provider), recorded it, and ran it again with --replay. Say in the PR what you ran.
  • testing.mdx links to the new page near the top.
  • pnpm --filter @chatcops/website build passes. Docs only, so no changeset.

Comment here to be assigned.

Langage dominant
TypeScript
Étoiles
13
Forks
7
Merge moyen
3 h 15 min
PR mergées (30 j)
329

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de codercops/chatcops

Toutes les issues de codercops/chatcops

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.