GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(fleet): implement the SSH leg of the laptop-agent ladder (#10796) by dezren39 · Pull Request #12795 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Refs #10796

What this is

The SSH leg of the fleet binary's laptop-agent ladder — the last of the four legs (broker → Cloudflare → Tailscale → SSH) to land as real code. PR #11122 merged the domain with the SSH leg as a named stub; this PR replaces the stub in pkgs/fleet/crates/fleet-laptop-agent/src/legs.rs with the implementation that was proven live in the 2026-11-17 parity shift (forced-leg-down harness: health and exec answered by SSH after broker, Cloudflare, and Tailscale were made to fail; evidence recorded on #10796).

The SshLeg shells out to the laptop-ssh script with the Python client's fallback semantics: the request is flattened into a remote shell program (ssh_inner + sh_quote), job paths are validated through job_segment, replies are size-capped (cap_tail), and fetch payloads ride base64 (b64_decode). The leg reports Absent when the script is missing, so the ladder degrades exactly as it does for a missing broker socket.

Recovery fix (second commit)

The recovered commit 75ddb67ef carried the leg's tests and call sites but not the helper definitions they use — the crate did not compile (20 errors: json_reply, sh_quote, ssh_inner, query_u64, job_segment, cap_tail, b64_decode, find_subslice all undefined). Commit f1f3678ae restores that section verbatim from the proven staged implementation preserved in the parity shift's laptop worktree, reformatted with cargo fmt. No behaviour change beyond compiling as intended.

Verification (laptop, this branch)

  • cargo test -p fleet-laptop-agent (from pkgs/fleet): 24 passed, 0 failed — including the six SSH-leg tests: sh_quote_matches_shlex, ssh_inner_flattens_env_cwd_and_argv, b64_decode_round_trips_and_tolerates_noise, ssh_leg_is_absent_without_the_script, ssh_leg_carries_no_other_surfaces, ssh_health_answers_through_a_fake_script.
  • cargo fmt -p fleet-laptop-agent -- --check: clean.
  • Clippy: not run — the laptop's rustup has no clippy component configured (rustup could not choose a version of cargo-clippy), so CI is the first clippy run. This is a pre-existing laptop toolchain gap, unrelated to this change.

Scope / follow-ups

  • Refs, not Closes: fleet binary: implement the laptop-agent domain — automatic transport fallback (CF → Tailscale → SSH) + CF Access credential from fleet secrets; retire the Python client's routing #10796's acceptance also covers re-pointing ~/tools/laptop-agent.py + laptop-ssh.sh at the binary, which the issue's own plan sequences after a fleet build carrying this leg deploys. The fetch-upload decision is already recorded on the issue (no daemon upload route; parity covers the fetch direction).
  • Known follow-up, not in this slice: the ladder does not pin /jobs/sshfb-* routes to the SSH leg (sshfb- job routing gap).

Proof this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
dezren39 and others added 2 commits November 22, 2026 21:55
@dezren39
feat(fleet): implement the SSH leg of the laptop-agent ladder (#10796)
75ddb67
Replace the named SshLeg stub with the full leg, mirroring the Python
client's SSH fallback (code#2879): gate on LAPTOP_AGENT_NO_SSH_FALLBACK
and ~/tools/laptop-ssh-real.sh, run the daemon's request surface over
real SSH (health synthesised from /proc, exec/run/poll/kill/jobs with
sshfb- ids spooled under ~/.local/state/laptop-agent/sshfb-jobs/),
magic-line proof that the remote shell started, per-op timeouts
(exec timeout_s+15, poll 60s, others 30s), 1 MiB/stream tail cap, and
the process-group kill on local timeout.

The implementation recovers the staged, test-green SSH leg from the
2026-11-17 parity shift on PR #11122 (queue/20682-muse-send worktree),
which was never committed before that PR merged; the only change here
is a saturating_add for the exec timeout so an absurd timeout_s cannot
overflow. Other paths (incl. /file) stay Absent.

Refs #10796
@dezren39
fix(fleet): restore the SSH-leg helper section lost in the #10796 rec…
f1f3678
…overy

The recovered commit 75ddb67 carried the SshLeg tests and call sites
but not the helper definitions they use (job_segment, json_reply,
find_subslice, query_u64, cap_tail, sh_quote, ssh_inner, b64_decode),
so the crate did not compile. The definitions are restored verbatim
from the proven staged implementation preserved in the queue-20682
laptop worktree (live parity proofs recorded on #10796), reformatted
with cargo fmt. No behaviour change beyond compiling as intended.
@dezren39
dezren39 requested a review from a team as a code owner November 23, 2026 03:03
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 12 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fb78281f-92d0-4dc4-8d54-ab38a32c790f
Commits

Reviewing files that changed from the base of the PR and between f8e14e0 and f1f3678.

Files selected for processing: 1

  • pkgs/fleet/crates/fleet-laptop-agent/src/legs.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 23, 2026
fleet binary: implement the laptop-agent domain — automatic transport fallback (CF → Tailscale → SSH) + CF Access credential from fleet secrets; retire the Python client's routing #10796
Closed
@dezren39
dezren39 removed the request for review from a team November 23, 2026 05:56
@dezren39
dezren39 merged commit b8c35c0 into main Nov 24, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the xaltha/10796-ssh-leg branch November 24, 2026 00:26
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
This was referenced Nov 27, 2026
fleet-laptop-agent: pin sshfb job lifecycle requests to SSH #16083
Closed
Audit programme: seven-lane review of PRs, issues and designs (2026-11-23) #13871
Open
fleet-laptop-agent: route the Python client through the deployed binary #16088
Open
fleet: cut laptop-agent entrypoints over to the deployed binary #16089
Closed
@developing-today-fleet developing-today-fleet Bot added audit:partial PR partially implemented; gap filed audit:bug-filed Bug in merged diff filed labels Nov 27, 2026
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 27, 2026
fleet-laptop-agent: validate SSH fallback job IDs before shell interpolation #16122
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:bug-filed Bug in merged diff filed audit:partial PR partially implemented; gap filed

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

fleet binary: implement the laptop-agent domain — automatic transport fallback (CF → Tailscale → SSH) + CF Access credential from fleet secrets; retire the Python client's routing

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.