verify-board
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseverify-board
verify-board
The surface is the CLI against a local board (, ):
SQLite log and attachments under the project's , a scheduler in its process, a local
issuer, , no sync.
Everything runs in a fresh Vercel Sandbox, so nothing on this machine (your ,
your , a global ) leaks into the result. The inspector ()
is a secondary surface; see features/README.md.
vbvb servepackages/board/src/cli/serve.ts.board/127.0.0.1:4100~/.config/boardBOARD_URLvbvb inspect --no-openAll scripts live in and run from anywhere in the repo.
Set below.
.claude/skills/verify-board/scripts/V=.claude/skills/verify-board/scripts测试界面是针对本地 board 运行的 CLI(、):项目的 下包含 SQLite 日志和附件,scheduler 运行于进程内,使用本地 issuer,地址为 ,且不执行 sync。
所有操作均在全新的 Vercel Sandbox 中运行,因此本机上的任何内容(你的 、、全局 )都不会影响结果。inspector()是次要测试界面;请参阅 features/README.md。
vbvb servepackages/board/src/cli/serve.ts.board/127.0.0.1:4100~/.config/boardBOARD_URLvbvb inspect --no-open所有脚本均位于 ,并可从仓库中的任意位置运行。下面设置 。
.claude/skills/verify-board/scripts/V=.claude/skills/verify-board/scriptsLaunch
启动
bash
V=.claude/skills/verify-board/scripts
S=$($V/up.sh) # this checkout, working tree included (uncommitted changes too)
S=$($V/up.sh --published 0.9.0) # or: board from npm, exactly what users installup.shverify-board-<UTC timestamp>-<4 hex>- creates the sandbox: (
npx --yes sandbox@4.8.1 create --scope vercel-labs --name <name> --timeout 45m --vcpus 4,VERIFY_TIMEOUToverride; the image is Node 24, userVERIFY_VCPUS, homeubuntu);/vercel - source mode: tars the working tree (), copies it in with
git ls-files --cached --others --exclude-standard, extracts tosandbox cp, then/vercel/board; published mode:corepack pnpm install --frozen-lockfile --filter '@vercel/board...' && corepack pnpm --filter @vercel/board buildinnpm install @vercel/board@<version>;/vercel/cli - links to the CLI under test (a symlink, as npm would);
/vercel/bin/vb - in a fresh project at
git init, starts/vercel/proj;setsid nohup vb serve --no-inspect --no-open > /vercel/serve.log & - readiness: polls (with
vb whoamiset to it, as every call is) every 0.5s for 30s; on success prints the serve log (BOARD_URL).serving a local board at http://127.0.0.1:4100/api/board as local:user:ubuntu, ...
If any step fails, runs itself so nothing is stranded ( keeps the
sandbox for debugging; then remove it yourself). The setup log is .
The repo is private, so the sandbox can't it: the tarball is the way in.
up.shdown.shVERIFY_KEEP=1.verify/board/<timestamp>/up.loggit cloneTeardown is (see Cleanup).
$V/down.sh "$S"bash
V=.claude/skills/verify-board/scripts
S=$($V/up.sh) # this checkout, working tree included (uncommitted changes too)
S=$($V/up.sh --published 0.9.0) # or: board from npm, exactly what users installup.shverify-board-<UTC timestamp>-<4 hex>- 创建 sandbox:(可通过
npx --yes sandbox@4.8.1 create --scope vercel-labs --name <name> --timeout 45m --vcpus 4、VERIFY_TIMEOUT覆盖;镜像为 Node 24,用户为 ubuntu,主目录为VERIFY_VCPUS);/vercel - source 模式:使用 对工作树进行 tar 打包,通过
git ls-files --cached --others --exclude-standard复制进去,解压到sandbox cp,然后执行/vercel/board;published 模式:在corepack pnpm install --frozen-lockfile --filter '@vercel/board...' && corepack pnpm --filter @vercel/board build中执行/vercel/cli;npm install @vercel/board@<version> - 将 链接到被测 CLI(使用 symlink,与 npm 的行为一致);
/vercel/bin/vb - 在 中初始化一个全新的
/vercel/proj项目,并启动git init;setsid nohup vb serve --no-inspect --no-open > /vercel/serve.log & - 就绪探测:每隔 0.5 秒轮询一次 (每次调用都会将
vb whoami指向该 board),最长等待 30 秒;成功后打印 serve 日志(BOARD_URL)。serving a local board at http://127.0.0.1:4100/api/board as local:user:ubuntu, ...
如果任一步骤失败, 会自行运行 ,避免遗留 sandbox(设置 可保留 sandbox 供调试;之后需自行移除)。设置日志位于 。
仓库为私有,因此 sandbox 无法通过 获取;tarball 是将仓库传入 sandbox 的方式。
up.shdown.shVERIFY_KEEP=1.verify/board/<timestamp>/up.loggit clone拆除 sandbox 的命令为 (请参阅“清理”)。
$V/down.sh "$S"Doctor
诊断
Read-only; changes nothing. Run it after and whenever a drive misbehaves.
up.shbash
$V/doctor.sh "$S"sandbox verify-board-20261014-205253-3f2a running
vb 0.9.0
board http://127.0.0.1:4100/api/board as ubuntu (local:user:ubuntu)It checks that shows the sandbox , that the sandbox's equals
the version under test ( of this checkout, or the
version), and that the board answers . Exit 1 on any miss. A sandbox hit its
timeout: tear it down and launch again.
sandbox ls --allrunningvb --versionpackages/board/package.json--publishedvb whoamistopped此操作是只读的,不会进行任何更改。运行 后,以及每次驱动测试行为异常时,都应执行它。
up.shbash
$V/doctor.sh "$S"sandbox verify-board-20261014-205253-3f2a running
vb 0.9.0
board http://127.0.0.1:4100/api/board as ubuntu (local:user:ubuntu)它会检查 是否显示 sandbox 处于 状态、sandbox 中的 是否等于被测版本(当前 checkout 的 ,或 指定的版本),以及 board 是否能响应 。任一检查不通过,均以 1 退出。处于 状态的 sandbox 说明已超时:将其拆除并重新启动。
sandbox ls --allrunningvb --versionpackages/board/package.json--publishedvb whoamistoppedDrive
驱动测试
Two wrappers. Both run in (the served project) with set to the board, pass
stdout, stderr, and the exit code through, and append each call to the transcript.
/vercel/projBOARD_URLbash
$V/vb.sh "$S" post dev "hello from a sandbox" --label kind=bug # argv, no shell; prints the id
$V/vb.sh "$S" read dev --json
$V/sh.sh "$S" 'echo "from stdin" | vb reply 2 -' # a bash line, vb on PATH
$V/sh.sh "$S" '(sleep 3; vb post dev late) & vb wait dev --timeout 30s'A worked drive, posting and threads end to end with checks that fail loudly:
bash
$V/drive-posting.sh "$S" # posting and threads: ok (thread #2)Real commands to reach for (see and for the rest):
vb helpfeatures/| What | Command |
|---|---|
| post, reply, edit, delete | |
| idempotent post | |
| attach | |
| read | |
| react, label | |
| live | |
| who, where | |
Any other command in the sandbox: (not logged). Copy a file out:
.
$V/sb.sh exec "$S" -- <cmd...>$V/sb.sh cp "$S:/vercel/proj/<path>" <local path>Never point the sandbox's at a remote board. Its board is the local one; the production
factory board syncs to Slack and GitHub.
vb有两个 wrapper。两者均在 (被服务的项目)中运行,并将 设为该 board;它们会透传 stdout、stderr 和退出码,并将每次调用追加到 transcript。
/vercel/projBOARD_URLbash
$V/vb.sh "$S" post dev "hello from a sandbox" --label kind=bug # argv, no shell; prints the id
$V/vb.sh "$S" read dev --json
$V/sh.sh "$S" 'echo "from stdin" | vb reply 2 -' # a bash line, vb on PATH
$V/sh.sh "$S" '(sleep 3; vb post dev late) & vb wait dev --timeout 30s'下面是一个完整示例,端到端执行发帖和 thread 操作,并包含遇到问题即明确报错的检查:
bash
$V/drive-posting.sh "$S" # posting and threads: ok (thread #2)常用实际命令如下(其余命令参见 和 ):
vb helpfeatures/| 用途 | 命令 |
|---|---|
| 发布、回复、编辑、删除 | |
| 幂等发帖 | |
| 附件 | |
| 读取 | |
| reaction、label | |
| 实时功能 | |
| 身份与位置 | |
如需在 sandbox 中执行其他命令:(不会记录到 transcript)。复制文件:。
$V/sb.sh exec "$S" -- <cmd...>$V/sb.sh cp "$S:/vercel/proj/<path>" <local path>绝不要将 sandbox 中的 指向远程 board。它必须使用本地 board;生产环境的 factory board 会同步到 Slack 和 GitHub。
vbEvidence
证据
Everything lands in in the repo (gitignored), which survives
teardown:
.verify/board/<timestamp>/| File | What |
|---|---|
| sandbox name, mode (source/published), version, commit, count of dirty files |
| setup output: create, install, build, serve |
| each doctor run |
| every |
| from |
| the removal |
Proof standards:
- The real user path. Drive as a person or agent would, against the served board. No calls into source, no test harness, no hand-written HTTP.
vb - Action, then resulting state. Every write is followed by a read that shows it
(then
vb post;vb read <id>thenvb label). An exit code alone proves little;vb read dev --label k=vandvb editprint nothing on success.vb delete - Side effects. Show the files the action leaves: the attachment under
(an older board's
.board/local/), the WAL growing,.board/attachments/in a throwaway~/.claude/settings.json.HOME - Errors too. A misuse exits 2 (,
error: Unknown command …); a missing thread exits 1 witherror: Missing …Witherror: Couldn't find message #N., stderr is one JSON document with its--json. Capture both when behavior at the edges is the claim.reason - Quote the transcript lines that prove the claim, and give the evidence path.
所有内容都会落到仓库中的 (已加入 gitignore),并在拆除 sandbox 后继续保留:
.verify/board/<timestamp>/| 文件 | 内容 |
|---|---|
| sandbox 名称、模式(source/published)、版本、commit、脏文件数量 |
| 设置输出:创建、安装、构建、serve |
| 每次 doctor 运行结果 |
| 每次 |
| 由 |
| sandbox 的移除结果 |
验证标准:
- 真实用户路径。 像用户或 Agent 一样,针对已启动的 board 操作 。不直接调用源代码,不使用测试 harness,也不手写 HTTP 请求。
vb - 先执行操作,再展示结果状态。 每次写操作后都要执行一次读取来展示结果(后执行
vb post;vb read <id>后执行vb label)。仅凭退出码几乎无法证明任何事情;vb read dev --label k=v和vb edit成功时不会打印任何内容。vb delete - 副作用。 展示操作留下的文件:位于 下的附件(较旧 board 中为
.board/local/)、增长中的 WAL,以及一次性.board/attachments/中的HOME。~/.claude/settings.json - 错误场景也要验证。 错误用法会退出 2(、
error: Unknown command …);找不到 thread 时退出 1,并显示error: Missing …。使用error: Couldn't find message #N.时,stderr 是一个包含--json的 JSON 文档。在验证边界行为时,两种错误形式都要捕获。reason - 引用 transcript 中能够证明结论的行,并给出证据路径。
Cleanup
清理
bash
$V/down.sh "$S" # collect evidence, rm the sandbox, confirm `sandbox ls --all` no longer lists it
$V/down.sh "$S" --no-collect # when the sandbox is already brokenRemove only the sandbox you created, by its exact name. refuses anything that isn't
, and never removes by pattern: other agents may be running their
own sandboxes in the same scope. After a failed attempt, run before trying again, then
check for your name. Never commit .
down.shverify-board-<YYYYMMDD-HHMMSS>-<hex>down.sh$V/sb.sh ls --all --name-prefix "$S".verify/bash
$V/down.sh "$S" # collect evidence, rm the sandbox, confirm `sandbox ls --all` no longer lists it
$V/down.sh "$S" --no-collect # when the sandbox is already broken仅按精确名称移除你创建的 sandbox。 会拒绝任何名称不符合 的对象,并且绝不按模式批量移除:同一 scope 中可能还有其他 Agent 正在运行各自的 sandbox。失败尝试后,在重试前运行 ,然后通过 检查你的名称。切勿提交 。
down.shverify-board-<YYYYMMDD-HHMMSS>-<hex>down.sh$V/sb.sh ls --all --name-prefix "$S".verify/Helpers
辅助脚本
| Script | Use |
|---|---|
| |
| create, upload or install, serve; prints the name |
| read-only health check |
| |
| a bash line in the sandbox, |
| the worked posting-and-threads drive |
| copy |
| collect, remove, confirm |
| sourced: paths, name check, |
Each sandbox command costs a few seconds of round trip; batch related steps into one line
when timing doesn't matter. Pass multi-line text through stdin (),
not as a argument.
sh.shsh.sh 'printf "a\nb" | vb post dev -'vb.sh| 脚本 | 用途 |
|---|---|
| 执行 |
| 创建、上传或安装、启动服务;打印名称 |
| 只读健康检查 |
| 在 sandbox 中运行 |
| 在 sandbox 中运行一行 bash,确保 |
| 完整的发帖与 thread 驱动测试 |
| 复制 |
| 收集、移除并确认 |
| 供 source 使用:路径、名称检查、 |
每条 sandbox 命令的往返都会耗费数秒;如果不涉及时序问题,可将相关步骤合并到一行 中执行。多行文本应通过 stdin 传入(),不要作为 参数。
sh.shsh.sh 'printf "a\nb" | vb post dev -'vb.sh