Design draft on branch design-tunnel-websockets-471 (platform-60, 2026-10-30): docs/superpowers/specs/2026-10-30-tunnel-websockets-design.md. Confirmed on dev: shop /up 200, an Action Cable handshake to /cable 502. Cause: the hub's tunnel is HTTP/2 and x/net's checkConnHeaders refuses any Upgrade header (fleet, forward and -tunnel rows share that transport). Recommended: carry the HTTP/1.1 upgrade unchanged inside one HTTP/2 stream (hub swaps Connection/Upgrade for a marker it scrubs from clients, the box's tunnelclient rebuilds the upgrade and hands its edge a hijackable writer); enforcement stays at the hub (CloseAccountUpgrades closes the real socket); cap 128 open upgrades per fleet box, pinned 250-stream limit, a bigger box connection window; old box or old hub = today's 502, so no release floor; zero bucket requests. Astra spec review R1 running. Side findings to file separately: fleet apps see the hub's IP as the client address; a rare X-Forwarded-Proto http after Dial's bufferedConn.
Fleet tunnel does not carry WebSocket upgrades (fleet apps behind the router) open
Found by fleet public routes Task 5 (#457 Phase 1a, platform-39, 2026-10-30): the hub edge's fleet tunnel client is HTTP/2 and rejects any request with an Upgrade header (http2: invalid Upgrade request header), so a WebSocket handshake to a fleet-placed app through the router gets 502 at the hub. Pre-existing for every fleet-placed route (hand rows included), not caused by Phase 1a. Impact: Rails apps using Action Cable (e.g. the rootfs sample examples/rails-shop with solid_cable) get no live updates at their public URL; plain HTTP works. Needs its own design: carry upgrades over the tunnel (HTTP/1.1 upgrade over the tunnel's stream, or RFC 8441 extended CONNECT), with the hub's single enforcement point (Task 5) and CloseAccountUpgrades on a real open socket. Phase 1a records it as a non-goal.
Spec rev 4 APPROVED by Paul 2026-10-30 (docs/superpowers/specs/2026-10-30-tunnel-websockets-design.md on design-tunnel-websockets-471, tip 7b9fbb4d; Astra R1 NOT READY, R2 NOT READY, R3 READY AFTER FIXES, P2s applied). Next: plan, Astra plan review, build (subagent-driven), release, live check Action Cable on shop. (platform-60)
#471 Task 10 live check on dev (2026-10-31): Steps 2 and 5 pass. Steps 3 and 4 are blocked: the dev account is awake-throttled, so the edge refuses every upgrade with 429.
All on v0.32.1 (box-1, dev console, CLI). Times UTC.
Step 2, ship. The sample at d937c467 was built on box-1 (podman, linux/arm64): build 32 s, save 22 s, tar sha256 6e7032b2.... carlos ship --rootfs shop.tar --processes processes.json --check on the box passed in 32 s: release 2.9 s, web answered GET / 200 after 3.3 s, worker still running after 5 s. The tmpfs failure from rootfs Task 11 did not come back. 04:09 carlos ship ... --app shop --version v4 (114.0MB, 16138 files), 04:10:19 carlos promote --app shop v4 edge, and at 04:11:20 /up answered 200 with x-carlos-version: v4.
Step 3, handshake: blocked. At 04:11:25, curl --http1.1 -i -N --max-time 10 to https://shop.bab.dev.oncarlos.com/cable with Origin set got HTTP/1.1 429 Too Many Requests, Retry-After: 60, body Too many requests. Try again in a moment. It was the same at 04:13:12, twice, after the 60 s. The CLI warns on every command: 4583 of 1500 awake hours this month. open live connections are closed. That matches planUpgradeAdmit in internal/edge/planthrottle.go: an awake-throttled account opens no upgrade, with a fixed Retry-After of 60, until the throttle ends at 2026-11-01T00:00Z. So this is plans 4c working as designed, not a #471 defect, but it means no socket can be opened on this account until then. Without the socket, this is all that could be checked: the page loads on v4, and POST /pings (with the form's token) returned 302 at 04:13:22. The counts went from 3 of 3 to 4 of 4 within 1.3 s, read by reloading the page, not from a broadcast.
Step 4, revocation: not run. No socket can be opened, so there would be nothing to watch close. cable was not created, so nothing is in the Trash.
Step 5, plain HTTP: pass. At 04:13:36, shop /up returned 200 with exactly one x-carlos-version (v4). railsdemo /up returned 200.
To finish Steps 3 and 4: rerun them after 2026-11-01T00:00Z, when the throttle ends, or on an account that is not throttled. Lifting the throttle by hand was outside this check's scope. The browser check of the page (P1-2) is still for Paul. Left in place: /root/t471 on box-1 (source, shop.tar) and the image localhost/shop:471, waiting for his call on teardown. shop now serves v4.
Heads-up from the design-console-protection-tab branch: three tests added with #471 race and fail under load (CI caught it on our merge of d937c467; they also fail 20/20 on main at -cpu=1 -count=20): TestRegistrationRacingARevocationIsNotPublished, TestOldBoxKeepsThe502, TestRegistrationRecordsCaps.
Cause: each test registers a box by hand, reads the 101 through a bufio.Reader, then hands the raw conn to tunnelclient.ServeWith. The hub writes the HTTP/2 preface and SETTINGS straight after the 101 (internal/edge/tunnel.go:218-224); when both arrive in one read the reader swallows the preface, the box's h2 server sees the SETTINGS ACK ("bogus greeting"), resets, and the hub answers 502. The real dialer avoids this with bufferedConn (internal/tunnelclient/tunnelclient.go:177-183).
Fix (test-only) is going in on design-console-protection-tab: hand the reader's buffered bytes to ServeWith, and drop the br.Buffered() != 0 assertion in TestRegistrationRecordsCaps, which encoded the race. It lands on main with that branch's squash. Shout if you'd rather fix it differently.
#471 Task 10, second pass (2026-10-31, dev on v0.32.2, bab's throttle lifted): Step 3 passes. Step 4 stopped because cable cannot boot without a store grant. Times UTC.
Step 3, handshake: pass. At 12:29:19, curl --http1.1 -i -N --max-time 10 to https://shop.bab.dev.oncarlos.com/cable (Origin set):
HTTP/1.1 101 Switching Protocols
Sec-Websocket-Protocol: actioncable-v1-json
X-Carlos-Version: v4
12:29:19.005 {"type":"welcome"}
12:29:21.978 {"type":"ping","message":1793449761}
12:29:24.979 {"type":"ping","message":1793449764}
12:29:27.979 {"type":"ping","message":1793449767}curl then stopped at its 10 s limit (exit 28). The pings came 3.00 s apart.
Step 3, the page's flow, scripted: pass. A stdlib Python client did what the page does:
12:30:00.781 GET / counts 4/4, form token read, cookie _rails_shop_session kept
12:30:00.886 101 on /cable (local port 51318), welcome, subscribe PingsChannel
12:30:00.907 confirm_subscription
12:30:01.083 POST /pings -> 302 (redirect not followed)
12:30:01.631 same socket: {"id":5,"done":5,"total":5} (0.55 s after the POST)
12:30:01.700 GET / counts 5/5Paul can still do the browser check himself.
Step 4, revocation: stopped before the socket. 12:30:35 apps create --app cable --place fleet/r10r, 12:30:44 SECRETKEYBASE set, 12:30:48 shipped the same tar as v1, 12:31:26 promoted it. The plan names the instance cable.bab.dev.oncarlos.com, which needed instances enable and instances create (12:31:40).
- On box-1 the release ran at 12:32:34, after one first try that missed the secret.
- At 12:32:56 web failed to boot:
Aws::Errors::MissingRegionError. The sample's Active Storage service needs the CARLOSSTORE* values, andcablehas no store grant. - Following the brief, I created no store, so no socket could be opened and no delete-to-close time was measured.
- To stop the crash loop I ran
carlos apps delete --account bab cableat 12:38:48. Box-1 removed the route at 12:38:52 (4 s) and the config at 12:38:55.cableis in the Trash until 2026-11-30.
To finish Step 4: either give cable a store, or set placeholder CARLOSSTORE* env values as ship --check does, then carlos apps restore cable and add the instance again (or use a new name). Both need a ruling.
#471 Task 10, Step 4 (revocation): pass. The socket closed 3.7 s after carlos apps delete. Dev is on v0.32.2. Times are UTC.
Per the ruling, cable was restored at 12:39:55 and given placeholder CARLOS_STORE_* values with carlos env set at 12:39:56. No store was created and nothing was granted. instances create answered "already exists", because the restore kept the instance record. The box still installed nothing: it logged "no build is installed for this instance yet", since it had forgotten the host at the first delete, and promoting v1 again did nothing. So I shipped the same tar as v2 and promoted it (12:42:16). The release finished at 12:43:40, and /up returned 200 with x-carlos-version: v2 at 12:44:04.
12:44:07.911 101, Sec-Websocket-Protocol: actioncable-v1-json, X-Carlos-Version: v2
12:44:07.920 {"type":"welcome"} -> subscribe PingsChannel
12:44:07.938 confirm_subscription
12:44:10.869 / 13.871 / 16.873 / 19.871 {"type":"ping",...}
12:44:17.392 carlos apps delete --account bab cable (returned 12:44:17.673, trashed)
12:44:21.087 socket closed: TCP EOF, no WebSocket close frameThe socket closed 3.7 s after the delete started, inside the 30 s target. The close came before the box stopped the instance: box-1 removed the config and stopped generation 6 at 12:44:23, and logged "hibernated" at 12:44:24. So the edge revoked the connection; the app process ending was not what closed it. cable is in the Trash until 2026-11-30.
Findings:
- Config delivery lagged the release. The first release try at 12:32:12 failed with "Missing secretkeybase", although
secrets setran at 12:30:44. The retry at 12:32:19 passed. - After restore, a fleet rootfs instance gets no build until a new promote, because the box forgot the host at delete. Promoting the same version again is "nothing to do". The restore message also says "NO routes", yet the instance record came back.
- Revocation closes the socket with no WebSocket close frame: the client sees only TCP EOF.