GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||
GeezerVison is showing github.com — Design + build: fleet connect — explicit transport selection, sessions, and drop semantics · Issue #10356 · developing-today/code Open Labels epic/fleet-orchestrationReprioritization program epic (2026-11-12)kind/designA design proposal (design-architect): multi-step, phased, decision-bearing DescriptionDesign + build:
|
| Path | Throughput |
|---|---|
| Sandbox → R2 staging (rclone crypt — the #50 backup design's road) | 2.50 MB/s ≈ 21 Mbps (53.7 s) |
| Sandbox → R2 raw (rclone, no crypt) | 0.97 MB/s ≈ 8 Mbps (138.9 s — variance dominates; crypt is not the bottleneck) |
| Sandbox → laptop (real SSH stdin push via tunnel proxy/DERP) | 0.37 MB/s ≈ 3.1 Mbps (362.1 s, content verified identical) |
| Laptop → sandbox (SSH pull) | 0.66 MB/s ≈ 5.5 Mbps (204.3 s) |
Findings that bear on this issue's design:
/files route (Design: fleet proxy get/put — file transfer over the agent channel #5759) or a fleet proxy raw splice removes SSH/cat framing losses — worth tens of percent — but cannot remove the hairpin. Expect a purpose-built pipe to land near the SSH numbers, not the R2 numbers. The R2-staging shape used by hatch-personal#50 exists precisely because two good roads (sandbox→edge, edge→laptop fiber) beat one relayed road.~/.cache/restic (1.3 GB measured, ~1.8 GB after repo reads), boundable via restic cache --cleanup / --cache-dir (restic 0.19.1).The report ends with the backup decision table — (A) laptop-run as designed, (B) stay on sandbox restic with a cache bound, (C) hybrid — each with a trigger-ready next step, for Drew's call.
Owner ruling — 2026-11-15 (Drew, main chat): stop using Tailscale for the sandbox↔laptop path. Rendezvous at Cloudflare instead.
Drew's words: "stop using tailscale. point the sandbox at cloudflare point laptop at cloudflare tunnel."
What this means for this design:
First step in flight: a throughput probe — cloudflared quick tunnel on the laptop, same 128 MiB file sandbox→laptop through Cloudflare, compared against the 3 Mbps relay baseline. Results will be posted as a follow-up comment here.
Full note: cloudflare-tunnel-probe-2026-11-15.md (sandbox workspace). Same 128 MiB test file as the 2026-11-14 baselines (SSH via Tailscale DERP 0.37 MB/s; R2 crypt staging 2.50 MB/s).
Verdict: split. The laptop/tunnel leg is proven fast; the sandbox-as-client leg cannot be measured with an account-less quick tunnel, because the sandbox has no direct internet egress — everything leaves through the platform's HTTP CONNECT proxy, and Cloudflare's web edge blocks that proxy's exit on trycloudflare.com hostnames.
Numbers:
--transfers 16 --s3-upload-concurrency 16 --s3-chunk-size 16M vs defaults, 2 runs each, order swapped): defaults 14.07 / 11.66 MB/s; parallel 4.54 / 10.43 MB/s. No consistent gain — variance dominates. Notably both settings ran 4–5× yesterday's 2.50 MB/s baseline: the R2 path is ~10–14 MB/s when the sandbox isn't saturated. Parallel multipart is not the lever; sandbox load is.Two things worth carrying forward:
lab-tunnel, pm-stack) are live on it today. The tunnel side of the ruling is proven infrastructure.Cleanup done: all quick tunnels/servers killed, test files deleted both sides, R2 probe objects purged, production tunnels and the Tailscale/laptop-agent setup untouched.
Named-tunnel rendezvous BUILT and MEASURED (2026-11-15) — the sandbox-as-client leg the quick-tunnel probe couldn't prove is now proven, on our own domain, with Access enforced. Cost: $0 (free-tier features).
Built: named tunnel sandbox-link (722f72ba-b27a-42a8-b06a-9b72ed2f8e8c) → hostname sandbox-link.security.cab (CNAME, proxied) → laptop http://localhost:18099. Zone note: the account tokens see exactly one zone, security.cab — developing-today.com is not in this Cloudflare account (this account holds the production tunnels amd-6-pm-stack + lab-cluster, untouched and verified healthy). Access application + service-token policy protect the hostname: no headers → 403, service-token headers → through. Connector on the laptop registered at msp01/ord07/ord14/ord08 (Minneapolis/Chicago, never NYC). Secrets stored in Bitwarden: cloudflare.tunnel.sandbox-link-token, cloudflare.access.sandbox-link-client-id/-secret.
Measurements (sandbox → platform proxy → CF edge → tunnel → laptop; 128 MiB random payload):
Left in place: tunnel + DNS + Access + running laptop connector (detached laptop-agent job — not yet a boot-persistent unit; Nix-route follow-up). Throwaway test server killed. Tailscale/laptop-agent untouched (migration, not hot-swap). Full account: ~/workspace/named-tunnel-build-2026-11-15.md
Drew's 2026-11-15 ruling ("stop using tailscale. point the sandbox at cloudflare point laptop at cloudflare tunnel") is now carried out for the fleet control path, not just probed:
Tunnel ingress — sandbox-link.security.cab now ingresses to the laptop-agent daemon at http://100.99.113.103:4799 (the daemon binds the tailnet IP only; the connector dials it locally, daemon untouched). The relay.security.cab → :3340 iroh-relay row was preserved. Access service-token policy unchanged. Wire-verified in layers: no Access headers → 403 · Access only → the daemon's own 401 (its X-Agent-Token auth is preserved end to end) · both → 200.
Durable connector — the detached cloudflared job is replaced by an enabled systemd user service running the production pattern (Nix cloudflared 2026.10.7, --protocol http2, metrics 127.0.0.1:20244, --token-file ~/.cloudflared-sandbox-link/tunnel.token), 4 edge connections. The Nix module that makes it switch-durable is merged: PR #10552 (nixos/services/sandbox-link-tunnel, mirroring lab-tunnel incl. the /ready watchdog; enabled for amd; verified by a full nix eval of the amd configuration resolving the exact ExecStart). It activates at the next switch — until then an interim user unit of the same name runs the connector and will be shadowed by the Nix unit when it lands. No switch was run.
Client — ~/tools/laptop-agent.py + ~/tools/laptop-agent-broker.py now prefer the Cloudflare path (HTTPS via the platform egress proxy, Access headers from a 0600 file by the agent token), with automatic Tailscale fallback on connection failure or edge 502/503/530. Every trip-log record now names its transport. A 105 s /exec was wire-proven over the tunnel (the classic ~100 s edge cap does not bite this path), so Cloudflare carries all normal requests; a 660 s safety valve remains.
Proof on the wire
cf.transport: ts); connector restarted → Cloudflare primary resumed on its own.Not moved (unchanged, still on Tailscale): real SSH (laptop-ssh.sh ProxyCommand) and the fleet binary's own proxy/serve path, plus the broker's 4800/4801 service ports (secrets/queue brokers are not ingressed on the tunnel). SSH-over-Cloudflare would need a websocket-capable ProxyCommand in the sandbox; named here so the remaining Tailscale surface is explicit, not silent.
Observed quirk (pre-existing, not transport): streaming a >1 MiB job spool via laptop-agent poll stops after the first 1 MiB chunk when the job is already done — chunked exec reads were used for the transfer proof instead.
Left-on-ground re-check (pass 2), task 17398, lane code-f / openchamber scheduled lane — 2026-11-16T12:20Z: the item is on the ground. Done.
Verified fresh against main and the wire (not against the packet):
f2fe6c9875 on main — fleet-proxy/src/tunnel.rs (+246), serve.rs (attempt plan / leg ordering), fleet-config (DEFAULT_CF_HOST = sandbox-link.security.cab), plus unit tests attempt_plan_puts_cloudflare_first_when_the_leg_is_in_play and attempt_plan_degrades_to_the_tailnet_plan.nixos/services/sandbox-link-tunnel module (merged earlier).laptop-agent exec calls sha256-identical both directions; fallback proven live (connector stopped → trips go transport: ts; restarted → cf resumes automatically).skipping) — no CI legs ran on it; the Rust unit tests were not re-executed in this 30-minute scheduled lane (heavy build), so the evidence is the merged-main commit plus the recorded wire proof, not a fresh local run.Still explicitly outside this item (unchanged, named in the 2026-11-15 note, not silently dropped): real SSH via ProxyCommand and the secrets/queue broker ports remain on Tailscale; fleet connect session/drop-semantics design from this issue body is separate scope and not claimed by this pass.
Drew directive (2026-11-16): the transport fallback belongs in the fleet binary itself. Recorded here because this is the transport design home.
State after today: the proxy-layer fallback (CF-primary / Tailscale-fallback) is already in the binary via PR #10577 (merged 2026-11-16T00:56:57Z, verified by the pass-2 re-check below). What still lives in the Python client is the laptop-agent exec/jobs surface itself — including this morning's automatic SSH-fallback patch and the Cloudflare Access credential fetch (moved into fleet secrets today as cloudflare.access-laptop-agent; Python interim landed in dezren39/hatch 84fbd0475).
The remaining build is filed as #10796: implement the binary's laptop-agent domain with the full automatic fallback ladder (CF → Tailscale → SSH, non-blocking) and the secrets-sourced CF Access credential, with parity proofs before the Python routing retires.
agent-note:v1
task: 22024
issue: #10356
lane: code-j
worker: repo-worker-code
origin: openchamber-scheduled-lane
state: done
stage: claimed -> verified -> complete
Triage verdict (fresh 2026-11-24): #10356 is OPEN with kind/design and epic/fleet-orchestration. Proxy-layer transport fallback (CF-primary, Tailscale-fallback) is already in the fleet binary via PR #10577 (merged 2026-11-16), as the issue's own 2026-11-16 note records.
Residual work: the laptop-agent exec/jobs surface and the Python client still carry the automatic SSH fallback and the Cloudflare Access path. Moving that into the binary is a build, not triage, and needs a scoped build packet with its own design sign-off. Routing that packet is left to the design owner; this lane changed no code.
Second-pass verify-and-route (oc-code-07, task 22782), state checked 2026-11-24.
Verdict: open design-and-build, partly landed. The sandbox-link tunnel is merged (#10552, 2026-11-15). The explicit transport selection, session and drop semantics for fleet connect are not yet built. This is a design-led build too large for a 45-minute slice, so it goes to a builder with the design settled first. Parked for routing. No code changed in this pass.
Claimed by lane 12, 2026-11-25T01:31Z. Writing the design-phase decision record for items 1–4 (method selection reconciled with the #13717 route-form matrix, the session model over daemon jobs, the stdin decision, and tmux), with the measured numbers already recorded in this issue in one table. Docs-only PR; no build in this pass.
Generated by Claude Code
Merge evidence: PR #14727 (docs(9432, 10356): AUTH-05 provenance and laptop connect decision records) was merged into main on 2026-11-26T06:12:46Z, merge commit efe85703914e20afd35a5ecf8c2228df3688955b, under the direct no-queue shepherd route (Drew's 2026-11-26 order; queue broker/laptop down).
The laptop-connect decision record for this issue's design phase (items 1-4) landed as doc/2026-11-25T01-24-42Z_design_10356_connect_methods_sessions_drop/ (+277 lines, docs-only). This issue stays OPEN: the record's build slices B1-B5 are the remainder, with the post-merge fanout already routed to #14932 per the 2026-11-25 second-pass note.
oc-code-08 routing update: merged design #14727 already produced B1–B5 issues #15419–#15423. B1–B4 are closed by merged PRs #15470, #15453, #15428 and #15616 respectively. Remaining B5 #15423 now has live queue coverage in repo-health-code-pilot task 24310 (read back as queued). B5 retains the remote-only measurement and no-estimates contract; B1–B4 dependencies are satisfied. Parent stays open until B5 finishes.
Triage recheck (oc-code-08, 2026-11-26): #10356 remains open pending B5. Verified B1–B4 closed by merged PRs as previously noted. B5 #15423 remains open; live task 24310 is currently parked in repo-health-code-pilot until 2026-11-27T22:08:46Z, waiting on #15651 closure and laptop reachability (not estimates). This corrects the prior routing note’s “queued” status; the parent verdict is unchanged. No code changed.
Agent note — small_fix triage (lane oc-code-02, task 25192)
State: partially landed; B5 remains actively routed.
Fresh evidence (checked 2026-11-27T00:18Z):
Refs #10356 to B5 so the parent relationship is machine-verifiable.Triage verdict: no new packet; parent stays open pending B5 measurement completion. No small fix applies; task 25192 completes as triaged.
Premise + ownership check (2026-11-26, all 17 comments read): #10356 is OPEN (kind/design, epic/fleet-orchestration), no held/user label, no Drew-decision gate on the remainder. But there is no unclaimed fleet-workable slice:
Verdict: parent stays open pending B5 under its existing coverage (task 24310). No new packet, no code changed. Task 25611 is parked on the same condition as 24310 (B5 completion), so this issue is not re-triaged in a loop.
Fresh re-verification (2026-11-27T05:42Z) confirms lane 2237-I's disposition minutes earlier (comment 7210524850) is unchanged:
fleet queue verify-disposition for this issue with follow-up task 24310 returned invalid_no_work (gate pass for a triage completion with follow-up). Task 25611 completes as triaged with follow-up 24310; parent stays open pending B5. No code changed, no duplicate packet filed.
Picked up by repo-worker-code — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code posts progress markers; after 30 minutes of silence any other worker may pick this up.)
Completed by repo-worker-code (outcome: done). Triaged: no new work; B1-B4 are complete and B5 #15423 remains under live parked task 24310 pending #15651 closure and laptop reachability. Existing newest issue note carries the same verdict; no duplicate triage note or code change.
Disposition: verdict invalid_no_work, checked_at 2026-11-27T05:54:34Z -- the record below passed the broker's offline disposition gate at completion time. The record's follow_up names task 24310: only the broker can check it against the queue, so it is recorded here UNCHECKED -- the broker runs check_successor_task on it when it returns.
{
"checked_at": "2026-11-27T05:54:34Z",
"source": "fleet gh readback",
"issue": {
"number": 10356,
"state": "open",
"state_reason": null,
"closed_at": null,
"closed_by": null
},
"pulls": [],
"verdict": "invalid_no_work",
"follow_up": {
"task_id": 24310,
"reason": "Parent issue remains open pending B5 #15423; live parked task 24310 covers it pending #15651 closure and laptop reachability. Existing newest note has the same verdict, so no duplicate issue comment."
}
}