The environment-variable and secret-injection tests reused one
long-lived SSH shell, so a closed channel caused later checks to fail
with `EOF` and could allow scan-based assertions to pass without finding
a value. They now share only the SSH client and use a fresh,
deadline-bound session for each variable, isolating failures while
preserving environment-precedence coverage.
Closes https://linear.app/codercom/issue/PLAT-310.
Reviewed and updated by Coder Agents on behalf of @dylanhuff-at-coder.