问HN:人们在使用代理协调器时是如何进行测试的?
我正在使用Conductor,总体来说,它极大地提升了我的工作效率。唯一的问题是他们的“Spotlight”功能,本应将工作树与根目录同步,从而使本地测试成为可能,但它的可靠性不高。即使它能正常工作,也不完全符合我的需求,因为我希望每个工作流能够独立进行测试。
到目前为止,我尝试了三种方法,但都效果不佳:
1. 我使用了一个Conductor设置脚本,在每个工作树中运行我的本地开发环境。这并没有成功,因为Docker容器之间存在端口冲突。
2. 我使用Terraform,因此为每个PR快速启动一个资源较少的临时环境是小事一桩。这使得Conductor中的每个Claude会话都可以使用Playwright来测试代码。但有两个问题:首先,这样的成本相当高(每个PR每天$2-5)。我每天提交20-30个PR,即使有自动清理,这也让我每月花费$XXX。其次,我的部署大约需要10-15分钟,虽然时间不算长,但Claude经常需要重新提示才能检查已部署的更改。
3. 对于新功能,我只是让Claude在功能标志后将代码直接推送到暂存或生产环境。这导致了回归问题,并且需要Claude访问特权数据进行测试,因此这不是一个好的解决方案。
我在考虑是否可以使用与每个工作树关联的本地虚拟机,但在深入研究之前,我想确认一下是否有现成的解决方案我没有意识到。
查看原文
I'm using Conductor and overall it's been a game changer for my productivity. The one hiccup is that their "Spotlight" feature, which is supposed to sync the worktree with my root and thus make testing locally possible, doesn't work reliably. Even if it did, it wouldn't be exactly what I need because I want each workstream to be able to test independently.<p>Three things I've tried so far, none of which are working well:<p>1. I used a Conductor setup script that runs my local dev setup in each worktree. This didn't work because of port collisions between docker containers.<p>2. I'm using terraform, so it was trivial to spin up a copy of my staging infra (with fewer resources) for every PR. This let each claude session in Conductor use Playright to test it's code. Two problems: first, this is pretty expensive ($2-5/per day/per pr). I'm pushing 20-30 prs a day, so this was costing me $XXX/month even with automated cleanups. Second, my deploy takes about 10-15 minutes, which isn't that long, but claude would often need to be re-prompted to check on the deployed changes.<p>3. For new features, I just had Claude yolo code to staging or prod behind feature flags. This caused regressions and requires that Claude have access to privileged data for testing, so not a great solution.<p>I'm thinking that something like local VMs tied to each worktree could make sense, but wanted to check if I'm just oblivious to an existing solution before diving into that.