Skip to content

fleet: queue dispatch fallback workflow-dispatch route fails with TLS UnknownIssuer in all proxy configurations #13324

Closed

Description

@dezren39

Symptom

fleet queue dispatch's fallback workflow-dispatch route fails with:

invalid peer certificate: UnknownIssuer

against the fleet-run.yml dispatches endpoint, in all proxy configurations tried.

Evidence (2026-11-23, repeated)

Workaround (proven)

Direct gh workflow run fleet-command.yml works. The 9111-02 lane already added the proven executor-container invocation to #13159 as comment 7101897957 (#13159 (comment)).

Relationship to #13159

#13159 covers a different dispatch defect (the fleet-command dispatch container cannot run nix develop out of the box — experimental features, nixbld group, homeless-shelter purity). This TLS failure is on the seat-side fallback workflow-dispatch route itself, before any workflow runs, so it is filed separately as a seat dispatch defect.

Ask

Diagnose why the seat's fleet queue dispatch fallback route presents / receives an untrusted certificate chain for the dispatches endpoint in every proxy configuration, and fix it so the fallback route works without the direct gh workflow run workaround.

Filed by lane felix, 2026-11-23, from the deferred-bookkeeping retry run.

Activity

  1. developing-today commented on Nov 23, 2026

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

    @dezren39
    MemberAuthor

    Lane felix picking up #13324. Root cause found: the dispatch path's ureq agent (RealGh in pkgs/fleet/crates/fleet-queue/src/placement.rs) uses ureq's default root store, which is webpki-roots only (ureq TlsConfig default RootCerts::WebPki) — it never consults the platform store or SSL_CERT_FILE, so the egress proxy's Hatch Sandbox Egress CA is unknown to it. The fleet crate's gh client already fixed this same failure in #8887 via RootCerts::PlatformVerifier; the queue path never got it. Fix in progress: mirror the #8887 shape in fleet-queue.

  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Verification record — lane felix, 2026-11-23: #13324 is the same defect as #13122, and the fix is already on main. It only still reproduces from this seat because the installed ~/tools/fleet is the stale pre-fix build (d26fa16).

    Fix of record: PR #13173 ("fix(fleet): GitHub API agents use the platform root store (code#13122)"), commit 3cb241a. RealGh in pkgs/fleet/crates/fleet-queue/src/placement.rs now builds its ureq agent with RootCerts::PlatformVerifier, and fleet-queue's ureq pin carries the platform-verifier feature — the same shape as the fleet gh client (#8887). The same pass covered the queue_broker and fleet-dispatch-test agents.

    Root cause, proven from this seat:

    • ureq's default TlsConfig root store is RootCerts::WebPki — webpki-roots only. It never consults the platform store or SSL_CERT_FILE.
    • This seat's egress goes through an intercepting proxy (HTTPS_PROXY=hatch-egress-proxy:3128). Via the proxy, api.github.com presents a cert issued by CN = Hatch Sandbox Egress CA (verified with curl); that CA is in the seat's sanctioned bundle (SSL_CERT_FILE=/run/hatch/egress-tls/ca-bundle.pem) but not in webpki-roots → UnknownIssuer.
    • Control test: with the proxy env cleared, the same stale binary gets the real Sectigo cert and its TLS succeeds (it then failed later on an unrelated stale-binary 422) — the failure is exactly {intercepting proxy} × {webpki-only roots}. gh works because Go reads SSL_CERT_FILE.

    Acceptance (this seat, ambient proxied environment, nothing cleared): fleet binary built from origin/main 9776461 in ~/workspace/issue-13324/wt:

    • Before (installed stale binary): repo-queue: github api POST /repos/developing-today-forks/fleet/actions/workflows/fleet-run.yml/dispatches: io: invalid peer certificate: UnknownIssuer
    • After (main-built binary): fleet queue dispatch --repo developing-today/code --ref main --command 'true' --dispatch --json succeeded — handle fp_69ce0d914611a73d9e72f440a99fcaef, run https://github.com/developing-today/fleet/actions/runs/45187889797 (in progress at check; session status reads back state=running).

    Remaining step: reinstall this seat's fleet binary from a main containing 3cb241a (Felix's install step), after which #13324 can close as a duplicate of #13122. No code change is needed — my branch carries no commits.

  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Closed as duplicate of #13122 — Felix, 2026-11-23. Root cause proven by my lane (record above): the dispatch HTTP client (ureq 3) defaulted to webpki-roots only and never consulted the platform store or SSL_CERT_FILE, so this seat's egress CA was unknown while gh (system roots) worked. The fix had already landed on main as PR #13173 (PlatformVerifier roots) under #13122. The remaining piece was this seat: I refreshed the installed ~/tools/fleet from the stale 2026-11-21 build (d26fa16) to a build of current main (9776461) and verified from this seat, ambient proxied env: fleet queue dispatch now succeeds end to end, and agent doctor reports all rungs healthy. Note: the installed build is a debug-profile build; it will be refreshed to a release build at the next seat bootstrap.

  5. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Correction to the closing note — Felix, 2026-11-23: the installed build is no longer the debug stopgap. The seat keeper briefly reverted the fix (its byte-compare reference build in ~/fleet-main was still the stale one), so I updated ~/fleet-main to current main, built the release binary there, and installed it byte-identical to the keeper reference. Verified after a keeper run: binary unchanged, fleet queue dispatch succeeds, doctor healthy. The seat is durably on the fixed build now.

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