mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-20 07:04:53 +00:00
The dedupe in startSession.cjs runs under `with(ctx)`, where ctx is wired with sshBridge.cjs's own local findDefaultPrivateKey / findAllDefaultPrivateKeys — not the sshAuthHelper.cjs copies. The characterization test targeted the helper's exports, which the connect path never calls (sshAuthHelper.findDefaultPrivateKey has no production consumers at all), so it gave false confidence and the in-code comment pointed at the wrong test. Expose the local pair as _findDefaultPrivateKey / _findAllDefaultPrivateKeys (matching the existing _-prefixed test-export convention) and retarget the test at them, so it actually guards the path the optimization depends on. Behavior is unchanged; the two local functions are verified equivalent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>