René's URL Explorer Experiment


Title: fix(remote): avoid holding write handle on SSH evidence log on Windows by xiaoyumuxi · Pull Request #200 · Lithe-IDEA/Lithe-core-rust · GitHub

Open Graph Title: fix(remote): avoid holding write handle on SSH evidence log on Windows by xiaoyumuxi · Pull Request #200 · Lithe-IDEA/Lithe-core-rust

X Title: fix(remote): avoid holding write handle on SSH evidence log on Windows by xiaoyumuxi · Pull Request #200 · Lithe-IDEA/Lithe-core-rust

Description: Summary Fixes Windows SSH remote connections failing immediately at stage=connect with: Couldn't open logfile \AppData\Local\Temp\lithe-evidence-...\ssh.log: Broken pipe Root Cause Introduced in 289af38 (#189): Evidence::new() pre-created %TEMP%\lithe-evidence-\ssh.log with OpenOptions::new().read(true).write(true).create_new(true) and kept that writable File handle open while spawning ssh.exe -E . On Windows, Win32-OpenSSH's log_redirect_stderr_to opens the -E logfile without FILE_SHARE_WRITE. Because the parent process still held a writable handle on ssh.log, Windows rejected ssh.exe with ERROR_SHARING_VIOLATION (Win32 error 32), which MSVC CRT reports via strerror(32) as EPIPE (Broken pipe), causing ssh.exe to exit immediately with status 1. Changes rust/crates/workspace/src/ssh_evidence.rs: Pre-create ssh.log with owner-only permissions (create_new(true)) and immediately drop the write handle so ssh.exe is the sole writer. Open ssh.log read-only on demand in read_bounded for identity() and diagnostics() (on Windows, Rust defaults OpenOptions::new().read(true) to FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE). Add unit test evidence_reads_diagnostics_and_identity_written_by_another_handle. rust/crates/workspace/src/sessions.rs: Move Evidence into ConnectionTransport::Process and drop it in Connection::end_transport() after tree.terminate(EXIT_GRACE), so Windows can cleanly delete lithe-evidence-* after ssh.exe exits rather than failing cleanup while ssh.exe holds ssh.log open. rust/crates/git-host/src/authentication/windows.rs: Use O:{sid}D:P(A;OICI;GA;;;{sid}) for private_directory so files created inside the private directory (including ssh.log) inherit the owner-only protected DACL. rust/crates/platform-tests/tests/platform/permissions.rs: Add Windows platform test private_directory_evidence_log_allows_read_only_sharing_with_single_writer simulating a writer opening ssh.log with FILE_SHARE_READ only (no FILE_SHARE_WRITE) while the host reads concurrently. Verification cargo fmt --manifest-path rust/Cargo.toml --check — passed node scripts/rust-core/verify-platform-tests.mjs — passed (every test of 53 crates runs on a host CI tests it on) scripts/rust-core/verify-rust-core-comments.sh git-host workspace platform-tests — passed cargo test --manifest-path rust/Cargo.toml -p lithe-workspace -p lithe-git-host -p lithe-platform-tests — 136 passed, 0 failed (macOS) LIBSQLITE3_SYS_USE_PKG_CONFIG=1 cargo clippy --manifest-path rust/Cargo.toml -p lithe-workspace -p lithe-git-host -p lithe-platform-tests --all-targets --target x86_64-pc-windows-msvc -- -D warnings — passed Not run locally: Native Windows test execution (lithe-platform-tests on Windows) — no Windows VM on this macOS host; will run in Windows CI once marked ready.

Open Graph Description: Summary Fixes Windows SSH remote connections failing immediately at stage=connect with: Couldn't open logfile <HOME>\AppData\Local\Temp\lithe-evidence-...\ssh.log: Broken pipe Root Cause...

X Description: Summary Fixes Windows SSH remote connections failing immediately at stage=connect with: Couldn&#39;t open logfile &lt;HOME&gt;\AppData\Local\Temp\lithe-evidence-...\ssh.log: Broken pipe...

