Address code-review feedback:
- Stat the absolute "/test.git/config" path (memfs can resolve
relative vs absolute lookups differently); matches the rest of
the package.
- Close the listener in startSSHServer cleanup as well as the
server, avoiding a listener leak if Cleanup fires before the
concurrent Serve registers the listener.
- Quote the key path in GIT_SSH_COMMAND so paths with spaces are
not mis-split when git execs ssh.
- Rename the TestGitServiceFor loop variable tc -> tt for
package-wide consistency.
Assisted-by: Claude Opus 4.8 via Claude Code
Add comprehensive SSH integration tests covering:
- push creates repo on demand and clone round-trips match HEAD
- push rejected when disabled, repo not created
- clone of missing repository fails
- receive-pack hooks fire asynchronously after push response
Tests drive a real git client over ssh:// against an in-process
SSH server backed by memfs, generating ephemeral ed25519 client
keys and bypassing host key checking for CI environments. Helpers:
gitSSHEnv() configures GIT_SSH_COMMAND and isolation env vars,
gitWithEnv() runs git with custom env (callers can inspect errors),
startSSHServer() creates an in-memory daemon on an ephemeral port.
Assisted-by: Claude Sonnet 4.6 via Claude Code