Docs: "Test your bot before launch" guide

Đang mở
#555 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, typescript, yaml
Lĩnh vực
documentation

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
13
Fork
7
Merge trung bình
3 giờ 10 phút
Pull request đã merge (30 ngày)
339

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của codercops/chatcops

Tất cả issue của codercops/chatcops

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.