Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

chatcops test: --url to test a deployed server

未关闭
#419 3 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@srujankaleru2007 已经在做这个了。

开始于 2026年10月28日。

评估

这个 Issue 还没有评估数据。

描述

enhancement hacktoberfest testing

chatcops test runs the bot in process from the config. --url https://example.com/chat runs the same eval files against a deployed server instead, over the wire protocol, as a smoke test after a deploy.

What to add

  • In packages/cli/src/test/run.ts, runOnce (line 86) sends each turn with sendTurn (line 135), which calls the handler in process. Add a second way to send a turn: POST the same body to the URL with format: 'v1' (see website/src/content/docs/server/protocol.mdx for the request and the stream), parse the stream into the same TurnResult, and keep the conversationId across turns.
  • With --url, the server config isn't needed. A test with mocks can't run that way, so fail it with a reason that says so instead of skipping it quietly.
  • --header "Authorization: Bearer ..." (repeatable) for servers that need it. Never print header values.
  • The server's rate limit will apply, so mention --concurrency 1 in the docs. Recording with --record works the same way, since replays happen at the fetch level (packages/cli/src/test/cassette.ts).

Acceptance criteria

  • Tests against a real server started in the test with createChatHandler and node:http (see packages/server/tests for examples), including multi-turn, an error part and a refused request
  • Documented in website/src/content/docs/core/testing.mdx, with a changeset for @chatcops/cli (minor)
  • pnpm test:coverage and pnpm lint pass
主要语言
TypeScript
星标
13
派生
7
平均合并
3 小时 30 分钟
30 天内合并 PR
258

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

codercops/chatcops 的其他 Issue

查看 codercops/chatcops 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。