fix(sshconfig): change known_hosts under its own lock

Pinning or forgetting a VM's host keys takes known_hosts.lock (an OS file lock, paths.Dirs.KnownHostsLock), reads the file again inside it and writes it whole with state.WriteFile, so two devvms at once lose neither's pin. ForgetHostKeys takes its caller's ctx. TestHostKeyConcurrent holds two pins' reads until both have read; it fails on the unlocked code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
w3cjandClaude Opus 5.5 committed 2026-11-03 19:38:27 -07:00
1 parent 329e31be1d
commit c40f9bbf74
9 files changed
+155 -22

No files matched your search

+2
View File
@@ -90,6 +90,7 @@ images/X/record.json
images/locks
images/locks/X
known_hosts
known_hosts.lock
logs
logs/runs
logs/runs/X.log
@@ -157,6 +158,7 @@ images/X/record.json
images/locks
images/locks/X
known_hosts
known_hosts.lock
logs
logs/runs
logs/runs/X.log