Opengraph URL: https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:74d591af-09f4-42fc-2fce-f637fb44ebb5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id808E:A618:59EA5:76C50:6B07314F
html-safe-nonce9ad7dbb78cd264991d21cf8ecbc7d4dc6c4668378d4e63b0706bfe3a9df24468
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDhFOkE2MTg6NTlFQTU6NzZDNTA6NkIwNzMxNEYiLCJ2aXNpdG9yX2lkIjoiMjM0MDUzNTkyNzE3MDM0NzM0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca18156252e4a73244fd073785ecec2850411fac79a0f41c7def125cfdb067459
hovercard-subject-tagpull_request:5487686818
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files
twitter:imagehttps://avatars.githubusercontent.com/u/145102356?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/145102356?s=400&v=4
og:image:altSummary Fixes Windows SSH remote connections failing immediately at stage=connect with: Couldn't open logfile <HOME>\AppData\Local\Temp\lithe-evidence-...\ssh.log: Broken pipe Root Cause...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None2a60952cad7efb2604ea85e500208f51c1ec1943aa260ac605c13eb46a1ed83b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/Lithe-IDEA/Lithe-core-rust git https://github.com/Lithe-IDEA/Lithe-core-rust.git
octolytics-dimension-user_id340144206
octolytics-dimension-user_loginLithe-IDEA
octolytics-dimension-repository_id1449354685
octolytics-dimension-repository_nwoLithe-IDEA/Lithe-core-rust
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1449354685
octolytics-dimension-repository_network_root_nwoLithe-IDEA/Lithe-core-rust
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release345c27626db08417fdfc84278a4415ae9a48d8f3
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FLithe-IDEA%2FLithe-core-rust%2Fpull%2F200%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FLithe-IDEA%2FLithe-core-rust%2Fpull%2F200%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=Lithe-IDEA%2FLithe-core-rust
Reloadhttps://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files
Reloadhttps://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files
Reloadhttps://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files
Lithe-IDEAhttps://github.com/Lithe-IDEA
Lithe-core-rusthttps://github.com/Lithe-IDEA/Lithe-core-rust
Codehttps://github.com/Lithe-IDEA/Lithe-core-rust
Issues1 (1)https://github.com/Lithe-IDEA/Lithe-core-rust/issues
Pull requests2 (2)https://github.com/Lithe-IDEA/Lithe-core-rust/pulls
Actionshttps://github.com/Lithe-IDEA/Lithe-core-rust/actions
Projectshttps://github.com/Lithe-IDEA/Lithe-core-rust/projects
Security and qualityhttps://github.com/Lithe-IDEA/Lithe-core-rust/security
Insightshttps://github.com/Lithe-IDEA/Lithe-core-rust/insights
Sign up for GitHub https://github.com/signup?return_to=%2FLithe-IDEA%2FLithe-core-rust%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FLithe-IDEA%2FLithe-core-rust%2Fissues%2Fnew%2Fchoose
xiaoyumuxihttps://github.com/xiaoyumuxi
mainhttps://github.com/Lithe-IDEA/Lithe-core-rust/tree/main
fix/windows-ssh-evidence-sharinghttps://github.com/Lithe-IDEA/Lithe-core-rust/tree/fix/windows-ssh-evidence-sharing
Conversation 0 https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200
Commits 1 https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/commits
Checks 15 https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/checks
Files changed https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files
Please reload this pagehttps://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files
fix(remote): avoid holding write handle on SSH evidence log on Windows https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#top
Show all changes 1 commit https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files
f8cbacd fix(remote): avoid holding write handle on SSH evidence log on Windows xiaoyumuxi Nov 25, 2026 https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/commits/f8cbacdc0e1c0310b2b1142fd660be6b4fc01b3b
Clear filters https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files
Please reload this pagehttps://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files
Please reload this pagehttps://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files
windows.rs https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-e86d22caa01a34dde01f60bda0b23fec35e4602a112bb8bbaa9a4659a7e5b97c
permissions.rs https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-670f48cb23d6de4665409f6e66575ac2149f3c53cdfe7fe853ba981fffe66c9a
sessions.rs https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
ssh_evidence.rs https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-82d17300d1da98fd9ff3c12416fbcb547f6ffb876ec49f2dbaebd6fd0a87800b
rust/crates/git-host/src/authentication/windows.rshttps://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-e86d22caa01a34dde01f60bda0b23fec35e4602a112bb8bbaa9a4659a7e5b97c
View file https://github.com/Lithe-IDEA/Lithe-core-rust/blob/f8cbacdc0e1c0310b2b1142fd660be6b4fc01b3b/rust/crates/git-host/src/authentication/windows.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/{{ revealButtonHref }}
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-e86d22caa01a34dde01f60bda0b23fec35e4602a112bb8bbaa9a4659a7e5b97c
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-e86d22caa01a34dde01f60bda0b23fec35e4602a112bb8bbaa9a4659a7e5b97c
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-e86d22caa01a34dde01f60bda0b23fec35e4602a112bb8bbaa9a4659a7e5b97c
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-e86d22caa01a34dde01f60bda0b23fec35e4602a112bb8bbaa9a4659a7e5b97c
rust/crates/platform-tests/tests/platform/permissions.rshttps://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-670f48cb23d6de4665409f6e66575ac2149f3c53cdfe7fe853ba981fffe66c9a
View file https://github.com/Lithe-IDEA/Lithe-core-rust/blob/f8cbacdc0e1c0310b2b1142fd660be6b4fc01b3b/rust/crates/platform-tests/tests/platform/permissions.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/{{ revealButtonHref }}
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-670f48cb23d6de4665409f6e66575ac2149f3c53cdfe7fe853ba981fffe66c9a
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-670f48cb23d6de4665409f6e66575ac2149f3c53cdfe7fe853ba981fffe66c9a
rust/crates/workspace/src/sessions.rshttps://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
View file https://github.com/Lithe-IDEA/Lithe-core-rust/blob/f8cbacdc0e1c0310b2b1142fd660be6b4fc01b3b/rust/crates/workspace/src/sessions.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/{{ revealButtonHref }}
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-0d0acf8bad5259d39627d135b6a9e4ce8440336194a08f3c7f7509e9c583db1a
rust/crates/workspace/src/ssh_evidence.rshttps://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-82d17300d1da98fd9ff3c12416fbcb547f6ffb876ec49f2dbaebd6fd0a87800b
View file https://github.com/Lithe-IDEA/Lithe-core-rust/blob/f8cbacdc0e1c0310b2b1142fd660be6b4fc01b3b/rust/crates/workspace/src/ssh_evidence.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/{{ revealButtonHref }}
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-82d17300d1da98fd9ff3c12416fbcb547f6ffb876ec49f2dbaebd6fd0a87800b
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-82d17300d1da98fd9ff3c12416fbcb547f6ffb876ec49f2dbaebd6fd0a87800b
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-82d17300d1da98fd9ff3c12416fbcb547f6ffb876ec49f2dbaebd6fd0a87800b
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-82d17300d1da98fd9ff3c12416fbcb547f6ffb876ec49f2dbaebd6fd0a87800b
https://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files#diff-82d17300d1da98fd9ff3c12416fbcb547f6ffb876ec49f2dbaebd6fd0a87800b
Please reload this pagehttps://github.com/Lithe-IDEA/Lithe-core-rust/pull/200/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.