Skip to content

feat(dev): add kiloclaw-worker-tunnel for local wrangler dev checkin routing#1955

Open
evanjacobson wants to merge 6 commits intomainfrom
improvement/kiloclaw-worker-tunnel
Open

feat(dev): add kiloclaw-worker-tunnel for local wrangler dev checkin routing#1955
evanjacobson wants to merge 6 commits intomainfrom
improvement/kiloclaw-worker-tunnel

Conversation

@evanjacobson
Copy link
Copy Markdown
Contributor

@evanjacobson evanjacobson commented Apr 3, 2026

Summary

These changes extend the existing start-tunnel script & other kiloclaw dev infra to spin-up a second cloudflare tunnel for the worker, which adds a missing piece of infra (machine checkin) to the KiloClaw admin panel.

Reviewer Notes

  • This should work with both named and anon cloudflared tunnels

…routing

Adds a second named cloudflare tunnel (kiloclaw-worker) that routes
machine checkins to the local wrangler dev worker on port 8795.
Without this, checkins from Fly machines hit the production worker and
fail auth (403) because the gateway token secret differs between envs.
@evanjacobson evanjacobson self-assigned this Apr 3, 2026
@evanjacobson evanjacobson marked this pull request as ready for review April 3, 2026 06:02
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot bot commented Apr 3, 2026

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
dev/local/cli.ts 147 kiloclaw-worker-tunnel is started as a capture service but never awaited, so kiloclaw can boot with a stale or missing KILOCLAW_CHECKIN_URL.
Other Observations (not in diff)

No additional issues outside the current diff. The two previously reported dev/local/scripts/start-tunnel.ts warnings are resolved in the latest commit.

Files Reviewed (2 files)
  • dev/local/cli.ts - 1 issue
  • dev/local/scripts/start-tunnel.ts - previous warnings resolved

Fix these issues in Kilo Cloud


Reviewed by gpt-5.4-20260305 · 145,687 tokens

const captureServiceSet = new Set(['kiloclaw-tunnel', 'kiloclaw-stripe', 'app-builder-tunnel']);
const captureServiceSet = new Set([
'kiloclaw-tunnel',
'kiloclaw-worker-tunnel',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: kiloclaw-worker-tunnel is started as a capture service but never awaited

cmdUp only snapshots and waits for KILOCODE_API_BASE_URL, STRIPE_WEBHOOK_SECRET, and BUILDER_HOSTNAME. After adding kiloclaw-worker-tunnel here, the code still never waits for KILOCLAW_CHECKIN_URL to change, so kiloclaw can start before the worker tunnel writes its endpoint into kiloclaw/.dev.vars. On a fresh quick-tunnel startup that leaves the worker booting with a stale or missing check-in URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants