fix(tls): select certifi before macOS clients - #89254
Open
somewheresy wants to merge 1 commit into
Open
Conversation
somewheresy
marked this pull request as ready for review
August 18, 2026 15:36
somewheresy
force-pushed
the
justin/e-998-hermes-desktop-shows-no-models-for-actual-provider-urllib
branch
from
August 18, 2026 18:02
06d657f to
8c21293
Compare
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
SSL_CERT_FILEvalues and the existing non-macOS certificate search order.Motivation
Hermes Desktop could return no Actual models and fail Responses calls because startup selected Python's compiled
/private/etc/ssl/cert.pembefore certifi on macOS. That bundle could not validate the Actual relay certificate.Setting
SSL_CERT_FILEto the installed certifi path in.envproves the root cause, but that workaround embeds a username, install location, virtual-environment layout, and Python version. Hermes should select its installed bundle itself.Links
Approach
gateway.runintohermes_cli.ssl_certsso CLI and gateway entry points share one policy.SSL_CERT_FILEauthoritative and continue repairing stale paths.sys.platformor mutating private opener state.Local verification passed 24 focused regression tests on Python 3.11 and the four changed certificate tests on Python 3.13. A live Actual smoke test selected certifi, discovered 27 models through urllib, and completed a Responses request through OpenAI/httpx with
TLS_OK.Reviewer Focus
SSL_CERT_FILEremains authoritative.Failure Modes
SSL_CERT_FILEis logged, removed, and replaced through normal discovery.SSL_CERT_FILE, including a corporate CA bundle, is left unchanged.Breaking Changes
None.
Post-Merge Behavior
Merging triggers upstream CI and normal release processing only; it does not deploy Actual infrastructure. Source installs and the next Hermes release containing the merge automatically use certifi as the macOS process default. Downstream immutable pins, including Actual PR #3283, must be updated separately after this PR merges.
Diagrams
flowchart LR D[Hermes Desktop or CLI] --> E[Load profile dotenv] E --> S[Select process CA] S -->|valid SSL_CERT_FILE| C[Operator CA] S -->|macOS default| B[Installed certifi bundle] C --> U[urllib and httpx/OpenAI clients] B --> U U --> A[Actual models and Responses endpoints]