Skip to content

fix(bashkit-eval): make rustls provider init idempotent#1619

Merged
chaliy merged 2 commits intomainfrom
2026-05-09-propose-fix-for-rustls-provider-issue
May 9, 2026
Merged

fix(bashkit-eval): make rustls provider init idempotent#1619
chaliy merged 2 commits intomainfrom
2026-05-09-propose-fix-for-rustls-provider-issue

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented May 9, 2026

Motivation

  • ensure_rustls_crypto_provider() previously cached any install_default() error in a OnceLock, which breaks callers when a rustls provider was already installed (benign second-install case).

Description

  • Update ensure_rustls_crypto_provider() to treat install_default() failing as success when CryptoProvider::get_default() is already Some, preserving idempotence while keeping OnceLock memoization.
  • Preserve original failure semantics for real install errors.
  • Add a unit test ensure_rustls_provider_succeeds_when_already_installed that pre-installs the ring provider and asserts the helper returns Ok(()).

Testing

  • Ran cargo test -p bashkit-eval provider::tests::ensure_rustls_provider_succeeds_when_already_installed and the test passed.
  • Built and ran the bashkit-eval package tests as part of the run; targeted regression test succeeded.

Codex Task

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 9, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit 71d4fcd Commit Preview URL May 09 2026, 09:19 AM

@chaliy chaliy force-pushed the 2026-05-09-propose-fix-for-rustls-provider-issue branch from c0b9c25 to 71d4fcd Compare May 9, 2026 09:19
@chaliy chaliy merged commit 03e183a into main May 9, 2026
16 checks passed
@chaliy chaliy deleted the 2026-05-09-propose-fix-for-rustls-provider-issue branch May 9, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant