Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkgs/fleet/crates/fleet-dispatch-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ serde = { workspace = true }
# the schema's column order, part of the output shape agents consume.
serde_json = { version = "1", features = ["preserve_order"] }
# Same pin as fleet-search / fleet-queue.
ureq = { version = "3", features = ["rustls", "json"] }
ureq = { version = "3", features = ["rustls", "json", "platform-verifier"] }
10 changes: 10 additions & 0 deletions pkgs/fleet/crates/fleet-dispatch-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,20 @@ fn resolve_named(config: &Config, name: &str) -> Result<SecretValue> {
}

fn agent() -> ureq::Agent {
// Platform root store, not webpki-roots alone: hosts
// behind a TLS-intercepting egress proxy present the
// proxy's CA, which only the platform store carries (the
// sandbox seat's scan died with UnknownIssuer before this
// — code#13122; same fix as fleet's gh.rs App leg).
ureq::Agent::config_builder()
.timeout_global(Some(Duration::from_secs(60)))
.timeout_connect(Some(Duration::from_secs(10)))
.http_status_as_error(false)
.tls_config(
ureq::tls::TlsConfig::builder()
.root_certs(ureq::tls::RootCerts::PlatformVerifier)
.build(),
)
.build()
.into()
}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/fleet/crates/fleet-queue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ serde_json = { version = "1", features = ["preserve_order"] }
tiny_http = { version = "0.12", optional = true }
# uds_http's bind lock (flock) — #6515.
libc = { version = "0.2", optional = true }
ureq = { version = "3", features = ["rustls", "json"], optional = true }
ureq = { version = "3", features = ["rustls", "json", "platform-verifier"], optional = true }
# The #8583 local coordination replica's durable store; bundled so
# the broker surfaces need no system SQLite (atlas-core pins the same
# stack). Only the queue-broker surface carries the replica.
Expand Down
10 changes: 10 additions & 0 deletions pkgs/fleet/crates/fleet-queue/src/placement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,19 @@ fn first_token(lookups: &[&dyn Fn() -> Option<String>]) -> Option<String> {

impl RealGh {
fn new() -> Self {
// Platform root store, not webpki-roots alone: hosts
// behind a TLS-intercepting egress proxy present the
// proxy's CA, which only the platform store carries (the
// sandbox seat's dispatch died with UnknownIssuer before
// this — code#13122; same fix as fleet's gh.rs App leg).
let agent: ureq::Agent = ureq::Agent::config_builder()
.http_status_as_error(false)
.timeout_global(Some(Duration::from_secs(60)))
.tls_config(
ureq::tls::TlsConfig::builder()
.root_certs(ureq::tls::RootCerts::PlatformVerifier)
.build(),
)
.build()
.into();
RealGh {
Expand Down
10 changes: 10 additions & 0 deletions pkgs/fleet/crates/fleet-queue/src/queue_broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -688,9 +688,19 @@ pub fn run() -> i32 {
}
};

// Platform root store, not webpki-roots alone: this agent
// carries the broker's GitHub dep-probe reads, and a broker
// running behind a TLS-intercepting egress proxy presents
// the proxy's CA, which only the platform store carries
// (code#13122; same fix as fleet's gh.rs App leg).
let agent: ureq::Agent = ureq::Agent::config_builder()
.http_status_as_error(false)
.timeout_global(Some(Duration::from_secs(90)))
.tls_config(
ureq::tls::TlsConfig::builder()
.root_certs(ureq::tls::RootCerts::PlatformVerifier)
.build(),
)
.build()
.into();
// Turso is the only queue backend: QUEUE_BROKER_BACKEND unset
Expand Down
6 changes: 6 additions & 0 deletions pkgs/fleet/doc/agents/remote-build-and-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ For a detached laptop command, add `--detach` and track the returned job ID with

Random `fp_...` handles and their records remain in `~/.local/state/fleet-place/sessions.json`. They work where that local store is available. For a follow-up from another agent or workspace, use the portable `OWNER/REPO#RUN_ID` identifier; Fleet resolves it through GitHub without the local session record. If dispatch has not correlated a run ID yet, keep using the local handle.

## Sandbox seats

Sandbox seats run the static `fleet` build (installed by `scripts/muse/bootstrap.sh`). Dispatch and `dispatch-test` call the GitHub API directly from the seat, and the binary validates TLS against the platform root store, so both work under the sandbox's TLS-intercepting egress proxy with the ambient environment — no proxy overrides needed.

On a binary old enough to predate the platform-verifier fix (code#13122), the same calls fail with `invalid peer certificate: UnknownIssuer`: that build trusted webpki roots only, and the egress proxy's CA is not among them. Do not conclude dispatch is unavailable from a sandbox seat on that error — update the binary (re-run `scripts/muse/bootstrap.sh` on a current checkout), or route every proxy variable (`HTTPS_PROXY`, `https_proxy`, `HTTP_PROXY`, `http_proxy`, `ALL_PROXY`, `all_proxy`) through the seat's plain-tunnel relay, `http://broker:broker@127.0.0.1:3130`, which presents the real GitHub certificate.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Provide an upgrade path that actually installs the TLS fix

For a sandbox seat encountering UnknownIssuer, rerunning the bootstrap script does not install this fix: scripts/muse/bootstrap.sh:43-44 still pins the pre-fix fleet-static-b8bbcc0 artifact, and lines 192-195 skip downloading altogether when the cached binary already supports bridge. Following the new recovery instructions therefore leaves dispatch broken. Document how to install a fixed artifact and replace the cached binary, or update the bootstrap's artifact pin and upgrade behavior alongside these instructions.

Useful? React with 👍 / 👎.


## Other dispatch routes

- **`fleet dispatch-test scan|submit|status`** — the explicit-dispatch route for work inside a fleet-umbrella submodule. `scan` lists the execution homes (dezren39/fleet and its fork network) with their live Actions load and picks the first with free capacity; `submit --submodule <name> --ref <ref> --commands '<cmds>'` stores the job in the fleet-dispatch Turso store and dispatches `fleet-dispatch-test.yml` there; `status <job-id>` reads the stored result. Linux, GitHub-hosted only; use it when the job is naturally "run inside submodule X at ref Y".
Expand Down