Docs: "Test your bot before launch" guide

未關閉
#555 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
72/100
Issue 類型
文件
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
github-actions, typescript, yaml
領域
documentation

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
TypeScript
星號
13
分支
7
平均合併
3 小時 10 分鐘
30 天內合併 PR
339

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

codercops/chatcops 的其他 Issue

查看 codercops/chatcops 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。