Skip to content

fix(fleet): remote dispatch is unreachable from sandbox seats (stale binary + TLS UnknownIssuer on direct GitHub API calls) #13122

Closed

Description

@dezren39

What

Remote build/test dispatch (fleet queue dispatch, fleet queue session, fleet shell --target actions) is landed on main and verified working end-to-end from the laptop on 2026-11-23 (proof runs below). It is not reachable from Muse sandbox seats today, for two independent reasons:

  1. The sandbox fleet binary predates the verbs. The sandbox seat's binary (source rev d26fa16, 2026-11-22 build) has no queue dispatch / queue session / queue surfaces verbs and its fleet shell targets knows only laptop/codespace/local — no actions target. A newer binary rollout to all seats was ordered 2026-11-23 and is tracked outside this issue; this issue is the sandbox-seat record of the gap.

  2. Direct GitHub API calls from the sandbox fail TLS validation. With the current sandbox binary, fleet dispatch-test scan fails immediately:

    fleet dispatch-test: GitHub API unreachable: io: invalid peer certificate: UnknownIssuer
    

    The sandbox's egress path presents a certificate the binary's TLS stack does not trust. Placement's capacity probes and the dispatch-test scan/submit path call the GitHub API directly (not through the queue broker), so updating the binary alone may not restore dispatch from sandbox seats — this needs a verified fix (system CA store use, or routing those calls through a trusted path) or a documented working route for sandbox seats.

Proof the server side works (from the laptop, 2026-11-23)

  • fleet queue dispatch --repo developing-today/code --ref main --command "echo fleet-dispatch-proof && git rev-parse HEAD" --dispatch --json → placement picked surface fleet-personal (dezren39/fleet) because the developing-today owner showed 62 active jobs vs cap 20 (0 free), dezren39 0 vs cap 40. Handle fp_30152cf76e232b2e0a3dc89cbc337323, run https://github.com/dezren39/fleet/actions/runs/45139454074 — completed/success; log shows the command output and the target HEAD.
  • fleet queue session result <handle> --json returned the full session record (actor: the developing-today GitHub App).
  • The same fleet-command.yml workflow dispatched raw via gh workflow run from the sandbox also completed/success (run 45139195957 in developing-today/fleet), so the workflow layer is reachable from the sandbox — only the fleet binary's own API path is not.

Acceptance

  • From a Muse sandbox seat, fleet queue dispatch --repo developing-today/code --command 'true' --dispatch --json returns a handle and the run completes; fleet queue session result reads it back.
  • fleet dispatch-test scan from a sandbox seat prints scope lines instead of the TLS error.
  • The agent runbook (pkgs/fleet/doc/agents/remote-build-and-test.md) names the working route for sandbox seats once fixed.

Notes

  • The local session store (~/.local/state/fleet-place/sessions.json) is a labeled stopgap; under multi-lane load a session read can answer "session store is locked by another fleet-place process; retry shortly" (observed once; retry succeeded). The designed agent.placement_sessions table removes this class.
  • Placement decision latency observed at ~4-5 minutes from invocation to run creation under heavy fleet load (capacity probes across owners). Not part of this issue's acceptance, recorded for visibility.

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Claim — Lane PU (archer), 2026-11-23. Taking #13122: the binary half is closed by the rollout (sandbox now runs fleet-static-b8bbcc0, verbs verified). The TLS half is still live — reproduced from this sandbox seat just now: fleet queue dispatch --dispatch fails with io: invalid peer certificate: UnknownIssuer.

    Diagnosis so far: the sandbox's ambient egress proxy (hatch-egress-proxy:3128) MITMs TLS with a "Hatch Sandbox Egress CA" whose cert is installed in the system CA store, so system-store clients (curl/openssl/gh) verify fine; the fleet binary's TLS stack does not read the system store, so it rejects the proxy's CA. The 127.0.0.1:3130 relay path is a plain CONNECT tunnel presenting the real GitHub certificate (verified with openssl: Sectigo issuer, verify ok).

    Working the fix/route now: test the full-proxy-override route (all proxy vars → the 3130 tunnel) against the issue's acceptance, and check whether the binary honors the system bundle via SSL_CERT_FILE; if a code fix is needed (native roots in the GitHub client), it lands via worktree + PR.

  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Fixed — Lane PU

    Root cause (verified first-hand): three ureq agents that call the GitHub API were built with ureq defaults, which trust only the bundled webpki roots. Sandbox seats reach GitHub through a TLS-intercepting egress proxy whose CA (Hatch Sandbox Egress CA) is in the platform store only, so every direct GitHub API call from a sandbox seat failed with invalid peer certificate: UnknownIssuer. The raw-minter path in fleet/src/gh.rs already carried the platform-verifier fix; the placement, broker, and dispatch-test agents did not. SSL_CERT_FILE does not help — ureq with webpki roots ignores it.

    Fix: PR #13173, merged as 17cc36e436f9b7303864d64a93b424adf0389d76 — the three agents (placement.rs RealGh, the shared queue_broker.rs agent, fleet-dispatch-test agent()) now build with RootCerts::PlatformVerifier, mirroring the gh.rs precedent, plus the platform-verifier ureq feature in both crates and a runbook section naming the sandbox-seat route.

    Verification:

    • cargo test -p fleet-dispatch-test — 23/23 pass; cargo test -p fleet-queue --features client,queue-broker — 542/542 pass (laptop worktree at the PR head).
    • Static build from the branch installed into the sandbox seat (fleet-static-3cb241a, sha256 c689a9006ea57e66fcaa7e5b283974e7a29f29e7a026e4522a67fab661035b04; the previous b8bbcc0 build remains beside it as the rollback copy).
    • Acceptance, from the sandbox with the ambient environment (no proxy overrides): fleet dispatch-test scan prints the fork-network scope lines; fleet queue dispatch --repo developing-today/code --command true --dispatch --json returned handle fp_c7ab5b8c7d2c4902d23423b83db8f6c7 and run 45156859137; fleet queue session result reads it back as succeeded.

    Note: the first remote-dispatch attempt at running the test suites landed on a runner container without cargo on PATH (exit 127 before any test ran) — the suites were run on the laptop instead. That runner-image gap is separate from this issue.

    Closing as completed.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions