Skip to content

Commit 025f405

Browse files
committed
fix: realign managed-tunnel design state with the 0.4.2 runtime
Point component:managed-tunnel at spawn_tunnel_supervisor and start_tailscale_funnel_once now that start_managed_tunnel is gone, and update the requirement, component, and acceptance wording from sequential provider fallback to the concurrent background model with per-tunnel self-healing. The send_imessage reference is intentionally left out: the cfg-gated duplicate definitions cannot resolve to a unique symbol.
1 parent 0d81a2a commit 025f405

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

.wcode/design/acceptance.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@
386386
- schema_version: 1
387387
id: AC-TUNNEL-001
388388
title: Managed tunnel selection supports free provider fallback
389-
statement: The default tunnel policy tries bounded free providers in deterministic order, explicit provider values remain stable, Cloudflare URLs exclude the API host, localhost.run and Pinggy public hosts are parsed without accepting provider control hosts, and a candidate is accepted only after the public health response matches the current wcode instance.
389+
statement: The default tunnel policy starts every provider concurrently and keeps each candidate only after the public health response matches the current wcode instance, explicit provider values remain stable, Cloudflare URLs exclude the API host, localhost.run and Pinggy public hosts are parsed without accepting provider control hosts, and Tailscale Funnel surfaces its enable URL when the tailnet has not enabled Funnel.
390390
verification:
391391
- kind: test
392392
path: src/runtime/tunnel.rs

.wcode/design/components.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,18 +612,22 @@
612612
name: Managed Public Tunnel Runtime
613613
responsibilities:
614614
- expose the local MCP runtime through temporary HTTPS providers without binding availability to one vendor
615-
- auto-fallback across Cloudflare Quick Tunnel, localhost.run and Pinggy when process startup, URL discovery or instance-matched health verification fails
615+
- start Cloudflare Quick Tunnel, localhost.run, Pinggy and Tailscale Funnel concurrently in the background so the dashboard never waits for a provider; retry unreachable providers on a fixed interval and keep every instance-health-verified tunnel live
616+
- respawn a single dead tunnel after an exponential backoff without restarting the process or disturbing live tunnels, promoting the next live tunnel when the primary endpoint dies
616617
- keep explicit provider selection and stable --public-url overrides available without weakening OAuth or local health verification
617618
- isolate provider lifecycle, dependency checks, URL parsing and health verification from the top-level process bootstrap
618619
depends_on:
619620
- component:mcp-runtime
620621
implementation:
621622
- kind: symbol
622623
path: src/runtime/tunnel.rs
623-
symbol: start_managed_tunnel
624+
symbol: spawn_tunnel_supervisor
624625
- kind: symbol
625626
path: src/runtime/tunnel.rs
626627
symbol: start_ssh_tunnel_once
627628
- kind: symbol
628629
path: src/runtime/tunnel.rs
629630
symbol: extract_ssh_tunnel_url
631+
- kind: symbol
632+
path: src/runtime/tunnel.rs
633+
symbol: start_tailscale_funnel_once

.wcode/design/requirements.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@
471471
- schema_version: 1
472472
id: REQ-TUNNEL-001
473473
title: Public tunnel availability is provider-resilient
474-
intent: Remote MCP startup must not depend on one tunnel vendor; wcode must support bounded automatic failover across free HTTPS tunnel providers while preserving exact instance health verification, explicit provider selection, OAuth and stable external reverse-proxy overrides.
474+
intent: Remote MCP startup must not depend on one tunnel vendor; wcode must start the free HTTPS tunnel providers and Tailscale Funnel concurrently in the background, keep every instance-health-verified tunnel live, and self-heal single-tunnel failures without a process restart, while preserving exact instance health verification, explicit provider selection, OAuth and stable external reverse-proxy overrides.
475475
priority: high
476476
implemented_by:
477477
- component:managed-tunnel

0 commit comments

Comments
 (0)