Skip to content

fix(backend): isolate SSL key logging from bundled Windows runtime - #194

Merged
zouyonghe merged 1 commit into
mainfrom
codex/fix-windows-sslkeylog
Nov 14, 2026
Merged

zouyonghe merged 1 commit into
mainfrom
codex/fix-windows-sslkeylog

Conversation

@zouyonghe

@zouyonghe zouyonghe commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Problem

Closes #193.

The bundled Windows Python/OpenSSL runtime can abort with OPENSSL_Uplink(...): no OPENSSL_Applink when SSLKEYLOGFILE is inherited, causing the backend to exit before the dashboard becomes reachable. The reporter confirmed that removing the variable restores startup.

Changes

  • Remove SSLKEYLOGFILE from the bundled Windows backend child through the existing packaged-Python environment sanitizer. Existing logging records only the variable name.
  • Preserve the user's process/system environment, custom backend commands, and non-Windows backend behavior. TLS key logging is disabled for the bundled Windows backend child as a compatibility workaround.
  • Add a platform-policy regression test and document the scope, log message, and a process-local PowerShell workaround for older releases.

Validation

  • macOS aarch64-apple-darwin, rustc/cargo 1.93.1: cargo test --manifest-path src-tauri/Cargo.toml --locked -- --nocapture — 215 passed, 0 failed (baseline: 214 passed).
  • cargo clippy --manifest-path src-tauri/Cargo.toml --locked --all-targets -- -D warnings — passed.
  • cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check — passed.
  • git diff --check — passed.
  • The source-exact sanitizer and new regression test type-checked in isolation for x86_64-pc-windows-msvc using rustc --test --emit=metadata.

Native Windows execution and the release-installer crash were not reproduced locally. The macOS test exercises the preservation branch; the Windows removal assertion requires a Windows run. This PR uses the reported process-local workaround without upgrading the packaged runtime or changing SSL context/CA handling.

Summary by Sourcery

Prevent inherited SSL key logging settings from aborting the bundled Windows backend during startup.

Bug Fixes:

  • Prevent the bundled Windows backend from crashing at startup when an inherited SSLKEYLOGFILE is incompatible with its OpenSSL runtime.

Enhancements:

  • Apply the SSL key logging isolation only to the bundled Windows backend while preserving user and system environments, custom commands, and non-Windows behavior.

Documentation:

  • Document the Windows SSL key logging limitation, diagnostic logging, and a process-local PowerShell workaround for affected older releases.

Tests:

  • Add regression coverage for the platform-specific SSLKEYLOGFILE sanitization policy.

@sourcery-ai

sourcery-ai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Linked issues

Checked at commit da1be38

#193 [Doc] OPENSSL_Uplink(xxx,08): no OPENSSL_Applink的一个排查思路 · 1 of 2 met · 1 to check by hand

# Requirement Status Notes
1 Start normally when SSLKEYLOGFILE is set in the environment. 👀 Check by hand (runtime) Verify on Windows that the bundled backend starts and becomes reachable when launched with SSLKEYLOGFILE inherited; the change removes it from the packaged child, but the reported runtime failure was not reproduced locally.
2 Provide a troubleshooting approach for others encountering this startup failure. ✅ Met The environment-variable documentation explains the symptoms and provides a process-local PowerShell workaround for older releases.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@zouyonghe
zouyonghe merged commit 954bcc8 into main Nov 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Doc] OPENSSL_Uplink(xxx,08): no OPENSSL_Applink的一个排查思路

1 participant