fix(proof-vm-agent): install rustls provider at boot, drop aws-lc-rs (Architecte follow-up 1/4) - #248
Merged
Merged
Conversation
The KVM-host agent panicked at its first HTTPS listener when built from the workspace root (cargo build --workspace / --bin proof-vm-orchestrator): feature unification enabled both rustls providers (reqwest -> ring, axum-server tls-rustls -> aws-lc-rs) and rustls could not pick one. Install ring explicitly before any TLS config, switch axum-server to tls-rustls-no-provider so aws-lc-rs leaves the graph, add a boot smoke test (install twice + load a self-signed PEM pair), and document the build flags (glibc + musl) plus a no-KVM listen smoke in the runbook.
Contributor
Author
|
@greptileai please review CryptoProvider fix (Architecte GO conditionnel). |
Greptile SummaryThis change makes proof-vm-orchestrator TLS startup explicitly install rustls’s Confidence Score: 5/5Safe to merge. There are no outstanding findings. Reviews (2): Last reviewed commit: "fix(proof-vm-agent): install rustls prov..." | Re-trigger Greptile |
echobt
marked this pull request as ready for review
September 9, 2026 00:52
5 tasks
8 tasks
echobt
added a commit
that referenced
this pull request
Sep 9, 2026
* deploy: staging pins for 4252130 images.yml built GHCR digests on main then could not push the pin commit (GH013: PRs required + Greptile). Land the same promote via PR. Co-authored-by: Mathis <echobt@users.noreply.github.com> * fix(deploy): keep full prior staging release in previous Sequential promote.sh calls were snapshotting previous per service, so rollback of 4252130 would restore a mixed pin set. Capture the 1dd07f7 release once and write it back after the promote loop. Co-authored-by: Mathis <echobt@users.noreply.github.com> * deploy: staging pins for f013abb Retarget #245: main moved to #246. Digests from images run 34281980177. previous stays the full 1dd07f7 staging release. Co-authored-by: Mathis <echobt@users.noreply.github.com> * deploy: staging pins for 890ce5b Retarget #245: main moved to #247. Digests from images run 34286333214. previous stays the full 1dd07f7 staging release. Co-authored-by: Mathis <echobt@users.noreply.github.com> * deploy: staging pins for c0ce094 Retarget #245: main moved through #248/#252. Digests from images run 34297422117. previous stays the full 1dd07f7 staging release. Co-authored-by: Mathis <echobt@users.noreply.github.com> * deploy: staging pins for 85ab2b7 Retarget #245: main moved to #251. Digests from images run 34299348722. previous stays the full 1dd07f7 staging release. Co-authored-by: Mathis <echobt@users.noreply.github.com> * deploy: staging pins for e30d51d Retarget #245: main moved to #250. Digests from images run 34302039784. previous stays the full 1dd07f7 staging release. Co-authored-by: Mathis <echobt@users.noreply.github.com> * deploy: staging pins for a8b9018 Retarget #245: main moved to #253. Digests from images run 34373475123. previous stays the full 1dd07f7 staging release. Co-authored-by: Mathis <echobt@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Mathis <echobt@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Architecte / Owner follow-up 1 of 4 (CryptoProvider — agent boot stable) before Proof FC wires on prod. Fixes the
proof-vm-orchestratorboot panic that forced staging to keep a previously built binary; that workaround is retired.Root cause (reproduced locally, not guessed). rustls only auto-selects a
CryptoProviderwhen exactly one of itsring/aws-lc-rsfeatures is on. Cargo unifies features across every package selected for a build, socargo build --workspaceorcargo build --bin proof-vm-orchestratorfrom the workspace root (which resolves features over all members) compiled rustls with both: reqwest →ring,axum-server'stls-rustls→aws-lc-rs.RustlsConfig::from_pem_filethen panicked at the first HTTPS listener:Only a package-scoped
cargo build -p proof-vm-orchestrator-binhappened to work.Fix (
bins/proof-vm-orchestrator)install_crypto_provider(): installringexplicitly as the process-level provider before any TLS config exists; a repeat / pre-existing provider is a no-op, never a panic. Logged at boot:rustls crypto provider selected provider=ring installed_here=….axum-server→tls-rustls-no-provider+ a directrustlsdep onring.aws-lc-rs/aws-lc-sys(cmake + C toolchain) leave the binary's graph entirely, so every build shape now unifies to the same single provider and the musl build is a plaincargo build.tls_config()split out so the PEM → server-config step is unit-testable.crypto_provider_installs_once_and_tls_boots_from_pem: install twice,ServerConfig::builder()(the panic site), then load a self-signed PEM pair (rcgen, dev-dep only) into the server config.Docs (
docs/runbooks/proof-vm-orchestrator.md) — new § Build: exact flags for glibc and static musl (CC_x86_64_unknown_linux_musl=musl-gcc, becauseringlooks forx86_64-linux-musl-gcc), a no-KVM listen smoke to run beforeinstall, and the boot-log lines to expect; "apanickedline is a bug, never something to work around by keeping an older binary".No wire / protocol / env change. No digest anywhere. Lockfile:
rcgen+ its closure (dev-only);aws-lc-rsis no longer in any built graph (cargo tree --workspace -i aws-lc-rs→ none).How to verify
Verified here: the root
--binbuild reproduced the panic onmainand boots HTTPS on this branch (curl health → 200 with bearer, 401 without); glibc release and static-pie musl release both boot.Greptile
@greptileai reviewTest plan
cargo test --workspacecargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warnings,cargo deny check, xtaskloc-cap/consensus-lint/spec-check/design-check/external-docs-check(compose-matrix assertion needs docker; not touched by this PR)Risk
Deploy only: the host-installed agent binary. No miner CVM measurement, signature domain, or emission impact. TLS behaviour is unchanged except that boot no longer panics; the provider (
ring) is the one every other workspace binary already uses.Naming
I did not rename
BASE_*environment variables, deployed host paths(
/opt/base,/run/base, …), GHCRbaseintelligence/basepackage names, orbase-*-v1cryptographic domain tags, unless this PR’s purpose is a coordinatedcutover documented in
docs/NAMING.md.