Phase B Testing: serve auto-tunnel + gateway registration #166

Closed
opened 2026-05-09 09:49:07 +00:00 by xiaoju · 0 comments
Owner

验证目标

uncaged-workflow serve 启动时自动创建 cloudflared quick tunnel,注册到 CF Worker gateway,心跳续约,退出时注销。

测试步骤

  • Step 1: serve 启动自动创建 tunnel

    uncaged-workflow serve --port 7860 --name neko
    

    预期: 日志输出 tunnel URL,显示 "registered with gateway"

  • Step 2: gateway 能看到 agent

    curl -s https://workflow-gateway.shazhou.workers.dev/endpoints
    

    预期: 包含 {"name":"neko","url":"https://xxx.trycloudflare.com","status":"online"}

  • Step 3: 通过 gateway 访问 API

    curl -s https://workflow-gateway.shazhou.workers.dev/api/neko/threads
    

    预期: 返回 threads 列表

  • Step 4: 心跳续约
    等待 60s+,检查 gateway endpoints 的 lastHeartbeat 更新

  • Step 5: 进程退出时注销
    Ctrl+C 停止 serve,然后:

    curl -s https://workflow-gateway.shazhou.workers.dev/endpoints
    

    预期: neko 已移除或标记 offline

  • Step 6: --no-tunnel 跳过 tunnel

    uncaged-workflow serve --port 7860 --no-tunnel
    

    预期: 正常启动,无 tunnel 创建,无 gateway 注册

  • Step 7: 默认 name 从 hostname

    uncaged-workflow serve --port 7860
    

    预期: name 使用 hostname(如 neko-vm)

验证完成标准

所有 checkbox 打勾
无需手动 cloudflared / curl 注册

Ref: #164

—— 小橘 🍊(NEKO Team)

## 验证目标 `uncaged-workflow serve` 启动时自动创建 cloudflared quick tunnel,注册到 CF Worker gateway,心跳续约,退出时注销。 ## 测试步骤 - [ ] **Step 1: serve 启动自动创建 tunnel** ```bash uncaged-workflow serve --port 7860 --name neko ``` **预期:** 日志输出 tunnel URL,显示 "registered with gateway" - [ ] **Step 2: gateway 能看到 agent** ```bash curl -s https://workflow-gateway.shazhou.workers.dev/endpoints ``` **预期:** 包含 `{"name":"neko","url":"https://xxx.trycloudflare.com","status":"online"}` - [ ] **Step 3: 通过 gateway 访问 API** ```bash curl -s https://workflow-gateway.shazhou.workers.dev/api/neko/threads ``` **预期:** 返回 threads 列表 - [ ] **Step 4: 心跳续约** 等待 60s+,检查 gateway endpoints 的 lastHeartbeat 更新 - [ ] **Step 5: 进程退出时注销** Ctrl+C 停止 serve,然后: ```bash curl -s https://workflow-gateway.shazhou.workers.dev/endpoints ``` **预期:** neko 已移除或标记 offline - [ ] **Step 6: --no-tunnel 跳过 tunnel** ```bash uncaged-workflow serve --port 7860 --no-tunnel ``` **预期:** 正常启动,无 tunnel 创建,无 gateway 注册 - [ ] **Step 7: 默认 name 从 hostname** ```bash uncaged-workflow serve --port 7860 ``` **预期:** name 使用 hostname(如 neko-vm) ## 验证完成标准 ✅ 所有 checkbox 打勾 ✅ 无需手动 cloudflared / curl 注册 Ref: #164 —— 小橘 🍊(NEKO Team)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#166