mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 00:02:23 +00:00
`feat(ssh): probe ~/.ssh default identity keys (#507)` refactored the same function #486 changes, so the passphrase self-heal is re-expressed in the new shape rather than bolted back on. Main split the decode step out of `try_identity_file` into `load_identity(contents, raw_path, source, cached) -> IdentityLoad`, keyed on a new `KeySource`: an explicit key's failures are said aloud and may ask for a passphrase, a discovered `~/.ssh` default's are silent, because russh can only try an encrypted key by signing and a prompt for a key nobody asked for is a prompt the server may not even want. #486's retry now lives in that matrix. `IdentityLoad::NeedsPassphrase` carries a `rejected` flag, and an explicit key whose *cached* passphrase does not open the file returns `NeedsPassphrase { rejected: true }` instead of `Unusable` — one prompt path serves both ways of getting there, the typed answer still gets its attempt, and a typed answer that fails is the hard failure it always was, via `round.unusable`. A discovered key keeps skipping in silence whether its cached passphrase is missing or stale: the self-heal must not turn one stale `~/.ssh` keychain entry into a sheet on every connection, so only explicit keys drive it. `no_discovered_key_ever_asks_for_a_passphrase` pins that seam.